Save Scores?

Community Forums/Monkey Talk/Save Scores?

Paul "Taiphoz"(Posted 2011) [#1]
last time I asked monkey was not able to save to file, has anything changed on that front ?

Specifically the ability to take a html5 or flash web game, and once the player is dead, save his name and score either to a file in the local dir on the server, or via sending a request to php or asp.

just wondering if this is possible.


xlsior(Posted 2011) [#2]
Monkey can use HTTPget, so you should be able to communicate with server-side php/asp...


therevills(Posted 2011) [#3]
Monkey has always been able to store a file...

SaveState and LoadState will save and load data locally - this works for all targets.

For GLFW and STDCPP you can use the OS module to do heaps of IO commands.


Paul "Taiphoz"(Posted 2011) [#4]
savestate I had a look at but its not the same as writefile, where I can save out anything I like, it saves the variable state of the game if I am right which isnt the same deal.

I think lol.


GfK(Posted 2011) [#5]
Savestate saves whatever you tell it to save. The only caveat is that it must be in a single string format.

I have a filesystem module which is part of diddy, that emulates a more traditional filesystem across all targets and supports multiple pseudo-files.


Paul "Taiphoz"(Posted 2011) [#6]
Oh I wanted to save an array.

Grid[]

it's got about 300+ elements in it, all Integers.

got any ideas?

also this might be a daft question, but if one user saves a state and then another comes along and loads a state, will they see the same state ? or is it client locked


Paul "Taiphoz"(Posted 2011) [#7]
done it nvm


Paul "Taiphoz"(Posted 2011) [#8]
So I guess Load/Save state is local to the client doing the viewing, so we will need to call some PHP to save the state to a database where it can then be read from for other online viewers.