Re: LZ: Help with programming please!


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

Re: LZ: Help with programming please!



Michael wrote:
> 
> (sorry about sending this twice, but the last one didn't have a title
> and i want to make sure people read it)
> 
> I am trying to program a game that has some basic characteristics
> similar to Super Mario Brothers, so i will use it as a refernce for my
> question.  the question is pretty simple (and i hope the answer is
> too!). let's say mario smashes one of the bricks with his head, how do
> you update the level so that next time mario jumps in the same place
> where that brick was, there is nothing there?  should the whole level
> (originally made with a .dw'ed bitmap) be stored into memory while it
> is being played so it can be updated?  I hope that makes sense.
> thanks for any help....

That's a problem I had when I made sqrxz also... The level is too big to be
stored in the graph mem so you have to change in the source. I did like this:
When a brick was smashed, that location wasn't change into an "empty condition",
it was changed to "smashed brick", which had the same function as if there
was nothing there. When you later quit the game (or restarted it), I scanned through
the whole level, searching for smashed brick. If such a char was found, it was
changed to a brick.

It's easier though to allocate 3-4k for the level, but it would require that you
had enough memory for it.

-- 
Jimmy Mårdell                "I want to stand in the eye of a storm
mailto:mja@algonet.se         I want to get struck by lightning
http://www.algonet.se/~mja    I want our house to be set on fire
IRC: Yarin                    for us to walk without shelter" /Covenant



Follow-Ups: References: