Donkey.bas is 45 Years Old – 131 line of Glory

A browser-based port of DONKEY.BAS, a 131‑line BASIC game famously bundled with early IBM PCs and co-written by Bill Gates, is prompting nostalgia for the simplicity and approachability of 1980s home computing. Commenters reminisce about learning to code by editing bundled games like DONKEY.BAS, GORILLA.BAS, and NIBBLES.BAS, swapping typed-in listings from magazines, and exploring early sound and graphics hardware. The conversation also highlights modern efforts to faithfully emulate QBasic and GW-BASIC in the browser, contrasting those “batteries-included” environments with today’s more complex, dependency-heavy toolchains.

Browser Port and Gameplay Feedback

  • Port of DONKEY.BAS to the browser, admired for recreating a full game in ~131 lines of original BASIC.
  • Some users report rendering bugs (severe flicker at specific Firefox/macOS window sizes); a linked pull request claims to address it.
  • Original collision detection is described as inherently buggy: lane changes can trigger a hit even after visually passing the donkey, matching behavior in the classic code (line 1750).
  • Modern port adds extras: cheat mode, ability to play as the donkey, and image-based easter eggs (e.g., donkey photo on heavy loss, Bill Gates photo on many wins).

BASIC, QBasic, and Emulation Projects

  • A large subthread details a high-fidelity QBasic/QuickBasic 4.5-in-the-browser project:
    • Implements a virtual CPU and hardware abstraction layer.
    • Emulates VGA, multiple screen modes, VRAM access, hidden pages, vsync waits, BIOS calls, interrupts (including mouse via int 33h), PEEK/POKE, and even a virtual modem and printer.
    • Designed as a period-accurate, self-contained environment, contrasted with DOSBox, which is seen as less device-complete and harder for casual use.
  • Interest in related BASIC implementations: GW-BASIC forks, pcBasic (GW-BASIC emulator in Python), and GAMBAS as a spiritual successor to Visual Basic.

Old Hardware, Sound, and Storage

  • Discussion of early IBM PC speakers vs richer audio in the port. Original machines had simple dynamic speakers, but demos pushed them surprisingly far (PC speaker MOD players, game intros, “Realsound,” etc.).
  • Notes on alternative speaker technologies (electrostatic, piezo, planar magnetic).
  • Recovering old QBASIC programs from 5.25" floppies: 5.25" media are said to age relatively well; Greaseweazle is recommended for raw magnetic reads.

Nostalgia and Learning to Program

  • DONKEY.BAS, GORILLA.BAS, and NIBBLES.BAS are repeatedly cited as first exposure to programming:
    • Kids discovered source by hitting a key, then modified explosions, gravity, collision detection, or lives to “cheat.”
    • BASIC listings in magazines and simple joke programs fostered experimentation.
  • GORILLA.BAS and NIBBLES.BAS are remembered as bundled “gateway drugs” on DOS 5+ machines in an era when commercial games were expensive or scarce, depending on region.

Simplicity, Tooling, and “What We Lost”

  • Several comments praise early BASIC environments as compact, batteries-included, and approachable compared to modern stacks with many dependencies.
  • Others note that while BASIC was a poor language technically, DOS-era systems (CONFIG.SYS/AUTOEXEC.BAT, self-contained directories) made it easy to understand and fix one’s machine.
  • Comparisons to SDL, raylib, Godot, Unreal, Python, and VB/GAMBAS highlight that modern ecosystems are far more powerful but less immediately transparent and playful.