TODO, given we have determined it's unreasonable to expect ClientEngine to handle both server + serverless modes, we should consider passing the server info in to the constructor.
The purpose of this is to provide some ticking of the simulation system even when the renderer isn't, to guard against too much simulation work building up. If the renderer is using the simulation there should be almost no work to do here. Most browsers appear to stop servicing requestAnimationFrame when there is no focus and so by doing this we avoid the simulation pausing. Browsers also limit the fastest setTimeout to about 1s so there's no point having this in a loop tighter than 1s. Literature reports 1 second my testing in latest Chrome shows 2 seconds even.
Continuous input remains the same on the server if it doesnt get an update from client. Good for things like player movement instructions from inputs that are held down by the player.
Generated using TypeDoc
The main class for game clients. Brings together all the client-side systems in the engine.