Skip to content

minisphere 4.3.0

Choose a tag to compare

@fatcerberus fatcerberus released this 07 Nov 16:42

minisphere 4.3.0 is the third minor update in the minisphere 4.x release series, introducing the new Dispatch API, native support for promises, frame-perfect timing, and more. It is a fairly large update with several breaking changes, atypical for minor releases.

Breaking Changes

  • The entire engine now uses frame-perfect timing. API calls which previously
    dealt in seconds, such as system.now() and system.sleep(), now use
    frames. system.sleep() behavior has changed radically as a result - refer
    to the documentation for more information.
  • The new Dispatch API allows functions to be called asynchronously from the
    event loop. Calls may either be performed on the next tick, on a
    frame-perfect time delay, or once per frame. Refer to the included Sphere v2
    API reference for more information.
  • miniRT "struct" now provides Reader and Writer objects which work for
    both files and sockets. Refer to the included miniRT API reference for more
    information.
  • screen.frameRate will no longer accept 0 as a valid value. To disable
    the frame limiter, the frame rate must now be set to Infinity.
  • The fs object has been renamed to FS to match other namespace-like
    objects. There's little reason for it to be treated as a concrete object
    representing the file system, and doing so limits future extensibility.
  • The mouse and keyboard global variables have been removed and are now
    exposed as Mouse.Default and Keyboard.Default, respectively. This was
    done to allow support for multiple keyboards and mice to be implemented in
    a future version without a breaking API change.
  • The ShapeGroup constructor is now called Model to better reflect its
    purpose. Other than the name change, the API remains unchanged from previous
    versions of the engine.
  • The mostly redundant and non-standard SSJ functions have been removed from
    the API. Going forward, the "assert" module should be used for assertions,
    and SSJ.trace() can be replaced with console.trace() with no loss of
    functionality.
  • Promises are now supported natively through a polyfill. miniRT "pact" may
    still be useful to manage promises, but this allows them to be used without
    a pact if that's desired.
  • File-based objects such as Image and Sound now expose a .fileName
    property which allows access to the canonicalized SphereFS filename used to
    construct the object. This may be useful in certain encapsulation scenarios.
  • miniRT "threads" now takes advantage of the Dispatch API and no longer
    interferes with Sphere v1 update and render scripts. This should help with
    migration.

Changes in This Version

  • Adds a new Dispatch API for setting up asynchronous jobs. Jobs are called
    from the event loop; for example, Dispatch.onUpdate() is processed at the
    start of every frame.
  • Adds support for the JavaScript Reflect API.
  • Adds native support for JavaScript Promises via a polyfill.
  • Adds struct.Reader and struct.Writer which allow games to read and write
    binary data from files and network sockets.
  • Adds a .fileName property to objects such as Image and Sound, which returns
    the canonicalized name of the file the object was loaded from.
  • Adds assert() as an alias for assert.ok(), like in Node.js.
  • Renames the fs global object to FS to match other namespace-like objects.
  • Renames mouse to Mouse.Default to allow future support for multiple mice.
  • Renames keyboard to Keyboard.Default to allow future support for multiple
    keyboards.
  • Renames ShapeGroup to Model, better describing the object's purpose.
  • Removes the superfluous SSJ functions from the API.
  • Fixes several bugs discovered since minisphere 4.2.4 was released.
  • Updates the Sphere v2 API to use frame-perfect timing throughout. For
    example, system.now() returns the number of frames processed since engine
    start.
  • Improves Sphere 1.x compatibility. Many games which historically didn't run
    properly in minisphere, including Kefka's Revenge and Trial and Error, should
    now be fully playable.
  • Updates error messages to be more concise, making it clearer what went wrong
    at a quick glance.
  • miniRT no longer commandeers the legacy update and render scripts for itself.
  • When debugging with Sphere Studio, the gold "ssj" watermark in the bottom
    right is changed to blue to more easily distinguish interactive debugging
    sessions from command-line sessions.

Installing in Windows

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