2005-02-20

ZZT In JavaScript

Today I was bored, so I decided to start remaking ZZT in XHTML and JavaScript. Here is what I have so far of my ZZT Remake. (It requires a web browser with decent scripting capability, like Firefox.) I'm trying to focus on having it work internally how ZZT likely works, thus reproducing the same bugs and quirks naturally. The hard part about this, of course, is that the ZZT source code has been long lost. But so far, what I have functions very much like the real things. I decided to use CSS for all of the character presentation, so stylesheets can allow for different resolutions. In Firefox, go to View -> Page Style to see the alternative choices. So far, there's only one alternative, and it was just thrown together in a few seconds and is very incomplete, but you get the idea. The number of colors per character is essentially unlimited, but there may only be 16 color palettes. So you can have a high resolution red smiley, a high resolution blue smiley, and 14 other smilies for that character. The character images may be PNG, so characters can also have alphatransparency.

If you go to the right and down a couple spaces, you'll find a small group of what are called black holes. These are technically empties with stats. In ZZT, moving on top of them causes you to skip around. They also do that in my emulator, although I didn't program them specifically to. This is why designing it how Tim Sweeney likely designed ZZT really helps the developmental process. I just thought, hey, I wonder if black holes would work in my emulator, so I gave stats to a few empties, and viola! It works. No muss, no fuss.

Also, player clones work like they do in ZZT, To make a player clone appear in my emulator, press Insert. Again, my player clones weren't programmed specially to reproduce the bugs. They are real players (the same as the main player element), and they function the same way they do in ZZT.

If I'm still interested in developing this by then, I'll allow it to load actual ZZT game files (or at least boards). I'll probably do something like I did with viewer gecko in Downy WebFront, except I don't have to worry about breaking the back button, so it'll be simpler.

Hm... Or maybe I should do some of that homework that's due in a couple of days. Meh.

3 comments

wolis

Oh my.. where is this fabled javaScript and DHTML version of ZZT?

Im a bit of a javascript kinda guy.. my projects that are in some way related to both ZZT and javascript are:

http://wolispace.com/josh

and

http://cretiveobjectworld.com

Please, if you can, make your code visible again.. Id love to see it.

Anonymous

Come back to Z2, Nanobot! The community needs you!

Also, perhap *.zzt world support?

Nanobot

I dropped this project a long time ago, but you can see what I had here:

ZZTjs

If I were to do it over, I wouldn't put *everything* in the DOM like I did there. It makes the system unnecessarily slow. But I'm not going to do it over.

Post new comment

Comment moderation policy: Your comment will be reviewed before it is added to the site. This is in response to spam and other forms of abuse. I gladly accept comments containing criticism as long as the language is clean.

This weblog is powered by Blogger.