Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to make a game with a static scene and balls that can bounce on it? What is used for this, generally? Physics engines? Even if this is a simplistic example?

share|improve this question
I think this would be an good question if you elaborated more on what you are trying to accomplish. – tyjkenn Mar 9 '12 at 5:00
up vote 2 down vote accepted

The easiest way would to be use a physics engine. Box2D has been ported to nearly every popular language. However, its impossible to make a more specific suggestion as you provide no contextual information.

share|improve this answer

The simplest way would be good if the static scene only has straight walls and flat ground. All you would have to do is multiply one of its components speeds by -1. If it collides with a wall, this would be the x component. If it is the ceiling or floor, this would be the y component. If you want to add in friction, multiply instead by -.7 or something similar.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.