1
Show Posts
This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.
Messages - Eggbertx
2
Libraries / EventEmitter for miniSphere
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() {
super();
ei.addListener("escEvent", () => {
Sphere.shutDown();
}, 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: https://github.com/eggbertx/eventemitter-sphere
3
Libraries / SphereIRC
Back in the day I wrote a very simplistic IRC bot for Sphere 1.5. Since Sphere 1.x is long dead and miniSphere has been here for a long time now, I figured I should probably resurrect it (SphereBot, not Sphere 1.x), but early on, I decided to work it into a general purpose IRC module to be integrated into your online game projects instead of a standalone bot.
4
Libraries / Re: box2d-sphere
5
Libraries / Re: box2d-sphere
6
Engine Development / Re: Oozaru: Sphere for the Web
What kind of functions do you have in mind?
One thing I can think of is accelerometer support. You see it in use in stuff like racing games, where your phone becomes a steering wheel, or even just simple stuff like Pokémon GO, where putting the phone upside down will turn the screen black to save performance.
7
Game Development / Re: The Screenshot Thread
8
Editor Development / Re: QtSphere IDE 0.6.0
9
Editor Development / Re: QtSphere IDE 0.2.5

It might end up being able to display the first frame of each entity as a preview, rather than a generic icon. I haven't decided yet.
10
Engine Development / Re: Oozaru: Sphere for the Web
11
Engine Development / Re: Oozaru: Sphere for the Web
Now if only they would add (better) support for Android to ChakraCore...
12
Game Development / Re: The Screenshot Thread
13
Game Development / Re: The Screenshot Thread
14
Game Development / Re: The Screenshot Thread
15