Posted 10 October 2006 - 12:25 AM
Posted 10 October 2006 - 01:52 AM
Posted 13 October 2006 - 06:52 AM
1. Take the laptop
2. Open the window
3. Jump out
Voila, and you have brought gravity to the gaming experience...
Sorry if this was a bit off but I coulbn't resist.
Posted 13 October 2006 - 09:09 AM
There are a couple of ways of making gravity in a game:
if you game is little and easy and there arent that many different highs you could just always make the camera go down to say Y = 20:
if (bJump = True) and (Camera.Y > 50) then Camera.Y = 50 bJump = False end if
if you game is bigger and you want your character to jump on different things. then you need collision detection. This means that you have to check if you character is going thru objects.:
if(bJump = True) 'check collision for every object down the camera. 'move the camera down every frame if there isnt anything beneith it end if
an other approach would be using a fysics engine for downing your gravity work. this is the hardest option i think, but the nicest if your game is designd to handeld this. if you want to use this option you should look at things like: Netwon, ODE and tomahak i think... but there are a million other engines out there that also could do this..
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users