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

Username:   Password: 
 RegisterRegister   
 Need to reset Time for my game
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Morice




PostPosted: Tue Dec 20, 2005 9:57 pm   Post subject: Need to reset Time for my game

ok heres the deal i making this racing game now that i know how to use whatdotcolor and i need some few tips. However i do i have some problems first which is really annoying time, i cant get it to reset after the first track, second i need some stats after each level, like lap 2 was made in 10 secs something like that and 3rdly an highscore (but i did seen some examples however i dont understant them cause i didnt get to use some of those codes....
hers the game(btw start with Menu.t)



Game logo 2.jpg
 Description:
 Filesize:  37.09 KB
 Viewed:  1079 Time(s)

Game logo 2.jpg



Game logo 1.jpg
 Description:
 Filesize:  60.55 KB
 Viewed:  1075 Time(s)

Game logo 1.jpg



Track2.t
 Description:

Download
 Filename:  Track2.t
 Filesize:  2.55 KB
 Downloaded:  83 Time(s)


Racer v1 Player 1.t
 Description:

Download
 Filename:  Racer v1 Player 1.t
 Filesize:  3.66 KB
 Downloaded:  92 Time(s)


Racer v1 Multi Player.t
 Description:

Download
 Filename:  Racer v1 Multi Player.t
 Filesize:  7.95 KB
 Downloaded:  75 Time(s)


Menu.t
 Description:

Download
 Filename:  Menu.t
 Filesize:  10.86 KB
 Downloaded:  93 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Morice




PostPosted: Tue Dec 20, 2005 9:59 pm   Post subject: (No subject)

ohh ya plz dont try to steal, i worked really hard for this.... thanks
and btw this isnt for my class , im doing it for fun
do_pete




PostPosted: Wed Dec 21, 2005 11:46 am   Post subject: (No subject)

Please put all your file into a zip file, it makes it easier for all us lazy people Very Happy
Albrecd




PostPosted: Wed Dec 21, 2005 12:47 pm   Post subject: (No subject)

Instead of resetting the time, you could use Start Time - End Time = Total Time (this could be used for the laps too)
Morice




PostPosted: Wed Dec 21, 2005 9:16 pm   Post subject: (No subject)

ok i figured out how to do the time reset thing, after many many tries, anyway now i need to know how to do the highscores, can somebody explain it to me step by step.... i did look around however i didnt find them very useful...
thanks
Martin




PostPosted: Wed Dec 21, 2005 9:34 pm   Post subject: (No subject)

Have you learnt how to read and write to a file?

What you've have to do is just make a file called highscores.txt with name/score pairs that'll look like this:

Morice 357
Martin 300
Tony -16
...

Note that it'll be easy for someone to just edit the txt file with notepad, but don't worry about that for now.
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  [ 6 Posts ]
Jump to:   


Style:  
Search: