Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (711)
Games in Android Showcase (213)
games submitted by our members
Games in WIP (785)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  How does saves work?  (Read 3052 times)
0 Members and 1 Guest are viewing this topic.
Offline defrazr1

Senior Newbie

Medals: 2
Exp: 1 year

« Posted 2014-02-26 23:26:56 »

I know this is a really silly question, but I've no idea how to create a save game function for my visual novel (or any game for that matter). To make matters worse, I also have no idea how it would bring all of it back so (Loading a game). If there is a tutorial on here, I'd be more than happy and grateful to read it.

It's something I've taken for granted over the years but never put any thought into Tongue (I know bad me T__T)

I would think the basic idea would be to read/write from/to a file, however I don't want to oversimplify something that could be rather complex. At first I thought I'd just save every single variable state the game is currently in when a user saves.  Huh

Thanks for the help and sorry for the 'noob' question.
Offline Opiop
« Reply #1 - Posted 2014-02-26 23:32:02 »

No offense but this question is best left to Google. Saving and loading basic text files is a breeze in Java, search for InputStreams and the like. I guarantee you'll have something working by the end of the night, and you'll learn more if you research it yourself!
Offline defrazr1

Senior Newbie

Medals: 2
Exp: 1 year

« Reply #2 - Posted 2014-02-26 23:37:09 »

You're right, I feel bad for asking now Tongue

I've been tossing it around in my head all day, and I'm eager to start messing around with it when I get home! I made the mistake of asking before trying... a learning mistake Sad

Thanks for the advice opiop65!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline dime26

JGO Knight

Medals: 20
Projects: 6
Exp: 5 years

Should traffic wardens be armed?

« Reply #3 - Posted 2014-02-27 00:31:09 »

Depends on saving local or online. There are lots of free online data stores like for example. Convert your objects into something light weight like JSON, compress the string and push it to a database or document storage.

I have used Parse for mobile apps mostly at work but have played about with storing high scores and inventories etc:

These are also worth a look at:

If you are storing local though just save to a file "Java JSON serialization" is what you might want to search. You can use something like GZip to compress the string. If you are saving periodically a lot of data then pass this save off to a background task.

I know you could have Googled some of this yourself but you did ask so its just friendly to answer, good luck.
Offline defrazr1

Senior Newbie

Medals: 2
Exp: 1 year

« Reply #4 - Posted 2014-02-27 00:49:03 »

Thanks dime26, I'll give these a look. I hope to post how my ventures go in learning to save Tongue
Offline ctomni231

JGO Wizard

Medals: 99
Projects: 1
Exp: 7 years

Not a glitch. Just have a lil' pixelexia...

« Reply #5 - Posted 2014-02-27 07:39:00 »

Last but not least... hopefully. I wrote a post that goes over the general ways of saving a file. The thread has some extra knowledge if needed...

Storing levels

Offline defrazr1

Senior Newbie

Medals: 2
Exp: 1 year

« Reply #6 - Posted 2014-02-27 13:27:42 »

Thank you ctomni231!

That is a very helpful link indeed! I'll strive to make all the advice I get on this forum well worth everyone's time!

Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

numerical (367 views)
2017-02-21 07:32:16

numerical (368 views)
2017-02-21 07:31:46

theagentd (479 views)
2017-02-18 13:42:33

theagentd (477 views)
2017-02-18 13:35:16

h.pernpeintner (1642 views)
2017-01-24 22:39:11

h.pernpeintner (1629 views)
2017-01-24 22:38:32

Galdo (2198 views)
2017-01-12 13:44:09

Archive (2157 views)
2017-01-02 05:31:41

0AndrewShepherd0 (2697 views)
2016-12-16 03:58:39

0AndrewShepherd0 (2355 views)
2016-12-15 21:50:57
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!