pacman clone level design question

Started by
4 comments, last by xtrmntr 23 years, 7 months ago
This is my first attempt at designing a game so i pick something everyone knows, pacman. Havent run into too many DX probs but now i''ve come to the point where i need to design a way of drawing the levels. I was thinking of using tiling but in my findings of the old classic game im not quite sure how to go about mapping the tiles out. So there is no confusion, my question is not pertaining to HOW to tile so much or how i store and read a level. When i look at how the levels are laid out i cant see a good way of drawing the tiles and using that to do bounds checking, character movement, etc. I know i should keep it simple the first time but if it looks blocky it will take away from the eye candy. incite welcome.
Advertisement
A good way to design tilebased levels is to use a text editor like notepad. eg:

''#'' = wall
'' '' = open area
''.'' = normal pill
''*'' = power pill

then, when you design a level, you just use notepad to create something like this:

###############################*..........................*##.############ #############.##.#.........     ..........#.##.#.##### ################.#.# .#......*          *........#.#.#.############### ######.#.##.#.........     ..........#.##.############ #############.##*..........................*############################### 


You can make the map data as detailed as you like, eg you can have different characters to represent corner tiles, start positions, teleports etc. You dont really need to do anything fancy for collision detection, just check to see if the tile the players is trying to move into is a wall, and if it is, dont let him move there.
Excellent idea using PacMan.

It allows you to be a programmer instead of a game designer.

!!! READ THIS !!!!

PacMan ai is not what you may think. Some ghosts track pac man vertically and not horizonally and others track him horizontally only. One ghost tracks him in both ways. You need to play the game and test this.

If all monsters have the same AI they will end up following pac on the exact same path once they are in range and are "on top" of each other.

I wrote a pac man clone too and used the notepad text file idea also. It works well and you should write it so that levels can be changed very easily. The gosts all start out in the center square of the map anyway. Thats the only restriction.

Another interesting thing is the portals to the left and right. Which pac man can enter. Thats easy to implement. Just don''t put a wall there and when pac man walks off the screen he wraps to the other side.


MCSE, MCSD, Sun Certified Java ProgrammerPimp Daddy ;)
If your woried about the graphics being to blocky and boring then try this:

Use a normal 30 by 30 array(or whatever size) and fill that with walls and stuff. But instead of Drawing a brick where each wall should be, just make a big bitmap the size of the screen and use that for the graphics.

Edited by - wolfman8k on September 20, 2000 11:14:12 AM
I read somewhere that two of the ghost would take a direct route
to pacman while one would try to sneak around back and the other
would stay near one of the power ups. I forget where I read it
but I thought it was interesting.

Foxtrot
thanks a lot for all your guys suggestions.

This topic is closed to new replies.

Advertisement