Dizzy Walk is a console maze-adventure game written entirely in x86 assembly (MASM) for a Computer Organization and Assembly Language university course. A dizzy professor must find his way home through a randomly generated 100x150 maze while avoiding pits, lakes, walls and buildings, collecting coins and treasures, and managing a key needed to enter his house. The game is about 4,200 lines of assembly organized into 40+ procedures, with a scrolling viewport renderer, persistent save files, an adventure history log, and a top-5 highscore board.
The project was built to develop low-level fluency with x86 registers, memory addressing, and stack discipline — the foundation behind binary analysis and exploitation work in security.
| Title Screen | Main Menu |
|---|---|
![]() |
![]() |
| Gameplay | History Search | Highscores |
|---|---|---|
![]() |
![]() |
![]() |
- Randomly generated 100x150 logical maze, different every run
- Scrolling 30x20 viewport: the professor stays centered while the world moves around him
- Two game modes: random walk (autonomous) and keyboard control (WASD / arrow keys)
- Obstacle system: long walls, 8x8 buildings, oval lakes, instant-death pits
- Collectibles: coins (+10) and treasures (+50) with treasure location tracking
- Key mechanic: the key can be stumbled on and dropped, and must be recovered to enter home
- Status bar with live steps, wallet, key status, and treasure count
- Game state saved to
maze_state.txton disk - Adventure log with history search by professor name
- Top-5 highscore board persisted across runs
- Memory-mapped grid: the 15,000-cell maze lives in a flat byte array; cell access computes
row * GRID_COLS + coloffsets manually - Viewport scrolling: window coordinates are derived from the professor's logical position with edge clamping, so only 600 of 15,000 cells are drawn per frame
- Procedure design: 40+ PROCs with register preservation via push/pop (300+ stack operations), parameter passing through registers
- File I/O in assembly: save files, logs, and highscores written through Irvine32 wrappers over Win32 CreateFile/WriteFile/ReadFile
- Placement validation: every obstacle type has a paired
CanPlace/Placeprocedure that bounds-checks and collision-checks before committing cells
- Language: x86 Assembly (MASM syntax)
- Library: Irvine32 (console I/O, randomization, file helpers)
- Assembler/IDE: Microsoft Visual Studio with MASM
- Install Visual Studio with the Desktop development with C++ workload (includes MASM)
- Download the Irvine32 library from Kip Irvine's site and note its install path
- Create an empty C++ project, add
dizzy_walk.asm, and enable Microsoft Macro Assembler in Build Customizations - Point the project's include and library directories to the Irvine32 folder, and add
Irvine32.lib;Kernel32.lib;User32.libto the linker input - Build and run — the game starts at the title screen
The game writes maze_state.txt and its log/highscore files into the working directory at runtime.
| Member | Role |
|---|---|
| Muhammad Subhan (Denarzai) | Team lead |
| Affaf Shahid | Developer |
Developed as an equal pair effort across maze generation, rendering, game logic, and file persistence, with Muhammad Subhan leading the project structure and integration.




