Blog
Bio
The Technician
No Imperfections Noted
The Jeff and Casey Show
Jeff and Casey Time
Casey Muratori
Seattle, WA
Announcing Handmade Hero
A complete game and engine, coded live, from scratch.
I’ve been in the game industry since I graduated high school, and in all that time, almost all the important things I’ve learned came from watching experienced game developers at work. If the little kid version of me were to ask today’s me how to learn game programming, I’d have to shrug and say, “try to find some experienced game developers and work with them.” Because the truth is, there just isn’t a lot of solid documentation on the actual practice of game programming, so if you don’t have someone to learn from in person, it’s very difficult.
Now, to be sure, there’s plenty of resources out there about how to do individual elements of game programming. If you want to learn, say, the specifics of how to implement screen-space ambient occlusion, you can probably use Google to find a number of blog posts and papers that describe it. But if you just want to know how to do the daily work of implementing and structuring the eighty percent of the codebase that isn’t an isolated graphics algorithm, there’s not much out there.
With the rise of programming streams on things like Twitch and YouTube, a lot of my friends are starting to stream cool game programming videos. This easily-accessible way to show live explanations to a wide audience got me thinking that maybe the time was right to try to make something that anyone could use to learn professional game programming the way I did: by watching someone who already knows how to do it, and asking them questions.
So after several weeks of research and planning (I had never even used Twitch before!), handmadehero.org was born. It’s a project where I will spend an hour a night for (at least) the next year streaming the entire process of creating a game, with explanations of each step and Q&A sessions where people can ask about things they didn't understand. Tonight, at 8PM PST, I will stream the very first hour of coding, and I'd love to see you all there! If you can't make it, every episode will be archived on YouTube so you can watch it at your leisure.
Preorder the Game, Get Full Access to the Source Tree
Because the goal of this project isn’t just to program a professional-quality game, but to teach people how to program a professional-quality game, I’ve decided to make the source code available right from day one. Anyone who preorders the game on the handmadehero.org website will get full access to the source tree, updated nightly. The source code will be a series of ZIP files, one for each day of coding, so even with no knowledge of source code control, it will be trivial for anyone to unpack a version of the source tree and watch the video that coincides with that state of the tree.
Furthermore, since I want Handmade Hero to be available as a platform on which people can build new educational materials, a clock will start the day the final release of Handmade Hero is posted. Within two years of that day, I will release the full source code into the public domain permanently, so anyone and everyone can do whatever they want with it forever more. Until that time, if you have a project you want to do using the source code, you will have to e-mail here for written permission.
Making a Pixely Hero by Hand
Although it is tempting to just make a game using one of the ubiquitous game-making tools, like Unity or GameMaker, those tools obfuscate and abstract most of the actual work the computer does to run a game. They’re fine if all you care about is learning game design, but if you want to learn game programming, then you really need to start from scratch, so you can see absolutely everything that goes on inside a full game engine. After that, you may still decide that it’s easier to use a prefab engine than build your own, but for the educational process, it’s crucial to see everything, otherwise there will always be parts of the game that operate in ways you do not understand.
For these reasons, Handmade Hero will use no engines and no libraries. Every single thing done by the game will be written directly on top of the operating system — about as low level as you can feasibly get nowadays. Everything will be coded in C, C++, or assembly language, so there will be no automated language features like containers or garbage collection to obscure that actual execution of the game code. Everything that happens, we’ll write: our own containers, our own memory management, our own renderer. . . everything. Again, there’s nothing wrong with using other people’s code, but for educational purposes, if you really want to understand how code works, you have to write it yourself, at least once.
Traditional Design, Advanced Code
I am not a game designer. I’d love it if I were a great game designer, but that’s not even my job title. I’m a game programmer, and I’ve spent almost all my time in the game industry programming, not designing. So while I’d love to include a course on game design, I’m the last person you’d want to teach that class! Maybe someday, Jonathan Blow will decide to stream a full course on game design, and then we’ll all be way better off. But until then, I certainly can’t fill that void.
So, Handmade Hero will not be an avant garde game. It will be very traditional, and stick to traditional design principles that someone like me can faithfully execute. It will be in the classic style, an adventure where the little hero goes off into the woods on a quest of discovery.
However, since my goal is to teach not just basic game programming, but advanced game programming, the design will be intentionally intricate. All the things that we can think of that we might want to do in the game, we will code: complex item interactions, globally propagating environmental effects, monster behaviors that interact with each other and the environment, combinatorial powerups — anything that might be tricky to code, we’ll code. My hope is to spend the majority of the coding time dealing with the interesting architectural issues that arise from supporting complex gameplay mechanics, so we’ll keep piling things on until we know we’ve got a very advanced game core.
One Hour a Day, Five Days a Week
Normally, when I can, I prefer to program for at least six hours a day. In any modern environment, that can be hard to do, since programmers have to spend a lot of time communicating with each other or with the outside world. But I still try to make sure I can always get about six hours of solid coding in on any given work day.
Obviously, that’s not going to work for this project. Six hours of video would be impossible for anyone to follow, since they’d have to spend the majority of their day doing nothing but watching Handmade Hero. So instead, I’m going to just accept the fact that the game will be developed more slowly, and I’ll try to keep the streams to about one hour a day (8PM to 9PM PST), plus some additional time for Q&A that will be separate from the main stream where I program the game.
Even though the archive will always be available so anyone can watch it at any time, I am still going to try to keep to a regular streaming schedule so people can watch every night if they want to. Monday through Thursday, it’ll typically start at 8PM PST. On Fridays, I may do earlier streams, perhaps even in the morning, since people are often out on Friday nights (including me!) and some people in other timezones might want a chance to be in on the live chat once a week, too. It’ll be flexible, so we’ll see how it works out, and I can adjust accordingly based on feedback.
At Least One Year, Probably Two
At only one hour of programming time a day, and given that I will be much slower than my usual speed due to the explanations I’ll be giving as I go, it’s going to take a long time to build the code for this game. It’d be great to have a game done in a few months, but realistically it’s pretty safe to assume it’s going to be well over a year. So I apologize in advance for the slow pace, but that is the cost of having it be a class instead of just a game. Hopefully the benefits of that will far outweigh the drawbacks of waiting longer to have something fun to play.
Windows First, Mac and Linux Later
Platform wise, there’s unfortunately no getting around it: Windows is the only real platform for PC gaming at the moment. It accounts for 90% of all PC games sold. So if you’re serious about programming games from scratch, you’ve got to know how to do it on Windows.
But believe me, I would love it if that weren’t true. Personally, I program on Linux all the time (my main laptop runs Linux exclusively!). So at regular intervals in the series, we’ll take a break from programming the main game and take a week or two to show how to build the platform code for other platforms like Mac OS X, Linux, and Raspberry Pi. All the game code we write will be platform-independent, so even if we never cover a platform that you want to use to code the game, you should be able to get it running on that platform without too much effort.
Off on Our Adventure
For the past few days, I’ve been testing my streaming setup to make sure it was ready for today’s launch. The response to the test streams has been amazing and overwhelming. There are already more subscribers to the Handmade Hero Twitch channel than I thought there’d be six months from now. It has been wonderful to see such enthusiasm for the project, and it makes me even more excited about its potential for kicking off a new wave of educational materials made by professional game programmers. So I would like to extend my most heartfelt “thank you” to all of you for making this project a success before it has even begun. I can’t wait to start programming this game with you tonight. It’s going to be epic!
- Casey Muratori
2014 November 16
Site design and technology © Copyright 2005-2014 by Molly Rocket, Inc., All Rights Reserved.
Contents are assumed to be copyright by their individual authors.
Do not duplicate without their express permission.
casey muratori
casey's blog - post 31
prev
mollyrocket.com