Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 I can't do a boundary for my circle race track.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
raindrop




PostPosted: Tue May 18, 2004 2:26 am   Post subject: I can't do a boundary for my circle race track.

I created this car race game but I needed some kind of boundary to keep the two cars inside the circle race track. I tried using Math.Distance, but i don't think that works. Does anyone know how to set up this boundary limit?

I attached my game and the 2 cars that u will need in order to run the game. Thank you for your help.



redcar.jpg
 Description:
 Filesize:  5.35 KB
 Viewed:  1096 Time(s)

redcar.jpg



bluecar.jpg
 Description:
 Filesize:  5.57 KB
 Viewed:  1099 Time(s)

bluecar.jpg



RacewayGame.t
 Description:
RACE GAME

Download
 Filename:  RacewayGame.t
 Filesize:  8.75 KB
 Downloaded:  94 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
McKenzie




PostPosted: Tue May 18, 2004 8:02 am   Post subject: (No subject)

As far as your Distance goes, it doesn't work because you will want to check if the distance is <= 200 not =200. Also you are not checking for blue at all.
Some other areas to look at:
1. Use offscreenonly with View.Update
2. Use Input.Keydown for keyboard control
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: