Cult of the Turtle

Joe Tortuga's musing on life,tech and gaming


February 04, 2010

So, I said the other day that I was going to work more with HTML5 since the triumvirate of Python/Pygame/PGU were starting to bother me.  I don’t want to denigrate either python or pygame as both are well developed, maintained and documented projects.  I don’t quite get PGU, and I think it mainly suffers from the fact that programmers aren’t usually also writers.  Tech writing is its own specialty that is under-appreciated in the open source world, I think.

Anyway, that’s not why I want to abandon the way I was going.  Here’s the thing: for someone to run my pygame game, they’ve got to have python installed (and the correct version).  Also they need the pygame libraries installed, plus any libraries that I use need to be installed or delivered with my game.

I remember what this was like.

When I first became a full time programmer, I worked on a 4GL called PowerBuilder.  It took four hours to compile, and even then it was only pseudo-compiled.  In order to distribute it, you had to include 14 other DLLs, along with the executable and libraries you used. It didn’t come with an installer (ubiquitous setup programs came with windows 95, and this was in the Windows 3.1.1 days).  So we had to compile it — and just in case something had changed — copy all those DLLs along with it to send to the client.  Back then, that meant copying it to a disk and mailing it.  As our application grew, it no longer fit on a single 1.4MB floppy disk, so we had to go to two disks, which introduced more error.

I worked with other companies, but kept this up for several years.  VisualBasic was slightly better for distribution with it’s runtime, but writing VB game the hives.

Then came the web, and everything pretty much changed.   We lost that “client/server” architecture in favor of one that mirrored the old mainframe methods, just with a much smarter, more capable client.  (IT goes in these cycles, I wouldn’t be surprised if in 5-10 years we’re back to a client/server model, but the current trends are away from that.)

You see the same thing in game development. Most games on my PC want to install DirectX.  There’s still a huge suite of files installed when you run the setup for a game, and all that has to be managed, designed to run on multiple operating systems (even if they are all windows), builds, etc.  Abstraction is good, minimal distribution is better.

The thing is, pretty much everything that connects to the internet today has a browser. Pretty much system has a browser that supports HTML5.  Maybe you’re stuck in an environment where you must use IE.  Well, you probably aren’t playing games there, eh?

Lord of Ultima says, “All you need to enter is a normal web browser…,” as Corvus pointed out recently.  That’s pretty appealing.

I’m not finding any libraries yet, but the other reason I’m switching is that writing HTML and javascript is something that I do every day at my job.  My javascript-fu is a little rusty, but it’s coming back to me as I play with things.  You can look at some of my experiments over at the new Games website which is more of a lab at the moment. I do have a bouncing ball thing working using canvas.

It’s not much, but you know what? It works in Firefox and Chrome under windows xp and windows 7.  It also works on my iPod Touch and the browser on my Android phone. I bet it works under Linux and MacOS and on the iPad, too.  There will be some game design issues if I use keyboard controls, or want to support multitouch — those are the edge capabilities now.  But mouse clicks and single tap controls should work across all the platforms, defining the constraints of the design.

I’m excited by it, and it’s fun to boot!  Now to keep work on these tools so they’re ready in three and a half weeks!