GDevelop 5 opens saved game.json, but doesn't show the version that was saved

This is something I included in my previous post here, but thought it was just a beta88 thing. Looking in the game.json for my Asteroids Mk II game, I saw a LOT of images (objects/resources) there were no longer used (and not even on the disk anymore). So I removed them. Apparently, that’s a bad thing to do, because when I reloaded my game (I made the changes with the game saved and closed), I got a very old version instead of the current version. So, in the editor, I backed out (multiple undos) all of the changes and saved it as it was. Problem: it didn’t revert back to the latest version of the game. Instead, it stayed at the very old version.

Why is this happening, and how do I stop it and make GD5 open the game.json I’m giving it (which, after the first failure, I used a backup from earlier this morning—no changes between then and the screwup). No matter what I do, GD5 insists on loading an old version from [I don’t know where it’s getting the old version].

I looked in ~/.config/GDevelop\ 5 to see if maybe something was in there that might do this, but didn’t recognize anything except cache, which I cleared. No change.

Can anyone please explain what exactly is happening, why, and how I fix it?
Thanks

Looks like you mixed up your files…
GDevelop loads the json file you choose. The path of the loaded file is displayed in the title bar.

If you have unused resources, you should go to the resources tab, right-click and pick the “remove unused” options. Manual editing of the json file is not a good idea.

There is no fix aside from loading the most recent backup that you have.

I store thebackup json files in a directory called Saves. To use, I copy them back into the game’s directory as game.json (and skipping autosaves when asked), so the paths are all the same. I got this working again (from one backup level higher, very little to re-do) by using another copy of the whole directory that I’d done. That worked. I don’t know why it’s behaving this way, but I’ll leave that to the GD5 devs.

And I don’t see a tab called Resources, nor do I see “remove unused” anywhere, so I need a bit more help to find it. I do want to clean up the json file to get rid of the old stuff, but as you say, and as I learned, manually editing the json file is not a good idea. The objects that are left behind from the original template have all been removed and replaced with CC0 ones, but for some reason, still show up in game.json for some reason.

So where do I find Resources? Thanks

Deleted (or rather, I tried to delete it).

image

Thanks. Got it. And now to make 20 characters so I can post this thank-you note.

1 Like

The 20 characters are also for that. When you look at the rules (FAQ Tab) it says something like: don’t post a message to thank people, likes are here for that :wink:

1 Like