naveen Posted August 6, 2014 Share Posted August 6, 2014 I have developed a game using Phaser, some times the browser is freezing.It is not showing any error in console. How can I fix this? Advance thank you! Link to comment Share on other sites More sharing options...
lewster32 Posted August 6, 2014 Share Posted August 6, 2014 That sounds very odd. You'd need to upload it so we can see what's happening when it freezes. Link to comment Share on other sites More sharing options...
eguneys Posted August 6, 2014 Share Posted August 6, 2014 Just pause the javascript in Chrome devtools and manually step through the code, probably there is an infinite loop. Link to comment Share on other sites More sharing options...
jloa Posted August 6, 2014 Share Posted August 6, 2014 Does the game freeze totally or temporary? Which browser are you using? If totally - check the code, 100% sure it's the source of the perma-freeze.If temporary... Check the code, but that might not be the reason.There's some weird thing or bug with ie, firefox, the game can randomly freeze for like less than 50ms and the unfreeze. Happens totally random, even on a blank project and doesn't depend on fps, fps can still be 60/60. Still investigating this... Link to comment Share on other sites More sharing options...
naveen Posted August 7, 2014 Author Share Posted August 7, 2014 Just pause the javascript in Chrome devtools and manually step through the code, probably there is an infinite loop.I think it is due to infinite loop. In all my while loops, I used break statements followed by a message if it repeats for more than 10 times. It is printing message. thank you all for the suggestions. Link to comment Share on other sites More sharing options...
Recommended Posts