Beenden
  • Globale Community
    • Sprache:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Gesperrt

How do you save "game state" so the user can continue next time?

Beitragender ,
Feb 17, 2011 Feb 17, 2011

I'm not sure what the correct game terminology is for this, but how do you save "game state" so the user can continue next time?

This seems like a pretty important feature for building some games, we don't want users to have to start over everytime.

Any ideas if this is possible?

THEMEN
Entwicklung
1.7K
Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Community Expert ,
Feb 17, 2011 Feb 17, 2011

Take a look at either SharedObjects or the built in SQLLite datebase that is supported in AIR for Android as well.

Chris

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Beitragender ,
Apr 25, 2011 Apr 25, 2011

Chris, do you know where i can view some examples of saving data for next time app is run?  i have a 3 column grid i need to write to file and retrieve next run. Any help is appreciated.

thanks

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Entdecker ,
Apr 26, 2011 Apr 26, 2011
AKTUELL

Check out my blog post on the PersistenceManager:

http://www.unitedmindset.com/jonbcampos/2010/11/01/flex-4-5-persistencemanager/

This will help you understand how to store the data. When the app starts up again get the state information from the persistencemanager and reset you game to the state you need. It requires a bit of code for the startup, but it is relatively simple.

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines
Entdecker ,
Feb 18, 2011 Feb 18, 2011

well you could set the "game" view to destructionPolicy='none' and locally save the data you need and enable a "resume" button. so even if the player presses Back or Home your app is still running as a service with low framerate. So if the player returns and presses "resume" the game goes to the "game view" which has not been deleted from memory.

Note: don't forget to return the attribute of the view to ->  destructionPolicy='auto'

hope it helps.

Übersetzen
Melden
Community-Richtlinien
Seien Sie freundlich und respektvoll, geben Sie die ursprüngliche Quelle der Inhalte an und suchen Sie vor dem Absenden Ihres Beitrags nach Duplikaten. Weitere Informationen
community guidelines