minisphere 4.3.0
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 assystem.now()andsystem.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
ReaderandWriterobjects which work for
both files and sockets. Refer to the included miniRT API reference for more
information. screen.frameRatewill no longer accept0as a valid value. To disable
the frame limiter, the frame rate must now be set toInfinity.- The
fsobject has been renamed toFSto 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
mouseandkeyboardglobal variables have been removed and are now
exposed asMouse.DefaultandKeyboard.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
ShapeGroupconstructor is now calledModelto 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
SSJfunctions have been removed from
the API. Going forward, the "assert" module should be used for assertions,
andSSJ.trace()can be replaced withconsole.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
ImageandSoundnow 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.Readerandstruct.Writerwhich allow games to read and write
binary data from files and network sockets. - Adds a
.fileNameproperty 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 forassert.ok(), like in Node.js. - Renames the
fsglobal object toFSto match other namespace-like objects. - Renames
mousetoMouse.Defaultto allow future support for multiple mice. - Renames
keyboardtoKeyboard.Defaultto allow future support for multiple
keyboards. - Renames
ShapeGrouptoModel, better describing the object's purpose. - Removes the superfluous
SSJfunctions 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/minispheresudo apt-get updatesudo 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.