I have just updated my Cube Defense Demo to work in both WebGL enabled WebKit and FireFox. It is still 10-20fps slower compared to WebKit, but hey, at least it works! I would like to thank those who emailed me tips on making it compatible for both.
To share my experience, these are some of the things I had to change to make it work for WebKit and FireFox:
• Use UNSIGNED_SHORT instead of UNSIGNED_BYTE • Use CanvasUnsignedShortArray instead of CanvasUnsignedByteArray • For FireFox, use WebGLFloatArray instead of CanvasFloatArray. This will make things faster. • ARRAY_BUFFER rather than ELEMENT_ARRAY_BUFFER
• “clearDepth” for WebKit, “clearDepthf” for FireFox
• In “bindBuffer” function use null instead of 0
If you have anything else to add, share your thoughts! *Update: (November 18th, 09)
This is a little outdated now, so I crossed out some irrelevent stuff. Also, in the lastest WebKit, anything that was CanvasXXXXXArray is now WebGLXXXXXArray.
This is a playable demo of a game I’ve been working on with WebGL. As per usual, this will only run in WebKit Nightlies build. No bias or anything, but WebGL runs too slow for the game to work in FireFox Minefield. (It will work in both WebGL enalbed WebKit and Firefox, but WebKit will perform better.) This is also my first take on trying to make a tower defense style game, so don’t expect too much.
This is a work in progress of a game I will be making. This is based on BOOST (Some of you might see the resemblance).
Like the last example, it only runs on WebKit Nightlies at the moment. It renders partially in Firefox (Minefield) but is too slow, so I have disabled it from running.
It’s been a while since I’ve blogged last time. We’ve just wrapped up a project with VanAqua (See Chris Stone’s post for more info) and now with my down time, I started looking into WebGL. WebGL is OpenGL for web (duh) but it is currently underdevelopment and it is supported in very few browsers.
This is something I’ve come up with today. I am planning on turning this into some sort of game. Use A-S-W-D keys to move your box.
IMPORTANT!!!: You’ll need to have the latest WebKit Nightly build to run this. To set up, just follow the instructions on this page.
I’ve been working on a game called BOOST and here is the game description:
You’re the pilot of Space Octopus, a shiny metallic badass spaceship, stranded in the middle of a solar galaxy system far far away. In order to escape this madness, you need to cruise through asteroids, space people and such, and journey back to your mother planet. Here is the conflict: you only have limited fuel. To make things worse, no one can hear you scream in the milky way of star clusters. Luckily, like any other space galaxy, there are fuel cells floating in the vacuum of space. You need to keep collecting these to keep your spaceship running. Get it before they get to you! Remember, no one can hear you scream in space.
I apologize for the grammar in the game description. It’s intentional (or is it?)