Jump to content

Physics wall collision problems


ken_blanco31
 Share

Recommended Posts

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

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

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

 Share

  • Recently Browsing   0 members

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