Sign in to follow this  
Skeptron

Velocity is not reliable (not deterministic enough)

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!

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.