July 3, 2026

Ruby got caught street racing

Reverse-engineering Codemasters' BIGF archive format in Ruby

Ruby Was Supposed to Be the Nice Kid—Then It Cracked Open Old Racing Game Files

TLDR: A developer used plain Ruby, plus some AI assistance, to crack open old Codemasters racing game files and show the language can handle much more than web apps. Commenters loved the surprise, with one cheering Ruby’s hidden power and another swooping in to remind everyone Perl did it first.

A delightfully nerdy side quest turned into a mini comment-section lovefest after a developer revealed they reverse-engineered Codemasters’ old BIGF game archive files using plain Ruby—yes, Ruby, the language many people associate with friendly websites, not prying open the guts of a 2003 racing game. The big gasp from readers wasn’t just that it worked, but that it worked with almost no extra tools: just Ruby’s built-in string handling and a feature called unpack, which the author says made reading raw game data surprisingly smooth. Even juicier: the author openly said an AI helped throughout, with the human doing the steering and fact-checking while the model drafted ideas and code.

In the comments, the mood was mostly “this rules” with a side of “actually, Ruby has been secretly good at this the whole time.” The author jumped in to say it began as a hobby mission to understand the driving AI from old Codemasters games, which gave the whole thing a charming garage-project energy. One commenter immediately brought the receipts, reminding everyone that Ruby’s pack and unpack tricks owe a lot to Perl—classic internet move: even in a feel-good thread, someone has to make sure proper historical credit is assigned. Another reader praised the article as a fun showcase of what Ruby can do and joked that a special-purpose tool exists for this sort of thing, but honestly, why bother when the built-in stuff is already serving? The unspoken meme of the thread: Ruby isn’t just pretty—it can absolutely get its hands dirty.

Key Points

  • The article describes a pure, dependency-free Ruby reader for Codemasters’ BIGF archive format that works across archives from four games.
  • Ruby `String` objects are presented as practical byte buffers for binary parsing when files are read with `File.binread` in `ASCII-8BIT` mode.
  • `String#unpack` and `unpack1` are used to decode little-endian 32-bit integers and floats from BIGF archives, primarily with the `V` and `e` directives.
  • The article states that BIGF files contain a header, a directory, and a data section, and shows validating the archive with the `"BIGF"` magic value.
  • One BIGF directory layout is described as fixed 24-byte records containing a 16-byte name field plus 32-bit size and offset values read from the binary data.

Hottest takes

"String#unpack is basically a fast, C-backed binary parser hiding in the stdlib" — davidslv
"Ruby's un/pack is of course heavily inspired by Perl's" — tn1
"What a fun article to read" — Alifatisk
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.