Jump to content

something in phaser 2.0.3 makes my game crash on state change on nexus7


valueerror
 Share

Recommended Posts

oke..  i testet the very same code with phaser 2.0.2 and it also crashed - so i sat down for a minute an thought about what else i changed (besides the update to 2.0.3) - there was only one thing.. i added a frame counter:

 

create:

game.time.advancedTiming = true;fpsText = this.game.add.text(game.camera.width-60, 10, '', { font: '16px Arial', fill: '#ffffff' } );        fpsText.fixedToCamera = true;

update:

 if (game.time.fps !== 0) {    fpsText.setText(game.time.fps + ' FPS'); }

if i delete this framecounter it will not crash anymore on my tablet..   that's really strange..  is something wrong with the way i implement this frame counter? why wouldn't it crash on the desktop just on my tablet (nexus 7 chrome browser) ?? !!

 

i guess this thread is solved.. but the question remains .. why the hell?

Link to comment
Share on other sites

Does other text work on the tablet?

Does other text with arial as the font work on the tablet?

(Other then the font beeing the problem, I have no idea what could be it.. all your other ingame text hints seem to sprites, so no fonts involved)

Link to comment
Share on other sites

neither text nor font-styles are responsible for the crash - it's showing game.time.fps on state change!

 

if i make sure that (in the update loop) the text that shows the fps is not updated anymore right before the state change i can prevent the crash.

 

pseudo:

if gamestate == running : showfps

else if gamestate == lost OR gamestate == win :  dontshowpfs

 

the moment my player finished the level gamestate is set to "win" and the fps update stops..    thats ok but definitely a workaround for a bug 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...