Why Ghost House Pong?

Luke Cioffi
Strategio
Published in
7 min readFeb 13, 2023

As my final year of university studies was winding down, I looked to the future with an anxious hesitation. I was secure in my passion for game design, but my experience was still tragically limited. Having spoken to a few people in the industry, I knew that projects were an important part of any tech-field resume, and trying to find a job without any to speak of would be much more difficult then I had already known it to be.

My biggest project at the time, a fangame built in the Unity engine called Shy Guy Surfing, was nowhere close to completion. Everything else, for as much work as I had put in, was still in its infancy. This was my problem: instead of dedicating my time and focus to fully planning and developing a single project, I had spread myself too thin and now had very little to show for it.

I needed something real; something tangible that I could show to a potential employer and say “Hey, look at this thing I did. It’s all done and you can play it right here”. It had to be something quick and cheap, but nonetheless indicative of my growing skillset.

All signs pointed to the Game Jam.

If you’re unfamiliar with the Game Jam as a concept, it’s an event where many individual developers or teams come together, with each producing a game in a very short period of time, usually only a few days.

I didn’t have a team, or even an event to attend, but I did have the next day to myself, so I decided to proceed as if I were in participating a Game Jam, giving myself only 24 hours to make a fully playable game from scratch.

World A Ghost of a Plan

Now that I had my task, I had to define the scope of my project. I would use C# and the Unity game engine, since I had spent over a year familiarizing myself with those tools. Given that I only had the day, the project couldn’t be too broad or overly complex, and it couldn’t require many new audiovisual assets. I know my way around a pixel-art tool, but I am a slow painter.

I chose to make a small Pong clone with a spooky Super Mario theme. The delightfully simple Pong is a game that many new developers choose to imitate when flexing their skills, and early Super Mario Bros. games have a vast ocean of ripped assets online. For a quick, cheap, yet recognizable project, it seemed like a perfect fit.

The Building Blocks

A basic match between two players.

The game would come to look like this, but in its early stages, it was much more visibly simplistic. No music, no dotted-line net, and no cozy tiled background.

The first thing I did was create my player characters, the “Boos”.

A prefab view of our right-side player.

That faint green capsule shape is our paddle’s collider. When the ball makes contact with it, it will bounce away at the appropriate angle. With the same bounciness applied to our walls, as well as a basic movement script to shift the Boo up and down, there’s a good amount of playability in the project already.

The trajectory of the ball as it bounces between the walls of the court and the paddles of each player.

Soon enough, there were goal lines, a scoreboard, and a win condition. Once the game was over, the scene would reload and it would begin again. There’s our game, right?

Well, after passing a demo to a few friends and fellow community members, it became clear that while Ghost House Pong in its current state checked enough boxes to be a video game, it wasn’t much to write home about. It was a single looping scene, played on a single court, with no less than four hands huddled around a single keyboard. With the rest of the day ahead of me, I was determined to use that time to improve what I had by addressing my testers’ feedback.

Second-Story Work

These were the most common complaints:

  1. Table tennis has many optional rules, such as the common “Win by Two”, but Ghost House Pong can only be played with the same ruleset every time.
  2. Players may get bored of the same type of court.
  3. Local play is exhausting on a keyboard.
  4. Not everyone can play locally with a friend.

Optional Rules

After lunch rolled around, it was time to go back to the lab. Addressing the first critique seemed easy.

The game stored each side’s points in an array of integers called scores. Each time a point was earned for either side, the game would check if either score was above the required winning number. Unfortunately, this was the only check in that regard, and the scoreToWin variable was currently locked at 6.

I changed the conditional statement by adding a mustWinBy variable that corresponded to the “Win by X” rule in table tennis. Now, a win is only declared if all conditions are met. We still needed a way for the player to change these values, but that would come later.

Court Variety

All of the necessary code for running the Pong game was stored neatly in a single object that could be easily copied between game scenes. Because of that, I was able to create unique courts to play on by putting each one in its own scene.

I had to make sure that each one was different enough to create a unique play experience without completely overshadowing the base gameplay with gimmicks.

The Stormy Court features a wind tunnel in its center that can change the speed or trajectory of the ball.
The Pipe Court has open edges. If the ball goes out of bounds, it will appear from the other side.

No More Keyboards

In order to solve the problem of too many fingers on one keyboard, I had to lay the foundation for controller support. Unity’s base-level Input Manager is simplistic and lacking in a few important features such as remapping, but I didn’t have time to fully immerse myself in a more complex joystick API. I instead created new input mappings for Joystick motion, acting independently from the keyboard but performing the same functions in-game.

AI-Controlled Players

This is the one I was dreading. I didn’t know the first thing about programming enemy AI, but I knew that if someone were to play by themselves, I couldn’t just leave the second player motionless.

A block of code lifted from the Boo’s movement script, containing the implementation of AI behavior.

I created a boolean field that would tell the Boo script whether the character was to be controlled by an AI and issued commands under that condition. If the ball was above the AI player, it would move up, and if it was below them, it would move down. If the ball was close enough, it would attempt a powerful swing. It took a few attempts to get the distance values where I wanted them to be, and it still doesn’t perfectly execute every swing, but by the end, the AI player was up and running, and it actually put up quite the challenge.

I was still missing one thing: the Options Menu. I had all these options and rule-changes but no way to actually change them outside of the Unity editor. I realized would need a fully new scene for that, and thus the final stretch of development begin.

The Menu

For the final step, I created the Settings scene. Here, the player could change the game’s rules to their liking. Now, many different variations of Ghost House Pong could be played by anyone, up to the extreme 50-Point Game.

With the day drawing to a close, I returned to my ragtag group of testers and delivered the final version, to a much more positive response. I thanked them for their contributions as well, as it was their feedback that turned a bare-bones Pong clone into a highly customizable minigame.

If you’d like to try Ghost House Pong yourself, you can find a playable browser build on my itch.io page!

--

--