Professional-Hobo / PokeMMOn-Old

MMO Pokemon Game using Node.js
http://keitharm.me/projects/pokemmon/
6 stars 2 forks source link

Refactor Game Loop #39

Open lobabob opened 8 years ago

lobabob commented 8 years ago

The Logic Loop currently uses SetInterval which is not very consistent. This needs to be fixed.

lobabob commented 8 years ago

Web Workers are probably our best bet for the logic loop. Web workers will run asynchronously and not block the render loop.

keitharm commented 8 years ago

Won't Web Workers use something like setInterval still though?

lobabob commented 8 years ago

This has been changed to be part of the grand refactoring.

lobabob commented 8 years ago

Use (http://www.isaacsukin.com/news/2015/01/detailed-explanation-javascript-game-loops-and-timing) as a source

lobabob commented 8 years ago

This also includes refactoring how calcInterval for Player works

lobabob commented 8 years ago

Also, we can do web workers when they're actually needed. Web workers are currently overkill for our super simple game loop