How to write the data to a file, then load it back when the game launc

Hello! So, i have looked at the bgt-manual carefully. When i look both at the serialize and deserialize functions, they both look the same. I've followed the tutorial and have done exactly as it suggests, but still my data won't save after closing the game.

Let's say i've serialized and deserialized a dictionary, but how can i write the serialized/deserialized data to a file, then load the saved data back when i next time launch the game?
Sorry if the explanation sounded like a mess. I've provided an example situation here: I've set my cash at 10000. I do the serialize and deserialize things. How can i write those variables into a file so that the game recocnizes it and loads my data back, if i for example spend 2000 of my cash when i play the game, so i have 8000 cash left. When i next time launch the game, i have only 8000 cash, not 10000. How can i do that? The bgt manual doesn't cover it. Hope you understood, and please try to help me asap.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : marko via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : rory-games via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Nuno via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : marko via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : marko via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : marko via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : rory-games via Audiogames-reflector

Reply via email to