lucy Posted July 6, 2018 Share Posted July 6, 2018 Hi, I need to be able to frequently add and remove objects with around 2000 on the screen at any given time. I tried doing this by both blitter.create() and game.physics.add.image(). In both cases, I am able to add 2000 images. For Blitter, the frame rate is around 30 fps with 2000 images, and for regular it's closer to 20. When the images are added all at once, it takes about 15-30 seconds to load. If I add an image every 100ms, the frame rate goes down to around 5 fps. Another version in Phaser 2 didn't have this problem. Do you know what might be causing this or how to fix it? Thanks in advance!! Link to comment Share on other sites More sharing options...
samme Posted July 7, 2018 Share Posted July 7, 2018 How does http://labs.phaser.io/view.html?src=src\game objects\blitter\benchmark test 3.js&v=dev work for you? Link to comment Share on other sites More sharing options...
rich Posted July 8, 2018 Share Posted July 8, 2018 How large are the images? How large is the canvas? What devices are you testing on? etc etc etc. Link to comment Share on other sites More sharing options...
HugoMM Posted July 8, 2018 Share Posted July 8, 2018 seems blitters doesn't has depth control? Link to comment Share on other sites More sharing options...
lucy Posted July 8, 2018 Author Share Posted July 8, 2018 On 7/6/2018 at 11:16 PM, samme said: How does http://labs.phaser.io/view.html?src=src\game objects\blitter\benchmark test 3.js&v=dev work for you? It works well. The issue isn't when there are many images, but when there are many but they are also being added frequently. 12 hours ago, rich said: How large are the images? How large is the canvas? What devices are you testing on? etc etc etc. The canvas is 600x800px, the images are 64px squared. The device I am testing on is Linux with Chrome web browser. 10 hours ago, HugoMM said: seems blitters doesn't has depth control? What does this mean? Link to comment Share on other sites More sharing options...
samme Posted July 9, 2018 Share Posted July 9, 2018 1 hour ago, lucy said: It works well. The issue isn't when there are many images, but when there are many but they are also being added frequently. If you hold down the mouse button, that example will add more than a thousand objects per second. Link to comment Share on other sites More sharing options...
HugoMM Posted July 9, 2018 Share Posted July 9, 2018 I found the depth is mention in the Blitter class doc, but it doesn't work at all Link to comment Share on other sites More sharing options...
Recommended Posts