Closed kevincentius closed 2 years ago
WTF pixi objects must be destroy()-ed? How did the game run smooth at all so far :)
I guess go search for all places where new pixi objects are created and make the destroy for it in the appropriate place
new Texture()
Extends to be destroyed:
Hopefully can improve performance through local settings overrides player rules, e.g. board size & remote player sounds.
We should close this issue after final testing (kami?). Performance is something we have to keep in mind all the time anyways. The concrete solutions here have been implemented.
Try cullingRect? this.stage.cullingRect = new PIXI.Rectangle(0, 0, sceneWidth, sceneHeight); Not sure if this really helps in our case, most minos are within the visible area anyways.
[x] How to know how many render batches the game uses? tried gamestats.js but couldn't figure out tried this and worked: https://stackoverflow.com/a/64330563/2015374
9 draw call per player. It looks like minos in a player are batched but never between different players. With 100 PlayerDIsplays therefore there was like 901 calls.
[x] cacheAsBitmap on graphics helps if the graphics aren't changing
maybe one container per board row and use cacheAsBitmap on the rows?
Removing all graphics from the scene reduced render time by about 10% at first but when there are more minos on the board it looks like the sheer amount of mino sprites are simply the giant bottleneck.