Skip to content

rodoshi16/columns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

◆ COLUMNS ◆

Three gems fall. You shuffle. Gravity wins — unless you don't.

A full Columns puzzle game written in MIPS assembly for the CSC258 computer organization final project. No frameworks. No runtime. Just registers, syscalls, and raw pixel writes to a bitmap display.

     ┌─────────────────────────┐
     │  ░░░░░░░░░░░░░░░░░░░░░  │  ← grey border
     │  ░  🟣                 ░  │
     │  ░  🟡    match 3+     ░  │     pink   #ff7aa9
     │  ░  🟢    vertically   ░  │     orange #ffb67a
     │  ░                     ░  │     yellow #fffd7a
     │  ░      C O L U M N S  ░  │     green  #9dff7a
     │  ░                     ░  │     blue   #7adcff
     │  ░░░░░░░░░░░░░░░░░░░░░  │     purple #ab7aff
     └─────────────────────────┘

What is this?

Remember Sega's Columns? Gems stack in a narrow well. You control a falling column of three colored pieces — move left and right, rotate their order, and drop them fast. Line up three or more of the same color in a row (vertically, in this build) and they vanish. Gems above fall. Chain reactions feel incredible.

This implementation runs on the MARS / Logisim Saturn MIPS simulator with a connected bitmap display and keyboard.

Controls

Key Action Sound
A Move column left Low piano note
D Move column right Mid piano note
W Shuffle gems (rotate order) Synth blip
S Soft drop (move down one row) Bass thump
L Save current board state
F Restore saved state
Q Quit (plays a farewell riff) Exit melody

Focus the keyboard panel in the simulator before playing.

Features

  • Pixel-perfect playfield — 5-wide × 13-tall well inside a hand-drawn grey border
  • Title screen — "COLUMNS" spelled out in bitmap letter art on boot
  • Procedural columns — each new piece spawns with 3 random gems from 6 colors
  • Match detection — vertical streaks of 3+ trigger elimination
  • Gravity — surviving gems cascade down after clears
  • MIDI feedback — every action and combo has its own note
  • Save / restore — stash your board mid-game with L / F
  • Full soundtrackplay_song routine with a multi-bar piano arrangement (commented in at startup if enabled)

Tech

Component Address / Detail
Bitmap display 0x10008000
Keyboard 0xffff0000
Display size 256 × 256 px (8 × 8 unit cells)
Play area 5 columns × 13 rows
Language MIPS32 assembly
Syscalls Random (42), MIDI out (31), sleep (32), exit (10)

Pixels are written with sw to display memory. Each pixel is 4 bytes. Moving right = +4. Moving down a row = +128.

Getting started

Prerequisites

  • MARS MIPS Simulator or the Logisim Saturn environment used in CSC258 labs
  • Bitmap Display tool connected to the program
  • Keyboard tool connected at 0xFFFF0000

Run the game

  1. Open columns.asm in MARS / your simulator
  2. Assemble (F3 in MARS)
  3. Connect Bitmap Display and Keyboard peripherals
  4. Run (F5)
  5. Click the keyboard panel, then play

Reference files

File Purpose
columns.asm Main game — play this one
bitmap_display.asm Minimal demo: border + random column
keyboard.asm Minimal demo: read keypresses
Documentation/ Milestone notes and assembly explainers

How it works (the short version)

  main
    │
    ├─► draw border + title
    ├─► spawn random 3-gem column
    │
    └─► game loop ◄──────────────────┐
          │                          │
          ├─ poll keyboard           │
          ├─ move / shuffle / drop     │
          ├─ scan for vertical matches │
          ├─ delete + apply gravity    │
          └─ spawn new column ───────┘

Match scanning walks each column top-to-bottom, tracking streak length. Three in a row? Paint them black, play a rising triad, and let gravity pull everything above into place.

Authors

Rodoshi Mondal · Tess Madison

CSC258 — Computer Organization, University of Toronto

License

Academic project. All game logic is original work for the CSC258 final project.

built one lw at a time · no garbage collector required

About

Columns game coded in scratch using Assembly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors