AlexArroyoDuque Posted March 22, 2014 Share Posted March 22, 2014 Hi!I have performance problems.When my player walks around the world, the game runs slow... My canvas is 1280x720and my current tile size is 16x16. Some advice? Link to comment Share on other sites More sharing options...
valueerror Posted March 23, 2014 Share Posted March 23, 2014 the smaller the tiles - the more physics bodies are there to calculate.. of course your performance would be a little bit better with 32x32 tiles.. here in my mario demo (flappy mario ^^) http://test.xapient.net/phaser/ALL/flappy.html i use 32x32 tiles with loads of tiles (200x20 tiles), animations, parallax and the performance is quite acceptable.. on the tablet it is not good enough i have 3 layers on this 200x20 field.. if i remove 2 of them the speed increases immediately.. in my experience the canvas size is also relevant.. it determines the amount of pixels that have to be rendered.. most games use a smaller canvas than you do.. 800x600 even 640x480 all in all its a question about the hardware you are using.. i have pc's at work that are way faster than my own workstation when it comes to rendering my phaser testgame... also the question canvas or webgl ? remains plicatibu 1 Link to comment Share on other sites More sharing options...
valueerror Posted March 23, 2014 Share Posted March 23, 2014 one more think i encountered.. do not style your canvas ! if you apply rounded borders or even a dropshadow via CSS on your canvas the framrate will drop extremely ... plicatibu 1 Link to comment Share on other sites More sharing options...
Recommended Posts