Nov. 6, 2010

Update: There appears to be some weird bug on WebKit (at least in Chrome) making objects randomly not get drawn in both demos. Will have to figure this one out!

Update 2: The WebKit bug is now fixed and was due to the strage fact that Array.sort is unstable in WebKit - one to remember. Have fun!

jsGameSoup logo - a bowl and chopsticks

Here's another demo built using my HTML5 and Javascript game engine, jsGameSoup.

I also updated the AsteroidsTNG demo to support collisions so that the ship no longer passes through the asteroids.

I'm finding it pretty fun to fly around this almost infinite asteroid field finding interesting little places amongst the virtual space rocks. I really want to add some kind of multiplayer component to this demo.

After these changes jsGameSoup now has the following new features:

  • Collision engine with support for circle, poly, and axis-aligned bounding-box (rectangle) collisions.
  • Sprite engine which is capable of basic animation.
  • Seedable random number generator, useful for procedurally generated worlds where you want the same seed to generate the same thing for everyone every time.
  • Basic support for touch on WebKit browsers (like in the iPad and Android devices).

The collision, sprite, and random number engines are each simple and self-contained, and can be used independently of the jsGameSoup library by just including the respective javascript file in your project. If you use the library though, you also get cross platform events and robust entity management thrown in for free.

Unfortunately I still haven't updated the documentation or the jsGameSoup page to reflect these changes. Whoops!

Aug. 8, 2010

This weekend I have competed in Simon Wittber's GameJam. It's been a fun couple of days and nights hanging out with other nerds, programming video games. I used my Javascript/HTML5 games library jsGameSoup which meant I got the first working iteration of the game up and running after about four hours on Friday night. Saturday afternoon I polished it and tweaked the game mechanic with some good suggestions from Jack, Simon, Nick, and Jason. This afternoon I spent a few minutes getting it online and fixing bugs.

Anyway, here is a link to the game, PingZinger. I would love to hear what you think!

The theme of the game was "choose two at the expense of the other," which should give you some clue as to how to play the game.

Have fun!

Sept. 13, 2009

update: Oh wow, I completely forgot that there is already an awesome indie game called Dyson, thanks for reminding me, Dan!

Here's another AsteroidsTNG prototype. This asteroid field goes on until MAXFLOAT before looping (I think) and it contains up to 2^32 unique asteroids. I had to remove the collision detection, so you can fly through asteroids, but don't let that stop you from exploring! Oh wow, I just tested this on Internet Explorer and it runs hellishly slow. Sorry IE user, whoever you are. :(

(click on the image to play)

I think if I was ever to turn this into a proper game, I would call it Dyson, after the physicist Freeman Dyson who came up with the concept of the Dyson tree, which I would hope to work into the game. A short time ago I had the great fortune of briefly meeting Freeman Dyson's daughter and tech luminary, Esther Dyson, source of the following great piece of advice:

"Fail cheap. Fail fast. Fail often. Always make new mistakes." -Esther Dyson

I am a huge fan of this philosophy, especially when it comes to rapidly prototyping software and games.

This game was written inside the jsGameSoup framework.

Writing games for javascript and the canvas tag feels a bit like being an eight year old again, trying to squeeze every last cpu cycle out of my parents' Apple //e. Good times!

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/