Skip to content

Use per-second instead of per-tick times#64

Open
nabijaczleweli wants to merge 4 commits into
masterfrom
наб/second-time

Hidden character warning

The head ref may contain hidden characters: "\u043d\u0430\u0431/second-time"
Open

Use per-second instead of per-tick times#64
nabijaczleweli wants to merge 4 commits into
masterfrom
наб/second-time

Conversation

@nabijaczleweli
Copy link
Copy Markdown
Member

Closes #63

@TheCatPlusPlus
Copy link
Copy Markdown
Member

The problem with this is that the framerate is not guaranteed to be constant, hence why requestAnimationFrame callback gives you a timestamp and why the stub had a delta calculation which was supposed to be used for this. The server needs something like that, too. Multiplying real time values by a constant is only really valid when time step is fixed (but you still need real time deltas to know how many times to update physics in a frame), otherwise they should be multiplied by the real time delta.

@nabijaczleweli
Copy link
Copy Markdown
Member Author

nabijaczleweli commented Apr 25, 2016

I guess timestamps in Game.frame are respected now?
If that's not it I'm not quite sure what you're on about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants