urbini icon indicating copy to clipboard operation
urbini copied to clipboard

employ physics engine that supports variable framerate

Open urbien opened this issue 12 years ago • 2 comments

This issue has been well understood in Games. Stefan (creator of cannon.js and p2.js) brought my attention to bullet physics engine, which addresses this issue. Here is their doc, and a discussion on this topic that illuminates the problems one developer was having and introduces the term temporal aliasing.

Steven Witten addresses this problem in his amazing webgl-ed slides on the topic of employing math to more close matching physical world in our animations, by creating what human brains are expecting to see, not just clean bezier curves, and along the way compensate for bumps on the road (caused by GC, background apps, user actions). All of this is to achieve a buttery-smooth life-like animation, or an illusion thereof. Fascinating presentation! If I understood Steven correctly, he does not just do temporal aliasing, he is also adjusting the animation path, to create an illusion for the user that the body was moving along the projected path in a gradual manner.

urbien avatar Dec 13 '13 20:12 urbien

You already know this from our email disussion, but I wanted to point out that p2.js now supports interpolation. This should compensate for temporal aliasing and irregular rendering framerate.

schteppe avatar Dec 22 '13 22:12 schteppe

Right, this is awesome, can't wait to see the DOM renderer for p2.js.

urbien avatar Dec 22 '13 23:12 urbien