← All projects
Project record1 mention
Originally shared on Hacker News

Rat Race (After Dark, 1994)

A TypeScript port of Rat Race, the 1994 After Dark game, from Motorola 68k assembly, keeping rat behaviors and animation speeds frame-accurate to the original while adding enhancements: fairness fixes for lane win rates, up to 8 rats, a lane passing animation, and custom rat names inspired by Berkeley Systems' naming scheme.

Last shared
01 / The problem

What it addresses

In the original game, rats in the outside lane had an unfair advantage (43% win rate instead of the expected 33% random roll rate), which the port fixes.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Rat Race (After Dark, 1994)

    A TypeScript port of Rat Race, the 1994 After Dark game, from Motorola 68k assembly, keeping rat behaviors and animation speeds frame-accurate to the original while adding enhancements: fairness fixes for lane win rates, up to 8 rats, a lane passing animation, and custom rat names inspired by Berkeley Systems' naming scheme.

    Problem: In the original game, rats in the outside lane had an unfair advantage (43% win rate instead of the expected 33% random roll rate), which the port fixes.

    Posted by @shijie · Original source ↗

    Story title · @shijie · · Source ↗

    Show HN: Rat Race (After Dark, 1994), ported from 68k assembly to TypeScript

    Submitted URL · @shijie · · Source ↗

    https://rat-race.heyitsjam.es/

    Source text · @shijie · · Source ↗

    Github: https://github.com/heyitsjames/rat-race

    Source text · @shijie · · Source ↗

    Ported to TypeScript from Motorola 68k assembly!

    Source text · @shijie · · Source ↗

    All the rats' behaviors are true to spec: Their distractions (sniffing, turning around, grooming, stopping) are all frame accurate and occur in the same ratios as the original.

    Source text · @shijie · · Source ↗

    I ran tens of thousands of simulations and fixed a few unfair advantages rats had if they were in the outside lane—they would lurch forward quickly around the turns resulting in a 43% win rate as opposed to the 33% random roll rate one would expect.

    Source text · @shijie · · Source ↗

    I also bumped the max rat count up to 8 possible rats, and added a "lane passing" animation.

    Source text · @shijie · · Source ↗

    I also added my own names for the rats, inspired by Berkeley Systems' naming scheme.

    Source text · @shijie · · Source ↗

    Now we can all scream at our monitors urging Flamin' Furball to turn around and start waddling again like it's 1994.