Skip to content

minisphere 4.4.0

Choose a tag to compare

@fatcerberus fatcerberus released this 27 Jan 18:06

minisphere 4.4.0 is the fourth minor update in the minisphere 4.x release series and brings a massive overhaul to Cell, support for ECMAScript 2015 syntax with a properly-configured build, and many fixes for bugs discovered since minisphere 4.3.8 was released.

Important Considerations

  • The Cellscript API has been massively overhauled in order to improve
    extensibility. Cellscripts will need to be rewritten; review the Cellscript
    API reference to see what's changed.
  • Cell's command line interface has been updated to make it easier to use. It
    is now possible to initiate a build by simply entering cell while in the
    source directory. Doing so will build your game in ./dist.
  • SphereFS sandboxing has been strengthened: Attempting to make changes in a
    location which is specified to be read-only (such as the game package) will
    now throw a TypeError. Save data should always be stored in ~/ or a
    subdirectory.
  • ECMAScript 2015 constructs such as destructuring assignment and arrow
    functions are now supported in Sphere games. Note that Duktape doesn't
    support ES2015 syntax directly, so this requires a transpile() step in your
    game's Cellscript. For convenience, the Sphere Studio project template in
    this version includes such a step already.
  • All ECMAScript 2015 builtins such as WeakMap, Set, and Promise are now
    supported natively via a polyfill. This shouldn't impact compatibility, but
    may make some things easier so it's worth bearing in mind.
  • Most of the FS functions have been renamed to make them easier to
    understand at a glance. For example, FS.mkdir() is now called
    FS.createDirectory(). Scripts using these functions will need to be
    updated to work with minisphere 4.4 and later.

Changes in This Version

  • Overhauls the Cellscript API: require() is supported, file paths are
    resolved using SphereFS semantics, and Cellscripts and modules can now define
    custom targets and build tools for the ultimate in extensibility.
  • Improves the naming of the FS functions to make their intent clearer. For
    instance, FS.mkdir() -> FS.createDirectory().
  • Strengthens the SphereFS sandbox. Only the user directory (~/) is now
    writable; passing any other path to an API that requires write access will
    result in a TypeError.
  • Simplies the command-line interface for Cell. You can now initiate a build
    simply by running cell (with no additional options) from any directory with
    a Cellscript in it.
  • Adds FS.readFile() and FS.writeFile() which allow reading and writing
    an entire file in a single operation.
  • Adds a screen.frameSkip property to allow games to control frame skipping.
  • Adds support for ECMAScript 2015 built-ins like Map and Set using a polyfill
    which is loaded automatically on startup.
  • Adds a --clean command line option to have Cell delete all artifacts from
    the most recent build.
  • Adds a --rebuild command line option to have Cell build all targets, even
    if they are already up to date.
  • Adds support to Cell for ECMAScript 2015+ transpilation via Babel.
  • Adds support to Cell for minification via Babili.
  • Improves Sphere 1.x compatibility in various corner cases, and adds several
    missing Sphere v1 APIs.
  • Dispatch API functions will no longer accept a JavaScript source code string
    as a callback; the callback must now always be a function.
  • Improves the miniRT API documentation.
  • Fixes ANSI text coloration for SSJ in Windows 10 Anniversary Update and
    later.
  • Fixes an issue where Cell doesn't automatically rebuild a game if the
    Cellscript is modified between runs.
  • Fixes a bug where CommonJS module filenames don't get mapped to their source
    names when using SSJ Blue, causing the debugger to not be able to find them.
  • Fixes a bug where the miniRT terminal can get rendered before other threads.
  • Fixes a bug where random.sample() sometimes returns undefined.
  • Fixes a bug where error attribution doesn't work properly if Duktape.act()
    is not available at the time of the error.
  • Fixes a bug where a non-Error exception thrown from global code produces a
    confusing "script not found" error.
  • Fixes a bug where CreatePerson() won't accept a Spriteset object.

Installing in Windows

Simply download and run minisphereSetup-4.4.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/minisphere
  • sudo apt-get update
  • sudo apt-get install minisphere

You only need to do this once. The system will automatically notify you of future minisphere updates.

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_4.4.0_i386.deb, while 64-bit users should download minisphere_4.4.0_amd64.deb. Once downloaded, simply double-click the file and your package manager will guide you through the process of installing the package.