-
Notifications
You must be signed in to change notification settings - Fork 77
Description
My game was getting worse performance the longer it ran, even though there were less than 40 active instances. After some troubleshooting, I noticed it had to do with the depth of instances. I changed it based on their y coordinate, going from 0 to 100.
It appears that it'll create pools for every unique depth, but then not remove them once the instance depth is changed or the instance is destroyed.
https://github.com/YoYoGames/GameMaker-HTML5/blob/develop/scripts/yyRoom.js#L3707
The pool list here kept growing every frame, to a size over 8000, at which point the game had ground to a halt.
However, if I made sure the depth was set to a rounded number instead of floating point between 0 and 100, the pool length was kept in check.
I'm not sure whether or not this is working as intended, I'm suspecting not. Either the depth should be ensured to be a rounded value, or make sure that the pool is cleaned of empty values.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status