Hot answers tagged approach
5
Movement in games is usually approached as constantly changing states, rather than functions. Programming requires a different approach to math than teached in school because it often requires iterative approaches.
Character::Update()
{
[...]
onGround = [... has the character ground under his feets? ...];
dt = [... time difference between now and the ...
4
If you're looking to have not a lot of water move over a terrain, then your best bet will likely be some form of Smoothed Particle Hydrodynamics (or SPH). In this formulation, you simulate a set of particles as they adhere to the laws of hydrodynamics (namely, the Navier-Stokes equations). There is a great series of articles written about this from Intel:
...
1
It depends on your needs, but mostly it is a good idea to implement it as it implemented in real life: by physics! =) You can use 3rd party libraries or write your own stuff. AFAIK most popular lib now is Bullet.
If you don't need all of this, just implement mass, jumping force, gravity force and use Newton laws to calculate position (so your objects will ...
Only top voted, non community-wiki answers of a minimum length are eligible