Load/SaveState - do they work in the demo version?

Community Forums/Monkey Talk/Load/SaveState - do they work in the demo version?

semar(Posted 2011) [#1]
All,
a couple of questions:

I have monkey DEMO ver. 0.32.

I'm running the LoadState and SaveState example (HTML5) with Firefox 4.01, but it does not save nor load any state.

Are LoadState and SaveState deactivated in the 0.32 version ?

Does the current demo version support save and load state ?

Do LoadState and SaveState would work with Android/IPhone etc, ?

If I want then synchronize the saved data to a mysql db using a php script, would GET and POST work from within an Android ? If not, what can I use to save/load the saved state data to/from a remote db ?

Regards,
Sergio.

Last edited 2011


xlsior(Posted 2011) [#2]
the Monkey demo version is quite a few revisions behind the production one -- here's the changes in versions.txt:

NOTE: If you're having trouble with a new version, try deleting '.build' dirs!!!!!

***** V41 *****

Modules:

android mojo implemented 'fast' IntBuffer vertex buffers - see: http://code.google.com/p/android/issues/detail?id=11078

ios mojo audio now using AVAudioPlayer for music.


Trans (1.14):

Flash var name munging for embedded data now takes file extension into account.

Fixed more C++ interface gc issues.

Fixed C++ generic array cast bug.

Fixed '--' in translator output.


***** V40 *****

Modules:

Implemented dguy's ios mojo fix for LoadString crash with non-existent files.

monkey - removed resource module.

mojo graphics/audio - Added Discard method to Image and Sound (these are still GC'd though).

iOS mojo audio - tweaked ExtAudio based loader to attempt to deal with popping mp3s.

input - Fixed KEY_JOYBLAH typo.


Trans (1.13):

Addeds support for New with Extern classes - no ctors allowed for now (ie: default only)!

Fixed C++ GC handling of interfaces.


***** V39c *****

Tools:

MServer now uses 'etags' for detecting modified files.


Trans (1.12):

Fixed parenthesis mismatch error with multiline expressions.

Trans compiler back to debug build for internal err stack dump.

Fixed extern overriding extern causing internal err bug.

Added radix 10 param to parseInt for JS/AS translators.

Fixed method munging bug.


***** V39b *****

Tools:

Added Difference's info.plist to Mac monk.

Added thread per connection support to mserver.


Trans (1.11):

Fixed name munging of local vars.


***** V39 *****

Modules:

Mojo SetColor now affects images.

Added Compare method to String type.

Fixed DrawImageRect with 0 sized src rect in Flash.

Android mojo now works with API level 3.

Fixed Android music.


Trans (1.10)

Fixed various parser issues.

Added mserver, minimal monkey server. Very minimal.

Android target now works with API level 3.

Added 'm4a' (ie: aac) as recognized audio format.

Added interfaces.

Majorly cleaned up generics.

Added Alias directive.

Added #Error directive.


***** V38 *****

Modules:

lang.cpp - Fixed C++ GC stack thrash crash.

iOS mojo.audio - reverted to old custom WAV loader for wav files due to mystery 'pops' in ExtAudioFileRead based loader.


Trans (1.09):

Fixed weird bug with MSBUILD using 'Platform' Env var.

Fixed astranslator array resize not handling bool/array arrays!

Implemented JS/AS array resize tweak.

Fixed GLFW target WINDOW_TITLE.

Fixed trans/flash target file type checking to work with upper/lower exts.

cpptranslater - Fixed C++ GC stack thrash crash.


***** V37 *****

Modules:

lang.cpp - MSVC version now uses SEH, seems to be the only way to catch int divide by 0.

Mojo GLFW/Android/iOS - no more embedded text files: LoadString now uses real files.

Mojo GLFW - added joystick support. No d-pad yet though...

Mojo iOS - fixed new sample loader to use 3.2 compatible calls only.


Trans (1.08):

Fixed default GLFW target so release build links with static CRT.

Module munging fixed - you can now have 2 modules with same name.

Cleaned up preprocessor a bit.

Added #Error directive.

Fixed class function overriding.

Fixed field initializers accessing self methods.


***** V36 *****

Modules:

Fixed nasty crash bug in Map.


Monk:

Disabled ParseError for gcc errors.

Replaced a bunch of \n's with ~n's.


Trans (1.07):

Fixed const eval of negative vals.

Fixed INTLIT '%' prefix.

Fixed new override bug for overrides that skip a class.

Fixed EvalFunc bug that allowed ()().

Fixed infinite loop with unterminated string literal.


***** V35 ***** 

Modules:

Mojo iOS sample loader now uses audio toolbox for mp3 support.

Mojo Html5 SetScissor fixed.

Added Mojo Music commands - see mojo.audio

Mojo Android volume control now always sets media volume.


Trans (1.06):

Fixed float literal 'e' notation.

Fixed BalanceTypes to generate an error instead of returning null.

Rearranged and tidied up post semant class validation code.

Fixed ObjectType.EqualsType to use new ClassDecl.EqualsClass method for generic class comparison fix.


***** V34b *****

Quick fix release for nasty return stmt bug!


***** V34 *****

Modules:

LoadState/SaveState now only use cookies on FF and IE for 'file://' document.URLs.

Added a Backwards() method to List<T> and Stack<T> that allows you to iterate through elements backwards with an EachIn loop.


Trans (1.05):

Fixed non-void abstract methods in strict mode complaining about missing return expression.

Fixed IntType.ExtendsType infinite recursion crash.

Added SCREEN_ORIENTATION to android CONFIG.TXT.

Fixed overloading method not used overloaded method's munging.


***** V33 *****

Modules:

Added experimental DOM module - see gldemo.monkey in modules/dom.

Tweaked html5 update rate timing code - shouldn't 'leak' time anymore and may be smoother on some browsers? More work needed here...

Only Chrome/Safari use localStorage for LoadState/SaveState, others now use cookies. IE9 doesn't like localStorage at all, and FF doesn't like it with file:// documents.

iOS accelerometer now tries to compensate for UI orientation - you should still lock accelerometer 
games to a single orientation though.

Fixed iOS screen saver with accelerometer based games.

Changed some android defaults in manifest - fullscreen theme + no reset on orientation change.

Fixed glPixelStorei unpack alignment for GLFW target. Added fox to iOS too.

Fixed line thickness scaling in Flash.

Added checks to mojo graphics to ensure rendering commands are only performed inside OnRender.

Fixed xna mojo reach mode additive blending.


Trans (1.04):

Android manifest and various other files moved to .build/android/templates - edit these, not the generated copies in .build/android.

Android app renamer added - see .build/android/CONFIG.TXT after first build.

Split trans.monkey driver into target-per-file layout.

Fixed array indices not being int-ized.



semar(Posted 2011) [#3]
Thanks Marc for the infos, but what about the other questions ?

;-)

Regards,
Sergio.


therevills(Posted 2011) [#4]
Are LoadState and SaveState deactivated in the 0.32 version ?


Nope but the code base is pretty old now! Check the v33 log:

v33:
Only Chrome/Safari use localStorage for LoadState/SaveState, others now use cookies. IE9 doesn't like localStorage at all, and FF doesn't like it with file:// documents.


The demo really needs to be updated!

Does the current demo version support save and load state ?


When I tested it, it did ;)

Do LoadState and SaveState would work with Android/IPhone etc, ?


Yep - works fine.

If I want then synchronize the saved data to a mysql db using a php script, would GET and POST work from within an Android ? If not, what can I use to save/load the saved state data to/from a remote db ?


Have a look a mnet module:
http://www.monkeycoder.co.nz/Community/posts.php?topic=725


semar(Posted 2011) [#5]
Thank you therevills :)

Tested LoadState/SaveState with Chrome - it works :)

A question more ;)
How much data could be saved/read on an Android with SaveState/LoadState ?
I guess it depends on the device, or are there other limits ?

Best regards,
Sergio.

Last edited 2011