Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Handmade Hero.

Before warching Casey program, it had not occurred to me you could sit down with a compiler and write an entire video game from scratch.

Then, I found out Jonathan Blow sat down and wrote his own compiler, followed by an engine, and now has a game in flight.

It's a truly incredible what these guys (and their teams) get done.



I'll see your Handmade Hero and raise you "But without a compiler".

Specifically, Roller Coaster Tycoon, hand-written in x86 assembler by Chris Sawyer.


Damn is the source code for that available somewhere? I loved that game.

Edit: guess I could just download it and disassemble ;)


Not really. It's actually more difficult than disassembling a C codebase. Chris used a macro assembler and wrote _a lot_ of macros. You'd only see what the assembler expanded, but you'd have no idea how the code _actually_ looked like.


Right, thats what I assumed. TIL!


Assembler is low-level C. Also probably easy to learn compared to Rust. ;-)

What impresses me though are old Atari games that were implemented in hardware without a microprocessor.


I've been thinking a lot lately about those two examples related to experience in programming, domain knowledge and producing good work. Jon had written 12 compilers by the time he got to Jai, and many more games before his Sokoban, and he started making games as a contemporary to Abrash, in an era where you had to really learn what was going on to produce something good. That knowledge from constrained environments adapted really well to the increasing power of computers (both in terms of processing power and ergonomics), whereas coming at it from a modern programmer's POV you can get away with very little in terms of know-how (which is both good and bad)

I'm working on trying to reach their level (it is reachable) but I sometimes feel like I started with a handicap of comfort from modern OSs and tools


Reminds me of the author of the K programming language, Arthur Whitney, wrote is own language, then database, and now he's working on his own OS.


Speaking of K, a way to generate the first N+1 Fibonacci numbers is what made me take notice of the language:

    N(|+\)\1 1
I'm not sure where I first saw this snippet (maybe in the Kona documentation) but it stuck with me enough that I was able to recreate it from memory.


Hey, could you recommend an episode of Handmade Hero to get started with? Should you just start at the very beginning or somewhere later in the process?


Its a pretty big comittment at this point, but if youve got the time I'd recommend starting at the beginning. There's also an annotated episode guide if you wanted to learn about a specific topic in a more targeted way


Big fan of both Casey's and Jon's streams.


Did Blow really finish the compiler? Got a link?

Last time I checked (a couple of months ago) there wasn't even a formal language spec yet.


It's been in closed beta for a couple years now IIRC. His approach is very different from what's prevalent in the industry today - he prefers to only release a product that's reasonably well done, instead of frustrating his audience with a buggy moving target. That's why the language is in its seventh/eight year of closed development at this point.


AFAIK it is done enough to be in closed beta


Definitely this. Lots of good practical advice in his videos too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: