Skip to content

Haseeb702/Assembly-Platformer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ•น๏ธ MIPS Assembly Platformer Game

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.

๐Ÿ“ฝ๏ธ Demo

https://youtu.be/88zUwO7eYjY


๐Ÿ› ๏ธ Features

  • ๐Ÿ‘พ 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

๐ŸŽฎ Controls

Key Action
A Move Left
D Move Right
(Optional) W Jump
(Optional) Q Quit Game

(Mapped using 0xFF200000 MMIO address)


๐Ÿ–ฅ๏ธ Requirements

  • MARS 4.5+ with:
    • Bitmap Display
    • Keyboard and MMIO Simulator
  • Java Runtime (for MARS)

๐Ÿš€ How to Run

  1. Open main.asm in MARS
  2. Go to Tools โ†’ Bitmap Display and set:
    • Width: 256, Height: 256, Unit: Pixel, Base Address: 0x10008000
  3. Go to Tools โ†’ Keyboard and MMIO Simulator
    • Enable MMIO at 0xFF200000
  4. Assemble (F3) and Run (F5) the program

๐Ÿ“Œ Notes

  • Player is a 5x2 red rectangle
  • Floor is blue with a white background
  • Coins disappear on collection
  • Works using manual redrawing (erase โ†’ update โ†’ draw)

๐Ÿ“š Concepts Used

  • MIPS stack and registers
  • Memory-mapped I/O (MMIO)
  • Framebuffer graphics
  • Collision detection
  • Game loop and state updates

๐Ÿง‘โ€๐Ÿ’ป Author

Haseeb Afzal
University of Toronto
๐Ÿ“ง haseeb.afzal@mail.utoronto.ca
๐Ÿ”— LinkedIn
๐Ÿ”— GitHub


๐Ÿ“ƒ License

MIT License โ€“ feel free to use and modify!

About

A 2D platformer game built in MIPS Assembly using MARS, featuring real-time keyboard input, gravity, collision detection, and collectible coins rendered via bitmap display.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors