Aug. 28, 2009

This is a free album of breakbeats, bloop-bleeps, and guitars which I never properly released. So now I am. It is Creative Commons licensed, so feel free to download, copy, share it if you like it.

Enjoy!

cryptolect

It would be nice if a few more people hear it, so if you like it I would really appreciate it if you blog/tweet or whatever about it.

This album was composed with a type of old school software called a tracker early this decade, which was and still is often used to make video game music.

Thanks for listening.

July 19, 2009

I was having a really dull time trying to port my GameJam0509 entry to anything other than the development platform, Debian GNU/Linux. I managed to get it running under Mac OSX 10.5, but Windows was giving me a really hard time, so I've done is what any self-respecting internet slacker would do and made a game trailer instead. This is all ingame footage (sorry about the low framerate but the game is heartily unoptimised).

The Infinite 8-Bit Platformer concept is an idea I had ages ago, and the basic game design is this:

  • There is no shooting or killing in this game. The primary game mechanics are exploratory and social. You can run, jump, go through portals to new levels, and collect things.
  • Content is user generated. As you can see in the video, the game includes an in-game editor. You can edit levels, portals (connections between levels), and items.
  • It's massively multiplayer in the same way that a MUD is massively multiplayer. As you explore the levels you can see other people doing the same, and you can stop and chat with them, give them items, etc. (this bit isn't implemented yet).

So basically I was hoping that if enough people used the game enough we'd end up with a massive, social, network connected platformer which you could explore for hours and hours, always finding new and interesting things, places, and people. Maybe I'll finish it one day, we'll see. In the meantime, all there is is this trailer and blog post. :)

Anyway, one things that GameJam0509 taught me is that the old way of making games kind of bites, and the web based entries kicked butt. From now on I think I'm going to try and do game development in the open, on the web.

July 18, 2009

I've been doing a lot of really boring, but neccessary work on the documentation for jsGameSoup, the Free Software library/framework I've been writing so that I can make web based games without using Flash. So here it is (click on the image below). Enjoy!

jsGameSoup link image

July 9, 2009

I did a little bit more work on the Javascript games library that I've been working on recently, adding rudimentary collision detection. It needs quite a bit more work, but I'm getting there slowly. That allowed me to put shooting into the little asteroids-like game that I'm using to test the framework. Click on the image to play.

AsteroidsTNG revision 41

I've also been doing a bit of work on the documentation of jsGameSoup so that other people can start using it more effectively. I got jsDoc running, producing documentation from the comments in the code. I need to get that documentation online and make a nice little mini-site like the great flixel one at some stage. I've also started documenting reasons why a game developer might like to use jsGameSoup:

  • If you make a game for the web, it will run everywhere, for everyone. Desktops, netbooks, games consoles, hand-held devices "...giving developers the largest user base of any platform."
  • jsGameSoup runs on the major current generation browser engines, including Internet Explorer, Firefox (gecko), and Safari (WebKit).
  • jsGameSoup relies on open standards and protocols, which means it runs in the lowest-common-demoninator places where proprietary technologies won't run.
  • jsGameSoup is Free Software, which means that the users and developers (that's you) will have control over its future, unlike proprietary technologies such as Flash and Silverlight.

Here are some of the things that are not yet supported by jsGameSoup, but which I am looking to support soon:

  • Documentation - I've started on this, but I need to get it online with lots of demos and examples.
  • Bitmap graphics - The canvas element is the basis of jsGameSoup and it supports bitmap graphics, but I haven't tested how it performs yet on all of the browsers.
  • Collision detection - I have implemented very naive bruteforce collision detection. I need to implement the more complex collision detection system I have in mind in order for it to scale up to games with more entities.
  • Sprite/Animation - I'd like to add vector and bitmap sprite management and animation to jsGameSoup to make it easier to draw and manage on-screen entities.
  • Networking - I will probably make a separate Javascript library with a Python based server for plugging into jsGamesoup to write multiplayer games with it. I have written a couple of Python based game/web servers before, so I have some idea of a good architecture for that.
  • Inheritance - I am thinking about adding John Resig's Simple Javascript Inheritance to the library to make it easier to code in an object oriented style. Maybe this is best left as an optional plugin though.

Taking all that into account, you can see from the AsteroidsTNG demo that you can make basic 2d games using jsGameSoup already, and they will run in the major browsers.

jsGameSoup is LGPLv3 and AsteroidsTNG is GPLv3. Here is their source code:

jsgamesoup-46.zip

or bazaar:

bzr branch http://mccormick.cx/dev/jsgamesoup/

AsteroidsTNG-41.zip

or bazaar:

bzr branch http://mccormick.cx/dev/AsteroidsTNG/

June 29, 2009

This weekend, in between watching Captain Picard versus Gandalf and having a birthday drink, I somehow managed to find some time to work on my web based games library, currently tentatively named 'JSGameSoup'. Click through the image to try out a little demo which uses it:

AsteroidsTNG revision 40

This demo doesn't do that much except let you fly around, but you can see where it's leading, and what the library is basically capable of. The idea is to make a Free Software game development environment which can be trivially deployed to web browsers and portable devices like Android, Nintendo DS, etc. I want to keep it completely free of proprietary technologies so that people don't have to rely on Flash, for example, to develop games for the web and beyond. I am pretty excited with how things are going. So far it seems to work well and speedily with the three majority rendering engines; Gecko, IE, and that KHTML fork that some company started. In other words, the demo runs with acceptible quality and speed on the majority of operating systems in the majority of browsers, with no fiddly tweaking - Hooray! \o/

Even though I've only just started doing it, I am really liking this new way of making and releasing games and game libraries, where I get to release them right here on this blog to you, the three people who read it. :) I really need to set up comments here as well, so I can actually get some feedback on the releases (but please feel free to email me). I think the fact that making games feels fun again, is a very good sign that I'm on the right track.

Anyway, as usual, here is the source code:

jsgamesoup-39.zip

or if you are a bazaar user:

bzr branch http://mccormick.cx/dev/jsgamesoup/

AsteroidsTNG-40.zip

or the repo:

bzr branch http://mccormick.cx/dev/AsteroidsTNG/

JSGameSoup is LGPLv3 and AsteroidsTNG is GPLv3.

The code of the Asteroids themselves is quite similar to what I posted before, except that it uses canvas commands now, instead of processingjs commands to draw. Here's the code that drives the ship:

function Ship(world) {
    this.world = world;
    this.world.player = this;
    this.x = gs.width / 2;
    this.y = gs.height / 2;
    this.angle = 0;
    this.speed = 0;
    this.points = [[0, -13], [-7, 7], [7, 7]];
    this.poly = [];
    this.lastsmoke = null;

    this.keyHeld_37 = this.keyDown_37 = function () {
        this.angle -= 0.1;
    }

    this.keyHeld_39 = this.keyDown_39 = function () {
        this.angle += 0.1;
    }

    this.keyDown_38 = function () {
        this.speed = 1;
    }

    this.keyHeld_38 = function () {
        if (this.speed < 3.0)
            this.speed += 0.3;
    }

    this.keyDown = function (keyCode) {
        //console.log(keyCode);
    }

    this.update = function() {
        if (this.speed > 0.1)
            this.speed -= 0.1;
        else
            this.speed = 0;
        this.x = (this.x + this.speed * Math.sin(this.angle) + gs.width) % gs.width;
        this.y = (this.y - this.speed * Math.cos(this.angle) + gs.height) % gs.height;
        for (n=0; n<this.points.length; n++) {
            this.poly[n] = [this.points[n][0] * Math.cos(this.angle) - this.points[n][1] * Math.sin(this.angle) + this.x, this.points[n][0] * Math.sin(this.angle) + this.points[n][1] * Math.cos(this.angle) + this.y];
        }
        if (this.speed && (!gs.inEntities(this.lastsmoke) || gs.distance([this.lastsmoke.x, this.lastsmoke.y], [this.x, this.y]) > 15)) {
            this.lastsmoke = new Smoke(this.x - 9 * Math.sin(this.angle), this.y + 9 * Math.cos(this.angle));
            gs.addEntity(this.lastsmoke);
        }
    }

    this.draw = function(c) {
        c.strokeStyle = 'rgba(255, 255, 255, 1.0)';
        gs.polygon(this.poly);
    }
}

And here is the object/class defining the little smoke particles which come out of the ship:

function Smoke(x, y) {
    this.x = x;
    this.y = y;
    this.life = 1.0;

    this.draw = function(c) {
        c.strokeStyle = 'rgba(200, 200, 200, ' + this.life + ')';
        c.beginPath();
        c.arc(this.x, this.y, 2, 0, Math.PI*2, true);
        c.closePath();
        c.stroke();
    }

    this.update = function() {
        this.life -= 0.08;
        if (this.life < 0)
        {
            gs.delEntity(this);
            this.life = 0.01;
        }
    }
}

The whole game is launched like this, where gs is the JSGameSoup() object that is automatically created by the framework:

w = new World();
gs.addEntity(w);
gs.addEntity(new Ship(w));
for (n=0; n<3; n++) {
    gs.addEntity(new Asteroid(w));
}

To me this code feels like it does quite a lot for just a little bit of work, and that's always nice.