Skip to content

Followup: Predictive positioning (rendering) #722

Closed

Description

@parasyte

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

Activity

  1. added this to the 4.0.0 milestone on Aug 8, 2015
  2. modified the milestones: 4.1.0, 4.0.0 on Oct 18, 2016
  3. modified the milestones: , 4.1.0 on Jan 18, 2017
  4. locked and limited conversation to collaborators on Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions