Show HN: Factory DS, A Factorio-Like Game for the Nintendo DS

Or how I ended up building a factory game for a 2004 handheld with 4 MB of RAM, with a lot of help from Claude Code
Yes, I even made a game card for it. No, it’s not for sale.
Download Factory DS (factory-ds.nds, 1.9 MB, in English and French). It runs on a real DS with a flashcart, or in an emulator like melonDS.
Why the Nintendo DS? I think the Nintendo DS is one of the best consoles ever made. It’s far from the most powerful, but I find it one of the best designed. Two screens, a real d-pad, four buttons and two shoulder buttons, and everything falls right under your thumbs. It’s a clamshell, so you can throw it in a backpack without being afraid of breaking it, and it’s simple: you open it and you play, you close it and it sleeps. And of course there is some nostalgia, I spent a lot of hours on it as a teenager.
3 points by j_leboulanger 6 hours ago ronangaillard.github.io 1 comments
Summary not yet generated for this article.

Original Text

Hi HN, I'm Ronan. I love the Nintendo DS but ran out of games that kept me hooked, so I tried porting the kind of game I play today: a factory game in the spirit of Factorio, on a 67 MHz ARM9 with 4 MB of RAM.

I had never written code for the DS, and I built it with Claude Code. I wrote the specs, the design and the balancing, and Claude wrote most of the C. The post goes through how that worked, and through the technical parts I found the most fun:

- a 2048x2048 world that is never stored: terrain is computed from (x, y), only the player's changes are kept in a hash table - night done by changing the 256-color palette instead of redrawing the screen - power grids and pipes computed per network with union-find (there is a small step-by-step animation in the post) - trains with schedules, block signals and pathfinding, plus redstone-like logic gates - a headless Mac build of the game with a text interface, so AI agents could play ~470 test sessions and even help balance the game

You can download the ROM (English and French) and play it on a flashcart or in melonDS.

Comments (1 of ) ⌛

Loading more comments... ⌛
Scroll down to load more comments
No comments available.
Type to search HN and engineering blog articles
Press Escape to close  |  ↑↓ to navigate  |  Enter to open