android - Save game state after pause. AndEngine -



android - Save game state after pause. AndEngine -

i've found after resuming game engine reloaded , application reinitialized. want save engine state , in "onresume" resume game proccess.

i've tried save engine (mengine) , after resume game in "onloadengine" homecoming saved engine. think bad solution , doesn't work

what best solution pause\resume game (after powerfulness key pressed example) in andengine ?

the solution found serialize state of engine json , save shared storage. lot of work, save it. since andengine going re-init engine , textures after pause, think there not many choices, unless want re-write of andengine game. (which can)

in json record position type velocity etc of each sprite. complexity of gets saved depends on complexity of game. , each class added deserialize method accepts json input.

as footnote method, cannot speak highly plenty of amazing gson library making easier task. http://code.google.com/p/google-gson/

but remeber when restoring game, set restored state paused user knows when game re-commence.

android andengine scene

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -