Re: minisphere 4.3.1
Reply #1395 –
Quick update: minisphere 4.3.1 adds an engine-provided frame loop that runs as long as there are active Dispatch jobs. While seemingly a small change, this represents a fairly large paradigm shift. Instead of this:
while (system.run()) {
// render stuff here
screen.flip();
// update stuff here
}
The idiomatic Sphere v2 way to write a game is now:
Dispatch.onUpdate(doUpdate);
Dispatch.onRender(doRender);
function doUpdate()
{
// update stuff here
}
function doRender()
{
// render stuff here
}
It's a bit more complicated, but effectively paves the way for cross-compatibility with Oozaru. And if you're only targeting minisphere, then you can still use the classic method.