Re: LZ: Levels?


[Prev][Next][Index][Thread]

Re: LZ: Levels?



Robin, Jim, & Eric Barker wrote:
> 
> Before I start writing my first program, does anyone know how levels for
> games such as BoulderDash or Boxes are stored?  Are they like bitmaps or
> what?
> 
> Eric Barker.


I can't answer for Boxes, but I guess each "square" is stored in two or
three bits. In BoulderDash, it's done in a completely different way, which
is IMPOSSIBLE to use in another game. First objects are scattered around
in the cave at random, except that the random seed is given (ie the cave
will always look the same). Then you have move specific raw data, like
"draw a line of brick walls from 5,8, direction down, length 7 - takes 5
byte","draw a rectangle of boulders from 12,7, width 10, height 10, fill
it with jewels - takes 6 byte". The compression rate is, well, each cave
(with 5 different difficulty levels) takes about 83 bytes. (a 40x22
level... ie 840 squares) Total the cave data takes about 1600 bytes in
BoulderDash 1.0.


<pre>
-- 
Jimmy Mårdell               | "He claimed to be the son of God
mailto:mja@algonet.se       |  he went too far, he was outlawed
http://www.algonet.se/~mja  |  he actually died for you and me
IRC: Yarin                  |  just to prove how cool he could be."
</pre>


References: