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.

DarkBASIC Discussion / wrong way indicator

Author
Message
Douglass
21
Years of Service
User Offline
Joined: 28th Aug 2003
Location:
Posted: 28th Nov 2003 06:16
how could i make one for a racing game?

check out my site www.dougsworld.tk
you think your site is bad....
Hell IVIonkey
22
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 28th Nov 2003 06:55 Edited at: 28th Nov 2003 06:57
Find the angle you're supposed to be going first. If your car is facing away from this value by 180deg in either direction, show the wrong way indicator.

Psuedo code:


Douglass
21
Years of Service
User Offline
Joined: 28th Aug 2003
Location:
Posted: 28th Nov 2003 17:43
thats good if the track is a straigt line. what about other shapes?

check out my site www.dougsworld.tk
you think your site is bad....
ESC_
21
Years of Service
User Offline
Joined: 29th Aug 2003
Location: Mass.
Posted: 28th Nov 2003 17:55
You have to set up 'checkpoints' around that track (best to make an editor to place these. You can use this to make sure a player did a lap properly, but you can also do what hell monkey said and calculate the angle towards the checkpoint and the current angle of the car.

''For nonconformity, the world whips you with its displeasure''---Ralph Waldo Emerson
Douglass
21
Years of Service
User Offline
Joined: 28th Aug 2003
Location:
Posted: 29th Nov 2003 00:21
thnx

check out my site www.dougsworld.tk
you think your site is bad....
Hell IVIonkey
22
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 29th Nov 2003 03:33
Yeah, in my code, when I refer to a waypoint, it's another way of saying a checkpoint, implying a curvy track.

Login to post a reply

Server time is: 2025-05-21 16:31:08
Your offset time is: 2025-05-21 16:31:08