To go along with the upcoming minisphere 2.0, I started work on a new Sphere compiler, which I've named Cell.
Alll the issues in the past with
game.sgm contents being overwritten by various editors? Well, that's solved handily with Cell. With a script like this, called
cell.js in your game source directory:
function make()
{
game({
name: "Spectacles: Bruce's Story",
author: "Fat Cerberus",
description: "Follow Scott Starcross in his quest to stop the Primus.",
resolution: "320x240",
script: "main.js"
});
}
You run
cell on the command-line and get this output:
$ cell
Cell 2.0.0 (c) 2015 Fat Cerberus
One minute left! There's nothing you can do now... ha ha ha ha!
Processing target 'make'
Success!
Since the build script is JS, it potentially has a lot of power, as long as the bindings are there. Besides the basic stuff like copying files, there could be functions to, e.g. generate an RSS spriteset from a set of images, or perhaps if there's a vector-based map format in the future it could be converted into a Sphere-compatible RMP by a Cell script. The possibilities are, quite literally, endless.
The idea for this came about due to Radnen's idea for a scriptable build pipeline in Sphere Studio. I actually started implementing that (the initial effort can be seen in the Studio build included with minisphere 1.7.11), then realized it would be very useful to have this kind of functionality universally, accessible from the command-line as well as in the GUI.
What do you guys think of this development?