Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Followup: Predictive positioning (rendering) #722

Open
parasyte opened this issue Aug 8, 2015 · 0 comments
Open

Followup: Predictive positioning (rendering) #722

parasyte opened this issue Aug 8, 2015 · 0 comments
Projects
Milestone

Comments

@parasyte
Copy link
Member

@parasyte parasyte commented Aug 8, 2015

Follows: #99 and #718

We have a new "frame_prediction" example which shows a naïve implementation of frame prediction built in user-code. This ticket will move the predictive positioning code into melonJS proper.

Some items to consider. All of these are in relation to the time delta of any skipped update:

  • me.Entity.draw should extrapolate the entity position
  • me.AnimationSheet.draw should handle the animation updates (in place of update)
  • me.TMXTileset.draw should handle the animation updates (in place of update)
  • me.Tween.draw should handle the tween updates (in place of update) even though it will not draw anything

This short spec will probably be pretty unstable until some edge cases are resolved. The edges are:

  • me.sys.updatesPerFrame === me.sys.fps:
    • update overruns allocated compute time
    • draw overruns allocated compute time
    • update and draw overrun allocated compute time together (but not alone)
  • me.sys.updatesPerFrame < me.sys.fps:
    • update overruns allocated compute time
    • draw overruns allocated compute time
    • update and draw overrun allocated compute time together (but not alone)

Where "allocated compute time" is equivalent to 1000 / me.sys.fps

@parasyte parasyte added this to the 4.0.0 milestone Aug 8, 2015
@obiot obiot modified the milestones: 4.1.0, 4.0.0 Oct 18, 2016
@obiot obiot modified the milestones: Future, 4.1.0 Jan 18, 2017
@obiot obiot added this to To Do (Core) in Roadmap Dec 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Roadmap
  
New Features (Core)
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.