MuneebBaderoen / cloaked-octo-avenger

Game Engine on top of Three.js
2 stars 2 forks source link

Game loop throttling #6

Open MuneebBaderoen opened 9 years ago

MuneebBaderoen commented 9 years ago

https://github.com/liabru/matter-js/wiki/Rendering#using-a-custom-renderer

Since we using threejs to render out the scene, and matterjs for the physics simulation, It might make sense to make full use off matterjs and not only implement a custom renderer, but also control the game loop and update rate of the physics to throttle around 60 fps.

Everyone has some experience of how things look when vsync is turned off and your framerate for simple things ends up going nuts, and actually playing becomes a bit harder.

So keeping rendering and logic in sync. Ye. need to do it.

MuneebBaderoen commented 9 years ago

@Sultan786ZA Can you drop that link you sent us about game loops in here? will be useful when we get to that point

FaraazSulaiman91 commented 9 years ago

http://www.koonsolo.com/news/dewitters-gameloop/

Boom