Skip to content
Tom's Software Emporium

Text-Pac

A Text-Based Pac-Man Replica for the Windows Console

Step into the world of retro arcade gaming with Text-Pac, a faithful, text-based clone of the iconic Pac-Man–designed to run directly in the Windows Console (CMD). Built as a demo to showcase the speed and power of the FastConIO library, Text-Pac nails the charm of the 1980s classic while accurately replicating it's mechanics–down to the pathfinding algorithms of the ghosts and unintentional features such as the safe-spots.

A Proof of Concept

Anyone who's tried to enable console logging in a game or writing function traces knows the pain of watching framerates crawl into a slideshow when outputting data to stdout. Printing characters to the Windows console has become incredibly slow, especially when dealing with large volumes of text or small but frequent prints. And that's before you even factor in the complexity of colorizing output.

FastConIO changes the game entirely by vastly improving the rate at which text can be output to the Windows console. It accelerates the process enough to make a text-mode game like Text-Pac possible, where the entire screen is being redrawn every frame, all in real time.

The library goes beyond just speed improvements–it also introduces support for inline control codes, which allow developers to easily change the color of characters on the fly. Thanks to FastConIO, the ASCII maze walls, power pellets, and the colorful, menacing ghosts in Text-Pac stand out vividly against the console background, just like their pixelated counterparts did in the original arcade cabinet.

Text-Pac in action!

 [CMD] Text-Pac 1.0
Animation demonstrating Text-Pac gameplay

Accurate Ghost Pathfinding

At the time one of the most impressive features of Pac-Man was the unique behavior of each ghost, driven by specific algorithms that make the game feel alive. Text-Pac faithfully recreates this challenging system in the charming world of character graphics. For those unfamiliar with how the ghosts in the original Pac-Man operate:

Easter Eggs

Pac-Man fans will be excited to know that even the lesser-known quirks of the original game have been included in Text-Pac such as the infamous "safe-spot". This is a specific location in the maze, slightly above and to the right of the player's starting position, where the ghosts cannot reach from certain parts of the maze during the "chase" phase. This behavior is caused by the ghosts being instructed not to turn upwards at certain junctions of the maze, and became well known among arcade veterans and remains a key strategy in escaping tight situations.

Play Text-Pac

Whether you're a retro gaming enthusiast or a developer looking to explore the power of FastConIO, Text-Pac is the perfect showcase. Download Text-Pac today to experience a unique blend of nostalgia and cutting-edge console performance–one ASCII character at a time!

Download TSetup installer (Win2K+/ReactOS): [TextPac.zip] (13KB).
Download portable version (Win95+/ReactOS): [TextPacP.zip] (7KB).