How to save a game's world

Here’s a project I made.

Click the green [code] and select [download zip]
https://github.com/doug13579/gdevelop-save-load-trees-to-storage

Try me. The trees are draggable with the left mouse button and you can toggle the tree from green to red with the right mouse button. It uses 4 buttons and a tree object with a green and red animation.
https://games.gdevelop-app.com/game-0f88b01a-53e5-47fe-ae72-53e5b44e7531/index.html

The events and structure can be changed to save any property or variable.

scene variables

Edit: I tried this with 10,000 trees. There was a lag while it loaded and added the trees but, on my PC anyways it worked. If there is a limit then you could break up the trees and save them in groups or blocks of trees using different group names.

2 Likes