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 / Check points for racing.

Author
Message
Cas
13
Years of Service
User Offline
Joined: 12th Nov 2010
Location:
Posted: 7th Mar 2011 01:35
How would I go about creating check points for my racing game? I currently have a box which when collided with starts a timer for the players.

Just wondering how it would be best to go about trying to address this. If anyone has any suggestions then please fire away =]

Cheers,

Cas.
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 7th Mar 2011 03:25
I would make 3D zones and check for when the player is in those zones and then put the player's data into a separate set of variables or struct that is then recalled if needed(the player crashes,resets, etc).

If you want to use check points as a part of a time trial type of game mechanic, then you check for the player crosses a zone and then change your timer variable based on that action.


Cas
13
Years of Service
User Offline
Joined: 12th Nov 2010
Location:
Posted: 16th Mar 2011 18:38
Apologies for it taking so long to reply but uni is a harsh, taxing life

Is there a command for making 3D Zones or will I have to make them myself? If so how would I go about that?

Cheers.
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 16th Mar 2011 19:24
a very simple way would be making a box, positioning it where the checkpoint should be and then hiding it, finally, when the player is inside it, then you're in checkpoint, use dbObjectCollision function to check whether any collision happened

Cas
13
Years of Service
User Offline
Joined: 12th Nov 2010
Location:
Posted: 17th Mar 2011 02:38
I currently have that exact setup for the start of the race. To be honest I can't really remember why i asked the first question but it does lead me on to another...

Because it's a 2 player game, each player will need to know their position (1st or 2nd) how would I go about that? I do also have a couple more questions which one of you may have the answer to...

1) How would I make it so that the plane can only face one way? I don't want people to have the ability to be able to turn in circles to keep crossing the line.

2) I can't use DarkPhysics for collision with my terrain because it messes my game up too much. That leaves me to use the GetHeightMap command to read the terrain. This creates a problem where I can simply raise above the terrain and go where ever I want. I have tried a few command such as if it goes above a certain height e.g 200, reposition to 195.

Any help would be sweet =]

Thanks,

Cas
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 17th Mar 2011 03:08
1. If the check points are passed then when the player passes the crossing line increases a lap. If they haven't passed all check points then the lap won't increase.

2. Sparkys collision is probably the easiest I've used. Well, it's actually the only one I've used so far. The terrain would be setup as a complex object, a little bit of coding using standard gravity and your vehicle would stick to the terrain unless it goes over a ramp and jumps.

I've not used terrain commands for some time so I've forgotten most of the uses. I tend to just load objects for a map and use the collision commands on them.

Warning! May contain Nuts!

Login to post a reply

Server time is: 2024-06-27 22:08:39
Your offset time is: 2024-06-27 22:08:39