Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / 3D Platformer?

Author
Message
KC745
15
Years of Service
User Offline
Joined: 24th May 2009
Location:
Posted: 16th Oct 2009 00:03
How would I Prgram a 3d Platformer in DarkGDK? I can use darkGDK to make a fps and stuff but I don't understan Sparkys collision too well, because my charater moves with my camera but i want its feet to stick to the ground. I want it to be similer to the Ratchet and Clank Series.
bloodmage2
15
Years of Service
User Offline
Joined: 14th Jun 2009
Location:
Posted: 11th Nov 2009 17:58
well, you can make it so the character object is created at the ground level, and constantly check to see if the character is not touching ground and if it is, make the character fall.

-to the optimist, the glass is half full. to the pessimist, it is half empty, to the engineer, it is twice as big as it needs to be.
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 13th Nov 2009 02:36 Edited at: 13th Nov 2009 02:37
if you are talking about collision and gravity, then it isn't too hard for some basic gravity. heres a outlie:

make a velocity variable for the player and a constant variable that will be your gravity force.
next every loop add the gravity force to the velocity variable. then check for collision with the ground.
if there is collision set the velocity to 0
if there isn't collision then add the velocity to the player Y variable(but don't set it to zero).

Your velocity and gravity should probably be floats.

That's all there is to it!

New Site! Check it out \/

Login to post a reply

Server time is: 2024-10-01 18:27:43
Your offset time is: 2024-10-01 18:27:43