|
Gravity
Sept 15, 2018 20:38:52 GMT -5
Post by Mark Dunham on Sept 15, 2018 20:38:52 GMT -5
Does anyone have a simple of example of gravity for a side scroller style game? Or if you know of a great resource to get me started. Any help is greatly appreciated.
|
|
|
Post by Rod on Sept 16, 2018 14:04:09 GMT -5
The concept is about adding a small negative (+) amount to the vertical delta. So it starts out with a vertical delta of say -1 which gets eroded frame by frame by a negative (+) amount, gravity. So altering the upward movement to an increasing downward movement. -1 soon turns into 0 or +1 or even +2 and so the sprite plummets to the floor. libertybasiccom.proboards.com/thread/170/gorilla-defenderThe bananas fall in this code.
|
|