The Programming Challenge: Pacman!

The follwoing is a competition in speed-coding. Your task will be to implement a Pacman prototype. Mind you, not the entire Pacman game.

Your prototype game should have the following features:

  1. display a pacman level (one is enough)
  2. let the player move pacman around (keyboard input is enough)
  3. move 4 different-coloured ghosts around, and let them pick new directions when they get to an intersection.
  4. eat dots, and finish the game if you ate them all
  5. eat pills, and afterwards be able to eat ghosts for some time
  6. animate pacman and the ghosts,
  7. draw ghosts differently when pacman can eat them.
  8. pacman dies when he collides with a ghost and isn’t “on the pill”
  9. ghosts disappear when pacman is on the pill

Everything else is unnecessary. No need to count score, no need to make the ghosts smart, resurrect dead ghosts, implement fruit, death animations or any other UI. No sound required, either.

You are free to use any language you like, on any hardware and with any library that is convenient. There is a set of assets you can use that contains some bitmap sprites and the level data. You may modify these assets as much as you like.

Assets in this zipfile:

  • pac.bmp, 3 sprites that make up pacman’s animation in one direction
  • level1.bmp, this is how the level should look.
  • levelsprites.bmp, 8×8 sprites that the level is made of.
  • ghost.bmp, a ghost moving in four directions (see eyes)
  • frown.bmp, ghosts that can be eaten
  • level1.dat, the 28×32 cells that make up the first level. each cell is one byte containing an index into levelsprites.bmp, and they are written row by row from top to bottom

To win, you must be the first person to email me a .zip file containing the source, assets and compiled executable (if you’re not using an interpreted language) of your prototype that fulfills all the requirements above.

Advertisements

2 thoughts on “The Programming Challenge: Pacman!

  1. There wasn’t a lot of competition, I must add. This allowed Jesper to come in first with a working implementation for the Nintendo DS that he emailed me at 23:26.

    Not only does it work and meet the requirements, it’s for a very cool platform, too. Awesome, Jesper!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s