Computer Science Canada HELP!!! With the high score thingy... |
Author: | gohan [ Fri Apr 01, 2005 11:25 am ] |
Post subject: | HELP!!! With the high score thingy... |
I need help in making a high score board tht will hold 5 high scores... but first i need to know how to make the game hold the score, and update it if another player gets the high score...so PLZZZ Anyone help!!! Thank You very much. |
Author: | jamonathin [ Fri Apr 01, 2005 11:34 am ] | ||||
Post subject: | |||||
I first got the idea from a previous post that briefly explained a open, put and get, so I just put everything together and got this . . You first need to start with a default base:
Now here's the actual "top10" part, it calculates the position of the newscore and what not. Code:
Check tutorials. |
Author: | Mr. T [ Wed Apr 06, 2005 10:01 pm ] |
Post subject: | |
Did you by any chance get this from a post made by guttface? |
Author: | jamonathin [ Thu Apr 07, 2005 6:05 am ] |
Post subject: | |
me? I don't remember, I remember it was a MOD, but it was a little bit ago, and i first used the concept for a record list we had to do for class, then i juss "applied" it to a top 10 high score. |
Author: | Kyle [ Sun Apr 24, 2005 8:36 pm ] |
Post subject: | |
hmm this is cool. can i use this for my high score list for my year end game project please or no ? |
Author: | mike200015 [ Mon Apr 25, 2005 4:46 pm ] |
Post subject: | |
can u explain what this part means? like the open : .... and the put : .. and the get :.. stuff? |
Author: | Vertico [ Mon Apr 25, 2005 7:07 pm ] | ||||||
Post subject: | |||||||
sure
what this does is it opens another file called top10 and gets the information from within.
something like this gets the information from the file that was opened and stores the information. So the first line will be saved in the var names and the second will be saved in the var score. Im assuming u understand then vars are in arrays.
then this displays the same information that was saved into these varables early on the screen. |
Author: | jamonathin [ Tue Apr 26, 2005 6:15 am ] | ||
Post subject: | |||
Vertico's exactly right, this is just to help you understand what is being written. You can use "top10" or "top10.txt", it doesn't reall matter, you can open both up in word pad anyways, but this is what the file will ook like after it gets written:
Whatever you're telling to get the first time through the for loop, is grabbing the "New001", and whatever thesecond thing is you're telling to grab in the for loop, gets the "1". If you're wanting to add something else only once, such as a title, where it only needs to be written once, just have it be last, and put it after the for loop. And btw, yes you can use this if you want Kyle, anyone can, as long as they understand it. |