Instructor: Jamie Gant

Whack-A-Mole is an arcade and carnival game, originally known as Mogura Taiji (モグラ退治, “Mole Buster”) in Japan. A typical Whac-A-Mole machine consists of a waist-level cabinet with a play area and display screen, and a large, soft, black mallet. Five holes in the play area top are filled with small plastic moles, which pop up at random. Points are scored by whacking each mole as it appears. The faster the reaction the higher the score.

Mogura Taiji was invented in 1975 by Kazuo Yamada of TOGO, based on ten of the designer’s pencil sketches from 1974. TOGO released it as Mogura Taiji to Japanese amusement arcades in 1975. It was later licensed to Bandai in 1977. It became a major commercial success in Japan, where it became the second highest-grossing electro-mechanical arcade game of 1976 and again in 1977, second only to Namco’s popular arcade racing game F-1 in both years. In the late 1970s, arcade centers in Japan began to be flooded with “mole buster” games, where players used a foam mallet to hit plastic moles that popped out of the machine. Mogura Taiji has since been commonly found at Japanese festivals.

Mogura Taiji made its North American debut in November 1976 at the International Association of Amusement Parks and Attractions (IAAPA) show, where it drew attention for being the first mallet game of its type. Gerald Denton and Donny Anderson saw the Japanese game, and decided they wanted to adapt it into a carnival game by putting it in a trailer, with Denton also showing it to Aaron Fechter at the same show. 

Whack-A-Mole: Our Vision

Today we will begin to build our take on Whack-A-Mole game. Although we will not get through the entire game today. We have a good foundation. Below is the Game that we will build this week during class project time.

Unity Documentation

Throughout your programming career, you will live in the Documentation, also knows as Docs. The Unity Documentation will be your Bible to explore when you need to learn something new. Today we will use Primitive Objects to design prefabs. Below is the documentation

Resources Needed

Download the following resources that you will need ( Download all files here)

Whack A Mole - Media Needed

Grayboxing (Main Gameplay)

Grayboxing is a process used in Game Development that uses primitive shapes to design your game. The game designer focuses on the gameplay and coding. At the end when the gameplay and mechanics are finished, you will switch out your basic primitive shapes for your game assets.

Sandbox: Building Prefabs

Now that we have the Main gameplay setup lets build out our prefabs and GameObjects. Let’s design our basic prefabs that we will need to build out our game.

Time to Code

It’s time to code and make our game

Moving the Hammer and Swinging Hammer


Whack A Mole Code: Mole Show/Hide
Code: Mole Show/Hide

Player Movement

Player Movement is in every game. For our Whack A Mole Game, the Player movement is broken into 2 parts.
a) Movement: Moving the hammer around the environment.
b) Swing: Swinging the hammer when the player presses the trigger.

Player Movement: Moving

Whack A Mole (Coding: PlayerController)

Player Movement: Swing

Hammer Code