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.

DLL Talk / sparkys dll

Author
Message
Kieran
17
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 1st Jan 2007 02:14
is it possible for sparkys dll to do gravity? if so does any have a code snippet they are willing to share?

Dracula
17
Years of Service
User Offline
Joined: 7th Aug 2006
Location: DBP Recreation of Castle Csejthe
Posted: 1st Jan 2007 02:44
look at the sliding collision demo that comes with sparkys, it has a gravity routine in there.
Kieran
17
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 1st Jan 2007 10:21
ok i did but i can't figure out how to get it to work in my game

Dracula
17
Years of Service
User Offline
Joined: 7th Aug 2006
Location: DBP Recreation of Castle Csejthe
Posted: 1st Jan 2007 18:13
well, start by replacing sparkys .x map with your map. Make sure to position your hero/camera so it is in your map, since your map coords may be different. Then you will be able to run around in your map. Build your game around sparkys demo, rather than the other way around. Keep playing with the variables until you figure out what they all do.

And in case you are wondering what part handles the gravity, it's all in the moveplayer() function:



As you can see from the code, the gravity is coded and the collision part is handled by sparkys.

Hope this helps.

D

Login to post a reply

Server time is: 2024-06-28 02:54:51
Your offset time is: 2024-06-28 02:54:51