MichaelD Posted December 21, 2014 Share Posted December 21, 2014 Hello, The weirdest bug/issue just came up, I had a very light game (in terms of updates/actions, etc) and I was getting no more than 25 FPS on mobile devices (quad core tablet, dual core mobile phone android) When I was trying to figure out what was wrong I deleted one line from my .css file and suddenly the game runs with 55-60 FPS as intended. I reversed the changed line and again fps dropped to 25-27. I simply had canvas { border: 5px solid white;}Does anyone know why this happens? And moreover if any more css properties affect game performance. Thanks guys, I hope we can clarify and find the reason behind this. Link to comment Share on other sites More sharing options...
valueerror Posted December 21, 2014 Share Posted December 21, 2014 i made this experience a long time ago while working with processing.js a box-shadow was even worse if i remember correctly.. the problem seems to be that the whole canvas is rerendered 60 times per second .. that means including all it's style attributes ... Link to comment Share on other sites More sharing options...
MichaelD Posted December 21, 2014 Author Share Posted December 21, 2014 I came into the same conclusion, and I have to say "Ouch!". I hope this post saves somebody else some time. Link to comment Share on other sites More sharing options...
Recommended Posts