From the archives: DHTML Scorched Earth (2003)

I rarely leave projects unfinished, mostly because the "unfinished" part drives me nuts; unfortunately, this one slipped through the cracks. Demoed here in IE 6 (it almost worked in Mozilla/Phoenix at the time, save for some event handling.) A console.log()-style debug window is running to the left.

 

I got "so close" in this tribute to Scorched Earth (a PC-DOS classic game), and then hit a wall with a logic problem with multi-player where someone would die as the result of another's shot, they'd be removed from the player list, a turn would advance and then the "next" player would be skipped. In hindsight this should have been trivial, but I managed to muddle it up enough to frustrate myself to shelve the thing for a bit, and then it simply collected dust. Bah.

 

I'm occasionally reminded of this project, and briefly consider reviving it if only to get it finished. I was working on network play and chat before stopping, which lead to an early Comet prototype (which worked!)

 

The land was animated and "fell" like in the original DOS game too, and it was done by creating a ton of DIV elements. Yes, each slice of land is a 1-pixel-wide DIV element with varying height, randomly-generated at the start of each game.

 

Other fun parts: Making the tank's turrets with similar 1x1-pixel elements, and moving the turret in real-time as you adjust the angle/power on the HUD similar to the DOS game. (I never got around to doing this in the status window, apparently.)

 

The themes are separate CSS stylesheets, a sort of trend at the time (recall the CSS stylesheet switcher script?).. They actually worked quite well.

 

This was a fun experiment in object-oriented JavaScript following the fun of DHTML Arkanoid, though that one had the benefit of being finished and released.

1,828 views
1 fave
0 comments
Uploaded on March 12, 2010