You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
This discussion was converted from issue #722 on September 17, 2021 06:46.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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 positionme.AnimationSheet.draw
should handle the animation updates (in place ofupdate
)me.TMXTileset.draw
should handle the animation updates (in place ofupdate
)me.Tween.draw
should handle the tween updates (in place ofupdate
) even though it will not draw anythingThis 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 timedraw
overruns allocated compute timeupdate
anddraw
overrun allocated compute time together (but not alone)me.sys.updatesPerFrame < me.sys.fps
:update
overruns allocated compute timedraw
overruns allocated compute timeupdate
anddraw
overrun allocated compute time together (but not alone)Where "allocated compute time" is equivalent to
1000 / me.sys.fps
Beta Was this translation helpful? Give feedback.
All reactions