On an M2 Mac with 24GB the game went smooth for a few fights and then went down to around 10fps and got slower with every attack an enemy did in the fight. The longer I played the slower it got. CPU and memory usage was stable all the time.
Not a game dev. Besides profiling, I would create game scenarios that exercise certain parts of the game engine.
For example, I would create a game fight scenario where the player has infinite health and the enemy just attacks super fast at some settable rate. That way you could monitor whats happening in extreme abnormal conditions with the hypothesis that if the game works in extreme conditions then it will work in normal conditions.
Another example. If you have random encounters like in old school JRPGs then I would create a scenario where a fight happens per step of the player, the fight loads, then the enemy immediately dies, rinse wash and repeat. That should allow you to asses how the game performs after 100s of fights quickly.
The idea here is to create tests that improve your signal to noise ratio. So you create a scenario that will create a large signal so that then you can more easily diagnose the performance issues.
This is the future of troubleshooting: where did the LLM decide to introduce recursion based on calculation that draws on an otherwise unused global counter and a separate timer initiated at launch for absolutely no reason.
It can't be hardware, as others have noted these kinds of games have been working great on machines that are magnitudes slower than the OPs machine. Maybe it's some kind of search that is running linearly on an assumed small dataset and it gets bigger than imagined, instead of it running a binary search or something. Maybe some of the data is unreasonably large for what it contains and can't get cached as easily.
And, as others have mentioned, if you really want to know, profile.
Sounds like the culprit though, could be tons of small objects added for effects or something that still don't show up in memory usage but adds iteration time?
Not quite sure if I'm happy about stuffing an IDE and a full development environment into a browser. I would rather stick with the linux philosophy to doing one thing and doing it well, which would be browsing the web.