Save feature for game

Put your problem here if it does not fit any of the other categories.

Save feature for game

Postby timg530 » Tue Feb 08, 2011 12:40 am

Hey guys, I am developing a game and wanted to add a save feature so people can return to the level they were on last. What is the best way to do this? Should I just create and save a text file with the pertinent information? Or is there a better way? Thanks.
timg530
Junior Developer
Junior Developer
 
Posts: 12
Joined: Tue Feb 08, 2011 12:36 am

Top

Re: Save feature for game

Postby timg530 » Thu Feb 10, 2011 2:21 am

For those wondering what I ended up doing. I just wrote out to a file. Go to the following link to learn how to read and write files. http://www.anddev.org/novice-tutorials-f8/working-with-files-t115.html

I wrote the information that I needed to save, such as score, level, lives, etc., to this file and pulled it back out when I needed to load the game.
timg530
Junior Developer
Junior Developer
 
Posts: 12
Joined: Tue Feb 08, 2011 12:36 am

Re: Save feature for game

Postby imbroken » Thu Feb 10, 2011 6:17 am

You could use SharedPreferences as well
imbroken
Senior Developer
Senior Developer
 
Posts: 131
Joined: Thu Jan 06, 2011 6:57 pm
Location: Germnay

Re: Save feature for game

Postby madhavanmaddy » Thu Feb 10, 2011 7:31 am

dude if i am not wrong you can use java concept object serilization
i think it is used to save the state of objects
madhavanmaddy
Junior Developer
Junior Developer
 
Posts: 24
Joined: Wed Dec 15, 2010 7:04 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Exabot [Bot] and 24 guests