Python Forum
[PyGame] Creating "saves" for the game - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Game Development (https://python-forum.io/forum-11.html)
+--- Thread: [PyGame] Creating "saves" for the game (/thread-21737.html)



Creating "saves" for the game - subject71 - Oct-11-2019

Hi, I'm a beginner on pygame, and I was wondering if I can create "saves" for my game, I mean, if I close the game, I can return in the same point when I open it again. Is this possible?


RE: Creating "saves" for the game - metulburr - Oct-12-2019

The most simplified version of save is using a text file to store data. You can go all the way up to using MySQL, and anywhere between. A readable and editable save in a text editor could be JSON. I often use this as this is a natural python dictionary, which is perfect for storing data.


RE: Creating "saves" for the game - Zman350x - Oct-29-2019

I'd try pickle files.