[gameprogrammer] Re: Racing Game

  • From: Robbert de Groot <zekaric@xxxxxxxx>
  • To: gameprogrammer@xxxxxxxxxxxxx
  • Date: Sun, 24 Dec 2006 17:42:08 -0500 (EST)

Possibly having more than one checkpoint along the track and that the
player need to pass them in order to finally pass the finish line to
be declared the winner.  

Or, look at the vector of the car's motion and dot it with the vector
defining the 'good' direction at the finish line.  If he's going the
wrong way (dot product is < 0) then deduct a lap.  If he crosses in
the right direction then add a lap.  

--- Edilson Vasconcelos de Melo Junior <dirso@xxxxxxxxxxxxxxxxxx>
wrote:

> Hi,
> 
> I working on a racing game and I have a problem: To know whether
> the player
> finished the race I test if the car position is in the finish line,
> but the
> problem is if the player starts running, turns the car and then
> drives in
> the wrong way it will end up winning the race :-(. How could I know
> the
> player is in the wrong way? I put several check points and uncheck
> them if
> it was already checked, but I really would like to put a sign in
> the screen
> telling him his is in the wrong way.
> 
> Thanks a lot and Marry Xmas!!!
> 
> Dirso.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: