siggame / Viseur

Visualizer for the Cadre AI game framework
http://vis.siggame.io
MIT License
5 stars 9 forks source link

Thread delta state changes #10

Open JacobFischer opened 7 years ago

JacobFischer commented 7 years ago

One of the most expensive operations is when the game state changes, because we have to merge delta state(s), then tell the BaseGameObject instances that they have updated so they can update sprites and such.

This leads to micro stuttering between frames when a merge occurs, and the UI locks up.

Instead, we should use web workers to throw that expensive load to another thread, so the UI does not stutter.