Skip to content

Denarzai/dizzy-walk-asm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dizzy Walk — x86 Assembly Maze Game

Project Overview

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.

Screenshots

Title Screen Main Menu
Title Menu
Gameplay History Search Highscores
Gameplay History Highscores

Features

  • 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.txt on disk
  • Adventure log with history search by professor name
  • Top-5 highscore board persisted across runs

Technical Highlights

  • Memory-mapped grid: the 15,000-cell maze lives in a flat byte array; cell access computes row * GRID_COLS + col offsets 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/Place procedure that bounds-checks and collision-checks before committing cells

Tech Stack

  • Language: x86 Assembly (MASM syntax)
  • Library: Irvine32 (console I/O, randomization, file helpers)
  • Assembler/IDE: Microsoft Visual Studio with MASM

How to Build and Run

  1. Install Visual Studio with the Desktop development with C++ workload (includes MASM)
  2. Download the Irvine32 library from Kip Irvine's site and note its install path
  3. Create an empty C++ project, add dizzy_walk.asm, and enable Microsoft Macro Assembler in Build Customizations
  4. Point the project's include and library directories to the Irvine32 folder, and add Irvine32.lib;Kernel32.lib;User32.lib to the linker input
  5. 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.

Team

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.

About

Console maze-adventure game in pure x86 assembly (MASM/Irvine32) — randomized 100x150 maze, scrolling viewport, two game modes, and file-persisted history and highscores.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors