ken_blanco31 Posted January 27, 2015 Share Posted January 27, 2015 Hi there so I'm new in game development and I'm trying to make a phaser game that utilizes accelerometer to control a ball through a maze and shoot it into a predefined hole.I completed the game in desktop and it works fine. However when I install it into android mobile using cordova the game lags and the ball pass through walls and worse is that the ball sometimes pass through the screen totally destroying the game. How can I solve this physics glitch? And How can I make run faster? I'm using old Phaser version 1.1.3 and CANVAS Here's my code https://github.com/kenblanco31/accelerometer-game Thanks! Link to comment Share on other sites More sharing options...
ken_blanco31 Posted January 27, 2015 Author Share Posted January 27, 2015 I tried using PHASER.WEBGL but its too slow Link to comment Share on other sites More sharing options...
valueerror Posted January 27, 2015 Share Posted January 27, 2015 in phase 1.1.3 physics and rendered fps are bound together so if frames are dropped calculations are also gone and tunneling occurs.. in 2.2.2 physics calculations are separated.. you could cap them to 30 "fps" (calculations per second) and configure all speed values acording to it.. tunneling should not happen then..@perfomance in general: hard to say without seeing your game/code Link to comment Share on other sites More sharing options...
ken_blanco31 Posted January 28, 2015 Author Share Posted January 28, 2015 here's my code. https://github.com/kenblanco31/accelerometer-game I tried upgrading it to phaser 2.x but apparently it has errors some errors about rendering Link to comment Share on other sites More sharing options...
ken_blanco31 Posted January 28, 2015 Author Share Posted January 28, 2015 Any tips on how to convert it to phaser 2.2.2 Link to comment Share on other sites More sharing options...
ken_blanco31 Posted January 28, 2015 Author Share Posted January 28, 2015 I wonder if the phaser creator have a thread for translation to 2.x Link to comment Share on other sites More sharing options...
rich Posted January 28, 2015 Share Posted January 28, 2015 https://github.com/photonstorm/phaser/blob/master/resources/Migration%20Guide.md Link to comment Share on other sites More sharing options...
ken_blanco31 Posted January 29, 2015 Author Share Posted January 29, 2015 I tried migrating but this error is appearing and I dont know how to debug itTypeError: this.texture is undefined phaser.js:2419TypeError: displayObject.texture is undefined phaser.js:27629 Link to comment Share on other sites More sharing options...
rich Posted January 29, 2015 Share Posted January 29, 2015 Could be anything in your code. Open Dev Tools, follow the stack trace, see what leads to that error. It'll give you the actual source code line numbers of each file, all the way through the stack, so it should be easy enough to walk backwards through it and see. Link to comment Share on other sites More sharing options...
Recommended Posts