You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
reproduce_lag.zip
Here's a small project that reproduces the issue. Run it in a non-HTML5 target, and it'll run smoothly forever. However, HTML5 will gradually slow down.
Then, if you comment out the depth assignment in the step function test_obj, it'll keep running without problems.
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 theiry
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.
The text was updated successfully, but these errors were encountered: