1

Here is my pool game engine done in Box2dFlash.

I would like to make this simulation more realistic as I received mixed opinion from pool experts.

Here is my standard wall setting:

var leftWall = _sim.addBox({x:0.9, y:8.15, width: 0.6, height: 11.5, density: 0, fillAlpha: wallAlpha, lineAlpha: wallAlpha});

And of the ball:

_solidBall_7 = _sim.addCircle({x:ballPosX - (ballRadius * 5) - 0.8, y:ballPosY, radius:ballRadius, density: 0.1, linearDamping: 1, isBullet: true, restitution: 0.7, angularDamping: 5, skin: Solid_Bordo});

What other params I might try to improve the realistic movement of the pool game?

unwind
  • 391,730
  • 64
  • 469
  • 606
mirzahat
  • 1,025
  • 2
  • 10
  • 19

1 Answers1

1

Nice work. Looks good.

To make the game mote realistic I would ...

  • Animate the balls (spinning, hitting the pockets)
  • Add sounds (hit ball, hit walls, hit pocket)
  • Add shadows (adds a 3d feel)
  • The balls should be beneath (masked out) by the walls
  • Look over the physics parameters
Mattias
  • 3,907
  • 4
  • 28
  • 50
  • Thanks Mattias, actually Im not so interested in sounds and animations now...I received some critique from real billiard players saying that the angles are "not quite correct", so final question: is the game fun, is it playable? – mirzahat Dec 15 '10 at 09:03
  • I agree with Mattias, there is something a bit odd with the physics. I think you need to greatly reduce the friction because the balls do not roll enough. This also seems to affect the torque as if I hit the ball on the edge it is hard to make it spin. From a gameplay aspect, it takes quite a while from when it appears that there is nothing happening (after a shot) before the balls sleep. Perhaps add a function to loop through and detect the current speed of the ball and if below a threshold make it sleep so I do not have to wait. Looks good otherwise. – Allan Dec 15 '10 at 09:20