Skip to content

DukeDeSouth/cobol-galaxian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Galaxian — COBOL Edition

A Galaxian (1979, Namco) arcade clone written in GnuCOBOL with ncurses terminal graphics.

Title Screen

Gameplay

Requirements

  • GnuCOBOL 3.2+ (cobc)
  • ncurses (macOS: built-in, Linux: sudo apt install libncurses-dev)
  • Terminal 80×24 minimum

Build & Run

make
./galaxian

Controls

Key Action
A / Move left
D / Move right
SPACE Fire (one bullet at a time)
Q Quit

Game Rules

  • Destroy all 46 aliens to advance to the next wave
  • Aliens fly in formation and periodically dive-bomb your ship
  • Diving aliens shoot back — dodge or destroy them
  • 3 lives, bonus life at 5,000 points
  • Each new wave is faster and more aggressive

Scoring

Enemy In Formation Diving
Blue (W) 30 60
Purple (M) 40 80
Red (V) 50 100
Flagship ($) 60 150

Project Structure

File Lines Description
GALAXIAN.cob 755 Game logic — init, game loop, AI, rendering
utils.c 65 ncurses C bridge — input, display, timing
Makefile 18 Build system

How It Works

All game logic is in COBOL. The C bridge (utils.c) provides 8 functions for ncurses access: initWindow, getKey, showAt, showStrAt, clearZone, refreshScr, delay, resetWindow.

COBOL handles everything else: 46-alien array management, formation movement, 4-phase dive AI, collision detection, scoring, wave progression, and rendering at 30 FPS.

License

MIT

About

Galaxian (1979) arcade clone in GnuCOBOL + ncurses — 755 LOC COBOL, terminal graphics, 30 FPS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors