I'm not a beginner programmer. However, I am clueless about intricate game logic. So when I started messing around with Impact, there was one question that stood out in my mind.
How on earth do save files work? I'm creating a full-length RPG-ish game, and can't afford to have the player restarting a chapter every time they reload the game.
How does Impact save games?
1 decade ago
by Joncom
Quote from Daedalus
How does Impact save games?
Short answer: it doesn't.
Getting JavaScript to write to the client's physical hard drive presents some security issues. However...
Solution: Make a service that you can call using AJAX to store and then retrieve whatever variables you deem necessary to recreate the game state.
Quote from Joncom
Short answer: it doesn't.
Getting JavaScript to write to the client's physical hard drive presents some security issues. However...
Solution: Make a service that you can call using AJAX to store and then retrieve whatever variables you deem necessary to recreate the game state.
How do I make that service? I've never used AJAX - in fact, I'm not confident I fully know what it is.
Also, let me further clarify by stating that I want to package my game as an iPhone app eventually. I want to make a save game system that works on computers as well as mobile platforms.
1 decade ago
by Gamma
Joncom is right. It's a hard task to do. I've tried, and I've looked for help in doing this. There are methods in saving the "area" your player is in. Usually people would use "Impact Storage" a plugin you can find in the forums. Lawnchair is another way to go.
1 decade ago
by lazer
I did this with JSON and HTML5 localStorage. The game is unfinished, but it seemed to work. Here's a rough overview of how I did it (I made changes since then, but this technically functioned):
http://liza.io/saving-game-state-with-html5-localstorage-and-json-a-rough-working-draft/
1 decade ago
by Joncom
Ah yes, localstorage! I completely forgot about this. Although I have not used it myself, I imagine this is the best approach. It's definitely a lot simpler than creating a backend system to do the same.
Edit Spelling
1 decade ago
by lazer
Yup, and it was much less hassle than I thought it would be to set up (although as you can see the implementation I had there was still very rough)
Quote from lazer
I did this with JSON and HTML5 localStorage. The game is unfinished, but it seemed to work. Here's a rough overview of how I did it (I made changes since then, but this technically functioned): http://liza.io/saving-game-state-with-html5-localstorage-and-json-a-rough-working-draft/
Mm. Nice. I'll use your method until something better comes up.
Page 1 of 1
« first
« previous
next ›
last »