So Blake from my team recently made up a system called the Tracker where we can be able and see what objects are constantly being called in the game at any point. With this system opened up a view to a bunch of bugs that were inside the backend of the game and eating memory. This wouldn't effect the gameplay of the game until you have played for a few minutes or even hours and then noticing the lag inside of the gameplay. The biggest issue was that particle effects were being created and as the particles alpha went to zero making the particles not viewable, the particle still existed in the game.
Every time the avatar jumps or lands the particle system would be instantiated and after a couple minutes of gameplay, you would notice the list just gets longer and longer of calling updates in each and every frame. I was put in charge of getting rid of this effect. To do so, I studied how each effect was being created and the particles that were being created inside of the effect. I then checked to see if all the particles were done playing with and had the dispose command called if the conditions were met. In the dispose command, it properly got rid of all the children owned by the object and then disposed of itself from the game mechanics as well as the display manager.
No comments:
Post a Comment