Cortex Labs - Real-time, puzzle, strategy game for x86 processors made in assembly. MS-DOS. https://cyfrowynomada.com/products/cortex-labs
  • Assembly 53.6%
  • C 35.4%
  • Zig 5%
  • Python 4.4%
  • Shell 0.7%
  • Other 0.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Krzysztof Krystian Jankowski 8f893c1883 size analysis
2026-11-15 13:00:49 +01:00
.zed UPX in build 2025-08-28 23:17:30 +02:00
docs cleanup 2026-07-08 21:49:49 +02:00
journal cleanup 2026-07-08 21:28:08 +02:00
jsdos M4: draw PODs and resource deposits on the antenna map view 2026-11-03 23:21:09 +01:00
packaging ver 0502 2026-05-02 11:45:29 +02:00
scripts size analysis 2026-11-15 13:00:49 +01:00
src M11: back to the 16 KiB boot budget 2026-11-15 12:15:51 +01:00
tools M11: back to the 16 KiB boot budget 2026-11-15 12:15:51 +01:00
.bochsrc omarchy settings + action place rails 2025-08-15 22:07:58 +02:00
.gitignore M4-B: untrack seed-viewer build outputs 2026-10-22 22:13:21 +02:00
build.zig M11: back to the 16 KiB boot budget 2026-11-15 12:15:51 +01:00
LICENSE M6-C: license year + manual truth-pass 2026-10-22 22:24:58 +02:00
MANUAL.md M11: back to the 16 KiB boot budget 2026-11-15 12:15:51 +01:00
MANUAL.TXT M10: remove resource regrowth; random deposit amounts 2026-11-05 02:22:48 +01:00
README.md M11: back to the 16 KiB boot budget 2026-11-15 12:15:51 +01:00
THIRD_PARTY_NOTES.md M6-A: complete third-party inventory 2026-10-22 22:25:23 +02:00

Cortex Labs

Build the rails. Harvest the planet. Fill the rocket.

Cortex Labs is a small sci-fi logistics strategy game for classic x86 PCs. Build rail networks, use cargo pods to collect alien resources, and refine green Neurofung to fill and launch the rocket. The game is written in assembly, runs as a DOS .COM program, and can boot directly from a floppy disk.

Play

Game screen

Core Features

  • 6 fixed seeded maps, plus a randomized map
  • Rail-building logistics across a large 128x128 alien world
  • Cargo pods that move resources through player-built rail networks
  • Stations, switches, collectors, extractors, silos, refineries, labs, radar, and pod factories
  • Three resource types to extract, transport, store, and spend
  • Finite resource deposits that never regrow
  • Refinery system: turn green Neurofung into rocket fill progress
  • Laboratory upgrades for faster pods, faster extractors, longer extractor range, and bigger silos
  • Resource storage limits expanded by building silos
  • Fog of war and radar visibility expansion
  • Mouse gameplay with keyboard shortcuts
  • Victory goal: fill the rocket and complete the mission

Story

Earth's last unaging generation is dying.

For three decades, Cortex Labs has chased Neurofung — a wild organism found only on Kepler-486i. A single gram can extend cognition and cellular life. A full rocket could change the fate of humanity.

You are Orbital Commander: the remote mind of an automated mining expedition.

Harvest. Refine. Launch.

Build

Requires FASM 1.73.35, Zig 0.16.0, UPX, mtools (mformat/mcopy), and zip. libpng16 dev headers are needed for zig build tools; qemu-system-i386 for the emulator and smoke test steps.

  • zig build — full floppy chain: boot sector, UPX-packed game12_floppy.com (guarded at the 16384-byte bootloader load limit), and a FAT12 build/img/floppy.img with GAME.COM and MANUAL.TXT
  • zig build qemu — boot the floppy image in QEMU (or bochs)
  • zig build burn / burn-fast — write to a physical floppy; FLOPPY_DEV (e.g. FLOPPY_DEV=/dev/sdb zig build burn) is required, there is no default device
  • zig build jsdos — regenerate jsdos/game12.jsdos deterministically (served by jsdos/index.html)
  • zig build help — full step list (com, stats, opcodes, tools, bundle, package, ...)

Release gates

  • scripts/baseline.sh check — rebuild and compare sha256 of boot.bin, game12_raw_dos.com, game12_floppy.com against scripts/baseline.sha256; record rewrites the baseline
  • scripts/smoke.sh — headless QEMU boot-to-title test of the floppy image

Technical Highlights

  • Pure x86 assembly game for DOS PCs
  • Less than 16KB in size
  • Runs under DOS or from a bootable floppy on compatible x86 PCs
  • Bootable FAT12 floppy image support
  • VGA 320x200 graphics
  • 16-color DawnBringer-style palette in 256-color mode
  • 16x16 tile and sprite renderer
  • Procedural map generation from campaign seed values
  • Double-buffered framebuffer drawing
  • RLE-compressed title/background images
  • PC Speaker sound effects
  • Rail auto-orientation and switch logic
  • Pod entity movement with collision handling
  • DOS mouse support through int 33h
  • Bare-metal floppy boot path with tiny PS/2 mouse driver
  • Custom asset pipeline using small tools for tiles, fonts, and RLE images
  • Graphics created with P1Xel Tool: https://github.com/w84death/p1xel-tool

Screenshots

Sprites

Screenshot Screenshot Screenshot Screenshot