Re: LZ: Programming question


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

Re: LZ: Programming question



Eric Barker (rbarker@polarnet.com)


> >2) If i was to try to make pac-man how would be the best (easy) way to setup
> >the levels? (walls) so that the program knows where they are?


> As for the walls, generate them however you want to, you can do it
> randomly, or use a set of 3 or 5 bitmapped levels, and cycle through them.
> To find out where they are, I'd test the space in front of pacman to see if
> there is a wall.  Just test the vram for a black square.


************


There is a problem with this method (as I have been wondering about this 
myself).  This works fine for most of the level in PacMan, except for 
the ghost box (the place where the ghosts start out in).  The box is 
usually 3X2 (each ghost and pacman being 1X1).  Even though the box 
usually is open (no dots seperating it into 6 connect segments) the 
ghosts act like it has these dots, they do not go down from point 
(1,1.66) to (2,1.66), they will go down from point (1,2) to (2,2).  Here 
it is easier for me to draw in ASCII:


    What is in memory                      What the player sees
 -----------------------                 -----------------------
|                       |               |                       |
| _____                 |               | _____                 |
|/ . . \                |               |/ . . \                |
||  ~  |*       *       |               ||  ~  |                |
| \/ \/                 |               | \/ \/                 |
|                       |               |                       |
|                       |               |                       |
 -----------------------                 -----------------------


Notice that the two dots (asterix) arn't there?  So if you test the 
screen inside the ghost box, the ghosts will go everywere, so that's 
probably not what the creaters of pacman did.  There has to be another 
way, please let me know if someone figures out a way it has stumped me 
for the past few days, even before you brought this up.


References: