Future of Sphere: Sphere v2 and the Web
I recently opened this GitHub issue for implementing browser-like behavior in the main engine so that we could experimment with writing Web-friendly Sphere games:
https://github.com/fatcerberus/minisphere/issues/78
The fact is, most of what's needed already exists. The Dispatch API, to be introduced with minisphere 4.3, is an important piece of the puzzle as it brings the ability to set update and render hooks that work engine-wide rather than just in the map engine. However because there is it yet an engine-provided frame loop, games still need to be written in the classic way:
while (system.run()) {
screen.flip();
}
Which works well for a PC game but would never fly on the Web unless you want your game to get killed by the browser in short order for "running too long".
In fact anything that blocks is right out, for exactly the same reason. APIs like system.sleep() need to be disabled, but more importantly, we need some sort of nonblocking I/O. It's proven that Sphere formats can be used on the Web, but Sphere's file API (including v2) blocks. That will need to change.
Anything else I'm missing?