swissnetizen Posted February 18, 2016 Share Posted February 18, 2016 (edited) This is on 2.4.4 because 2.4.5 has some text rendering issues of its own. I've got this really weird issue. I have a menu screen which advances to a level select and then play. When advanced to the level select then back to the menu, the menu text is unaffected. If I advance to a level before going back to the menu, the text doesn't appear any more (I've checked, and it does exist). But when we try to advance to a level which doesn't exist (and I deliver an error message) the text still appears. I've narrowed the issue down to when I added support for tilemaps. Edited February 18, 2016 by swissnetizen level to tilemap Link to comment Share on other sites More sharing options...
drhayes Posted February 18, 2016 Share Posted February 18, 2016 Do you change states to show the menu? I've displayed text after loading a tilemap in 2.4.4 so I don't think that's all there is to it. Link to comment Share on other sites More sharing options...
swissnetizen Posted February 18, 2016 Author Share Posted February 18, 2016 I do change states, but I think it's caused by the tilemap because I've checked diffs of the source before and after and tilemaps was the major change (there was a minor tweak to some keyboard events). Link to comment Share on other sites More sharing options...
drhayes Posted February 19, 2016 Share Posted February 19, 2016 Wait, sorry, I'm confused: is the problem that the text isn't showing up or that it is? Link to comment Share on other sites More sharing options...
swissnetizen Posted February 19, 2016 Author Share Posted February 19, 2016 The issue is that it doesn't show; yet when you check game.world.children it says that the text exists. Link to comment Share on other sites More sharing options...
swissnetizen Posted February 20, 2016 Author Share Posted February 20, 2016 Just updated to Phaser 2.4.6, no improvement. Link to comment Share on other sites More sharing options...
jpdev Posted February 21, 2016 Share Posted February 21, 2016 Try to reset the camera and world size at the beginning of your menu state. At least when I had this problem it was caused by the level having a bigger world size and the menu being placed at the world center (which was off screen). drhayes 1 Link to comment Share on other sites More sharing options...
swissnetizen Posted February 21, 2016 Author Share Posted February 21, 2016 That makes sense, how would you do that? Link to comment Share on other sites More sharing options...
jpdev Posted February 21, 2016 Share Posted February 21, 2016 You could first add: game.debug.cameraInfo(game.camera, 32, 32); to your render method, to get information on the camera. To test if the world size is the problem put: game.world.setBounds(0, 0, 1920, 1920); to the create method of your menu state. (but use the resolution your game has). Link to comment Share on other sites More sharing options...
swissnetizen Posted February 21, 2016 Author Share Posted February 21, 2016 Thanks! that was it! Link to comment Share on other sites More sharing options...
Recommended Posts