Save Scores?
Community Forums/Monkey Talk/Save Scores?
| ||
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. |
| ||
Monkey can use HTTPget, so you should be able to communicate with server-side php/asp... |
| ||
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. |
| ||
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. |
| ||
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. |
| ||
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 |
| ||
done it nvm |
| ||
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. |