This site requires JavaScript, please enable it in your browser!
Greenfoot back
martijn13039
martijn13039 wrote ...

2012/4/19

How can I safe my hiscore

martijn13039 martijn13039

2012/4/19

#
I have make a hiscore but if I play a second game my hiscore from the first game is gone could somebody explain me how I can safe all the hiscores and not just one
martijn13039 martijn13039

2012/4/19

#
If you neet to see code ask it to me I hope you could help me
2patrickMurphy 2patrickMurphy

2012/4/20

#
To pernamently save data this requires a database. To save data that is being executed within the program you use datastructures. such as arrays integers variables lists etc etc. as for code that is really not needed. I dont know greenfoot well enough but you can have a replay game feature that makes it so it restarts the game while not leaving the JVM. That way you can store your Hi-Scores as long as you wish to play everytime you restart. But if you were to close the program then re-open it your scores would be deleted. Look into databases compatible with greenfoot and then move on from there. Good luck i myself am learning databases soon aswell.
martijn13039 martijn13039

2012/4/20

#
oke thx
You need to login to post a reply.