Skip to main content


Recent Posts

Libraries / EventEmitter for miniSphere
Last post by Eggbertx -
I'm working on a relatively simple (but hopefully useful) event system for miniSphere influenced by Node.js's EventEmitter class, so if you're familiar with that, this should be fairly simple to get used to.

Some examples:
Code: (JavaScript) [Select]
import { Thread } from 'sphere-runtime';
import { EventEmitter } from 'events';

const maxListeners = 32;
const escOnlyOnce = true;
let ei = new EventEmitter(maxListeners);

export default class Game extends Thread {
    constructor() {
        ei.addListener("escEvent", () => {
        }, escOnlyOnce);

    on_update() {
        if(kb.isPressed(Key.Escape)) ei.emit("escEvent");

The `event#addListener` function also takes an optional parameter that emits the listener when it equals true or is a function that returns true.
Code: (JavaScript) [Select]
ei.addListener("escEvent", Sphere.shutDown, escOnlyOnce, () => {
    return kb.isPressed(Key.Escape);

I'm also working on a class for handling key press/release events

GitHub repo:
Engine Development / Re: Tileset won't update...
Last post by Radnen -
Since it's minisphere; it's likely an issue with Cell, the game 'compiler' system, which is supposed to compile your assets into a distribution folder for release. In this case the 'dist' folder has an outdated tileset.
Engine Development / Tileset won't update...
Last post by Defiant -
So I'm trying to make the change from the old sphere to miniSphere, but I'm old, I hate change and somethings frustrate me to the ends of the earth.

Anyways, I think it's a bug, I'm using miniSphere 5.3, and working off a blank tileset and editing it as I go. I frequently load up the game to see how things look and try to see proportions of the surroundings. The problem is that in the editor it updated to the newest iteration, but when i test the game it defaults to an old version. I've tried closing the map, and the project itself.

The top part is cropped from the editor, while the part below is being ran from the engine.

Is there something I'm missing?
Engine Development / Re: Oozaru: Sphere for the Web
Last post by DaVince -
Hey! I haven't been around for a while but this is looking mighty impressive so far, good job! :))
This sounds pretty much like the first few text-based games I ever wrote in QBasic.  Variables?  Functions?  What are they?  It was pretty much just a long string of IF..THEN and GOTO for each relevant input :P

Of course mine weren't roguelikes.  To code a whole roguelike like that... that's impressive.

    I saw that the source code for Elona, a fun japanese roguelike was available online and decided to take a look. It turns out it is a single, 14mb text file with 444000 lines of code, completely devoid of comments, written in 'Hot Soup Processor', a japanese basic like language.

    The code that determines what monsters can spawn is 30000 lines of this (7% of the total game code), which checks for every monster, where if it fails it goto's the next monster, for all 1000 monsters in the game.

Screenshots of the game can be found here:

I loved the tile draw code:
So unlike Sphere. My respects to even get it to work.
Engine Development / Re: Oozaru: Sphere for the Web
Last post by Fat Cerberus -
The first proof of concept of Oozaru is up (running the Spectacles battle engine), check it out:

Consider this Alpha 1.  I won't call it a beta, since it's not quite feature-complete yet; sizeable portions of the Sphere v2 API are completely missing and/or inoperable.  Like, the Joystick class exists, but all methods are no-ops.  And almost the entire FS API is missing... that kind of thing.
Programming / Re: So I wrote a monad tutorial...
Last post by Radnen -
@FatCerberus: I think you just nailed it with that post, bud. :) That's indeed the simplest explanation yet. I was looking for a simple overview, like an "all-together", and what you just wrote, is it.
Programming / Re: So I wrote a monad tutorial...
Last post by FBnil -
Thanks for the tutorial. I reciprocate by giving you a link to Uncle Bob. I love his perspective about "new" programming paradigms. Don't want to give too much away, here it is:

And yeah, as a dinosaur, he knows Monads too and has a clojure perspective:

Here are the slides of the presentation:

And... ah, here it is, the presentation itself:

don't fall asleep now ;)  (yeah, they are long but fun, for a certain type of programmers fun)
Official version is 0.4.4 DEVELOPMENT

There's not much added, however I have implemented voxel sorting to get proper rendering orders, however it's SLOW and has exposed a bug regarding how voxels determine visible faces. I'll have to fix this for

An example of real-time voxel re-ordering during rendertime