miniSphere 4.8.0
miniSphere 4.8.0 is the eighth minor update in the miniSphere 4.x release series. This release adds a new SphereFS prefix, new DirectoryStream and Image classes, Sphere 1.x compatibility fixes, and more. As always, upgrading is highly recommended!
Important Considerations
-
The Core API includes a new class,
DirectoryStream, which lets you game
enumerate the contents of a directory, seek within the list, etc., much like
you would read data from a file usingFileStream. DirectoryStream objects
are also compatible with the ES6 iterator protocol so you can use them in
from()query. Refer to the API documentation for details. -
SphereFS now supports a new prefix,
$/, which maps to the directory
containing the startup script. This should make importing local modules
easier. -
from()can now enumerate live ES6 iterator objects (i.e. with a compatible
.next()method), not just those with a[Symbol.iterator]method. -
The
MusicandLoggermodules now have designated base directories and
providing file extensions is optional. See the API documentation for more
details. -
A new
Imageclass in the Sphere Runtime makes it easier to work directly
with raster images, like you could in Sphere 1.x. For now only basic
blitting (likePrim.blit()) is supported; more features will be added going
forward. -
The backbuffer is no longer cleared between frames during map engine
processing, to improve compatibility with many Sphere 1.x games that relied
on this bug. There may be unintended fallout (graphical glitches) from this,
so keep an eye out.
Changes in This Version
- Adds a new
DirectoryStreambuilt-in class which allows you to enumerate the
contents of a directory. Works in both miniSphere and Cell! - Adds a new SphereFS prefix,
$/, which resolves to the directory containing
the startup script for miniSphere, or the root of the source tree for Cell. - Adds a new
Imageclass to the Sphere Runtime which allows working directly
with images, like in Sphere v1 code. - Adds
FS.directoryExists()for checking whether a directory exists. - Adds support for enumerating live iterators in
from.iterable(). - Adds a new experimental Person class to the Sphere Runtime which makes it
easier to work with map engine persons. - Improves windowed mode scaling behavior when miniSphere is run on a HiDPI/4K
display. - Improves the Music and Logger modules by giving them default base directories
(like in Sphere 1.x) and making the file extension optional. - Improves Sphere 1.x compatibility by avoiding clearing the backbuffer between
frames during aMapEngine()call. - Improves the maintainability of the codebase with extensive refactoring. Any
bugs, let me know! - Renames the
analogue.jssystem script topersist.jsto improve
compatibility with Sphere 1.x. - Fixes several issues in the implementation of
FS.rename()that could cause
the function to behave destructively on some platforms. - Fixes a bug where Cell
FS.writeFile()can accept a buffer object as input. - Fixes a bug in Cell
FS.fileExists()where it returns true for directories. - Fixes a bug in which a path specified uplevel from a SphereFS prefix, e.g.
@/../filename, is not correctly detected as a sandbox violation.
Installing in Windows
Simply download and run miniSphereSetup-4.8.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) (latest version only guaranteed on current Ubuntu release):
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.
Note: Users of other Linux distributions, or those using older versions of Ubuntu, can build the engine manually from the tarball (minisphere-4.8.0.tar.gz).