Programming · Project spec · 7 min read

ASCII maze “Minotaur”

What the game Minotaur must do: how it is played, what the player sees, how two people play over the network and what counts as a finished result.

Levels
7
Players
1, or 2 online
Interface
Console, ASCII
Language
Python 3.10+

The game

Minotaur is a turn-based console game with ASCII graphics. The player goes through seven mazes in a row: in each one they must find the key, reach the exit and avoid the monsters. It can be played alone or by two people over the network.

The mazes are new every time, and each one is bigger than the last. At first the player sees only the cells around them, and the rest of the map opens up as they explore.

How to play

The game is turn-based: the player makes a move, then all the monsters move. Nothing happens until the player moves, so there is no need to hurry.

An example level.

On the map

SymbolObjectWhat it does
PPlayerMoves one cell per turn or skips the turn
PTeammateOnly in a network game; the same letter, another colour
+ - |WallCannot be passed
.PassageCan be walked on
KKeyNeeded to open the exit
EExitOpens only once the key has been found
HHunterMoves every turn and takes the shortest way to the player. Until the key is found, it tries to cut the player off on the way to the key
WWandererMoves every turn and roams the maze. When it spots the player nearby it gives chase, and when it loses sight of them it goes to where it last saw them
MMinotaurThe final boss of level 7: jumps over walls and rests after each jump
!Jump markWhere the Minotaur will land on the next turn
*FreezeMonsters stand still for 3 turns
^TorchThe player sees further until the end of the level
?CompassShows the next 8 cells of the way to the key, and after the key, to the exit

Controls

KeyAction
W A S DStep up, left, down, right
SpaceSkip the turn
HHelp
PPause: resume, save, quit to the menu

Rules

  1. Walking into a wall does not use up a turn: the player stays put and sees a hint.
  2. The exit opens only after the key has been found.
  3. A level is complete when the player with the key reaches the exit. Completing the seventh level wins the game.
  4. The player loses if they end up in the same cell as a monster or they swap cells in one turn.
  5. Bonuses are picked up when the player steps onto their cell.
  6. In a two-player game, a caught player is out until the end of the level and comes back on the next one. A level is complete when every remaining player reaches the exit; the game is lost only when both are caught.

What the player sees

Light
Cells near the player: the map, the monsters and the items are all visible.
Half-light
Cells a little further away: only the map is visible, the monsters are not.
Shadow
Everything else: nothing is visible.

The part of the map the player has already seen stays on the screen in grey. The torch widens the lit area until the end of the level.

Levels

Seven levels, each bigger and more dangerous than the last. Every level has a key and an exit; the number of monsters and bonuses is:

LevelSizeHuntersWanderersMinotaurBonuses
17 × 901—1
29 × 1110—1
311 × 1311—2
413 × 1512—2
515 × 1721—3
619 × 2122—3
721 × 232214

Instead of generating a level, it can be loaded from a file. The game checks the file and reports if the level is wrong: for example, the exit is walled in or two items are in the same cell.

Final boss

On the seventh level the Minotaur replaces one of the hunters. It does not walk the corridors but jumps over walls, repeating three phases:

  1. 01AimThe Minotaur picks the nearest player and marks a 3 × 3 area around them with !. The mark is visible even in shadow, and the player gets a warning. They have one turn to leave the area.
  2. 02JumpThe Minotaur flies over the walls to the centre of the area, but no further than 6 cells. Anyone still in the area is caught.
  3. 03RestFor 3 turns the Minotaur stands still. This is the window to slip past it to the key or the exit. A freeze makes the rest longer.

Score and records

The score is counted in turns: the faster a level is completed, the more points it gives. Each bonus picked up adds 20 more.

\text{score} = 100 + \max(0,\, 300 - \text{turns}) + 20 \cdot \text{bonuses}
Points for one completed level.

The high score table keeps the 10 best results: name, score, level reached and date.

Screens and saves

  1. Main menu: new game, continue, network game, high scores, help, quit.
  2. Help: what the symbols mean and how to play.
  3. Pause: resume, save, quit to the menu.
  4. Game over and victory screens with the final score.
  5. A game can be saved in the middle of a level and resumed later from the same point.

Network game

Two players connect to a shared server and go through the mazes together. The server runs all the time, and the players do not need to set anything up apart from the server address.

  1. Lobby: after connecting, a player sees who else is online, can write in the shared chat and start a game with another player.
  2. Turns in order: first the first player moves, then the second, then the monsters.
  3. In-game chat: players can message each other during a game.
  4. It is enough for one player to find the key. A caught player is out until the end of the level and comes back on the next one; the level is complete when every remaining player reaches the exit. The game goes on until both are caught. The score is shared.
  5. If one player disconnects, the other sees a message about it, and the game is not lost.

Launch

The game is started from the console. At launch you can set:

  1. the folder where saves are kept;
  2. the high score file;
  3. a level file, to play it instead of a random one;
  4. a generation seed, to get the same mazes;
  5. the server address for network play.

If nothing is set, folders and files next to the game are used.

Requirements

  1. Runs on Windows and Linux with Python 3.10 or newer.
  2. All third-party libraries install with one command from requirements.txt.
  3. Any error — a bad file, a dropped connection, wrong input — is shown as a clear message, and the game does not crash.
  4. The code is covered by automated tests and documentation, and the game comes with a user guide.