A 2D platformer game built entirely in MIPS Assembly, using the MARS (MIPS Assembler and Runtime Simulator) with Bitmap Display and MMIO (Memory-Mapped I/O) for graphics and keyboard input.
- ๐พ Player movement with left and right keys
- ๐ฆ Platform collision detection
- ๐ช Gravity and falling logic
- ๐จ Collectible coins (3ร3 yellow blocks)
- ๐ซ Game over when falling off-screen
- ๐ฎ Real-time input via memory-mapped keyboard
- ๐งฑ Static environment with enemies and platforms
| Key | Action |
|---|---|
A |
Move Left |
D |
Move Right |
(Optional) W |
Jump |
(Optional) Q |
Quit Game |
(Mapped using 0xFF200000 MMIO address)
- MARS 4.5+ with:
- Bitmap Display
- Keyboard and MMIO Simulator
- Java Runtime (for MARS)
- Open
main.asmin MARS - Go to Tools โ Bitmap Display and set:
- Width:
256, Height:256, Unit:Pixel, Base Address:0x10008000
- Width:
- Go to Tools โ Keyboard and MMIO Simulator
- Enable MMIO at
0xFF200000
- Enable MMIO at
- Assemble (
F3) and Run (F5) the program
- Player is a 5x2 red rectangle
- Floor is blue with a white background
- Coins disappear on collection
- Works using manual redrawing (erase โ update โ draw)
- MIPS stack and registers
- Memory-mapped I/O (MMIO)
- Framebuffer graphics
- Collision detection
- Game loop and state updates
Haseeb Afzal
University of Toronto
๐ง haseeb.afzal@mail.utoronto.ca
๐ LinkedIn
๐ GitHub
MIT License โ feel free to use and modify!