Why DHTML?

Why Implement Chuckie Egg Using DHTML?

Twenty years ago, computers encouraged children to develop programming skills. For example, when you power up a BBC Model B you are presented with the BBC Basic command prompt.

Acorn Computers 32K

BBC Basic

>_

Without knowing at least some commands of the basic programming language you wouldn't get much further. This exposure to a programming interface nurtured the skills necessary to forge programs and led to a generation of people interested in computer games and capable of writing them. Modern operating systems insulate the user from programming languages and command-line interfaces. Nevertheless, they are programmable out of the box - you just have to know where to look.

I wanted to be able to implement a version of Chuckie Egg like the original authors would have done - i.e. without a fancy modern compiler, debugger, interpreter or integrated IDE. When you do a fresh WindowsXP install, you get Javascript coupled with Internet Explorer and notepad.exe as an editor. As it turned out, this was sufficient to make an accurate Chuckie Egg replica with the added benefit of it being completely cross platform (after dealing with minor browser differences).

Building a game in this way using the bare minimum is definitely a challenge, but that is where the fun lies. The demo writing scene is full of people who write incredible stuff with impossibly small executables purely because of the challenge. Whilst DHTML Chuckie Egg isn't as impressive as the work of those people, it was certainly more challenging than writing it in C++ or Java.

I found this article about writing DHTML games quite interesting. It summarises nicely the pros and cons of using DHTML for games development.

Things are getting better for DHTML based games all the time. Browser compatibility is improving making it easier to write cross-platform games and they are converging on what seems to be a cross-platform operating system. Technologies such as AJAX should make multiplayer DHTML games easy to implement. Native browser support for SVG (Scalable Vector Graphics) should dramatically improve what can be achieved visually. Continued improvement of HTML/CSS/DHTML development environments and standards provide ever richer ways of implementing DHTML games and the browser based web-page medium makes the games hugely accessible. Further more, with appropriate abstraction, there is no reason the game code couldn't be made to run natively rather than in a browser. This is the direction technologies such as WPF (Windows Presentation Foundation) are heading with applications that transparantly run as both a native executable and a web browser application.