The gold standard of optimization: A look under the hood of RollerCoaster Tycoon

Assembly and the RCT Codebase

  • Commenters are impressed RCT was largely written in assembly, but several note that with good macros, conventions, and comments, assembly can feel only slightly harder than C—just more tedious and discipline-heavy.
  • Veterans point out that, in the 80s–90s, starting in assembly was common because it was the only way to get acceptable performance; experience and tooling accumulated over years.
  • There’s curiosity about how much of the original source was macro-heavy compared to the more explicit OpenRCT2 code.

Bit Shifts, LEA, and What Compilers Actually Do

  • A long subthread disputes the article’s claim that compilers “won’t” turn division/multiplication by powers of two into shifts.
  • Multiple examples (including Compiler Explorer links) show modern compilers do this reliably, often using lea or shift instructions, with special handling for signed division and rounding semantics.
  • Some argue those particular micro-optimizations were standard even in the 90s and not unique to RCT.

Human vs Compiler Optimization

  • One camp stresses that compilers now excel at local arithmetic tricks; the hard part is data layout, memory access patterns, and algorithmic design, which compilers can’t redesign for you.
  • Others emphasize that domain knowledge lets humans deliberately bend formulas or rules (e.g., changing constants, reshaping systems) in ways a compiler never will.

Numeric Constraints and Game Design

  • Several examples (Minecraft, WoW items, fluid systems, voxel engines, space games, Factorio, CAD kernels) show how bit budgets, integer ranges, and floating‑point behavior still shape design and performance.
  • There’s disagreement: some say such micro-optimizations matter less on modern hardware; others reply they still matter once higher‑level issues (algorithms, cache locality) are addressed.

Pathfinding and Large-Scale Simulation

  • The RCT pathfinding example resonates; commenters mention precomputed flow fields and similar tricks to scale to tens of thousands of agents.
  • RCT and other simulation games are seen as showcases for turning technical constraints into mechanics.

Constraints, Creativity, and Single-Author Vision

  • Many praise the tight coupling of designer and programmer in RCT as enabling “end‑to‑end” optimization and distinctive gameplay.
  • Some lament that modern big‑studio pipelines and engines reduce this kind of integrated, constraint-driven creativity, though small studios and solo devs still practice it.