Skip to main content

News

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Eggbertx

1
Libraries / Re: EventEmitter for miniSphere
I actually got the idea while working on my IRC client module to simplify handling IRC events, and figured it could be applied to many other projects. I created a GitHub repo for it and added a link to the OP.
2
Libraries / EventEmitter for miniSphere
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() {
        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
I'm working on a module for an IRC client class called SphereIRC, and I may eventually start working on a server class as well.

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
I could be working on more "important" projects, but priorities are lame, and I have at least made some progress on this. Eventually when it's in a more usable state, I'm going to make a sort of catapult volleyball game.
5
Libraries / Re: box2d-sphere
This project stagnated for a long time because I ran into some hiccups and had larger projects that needed my attention (and still do, technically), but it's actually starting to work decently, as you can see from the video. It still currently relies on the debug draw mode, but I'm figuring out how to make it more flexible. When I get a proof of concept "game" working, I'll post the source code to my changes to the original box2d-js, my box2d-stage module, and the game itself.
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.
Stuff like this, or handling swiping. Though I guess it would technically be possible for a game to do that, but a runtime ES6 helper module would be nice.
7
Game Development / Re: The Screenshot Thread
I haven't mentioned it until now since it's a very low priority project that may never even get finished, but I figured I may as well post a screenshot for interest. The blocks that comprise each letter are actually one image copied to multiple locations as determined by a per-character array of JS object literals with x/y coordinates.
8
Editor Development / Re: QtSphere IDE 0.6.0
And now the map editor is (slowly) starting to look like a map editor! Thanks @Fat Cerberus for helping with the weird tileset quirk.
9
Editor Development / Re: QtSphere IDE 0.2.5
This thread is in desperate need of an update since QtSphere IDE is still in development even though it isn't my main project. I'm currently working on the map editor, and even though it's still far from completion, it fully loads map files, and this is what the editor itself looks like so far:

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
I wonder if it would be possible to add Oozaru-only (for now) API functions and objects to make games for mobile browsers.
11
Engine Development / Re: Oozaru: Sphere for the Web
This makes me wish HTML5/Canvas was a more feasible option back when I was working on JavaSphere. If that had been the case, I wouldn't have even bothered with Java. I'm very happy to see that things are starting to come along well with Oozaru, and that miniSphere will finally be getting a proper platform-independent option. When it's more stable, it would be pretty cool to see it uploaded to the server to directly showcase miniSphere instead of pictures alone.
Now if only they would add (better) support for Android to ChakraCore...
12
Game Development / Re: The Screenshot Thread
I didn't even know about that until yesterday, when I was looking for an easier way to record games than with ffmpeg. I read about the game bar and saw the shortcut I mentioned in my post. I decided to try and see if it worked without opening the game bar first, and it did.
13
Game Development / Re: The Screenshot Thread
By the way, if you're in Windows 10 and want to record a game/window, press Win+Alt+R to start recording. Then when you're done, press Win+Alt+R again to finish recording. I just converted the video to webm with ffmpeg because I thought it would expand the video inline like it did with the GIF file I uploaded earlier.
14
Game Development / Re: The Screenshot Thread
Weird, I could've sworn I posted an updated screenshot of my Chip's Challenge clone...anyway, it fully loads and parses the binary .DAT file and accurately (mostly) draws levels to the screen. You can move around and it handles basic collision, but not much else (yet). I replaced the UI background and the time font with my own, and eventually I'll either replace the sprites and tiles with my own or use the sprites and tiles from Tile World to avoid copyright issues.
15
Game Development / Re: The Screenshot Thread
I posted the screenshots in the Discord so I may as well post them here too. On a whim, I decided to write a Wavefront .obj model parser to experiment with 3D drawing in miniSphere. It's extremely preliminary, but here's what I've got so far. The screenshots are of a correctly loaded but not correctly (yet) drawn Suzanne, a built-in Blender model: