by DevelopmentTeam » Tue Aug 16, 2011 4:48 am
The simplest way to simulate physics for objects...
All objects will have (int) x, y, (float) forcex, forcey
Calculations for each frame:
object[i].x += forcex;
object[i].y += forcey;
object[i].forcex -= 0.5; (you can alter this 0.5 to your preference)
object[i].forcey -= 0.5; (you can alter this 0.5 to your preference)
object[i].y -= gravity; (Tune this gravity to make it look realistic)