Moe Posted April 8, 2014 Share Posted April 8, 2014 hi, change the following in starstruck example: game.physics.arcade.gravity.y = 250; to game.physics.arcade.gravity.y = 600; and minimize the browser screen.when you return the player sprite will skip one collision with the layer. Link to comment Share on other sites More sharing options...
rich Posted April 9, 2014 Share Posted April 9, 2014 Yes because it comes back in with a large delta timer and gravity is so high its forcing it to tunnel through the platform. Set Time.deltaCap to something other than zero to limit the maximum the delta can ever rise to and it will prevent this. There's no "standard" value it should be, it's dependant on each game really. Link to comment Share on other sites More sharing options...
BunBunBun Posted April 9, 2014 Share Posted April 9, 2014 same issue, tried different values from game.time.deltaCap = 0.1 to game.time.deltaCap = 100000000did not help. Link to comment Share on other sites More sharing options...
Moe Posted April 9, 2014 Author Share Posted April 9, 2014 I tried changing game.time.deltaCap to some number other than zero, I even tried a negative number : ) still no result. Link to comment Share on other sites More sharing options...
rich Posted April 9, 2014 Share Posted April 9, 2014 I can't recreate this even with a gravity of 1200, however the deltaCaps you're trying are massive The delta timer in a 60fps system would be 0.016 normally. So capping it at even 0.1 is still really high. Try somewhere between 0.02 to 0.05. Link to comment Share on other sites More sharing options...
BunBunBun Posted April 9, 2014 Share Posted April 9, 2014 Thanks rich! game.time.deltaCap = 0.02, helped in my case. Let me know please what is the best delta timer in a 15-20fps system? how to calculate it dynamically? Link to comment Share on other sites More sharing options...
rich Posted April 9, 2014 Share Posted April 9, 2014 delta is the number of ms that has elapsed between this frame and the previous frame, divided by 1000. So in a solid 60fps system it's 16.666 / 1000 = 0.016 (recurring) - the 16.666 coming from 1000 (ms in a second) / 60, i.e. one frame every 16.6 ms for 60 frames in a second. For 20fps it'd be 50 / 1000 = 0.05. Link to comment Share on other sites More sharing options...
Moe Posted April 9, 2014 Author Share Posted April 9, 2014 Thanks rich! game.time.deltaCap = 0.02, helped in my case too. Link to comment Share on other sites More sharing options...
Recommended Posts