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?
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
|
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. |
|||
|
|
|
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. |
|||
|
|
