Discussion It has been 15 years since I tried to write pac-man

jb skaggs

Member
I stared using GM in 2002. ANd I have not made a pac man style game since then. SO I have my son working thru a tutorial and decided to make one myself.

What I thought would have taken me an hour took a full day! And honestly the problem wasnt the code per se as much as how things changed and how I wanted to things differently.

First off back i n 2002 the tutorial did not have us use grids, rather just all drag and drop with solid obj collisions. And the ghosts did not chase the player.

The new version I made using a grid system, a finite state machine system ( an rewrote it to use the object state machine (that I think Yellow came up with? I forget who actually did). The obj states were cool by the way. And of course the ghosts have a mp_step grid system and come after you and try and box you in!

WHat I came away with, is these super simple games are not as super simple as they appear if you really want them to be smooth and fully fleshed out. You know the whole game concept was genius- not many stop and think about how basically pacman, centipede, defender donkey kong sort of materialized at the same time with nothing to base them on. There was nothing to even influence them really. And the machine limitations really strict. Nothing like today where in reality we are getting closer to unlimited game size, especially with shared computing etc.

Just my ramblings.
 
WHat I came away with, is these super simple games are not as super simple as they appear if you really want them to be smooth and fully fleshed out.
Yes, and you came away with that after making the game in GameMaker, where the rendering, sound, animation, game loop, AI (pathfinding), etc etc are 99% done for you compared to back when Pacman came out. Imagine doing this stuff in assembly and trying to make the entire game fit in 16kb, haha! Those old games were even crazier accomplishments than you'd think, making them in something as high level as GM!

I looked at 6502 assembly last year, and got as far as filling half the screen with dots before giving up. Only half, because a byte wasn't large enough to store any higher positions, and I wasn't patient enough to work around that problem. Probably would've taken me a month just to display Pacman flapping his mouth in the middle of the screen. :'D

Nothing but respect to old school programmers!
 

zendraw

Member
im pretty sure all game ideas came from how computers works rather then some dream, exception being the story driven and fangames. i se the process as, oh this and this code makes this happen, hmm this looks very much like a person walking, or climbing a rope, or somthing else.
all in all games are just data managing simulations. which can be fun.
 

Smarty

Member
GMC Elder
You know the whole game concept was genius- not many stop and think about how basically pacman, centipede, defender donkey kong sort of materialized at the same time with nothing to base them on.
Well.. Donkey Kong was based on a movie, and Pacman was based on a pizza. Centipede was made to appeal female players, by not shooting aliens for a change.

Pacman AI I think is pretty interesting - it was never simply move-at-random or chase-the-player (something which most clones seem to fail to grasp). They start in disperse mode, each moving to their dedicated corner of the maze, but once attack mode goes on each has their own chasing technique: one would move about the maze at random, one would chase the player directly, one would chase an area the player was facing (so as the two ghosts would corner him) and one would (IIRC) mostly move out of the way of the player until the player was close.

I looked at 6502 assembly last year, and got as far as filling half the screen with dots before giving up. Only half, because a byte wasn't large enough to store any higher positions, and I wasn't patient enough to work around that problem.
I programmed in 6502 assembly as a teenage hobby. Yes, I'm old. In any case, you were close - looping over anything higher than 256 simply meant increasing the high byte of the memory location that was addressed (screen being just an accessible part of memory in those days).

My favorite game of those days was Star Raiders. It has some sort of 3D cockpit space projection. The goal was to clear all sectors in the galactic chart of enemies. The enemies were moving towards the repair/refuel bases to destroy them which you obviously had to prevent. It featured 3 types of enemy, 4 difficultly levels, single and double blasters (in case of auto-aim), a galactic chart, a long range scanner, shields, enemy targeting, front and aft views (and automatic tracking of enemies across these), a board computer, fuel consumption, 9 travel speeds, a hyperspace jump, and keys to toggle all of those. Also, each of those components could be damaged or broken in battle, making using them harder up until you could fly to a base for repair or refuel. At the end of the game you'd get a rank and class to indicate your score based on the enemies disposed of and the energy wasted.

All of that stuff was fitted on a cartridge of 8 KB, dated 1979.
 

jb skaggs

Member
Smarty that is pretty amazing. I remember subscribing to games by magazine, And the games were printed in the magazine as 0's and ones and you typed them in the computer and compiled it. Sometimes it would take several days of typing to get a game installed. And if your computer was shut off you started over- or if someone changed the volume on your tape player all was lost.

My first sucessful game I was able to get to work was Centipede.

8kb- thats just amazing.
 
F

frog

Guest
I remember hearing that pac-man arose out of a lot of experimentation, an untidy and inefficient process. I presume its creator was just playing around.
 

Smarty

Member
GMC Elder
Smarty that is pretty amazing. I remember subscribing to games by magazine, And the games were printed in the magazine as 0's and ones and you typed them in the computer and compiled it. Sometimes it would take several days of typing to get a game installed. And if your computer was shut off you started over- or if someone changed the volume on your tape player all was lost.
No, I think your memory may be letting you down. Most magazines publish game listings using BASIC which was easy to copy and comprehend. Even if bits and pieces of assembly were used, they were usually either printed in assembly language, or listed as byte values using a BASIC program (using READ with DATA blocks) to POKE them into memory.

I remember hearing that pac-man arose out of a lot of experimentation, an untidy and inefficient process. I presume its creator was just playing around.
No, that doesn't sound right. It was a team of nine headed by a young developer who created the game over a period of a year. There was a clearly defined game idea up front of development. And although these were the early arcade days, there definitely was experience in software development, also at Namco.

At least you didn't have to do it the old fashion way with poke or "?".
Oh, you mean buffer_write and draw_text?
 

jb skaggs

Member
they were usually either printed in assembly language, or listed as byte values using a BASIC program (using READ with DATA blocks) to POKE them into memory.
probably I never understood it and it took forever to find the bug you typed in wrong. No this magazine was a for a commodore color computer. My other was a Tandy Coco II I'd get basic in books at Walden's in the mall. Game;s like Lunar Lander and Eliza. Eliza was cool, I actually had a few girls from school come over to talk to her. Which worked out nice- or bad depending as it led to my first wife.
 

K12gamer

Member
I took an OPEN SOURCE GM tutorial for Pacman...and added my own flair to it...(No way I could have made it from scratch)
Let me know if you want the original Open Source file I used (I should be able to find it somewhere)...

 
Top