Archive for the ‘Web’ Tag
A Platform Game Using HTML5 Canvas
Nearly 15 years ago, when I was all of 15 years old, I wrote this little platform game which I have recently ported to Javascript/HTML5. It is a kind of Mario clone and at the time I named it “Fred Jones in Adventureland”… hmm, not a great name.
It was a fun game to write and I learned a lot about game development and even game design in the process of writing it, some of which I occasionally put in to practice in my current job.
The game remains somewhat incomplete; the player has unlimited lives and unfortunately there are only 5 levels. But as it stands it is a playable game and hopefully a little bit of fun. There are a couple of small surprises in the levels along the way too.
Browser Issues
If you’re using Microsoft Internet Explorer 7.0 or higher the game will run awfully slow (Update: The game now supports the Google Chrome Frame plug-in. If you are using Internet Explorer you should install this plug-in, otherwise the game will run slowly).
It also will not run at all in earlier versions of Internet Explorer, Firefox 1.0 and I believe Opera 9 and earlier. This is because these browsers do not support for the necessary parts of the HTML5 specification. Please upgrade your browser.
Controls
Left Arrow: move left
Right Arrow: move right
Ctrl: jump
Click the link above to play the game.
Technical Details
The game you are playing here is a port of the original game to HTML5/Javascript. This means it now runs within any web modern browser.
Unlike most web games the game does not use Flash. The <canvas> HTML5 element is used to draw all the visual elements.
All the code for the game is all available to read if you hit “view source” in your browser and I invite you to take a look.
I was pleasantly surprised by the performance of the <canvas> drawing operations and the modern javascript implementations, it runs at the same framerate it always has on pretty much all browsers except Internet Explorer.
Linux Users Slowest to Update Firefox
My screengrab script for Mozilla Labs Ubiquity (think of Ubiquity as an extensible command-line interface for Firefox… if you can imagine that) gets fairly regular hits. Depending on the user’s preference, each time they start Firefox a request will be made to my site to check for any newer version of the script.
This means that for some users I get a web server log message every time they start their browser.
One interesting statistic I’ve uncovered from these logs is a startling lack of hits from Firefox 3.5 on Linux systems. It seems that almost no one running Linux has bothered to upgrade to the shiny, if not a little over-hyped, latest offering from the Mozilla team.
These ugly charts show the picture somewhat better than words can. (Can anyone recommend a prettier, free charting tool?).
As the pies show, only 4% of the 70 Linux users to hit my site in the last 5 days have upgraded to Firefox 3.5. Compare that with the 76% and 56% of Windows and Mac users respectively and you cannot deny the conclusion that Linux users are slow adopters.
Of course the reason behind the slow adoption is obvious: the ever so slightly Orwellian package maintainers. Ubuntu (which comprises 58 of my 70 Linux visitors) only makes Firefox 3.5 available in development repositories, not the main-line. It’ll be the default browser come Karmic Koala, but do we really all have to wait until October for a faster Javascript engine and what not?
There are more ways to get Firefox 3.5 into your Linux distro than I care to name or describe. But all of these either find ways around your package manager or use untrusted 3rd-party repositories.
So for the sake of keeping your system stable, the pragmatic thing to do on the Linux desktop is to wait until your distro decides to support the software you want to use. That is hardly putting the user in control.
There has to be a better way.
“Sorry, the universe you are trying to access does not exist.”
Using my preferred feed reader Netvibes this morning, I was greeted with the following message, funnily enough after clicking an article about black holes…

I guess the New Scientist RSS feed contained an inter-universal URL… what’s the syntax for that again? I don’t know, but all this multiverse thinking is making my head hurt. Maybe it’s time to switch to Google Reader instead.
Leave a Comment
Leave a Comment


Leave a Comment