minisphere 3.0.0
minisphere 3.0.0 is a massive release, the biggest in the history of the project. It brings several new features, including a full-featured command-line debugger called SSJ, TypeScript support, and fully-documented CommonJS modules for miniRT, as well as a slew of minor fixes and improvements. It also marks the first time minisphere binaries have been offered for Linux*.
note* Official Linux support is currently limited to Debian-based distributions.
Release notes (minisphere 3.0)
- SphereFS sandboxing is more comprehensive. API calls taking filenames no
longer accept absolute paths, and will throw a sandbox violation error if one
is given. As this behavior matches Sphere 1.x, few if any games should be
affected by the change. - minisphere 3.0 stores user data in a different location than past versions.
Any save data stored in /minisphere will need to be moved into
<documents>/Sphere 2.0/saveDatato be picked up by the new version. - miniRT has been overhauled for the 3.0 release and is now provided in the form
of CommonJS modules. Games will no longer be able to pull in miniRT globally
usingRequireSystemScript()and should instead userequire()to get at the
individual modules making up of the library. Games relying on the older
miniRT bits will need to be updated. - When using the SSJ command-line debugger, source code is downloaded directly
from minisphere without accessing the original source tree (which need not be
present). When CoffeeScript or TypeScript are used, the JavaScript code
generated by the transpiler, not the original source, will be provided to the
debugger. - CommonJS module resolution has changed. Previously the engine searched for
modules in~sgm/modules. minisphere 3.0 changes this to~sgm/commonjs. Assert()behavior differs from past releases. Failing asserts will no
longer throw, and minisphere completely ignores the error if no debugger is
attached. This was done for consistency with assert semantics in other
programming languages.- When a debugger is attached, minisphere 3.0 co-opts the
F12key, normally
used to take screenshots, for the purpose of triggering a prompt breakpoint.
This may be surprising for those who aren’t expecting it. - TypeScript support in minisphere 3.0 is mostly provisional. In order to
maintain normal Sphere script semantics, the TypeScript compiler API
ts.transpile()is used to convert TypeScript to JavaScript before running
the code. While this allows all valid TypeScript syntax, some features such
as compiler-enforced typing and module import will likely not be available. - Official Windows builds of minisphere are compiled against Allegro 5.1. Linux
builds are compiled against Allegro 5.0 instead, which disables several
features. Notably, Galileo shader support is lost. If a game attempts to
construct aShaderProgramobject in a minisphere build compiled against
Allegro 5.0, the constructor will throw an error. Games using shaders should
be prepared to handle the error. - If SSJ terminates prematurely during a debugging session, either because of a
crash or due to accidentally pressingCtrl+C, minisphere will wait up to 30
seconds for the debugger to reconnect. During this time, you may enter
ssj -con the command line to connect to the running engine instance and
pick up where you left off.
Changes in this release
- The Windows redistributable and GDK downloads have been combined into a single
installer. The engine is so compact that there's nothing gained from having
separate installers. - minisphere is now officially supported on Linux!
.debbinary and.tar.gz
source packages will be provided for all minisphere releases going forward. - miniRT is completely revamped and modernized. All miniRT components have been
rewritten as CommonJS modules which allows them to be pulled in individually
as needed, instead of all at once using a global RequireScript(). - A complete API reference for miniRT is now included with the engine.
- Introducing the brand-new command-line debugger, SSJ! SSJ can be started by
runningssj <game-path>on the command line. This brings single-step Sphere
debugging to non-Windows platforms for the first time! - Strengthens the SphereFS sandbox: Using absolute file paths is no longer
supported and will result in a sandbox violation error. - Adds provisional TypeScript support. minisphere uses
ts.transpile()
internally to convert TypeScript to JavaScript, so some TypeScript features
may not work as expected. See the release notes for more details. - User data (screenshots, save files, etc.) is now stored in
<docs>/Sphere 2.0
instead of<docs>/minisphereas it was in prior versions. SPK packages can
be placed into thegamessubdirectory to have the startup game automatically
pick them up. - minisphere now looks for CommonJS modules in
~sgm/commonjs. - Enhances
Assert()behavior. If an assertion fails and the debugger is
attached, choosing not to continue will cause a prompt breakpoint instead of
throwing an error. If the debugger is not attached, any failing assertions
will be logged tostderrbut otherwise ignored. - Improves fullscreen behavior: Games are letter/pillarboxed to maintain their
aspect ratio when switching into fullscreen mode. - Screenshots are now given meaningful names based on the game filename and
current date instead of random characters. - The frame rate is now visible by default whenever a game is started using the
spheruncommand, and has been moved to the lower right corner of the screen. - When the debugger is attached, the engine now shows a small "SSJ" watermark in
the lower left corner of the screen as a reminder. - The engine now waits for sounds to stop playing before freeing them, even if
the Sound object goes out of scope. This allows a common Sphere idiom
new Sound("munch.wav").play()to work as expected. - With the debugger attached, you can now press F12 to pause game execution and
turn over control to the attached debugger. This can be useful when trying to
debug glitches that don't lead to an exception. - You can now change the minisphere Console verbosity level when developing in
Sphere Studio by going to the Settings Center page. V2 (high-level logging)
is the default. - Vastly improves object inspection in the Sphere Studio debugger. Object
contents will be displayed in a treeview, allowing you to drill down into
properties, alleviating the need to scroll through a potentially huge JSON
dump. - The command to run minisphere Console from the command line has changed from
mspheretospherun. This will be the standard command to start a
Sphere 2.0 engine in developer mode going forward. The end-user engine has
been renamed as well, tominisphere. RNG.vary()is now namedRNG.uniform().- New API:
DebugPrint(), for logging low-level debug information without
cluttering the console.DebugPrint()output is visible only with a debugger
attached. - New API:
DoEvents(). This function can be called in a long-running loop to
avoid locking up the engine when you don't need to render anything or
otherwise disturb the backbuffer. Print()now accepts multiple values, which are separated by spaces when
printed.- The
sphereglobal object alias has been renamed toglobal, which is more
obvious and matches Node.js. Code relying on thespherealias will need to
be updated to work with minisphere 3.0. - All minisphere API functions, constructors, and constants have been marked as
non-enumerable, to avoid bloating the output when examining the global object
in the debugger. Everything is still fully writable and configurable, so as
not to prevent monkey-patching. - Fixes memory leaks in both Cell and minisphere, including a major one in
Cell's packaging code which could have caused it to run out of memory during
the installation step. - minisphere will no longer fail to start if the underlying platform doesn't
support shaders. Instead, the GalileoShaderProgramconstructor will throw
an error if called. Shaders are always disabled when the engine is compiled
against Allegro 5.0.
Installing in Windows
Simply download and run minisphereSetup-3.0.0.exe. The Inno Setup install wizard will walk you through the installation process.
Installing in Linux
For Ubuntu (14.04 and later), minisphere is available via personal package archive (PPA):
Installing from a PPA is easy. Simply open Terminal and run the following commands:
sudo add-apt-repository ppa:fatcerberus/minispheresudo apt-get updatesudo apt-get install minisphere
For other Debian distributions such as Linux Mint or Debian itself, simply download one of the .deb packages below. Users of 32-bit systems will want minisphere_3.0.0_i386.deb, while 64-bit users should download minisphere_3.0.0_amd64.deb. Once downloaded, simply double-click the file and your package manager will guide you through the process of installing the package.