SPAM-LOW: Re: [stella] Reflex: Online level editor

Subject: SPAM-LOW: Re: [stella] Reflex: Online level editor
From: "Lee Fastenau" <stella@xxxxxxxxxxxxxxx>
Date: Thu, 9 Sep 2004 08:13:21 -0500
> Ah, finally someone who shares my passion for compression. :-)
>
> When I did my exercise with Jammed I am afraid nobody understood
> exactly what I did. Maybe you can explain your algorithm better than
> I could.

Data compression (much like Stella programming) had always been a mystery to
me, but seemed like something that would be fun to learn about.  Curiosity
finally got the best of me a few months ago.  I read about the huffman
algorithm and coded my own huffman tree builder here:
http://www.ioyu.com/io/javascript/huffman.asp

The two links on that page, plus Googling "huffman compression" should be
enough to get anyone up to speed.  Also, feel free to view the source on my
huffman page.  The huffman tree is built and displayed using JavaScript on
the client.  I'm afraid the code is not well commented, but it may be
helpful to someone.

The attached source code has a single compressed level (search for
"levelData") and the decompression algorithm (search for "decompressLevel").
The decompression algorithm is probably one of the most well-commented
chunks of code in Reflex.

> Cool idea, though the playfield is a bit limited now. Do you plan
> allowing
> to extend it? That would cost some RAM and ROM space, but it would
> allow many more variations. I don't know about your free RAM, but with
> a good compressor, ROM shouldn't become a too big problem.

I considered extending it for the same reason, but after playing with editor
with mirroring set to horizontal or none, I found I was able to create some
nice, identifiable _stuff_... Atari characters, RobotBob SpongeChipPants (he
put the brain in the robot... you know), faces, animals, Windows icons...
lots of _stuff_. :)

I was thinking more about using the full playfield resolution instead of
doubling the blocks, which I can easily do to the game engine, but the
current decompression routine would only allow for 32 total 8-bit variations
using the block layout table.  Also, I would have to trim two blocks off
either side, so the number of blocks across would be 16 vs. 20 (2x10)... but
the playfield would be horizontally narrower.  (Confusing, yes.)

Anyway, if you assemble the game, don't mind the funky paddles.  I still
need to get to those.

> Have fun!
> Thomas

Thanks,
-Lee




Current Thread