Pacman arcade game for Maker Faire Rome – the making of

Pacman set up

Pacman set up

I had the good fortune to work on a really fun project for the Maker Faire Rome as part of my freelance stint with Metalworks by Maxus, the creative technology R&D arm of the media buy company. So I would like to share a bit on what went on behind this project.

The brief given to me by my client was to make a multi-player Pacman game. It would be fun for audiences to play with at the Faire and a tribute to one of the most successful arcade games of all time. It would also be a good maker showcase of how open source technologies can be used to create your own arcade game.

For the map design of the game, a Pacman Google doodle was used as a reference. I used sounds from the original 1980 game which I managed to find on the Internet.

Screen shot 2013-09-08 at AM 11.43.44

I worked with a graphic designer for this project. He was based in India while I was based in Singapore. He provided me with the map graphic as well as the sprites. He called the sprites “Blinky” (the one-eyed ghost) and “Pacmax” (portmanteau for Pacman Maxus). The font selected was “Optimus Prime”, a sci-fi font found online. The bonus cherry was replaced by a Maxus logo. Below is the character design sheet showing the graphics used for the movement animation.

sprite_20pxTileGrid

I used Processing to code the game. Processing is an open source programming language based on Java. It was designed to make it easy for artists and creative hobbyists to code their own interactive projects. Processing is maintained by a huge community of volunteers and the forums were really helpful whenever I needed to find some information. After coding the game in Processing, I then exported it as an application. Here is a screenshot of what the Processing interface looks like.

Screen Shot 2013-09-16 at 12.01.17 PM

I designed the map based on a tile system. There are 59 tiles by 20 tiles and you can see the grid system below.

tileMap

For some of the game logic, I referred to an article online that analysed the logic behind the original 1980 game. The game logic for this Maxus version of Pacman is quite simple once I had the tilemap system in place. The whole game was coded in about 1000 lines of code and took me about a month working on it full time. I designed the map on a piece of graph paper using a pencil and eraser before translating it into code.

Photo 23

Here are some screenshots from the game.

This slideshow requires JavaScript.

As for the hardware, my client found these huge arcade buttons that looked inviting to play with. I hooked them up to an Arduino micro-controller. Arduino is the hardware “companion” to Processing. Just like Processing, its intention is to also help artists and designers realise their ideas in hardware, and is an open source effort maintained by a vast online community. Its programming interface is designed to be very similar to Processing and the two can be used compatibly.

The circuit is a simple one involving eight button switches. I first made sure the circuit was working using a breadboard and jumper wires.

Photo 21

I then started soldering the circuit onto an Arduino Protoshield, essentially a perforated board designed specially for the Arduino, but not before translating the breadboard circuit into a soldered circuit on a piece of paper.

Photo 18

I had to use a “third hand” to help hold the shield while I used both my hands to solder.

Photo 17

I used ribbon wire for all my wires. The colours helped me to identify the wires and its form factor is neat and compact.

Photo 26

My colleague helped me to drill some holes into a plastic office tray holder for me to insert the buttons. We literally hacked office stationery to make our arcade controllers!

Photo 29

I wanted to 3D print a casing for the Arduino but I was running out of time. So I bought a cardboard box to house the Arduino and added an “insert coin” button to it.

Photo 6 Photo 9

Here is my messy workstation at the Maxus Singapore office.

Photo 13

Here are some photos showing how the hardware progressed during the course of a week.

Photo 24 Photo 15 Photo 5

I enjoyed making this Pacman arcade game, and through this experience I have learnt some new cool tricks with Processing and Arduino. I also have to thank my colleagues in Metalworks for their help and support, in no particular order – Harish, Upesh, Mithru, Rollen, Adam, Tom and Nico. Harish was the coordinator for this project in India. Upesh was the graphic designer based in India. Adam helped me with sourcing the sound files. Mithru helped me with technical implementation. Rollen gave me useful tips about programming and moral support. Tom and Nico helped supervise and direct the project.

That’s all folks! Thanks for reading.

Advertisements