2

I'm new to XNA and game programming.

I'm creating a 2D billiard game and I want to add balls with realistic movement (like 3D). Is it possible to achieve this without using 3D models? I only want to use 2D. Please give me examples.

House
  • 73,224
  • 17
  • 184
  • 273
Vano Maisuradze
  • 123
  • 1
  • 6
  • http://gamedev.stackexchange.com/questions/7862/is-there-an-algorithm-for-a-pool-game – Tetrad Feb 03 '12 at 21:57
  • 1
    I'm not asking about collision. I want to move balls as 3D models. See this game http://www.miniclip.com/games/8-ball-pool-multiplayer/en/ – Vano Maisuradze Feb 03 '12 at 22:06
  • Why is 3D mentioned at all? What precisely does "realistic movement" mean here? – Anko Apr 27 '15 at 13:24

2 Answers2

2

I think you are asking how they perform the faux-3d effect on the billiard balls, and is it "real" 3d models or not. I'm not entirely sure what technique they used, but I don't think that its "real" 3d.

I would guess that its a distortion of a stereographic projection of a billiard ball. There is an example here that talks about the distortion technique in flash, but still uses an underlying 3D model to "drape" the texture onto. And another example here that talks about using another pixel bender to create the faux 3d sphere effect, similar to something like this.

Now, Adobe Pixel Benders are functionally equivalent to pixel or fragment shaders. So you should be able to use the references here to do something similar to a sprite in XNA.

J. Holmes
  • 431
  • 3
  • 4
1

I'm creating 2D billiard game and I want to add balls with realistic movement (like 3D).

Do you just want the ball to slow down due to friction? Do you want the queue to be able to knock it up into the air? Do you want to know what happens when the ball hits a well? Or do you want to know what happens when two balls collide? The word moment is too vague for us to really help you without guessing your needs.

That being said check out this link and this link should cover everything :)

ClassicThunder
  • 8,383
  • 35
  • 49