urbien / urbini

Urbini ideas are now part of Tradle https://github.com/tradle, see also
http://tradle.io
30 stars 5 forks source link

employ physics engine that supports variable framerate #4

Open urbien opened 10 years ago

urbien commented 10 years ago

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.

schteppe commented 10 years ago

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.

urbien commented 10 years ago

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