
Handmade Hero – A complete game live-coded from scratch - tejohnso
https://handmadehero.org/
======
accidentalrebel
I've already gone through 3 weeks worth of Handmade Hero episodes but stopped
because of my busy schedule. During that short time I was able to appreciate
the value of having full control over your code.

I've built a career using game engines other people have made. Sometimes it
bothers me that I do not know what's going on behind the hood because of all
the layers of abstraction. It's nice to be able to make something quickly, but
the programmer in me feels sad that I'd have to trust things to just work
without me knowing how.

Handmade Hero showed me how things work behind the scenes and it inspired me
to be more aware of the internals of what I'm using as much as possible. Now I
make it into a point to delve into documentations and source codes and am now
also playing around with low level languages (Like C and Rust) during my free
time. Overall these have helped me a lot and I look forward to improving
myself more.

So kudos and thanks to Casey for this series. It has helped me strive to
become a better programmer.

~~~
emrex
I see that you have already gone through 3 weeks of his episodes. I walked
through the page provided, I can not see in what language is he writing ?

~~~
obituary_latte
C++

------
skadamat
Casey is really well known in the gaming community -
[https://mollyrocket.com/casey/about.html](https://mollyrocket.com/casey/about.html)
Through Handmade Con, he's also interviewed many other creators like Jonathan
Blow and Edmund Mcmillen. He also contributed to Blow's recent game, The
Witness (specifically the movement system and the world editor).

This is a really good series by an experienced game developer that's basically
free (or at least the Zed Shaw model of pay to download but free to view).

~~~
Zelizz
He also has some pretty cool articles on finding all walkable areas of the map
("walk_monster.cpp")and how he improved the grass planting system:

[https://mollyrocket.com/casey/stream_0006.html](https://mollyrocket.com/casey/stream_0006.html)

[https://mollyrocket.com/casey/stream_0015.html](https://mollyrocket.com/casey/stream_0015.html)

------
krapp
I only came in to Handmade Hero after it had been going on for a while, and I
followed it from the beginning episodically and made it about to the point
where he starts talking about tiles and scrolling, then gave up.

Every now and then I pick up the current version of the code to see what it
looks like, but there's no way I'm going to follow it through to the end. But
for me, it does work as a reference for the various parts of the code he
happens to be working on at the moment, and sometimes he stops to give a
tutorial on something like basic 2d physics.

Watching the process overall is useful but if anyone is intimidated by the
length of the stream I would suggest approaching it non-linearly.

He seems to have turned off comments on his Youtube stream, which I find
disappointing. A lot of the value I've gotten from the early videos came from
the comments people made either agreeing with, expanding on or disputing what
was discussed.

~~~
iherbig
The comments are enabled on the Twitch stream, in case you ever want to catch
it live again.

~~~
reificator
If he saves Twitch vods, they contain the live comments as well as new
comments from vod viewers.

~~~
nbm
He doesn't anymore. He has a portion before the stream where he likes to talk
about things that are not code-related (like his opinions on X), and he
doesn't want those recorded. As I understand it, people were taking the vods
and posting snippets to Youtube, which went against the spirit.

------
kleiba
I watched the first four or five weeks of episodes, but I'm still a bit
puzzled by who Casey assumes to be the target audience. Granted, this is a
really difficult endeavor, but I often find that he spends endless amounts of
time explaining trivial things which, if you don't know them already, you'd
have no chance of following along anyway. By that I mean, if you don't already
know some algebra, you might "get" everything that he explains, but it's hard
to imagine that you'd be able to actually internalize it to a point that you
understand how it is later used in various parts of the code.

I know from my own experience, though, that it can be "fun" to explain things
that you know inside out in (too much) detail because it gives you a feeling
of satisfaction and appreciation of the material you're going over.

However, I can't help that for anyone to whom you have to explain high school
math episode after episode, the rest of the show, i.e., actual (and sometimes
rather low-level) programming would be completely over their head.

That said, I do enjoy watching the shows quite a bit and I still plan on
finishing the full run. I just wish the trivial stuff wouldn't receive so much
time, or that there was a good way of skipping forward without having to fear
to miss something important.

One really awesome thing is that the source code is bundled up after each
episode so that you can really easily get back to speed after a longer break,
like in my case. What I plan to do is to find the last episode I watched, then
download that episode's code, and remind myself of the current state of
affairs by studying the code, rather than trying to remember the content of
everything I already saw.

I think this whole series is such a cool thing to do. And you can really tell
that he knows his shit.

Casey, if you hang out here on HN, two thumbs up for this awesome effort!

~~~
alephr
A community member actually annotates all the episodes with time stamped
descriptions of what's going on in the videos; You can watch the episodes with
them inline and clickable here:
[https://asafgartner.github.io/annotations_player/index.html](https://asafgartner.github.io/annotations_player/index.html)

------
djsumdog
I really feel like I should start live streaming some of my coding sessions;
taking a clear task from my issue tracker and working on it until completion.
When I work on stuff on my own, I get distracted by things like ... well ..
typing this comment on hackernews.

Streaming a coding session over a well defined feature seems like a really
good idea to stay focused .. like XP except not terrible and make you want to
stab your partner in the face.

------
convery
To each their own, but for me the series were just too slow. As in, it felt
like half the streams were just going over the basics and explaining every
little detail. Which I'm sure some enjoy, but if you're like me, I'd recommend
Jonathan Blows streams (naysayer88 on Twitch) for a little faster development.

~~~
smaddox
That's what youtube 1.5x / 2x speedup is for ;-)

------
alphast0rm
I'm surprised nobody has mentioned Notch's (the creator of Minecraft) entries
into Ludum Dare, a 48-hour video game development competition [1]. I only
looked briefly on Twitch and his entry for #22 [2] was the only one I could
find--nonetheless, it's really insightful seeing him work.

[1]
[http://ludumdare.com/compo/author/notch/](http://ludumdare.com/compo/author/notch/)

[2]
[https://www.twitch.tv/videos/38122415](https://www.twitch.tv/videos/38122415)

~~~
pygy_
Here's the beginning of Prelude of the Chambered. A Link's Awakening-inspired
dungeon crawler:

[https://www.youtube.com/watch?v=rhN35bGvM8c](https://www.youtube.com/watch?v=rhN35bGvM8c)

------
gnuvince
A comment thread from a couple years ago that resonated with me:
[https://news.ycombinator.com/item?id=11087399](https://news.ycombinator.com/item?id=11087399)

I watched about a dozen Handmade Hero episodes, and I was a bit annoyed that
every session resulted in a random hunt to fix a bunch of bugs because there
was not sufficient abstraction. It wouldn't be so bad if the abstractions were
upcoming, but Casey seems to have an aversion to abstraction and I stopped
watching because I grew bored of watching him jumping around in a bunch of
files trying to figure out what memory write caused an issue at run-time.

~~~
kristoff_it
That's the exact point of HM. Abstractions come from the knowledge gained
after wrestling with problems, not as a form of premature optimization.

And this is especially true in games because you need to get all abstractions
right otherwise the game will be limited and/or not performant enough.

In many other programming fields you don't get punished for adding a few
abstractions that are not strictly necessary, so usually other programmers are
used to abstracting things away fairly early (eg in OOP: properties vs public
variables, ...) because they're free as long as you don't overuse them.

Also you should keep in mind that the stream is educational so Casey sometimes
takes the scenic route before getting to the point, and he's both implementing
the engine and designing it, so sometimes he doesn't know yet what he wants
exactly.

~~~
k__
I'd say you're right if we'd talk about a junior dev, but not when talking
about a seasoned senior.

~~~
abiox
this isn't really an issue of "junior" or "senior".

------
curyous
After 15 years of software development, watching Casey's videos changed how I
code. His approach feels right. He's amazing, I'm very grateful for his
series.

------
dchuk
I have no delusions of having enough time to ever follow through all of these
videos, but it's still an idea that appeals to me. Something I'm curious about
though:

If I wanted to follow along on a Mac instead of Windows, how different of a
process am I looking at?

~~~
sourthyme
Not too bad, Casey does a good job of separating the platform code from his
game code. Also he's using emacs.

~~~
gnuvince
> Also he's using emacs.

Not anymore.

~~~
edanm
What is he using now?

~~~
nbm
He's using 4coder -
[https://4coder.handmade.network/](https://4coder.handmade.network/)

He likes that its configuration language is C, so he doesn't have to learn a
configuration language to get things done.

~~~
xfer
But if you are already using emacs, you already have learnt the configuration
language. What's the benefit?

~~~
dangerbird2
From what I remember, he switched to 4coder because it supports modal editing
that's better for his rsi problems. I guess he didn't care for vim or emacs
with vi emulation. Casey also likes to support his "Handmade" network
promoting simple C/C++ applications.

------
ndh2
What I find most notable about Handmade Hero is that Casey doesn't follow the
mindless OOP mentality that is currently prevailing. I have been using more
and more free functions, for example. It really made me question a lot of what
is considered best practices.

For my personal projects I've adopted a lot of his style, which is very
enjoyable to work with, and I found no downside.

~~~
0xcde4c3db
This is probably a horses-for-courses thing. Typical OOP patterns are a poor
fit for the lower-level aspects of a real-time game engine, where you really
need to know what's happening on the critical path. Things like GC and
constructors/destructors/finalizers can become an imposition rather than a
convenience if they're not kept out of the main loop, and that can put you at
odds with the usual idioms in an object-oriented setting.

I think the biggest benefits attributed to OOP are really from splitting up
the namespace into more manageable pieces. This can and usually should be done
in larger C and C++ projects even if you're not using an OOP approach. The
defaults in this regard are a little unfortunate, but both languages provide
tools to do it (internal/"static" linkage in C, namespaces and using
declarations in C++).

------
tmkbry
I want to point out that the website has a search tool. Good if you are
looking for some specific stuff. Examples:

[https://hero.handmade.network/episodes/search?#light%20rende...](https://hero.handmade.network/episodes/search?#light%20rendering)
[https://hero.handmade.network/episodes/search?#sucks](https://hero.handmade.network/episodes/search?#sucks)

~~~
pmarin
The youtube playlists are also very well organized if you are looking for a
single topic.

------
rkagerer
The "SGX and Unbreakable DRM" episode is pretty interesting:
[https://hero.handmade.network/episode/chat/chat005](https://hero.handmade.network/episode/chat/chat005)

------
joeld42
If you like HMH, I encourage you to also check out Ferris Makes Demos and
Ferris Makes Emulators

[https://www.twitch.tv/ferrisstreamsstuff](https://www.twitch.tv/ferrisstreamsstuff)
[https://www.youtube.com/channel/UC4mpLlHn0FOekNg05yCnkzQ](https://www.youtube.com/channel/UC4mpLlHn0FOekNg05yCnkzQ)

It's a mix of livestream development and democoding (mostly Rust and C++) and
super-detailed breakdowns of demos and tools he's built. He does a super good
job of taking effects and tools that seem very intimidating and breaking them
down into understandable parts.

------
saboot
I've followed the first ~50 or so videos mainly because I'm interested in 2D
game design and game physics at the basic levels (writing engines and
physics).

Commenting to ask if anyone has additional resources / streams / guides on
those topics they can recommend.

~~~
ewjordan
I'd recommend making at least three games and shipping them on existing
engines before trying to write your own. That's the best way to figure out
what is and isn't a must-have feature.

Beyond that, if you're interested in physics look up everything Erin Catto has
written about the design and implementation of Box2d.

~~~
saboot
Interesting, yes I'll read Catto's work.

My background is in physics, that part interests me the most, I'd be happy to
make a physics sandbox myself.

------
bo1024
Very cool. One suggestion (in case it will be heard) -- add some dates to the
homepage and each post, such as on the episodes page. Besides being generally
useful, it helps reassure visitors today that the project is still active.

------
mesozoic
Pfft. Did not fire and dye his own silicon transistors.

~~~
sitkack
Handmade Nand2Tetris [0][1]

[0] [http://nand2tetris.org/](http://nand2tetris.org/)

[1] [https://www.coursera.org/learn/build-a-
computer](https://www.coursera.org/learn/build-a-computer)

------
iaw
This is a brilliant gimmick for promotion, catch the intersection of gamers
interested in game design.

~~~
Hupriene
I think the amount effort put into this goes way beyond gimmick. I only
followed the first few episodes, but it was clear that he was very engaged
with his audience, and that he put a great deal of emphasis on the educational
value of the project.

~~~
slindsey
You're right. I've watched many hours from the very beginning and this is
about learning from the basics. It starts even before episode 1 with intro to
C stuff. And he constantly reinforces the fact that this is for teaching "from
scratch" and therefore isn't using libraries, but if you were to build a real
game for sale there are places where you wouldn't be doing things the same
way. Overall a very educational project.

------
salqadri
Wow this is crazy; I'm surprised its still going on after all this time.
Doesn't seem healthy imo to stick just one project for so long without
significant ROI. But yes, commendable indeed, and I hope people got
significant value out of it, for his sake.

~~~
ksk
The purpose of the project is education. It does have significant ROI, just
not significant commercial profit.

~~~
TeMPOraL
Exactly. True education is something you do to give people _humongous_ ROI on
_their_ time, not something you do for your own ROI.

