Hey, coders! I have the server creating random drops to the client. It creates 5px x 5px squares on the client that the player can walk over and ' pick up'.
These sprite drops triggered from server have no physics. they are just squares being stamped on the canvas. When the player walks over one the server removes it and updates the clients. Works fine.
Problem is, once 100 or so are made, FPS drops to single digits and everyone slows to molasses. Is there a max sprite count? I do not believe I have any memory leaks and the sprites arent using any physics. Any ideas? Thank you
Code to make the square sprites :
var bmd = game.add.bitmapData(0,0);
bmd.ctx.beginPath();
bmd.ctx.rect(0,0,5,5);
bmd.ctx.fillStyle = '#000000';
bmd.ctx.fill();
bmd.ctx.closePath();
var droppedItem = game.add.sprite(xDrop,yDrop, bmd);