The more in-game loads, the lower the frame rate

The game I created is similar to Celeste, a platformer that requires trial and error through repeated deaths.

In my game logic, death means reloading the save.

However, I’ve noticed that the frame rate in AGM drops significantly after multiple reloads, which is very confusing.

Here is the test I conducted:

This is the initial frame rate of the game, showing 120 FPS.

After reloading the save 15 times in the same scene ↓

The FPS dropped to 100.

After reloading the save 20 times in the same scene ↓

After reloading the save 35 times in the same scene ↓

After reloading the save 60 times in the same scene ↓

Eventually, the frame rate dropped to just 20 FPS. This is astonishing. I suspect that AGM might be recreating new objects during reloads without properly deleting the old ones, causing the game to become increasingly laggy with each reload, eventually leading to a system crash. I had three friends test this on different computers, and they all encountered the same issue. This is causing me immense frustration.

I really want to use the feature that deletes objects once they leave the camera view,

but due to this critical bug (child nodes cannot respawn at the correct position) ↓↓↓↓ (请问子节点里的对象复活后位置不对的问题)

I cannot currently implement this feature to reduce CPU load. I don’t know when the official team will fix this issue.

Update: I tried creating a separate empty scene for save reload testing. Even after reloading 100 times, there was no drop in frame rate. However, if I place a certain number of tiles and interactive objects in the scene, the issue reappears.

If I don’t reload, playing in the same scene for 30 minutes causes no frame rate loss at all. But once I reload multiple times, the frame rate keeps dropping. This is a very serious issue…

I sincerely request the development team for assistance!!

Based on the description here, it does indeed appear that there is some kind of issue.

Would it be possible for you to share the project where the problem is occurring? If possible, a minimal reproduction project would be greatly appreciated.

Is it acceptable for me to provide a playable demo export directly for testing purposes?

This is, in my opinion, the most serious bug I’ve encountered since using AGM. It can cause all computers to slowly freeze. It’s truly terrifying. I urgently request the development team to resolve this issue as soon as possible!

I was able to reproduce this on my end with a minimal setup (just one player GameObject, saving and loading repeatedly), so I’ll get this reported.

Your project seems to have more Objects leaking per load though, would it be possible for you to send your actual project to pgmmv-support@gotchagotcha.jp so we have it for comparative testing?

Thanks for the thorough testing across multiple machines, the screenshots and step-by-step load counts really helped narrow this down.

1 Like

The project has many assets and a large capacity, making it inconvenient to break down. In a single scenario, there are approximately 60 GameObjects and 30 Area2Ds that can interact with the player. However, most GameObjects are configured with a startup condition: they activate when the camera gets close. Therefore, they are not loaded in the scene initially.

I opened the inspector for reference.

In actual operation, there are only about 25 active objects. The Tilemap has around 1500.

Do you use StartingPoints in your game? I think we have isolated the root cause of the FPS degradation. It seems to be tied to AGM’s StartPoint to Player resolution path, not save/load itself. Every scene load re-runs that resolution which is why it builds up over time.

I wanted to verify with you if that is the cause in your project as well. Could you remove any StartingPoints and instantiate the player scene directly. Then run your save/load tests and see if that prevents the FPS drop?

Does “startingpoints” here refer to this node?

I’ve never used this node in any game scene. I didn’t even know it existed :sweat_smile:

I also haven’t used the “Instantiate Scene” feature (mainly because I wasn’t clear on what it does, so I never used it).

I think we really do need to see your specific project so we can properly assess what is going on. Can you zip up your project and send it to pgmmv-support@gotchagotcha.jp so we can investigate this specific issue? If you need to send a link from a cloud service to download that is fine.

Alternatively you can wait for next patch which fixes a couple performance issues. If the issue still persists then you can send in your project.

Okay, thank you very much, Baz, for the detection. Let’s take a look at the next patch fix first.

If that doesn’t work, I’ll compress and simplify a single-scene project and send it over for review.

My project only uses basic functional objects, like links in VS. I haven’t added any special nodes to the scene either… I’ve just used the default ones…

1 Like

After thinking about it, I realized that finding the cause sooner would be better. I’ve sent the simplified standalone scene [game_scene_1] via email.

The zip file may contain some tscn objects unrelated to game_scene_1; please ignore them.

I’m not sure if a tscn file alone, without its PNG images and sound effects, will function properly. If you encounter any issues, please feel free to contact me. Thank you!

Thanks for sending the project over! I tested it and what I’ve gathered it’s the same performance issue I mentioned earlier. The fix is already done on our end and should come with the next patch.

Give it a try once you update and let me know if the FPS still drops!

It would be great if this could be fixed, as the game can finally be played normally. I haven’t used StartPoint in my entire project.
Could you please let me know what caused this issue?

The FPS drop comes down to an object reference that was being held every save/load and not cleared out. It’s separate from the StartPoint issue I mentioned above (though that one’s fixed too), and it’s the same thing your project is running into.

The reason it hit your project so much harder is the count stays the same no matter what’s in the scene, always +1 per load, but the cost of those extra objects scales with everything going on, since they keep getting evaluated every frame. So a busy scene feels the slowdown much faster and more dramatically than a light one. That lines up with what you were seeing.

Once the next patch is out, could you retest on your project and verify it clears up the FPS for you?

Thank you very much for reporting these findings!

1 Like

Thank you so, so much! I look forward to the next update every day!