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

2011/12/15

Possible to implement a "Save Game" Feature?

minecraft15 minecraft15

2011/12/15

#
I have a video game that is rather long, and it would be nice if the user was able to save the game, exit the program, and then load it again another time, is this possible?
kiarocks kiarocks

2011/12/15

#
If you are posting this to the gallery, no.
Builderboy2005 Builderboy2005

2011/12/15

#
There is no (simple) way to save data and retrieve it later if you are running an applet on the gallery, but there are ways to help your users not have to start the game over again. One method that I use is a password system, when the player reaches a certain checkpoint, they get a password that can be entered to load that area. It's not a perfect system but it helps people not have to play the whole game over again ^^
dordor dordor

2011/12/15

#
Builderboy2005 wrote...
There is no (simple) way to save data and retrieve it later if you are running an applet on the gallery, but there are ways to help your users not have to start the game over again. One method that I use is a password system, when the player reaches a certain checkpoint, they get a password that can be entered to load that area. It's not a perfect system but it helps people not have to play the whole game over again ^^
I don't know what Builderboy2005 meant, but I think that you need to read and write files (I'm not sure in 100%). For that, you can check the Oracle tutorial I/O: http://docs.oracle.com/javase/tutorial/essential/io/ In that way, you can save the in-game data in a file on your computer (You can't use file reading / writing in the gallery, sorry...), and whenever you need it, you can read it from the file. Hope I helped.
minecraft15 minecraft15

2011/12/15

#
Thats something I could try out, I made the game into an exe, so its not run from the gallery, manly what I'd like to happen, is they save a file to certain folder, then they load it again. But, the password idea might be a MUCH simpler way to do it.
minecraft15 minecraft15

2011/12/15

#
Builderboy2005 wrote...
There is no (simple) way to save data and retrieve it later if you are running an applet on the gallery, but there are ways to help your users not have to start the game over again. One method that I use is a password system, when the player reaches a certain checkpoint, they get a password that can be entered to load that area. It's not a perfect system but it helps people not have to play the whole game over again ^^
I know this is not really the topic, but while I have your attention, your kinda a genius with greenfoot, so I will ask you, How do I make the game/program auto run so they dont need to actually press the run button? And is it possible to remove it as a whole so they just use in-game menus to do that sort of thing?
dordor dordor

2011/12/15

#
Three things: First, to your question, you just put
greenfoot.start()
in the construction of the world, or other class which being created in the start of the game. To remove the start/pause buttons you need to edit the greenfoot code on your computer. Second, who do you made the game into an exe? Third, I didn't really understand how the password system works, or how to use it, can you explain me that?
Builderboy2005 Builderboy2005

2011/12/15

#
I know of no way to remove the start/reset buttons without modifying Greenfoot itself unfortunately. The password system is simple though, you just display a certain password every level (it can be whatever password you choose) and at the main menu, have an option to enter a password. If the password entered matches a password for one of the levels, jump to that level.
dordor dordor

2011/12/15

#
Oh, I thought that you meaning a system of log in/log out. Now I understand what you meaning...
minecraft15 minecraft15

2011/12/16

#
Alright, Thank you guys for your help.
nccb nccb

2011/12/16

#
Just to let you know, the next version of Greenfoot (which should be released some time in the first quarter of 2012) will have support for storage on local machines and on the gallery website. You can use it to do high-scores, or for things like Builderboy2005's scenarios, you can use it to keep track of which checkpoints a player has reached.
kiarocks kiarocks

2011/12/16

#
Yay!!!! I always wanted that feature for my text editor!
Builderboy2005 Builderboy2005

2011/12/16

#
Oooh wow that will be super useful! I can't wait to see how you guys went about implementing that :)
darkmist255 darkmist255

2011/12/17

#
Awesome! Good luck with it :D!
You need to login to post a reply.