Partsu Posted January 15, 2015 Share Posted January 15, 2015 I have noticed that I cannot use tilemaps with most mobile devices (e.g., Android and iPad 1) as the game starts to lag when the camera is supposed to move. To test this, I took the "sci fly" from the examples and added some simple touch controls. Now I can play the game just fine if I keep the player sprite near the starting point. Once the sprite travels further, the game starts to lag and eventually practically freezes. If I disable the camera.follow from the moving sprite, there are no problems. I also tried to add controls to move the camera itself with the touch controls and the game froze immediately when I touched it. Has anyone else experienced this? I am using Phaser 2.2.2. Pooya72 1 Link to comment Share on other sites More sharing options...
Partsu Posted January 26, 2015 Author Share Posted January 26, 2015 This has become a real issue on developing mobile games with Phaser. I have noticed that most Android devices also fail to scroll the tilemaps, as does iPhone 4s.I made a simple example of this problem by modifying the "sci fly" example from the Phaser examples to include touch controls: http://users.jyu.fi/~petmikpa/tilemaps/ The game will freeze once the screen is supposed to begin to scroll. You need to fly a little bit to have the effect. I'm not quite sure where to start to solve this issue. Without the tilemap functionality Phaser becomes totally unusable for my project. Can it even be resolved? Link to comment Share on other sites More sharing options...
Partsu Posted January 26, 2015 Author Share Posted January 26, 2015 It seems that at least iPad throws an error message to the developer log when the game freezes: INDEX_SIZE_ERR: DOM Exception 1 : Index or size was negative, or greater than the allowed value Unfortunately Firebug is not able to give out the line where this occurs. Link to comment Share on other sites More sharing options...
valueerror Posted January 26, 2015 Share Posted January 26, 2015 https://github.com/photonstorm/phaser/issues/839 maybe this helps a little bit.. there is a tilemap plugin for phaser called "tiledmap" (i believe its called that way.. search the forum! ) that should give you better performance results. with this testgame of mine http://test.xapient.net/phaser/attm/ i have 45 frames on my oneplus one and 40 on my nexus 7 most of the time.. this is without the plugin.. i should be much better with the plugin Pooya72 1 Link to comment Share on other sites More sharing options...
Partsu Posted January 27, 2015 Author Share Posted January 27, 2015 Thank you. The Tiledmap plugin clearly performs much better. There are still issues with iPad 1 but that is due to the very old Safari. Hopefully the development of the plugin has not ceased as the Phaser's own tilemap system is quite broken as it is. There are still some things the plugin does not have, such as the arcade support. Link to comment Share on other sites More sharing options...
Pooya72 Posted July 7, 2015 Share Posted July 7, 2015 i have the same problem by using camera.follow and tilemap together, is there any plan to solve this problem ? Link to comment Share on other sites More sharing options...
Recommended Posts