Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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
4  
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
add comment

2 Answers 2

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
add comment

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
add comment

Your Answer

 
discard

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.