Jump to content

Velocity is not reliable (not deterministic enough)


Skeptron
 Share

Recommended Posts

Hi all!

 

I'm coding a multiplayer game with server verification and the first thing you need when doing so, is a deterministic environment. And my issue is that velocity seems not to be even remotely reliable...

 

I made a sandbox to illustrate my issue : http://phaser.io/sandbox/edit/vLcJZUDX

 

You can see that from frame to frame, the delta x (in px/s) is really different. 

 

I could set the x and y myself (without using velocity), but then I would loose the collision detection, which I want to use, of course.

 

Am I using velocity wrong? Is my sandbox poorly done?

 

Thanks a lot guys!

Link to comment
Share on other sites

Does phasor automatically fix step or lock the loop time?   Basically make your game logic run at a constant speed.    That's my immediate thought when seeing the game.

 

A second thing I've run into is that if you're counting time up for your fixed step(then suptracting when you actually run game logic).   You might not be aggressive enough in using your accumulated time, or your game logic is longer than your game step(unlikely).

 

I think it's likely something related to time.

 

I've also seen the same thing happen with bad key board logic.   Are you sure the the keys are staying registered as down?

 

 

EDIT:  whoops thought I was in general discussion, haven't used phasor so I might just be misleading you if phasor is high level as keeps you from controlling the above.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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