R/C “Pac-Man” Game Independent Investigation:
Vehicle Functionality & Feasibility
Timothy Sperr
CE Design Projects I
0306-654-01
Instructor Dr. Roy Czernikowski
Submitted 05/04/2009
Timothy Sperr Yuriy Dragonuv Nathaniel Pearson
tss1319@rit.edu ypd1467@rit.edu nrp8523@rit.edu
(585) 314-8057 (207) 232-8772 (703) 314-9210
Introduction
The goal of this multidisciplinary design project is to envision a system that is entertaining and
incorporates some vehicular or robotic elements. To achieve this goal, a new perspective on the classic
arcade game “Pac-Man” was created, in which both Pac-Man himself and the maze he navigates are
actual physical objects, with the player controlling Pac-Man via simple R/C joysticks. A maze will be
constructed out of PVC pipe and will constitute the game’s playing field. Above the playing field, a digital
projector will be mounted facing downward, such that it is able to project the game onto the playing
field. Using graphical programming libraries, a Pac-Man game will be implemented on a Windows PC
that will be connected to the projector, with enemies and power-ups, along with an outline of the game
maze, projected onto the playing field. A small R/C tank will be modified to have Pac-Man’s appearance,
and will allow the player to navigate the maze. The tank will be tracked via a webcam mounted on the
projector and a color-recognition algorithm. By using an internal coordinate system that links the
webcam’s positioning of the player vehicle to the known coordinates of enemies and power-ups, it will
be possible to craft a game that is both entertaining and technically interesting.
Investigation Overview
The focus of this investigation is to be the feasibility of using a small R/C tank as the vehicle in the Pac-
Man game. The choice of a vehicle for use in this project bears several considerations. First, it must be
small enough to navigate a maze subject to the constraint that the maze must be no larger in area than
8’ by 8’ (64 square feet, or 9216 square inches). Second, the vehicle must be controllable in a manner
similar to that of the Pac-Man character in the arcade game – namely, it must be able to move forward
and be able to turn 360 degrees in-place. Third, the vehicle must possess sufficient speed, both turning
and moving straight, to allow the ghost enemies that chase Pac-Man to move at reasonable speeds. 0.5
feet/second was deemed sufficient for this purpose. Finally, the battery life of the vehicle must exceed
the time of an average game; for this period, the speed of the vehicle should not vary by too much or
diminish. If all of these requirements are fulfilled, the vehicle may be deemed feasible for the project.
Otherwise, a new vehicle must be selected, or workarounds must be established.
Other Investigations
Projection System
A projector that meets the requirement of throwing an image of 107” by 80” needs to be obtained
as well as one that is bright enough to operate in ambient light conditions. A camera will also need
to be obtained with a large enough viewing angle and sensitivity to motion so that it can precisely
capture the entire mat with moving Pac-man. Both the projector and webcam will need to be
mounted about 8 feet in the air on a structurally stable stand out of the way of the mat and user.
The stand must also allow the projector adequate ventilation and safe management of power and
data cords.
Imaging System
The imaging system investigation will focus on a means of locating the Pac-Man vehicle within the game
maze. It examines the image-processing algorithms required to locate a specific color in a still picture,
programming interfaces with a webcam, and what sampling time between images is necessary/whether
2
a constant sampling period is required. In addition, it examines the coordinate system required to
implement such a scheme.
Vehicle Size & Overview
The vehicle chosen was a 1/48 scale MIA2 Abrams R/C tank kit, available for purchase from select online
hobby shops. The vehicle was chosen primarily for its size – it was advertised as having a length of 6”
and a width of 2.75.” Measurement with a tape measure confirmed these dimensions. In addition to its
dimensions, the tank is driven by a pair of AA batteries, and possesses a pair of motors such that it may
turn in-place.
Fig. 1 – Selected Vehicle
To determine the size required of the vehicle, it was first decided that an 8’ by 8’ maze area would be
used for the game. The typical Pac-Man maze, shown in Fig. 2, was then drawn inside of a grid. By
examining the grid, it was determined that a grid of 8 squares by 12 squares would be necessary for the
maze. Dividing 8 feet by the larger dimension of 12 squares, the size of each square in the maze was
found to be 8” by 8”, or 64 square inches. Taking into account the fact that the walls of the maze are
going to be more than 0 inches thick, it was decided that a vehicle less than 7” by 7” was acceptable
(after cosmetic modifications, it is hoped that the vehicle will resemble a circle with a radius of 3.5”).
The tank acquired for testing is within these constraints, as confirmed by its specifications and
measurements. It was also decided that a speed of over 0.5 feet per second was desirable in terms of
making the game interesting to play. This will be examined in the “Vehicle Speed” section.
Vehicle Movement
Movement and controllability was the main reason that a tank was selected over other remote-
controlled vehicles. R/C tanks are typically driven by a pair of motors, each of which controls one set of
treads. The result is that by rotating both motors in the same direction forward and reverse movement
are possible, and by rotating the motors in opposite directions in-place turning is possible. The selected
R/C tank matches these expectations, and its controller allows for easy forward-reverse-left-right
maneuverability.
One concern with vehicle maneuverability is its ability to move in reverse. In the traditional Pac-Man
arcade game, the player cannot move backwards, and must instead turn 180 degrees. There are several
possibilities for how to deal with this factor: allow it, and ignore the discrepancy, remove backward
functionality from the remote electrically, or limit reverse movement of the vehicle mechanically. These
options will be further explored during the implementation of the project. If no means of limiting
reverse movement of the vehicle are found, then it will simply be allowed in the game.
3
Fig. 2 – Pac-Man Maze
Vehicle Speed
Measurement of the vehicle’s speed addresses two important concerns – can the vehicle maintain a
constant speed, and how much its turning time affects game play. In the arcade version of Pac-Man, the
ghost enemies possess two speeds – a faster speed when they are chasing Pac-Man, and a slower speed
when they are running away (as a result of Pac-Man collecting power-ups). The faster speed initially
matches Pac-Man’s speed, and slowly increases as the player clears levels in the game. The slower speed
is constant and is slower than Pac-Man’s speed, such that Pac-Man can chase down and “eat” ghosts
when powered-up. Additionally, in the arcade version of Pac-Man the player may turn Pac-Man in any
direction very quickly; this project must compensate in some way for a vehicle with a slower turning
speed.
Three tests were envisioned to test the vehicle’s speed. First, the vehicle is run in a straight line for one
yard and timed. Second, the vehicle was turned approximately 360 degrees and timed. Third, the vehicle
was run in a zigzag route, as shown by Fig. 3 and timed. Each test was repeated 10 times, and an
average time obtained. From these timings, it was possible to determine the vehicle’s average speed
and time to turn 90 degrees.
4
Fig. 3 – “Zigzag” Test Route
All tests were performed to the best of the tank controller’s ability; nevertheless, some inaccuracies are
present in the measurements. However, this series of tests seeks only to gain a rough understanding of
the vehicle’s performance and verify that said performance is relatively consistent. Note that all tests
were performed upon a hard surface. At the time of writing, the material for the floor of the maze was
not determined; however, it is expected that the maze floor will be some hard material, and that the
tank’s performance will not differ considerably under the different conditions.
Test Average Time (s)
Straight Line 5.5
360-Degree Turn 6.4
Zigzag Route 16.2
Fig. 4 – Table of Speed Test Results
From the table above, the vehicle’s average forward speed can be calculated as 3 feet / 5.5 seconds =
0.54 ft/s. Its turning speed can be calculated as 6.4 / 4 = 1.6 seconds to turn 90 degrees. In addition to
this, it appears that using the vehicle to navigate a zigzag pattern introduces some additional delay, as
16.2 seconds is longer than expected for the vehicle to move 5 feet and turn 4 times.
Because the vehicle does not function ideally as Pac-Man does in the arcade game, certain modifications
must be made. The ghosts in the maze will initially be given a “fast” speed of 0.5 ft/s, and a “slow” speed
of 0.4 ft/s. These speeds allow the vehicle to slightly outrun the ghosts to account for its non-zero
turning time, and allow it to easily “catch” the ghosts when chasing them. Further testing is required to
determine whether these numbers result in a playable game, however.
5
Vehicle Battery Life
Initial investigation revealed that the battery life of smaller R/C tanks could be a concern, due to the fact
that they typically only carry a small rechargeable battery, and charge prior to use by docking on the
remote. The first tank chosen for the project was powered in this manner. However, due to difficulties in
ordering that tank, a second vehicle (the Abrams tank in Fig. 1) was ordered. The Abrams is powered by
its own set of two AA batteries; its remote requires two C batteries. Due to the fact that the tank
possesses its own set of batteries, battery lifetime was found to be less of a concern in this project, but
was tested nonetheless.
After running the speed tests detailed above, the tank’s batteries were replaced with two new AA
batteries. The tank was then run nonstop, in 5 minute increments (5 minutes is the estimated maximum
duration of a single game of Pac-Man). After 20 minutes of testing, no noticeable degradation in tank
speed or turning time was observed. As such, battery lifespan was not found to be a problem. By
obtaining several pairs of rechargeable AA batteries, it is expected that the tank’s batteries may be
replaced/recharged as necessary when they run down. Some form of reset functionality will be built into
the game, should the tank’s batteries appear to run out mid-game.
Summary
After examining the size, speed, maneuverability, and battery life of the selected vehicle, it has been
determined that the 1/48 scale Abrams R/C tank is suitable as a vehicle in the Pac-Man game. Its size is
small enough to allow it to fit within one “square” of the maze grid after cosmetic modifications, its
average forward speed of 0.54 ft/s meets expectations, its maneuverability closely matches what is
needed, pending some possible modifications, and its battery life was found to be long enough to
warrant no extra effort on the part of the team. In addition to these factors, its cost, $18.95, is low
enough that purchasing several for testing/modification is not an issue.
6