Skip to content
0:00 / 0:00

#handmadehero#win32#gameengine

Handmade Hero Day 001 - Setting Up the Windows Build

Molly Rocket

148K subscribers • 33 videos on Hallway

YouTube
  • Recommended by 3 people: 3 on Hacker News.
  • A classic. People kept recommending it from 2017 to 2021.
  • May be out of date. Uploaded 11 years ago, in an area where tools change fast.

Beginner. No background in the topic needed.

465K views11 years ago3 recommendations

Game developmentSystems programmingGame programmingCOperating systems

This live-coding session demonstrates how to set up a minimal C build system and WinMain entry point on Windows from scratch.

Day 001 of coding on Handmade Hero. See handmadehero.org for details. 1. Review of C on Windows 2. Command subst. subst w: c:/hmh 3. WinMain entry point 4. Navigating windows shell 5. Setting up minimal build system. 6. Windows MessageBox

Why it's here

3 people recommend this

What people say. Highly recommended as the starting point for a masterclass in building a complete game engine from scratch in C.

Moments people linked to

thorinon Hacker News • Recommends

On “Ask HN: As a developer what are your aha moments?”

After watching the first few weeks of Handmade Hero 1 I realised my idea of hard work and dedication was different to a lot of people I was trying to emulate. Doing this as a spare time, free project and the amount of knowledge and experience on-show was incredible 1 link to this video

w0uterton Hacker News • Recommends

On “Compiler Optimizations are Awesome”

Handmade hero 1 mostly, and sometimes Jonathan Blow's compiler programming streams 2. Not all of these video's are equally interesting, but there's some real gems in there, e.g. where Casey (of HH) hand-optimizes his bilinear bitmap interpolation code (somewhere between streams ~115 and ~120 if I remember correctly). I cringe a lot about their coding style and complete disregard of architecture and basic code hygiene they appear to have, but there's still a lot of interesting things to learn from watching these streams. 1 link to this video 2 link

agentultraon Hacker News • Recommends

On “Why I Hate Frameworks (2005)”

It's hard for me to recall how I learned because my first "game" I wrote was in '89 and I wasn't very old at the time. Maybe check out link to this video -- I've watched a fair bit of it and many folks agree it's thorough and interesting. If you don't know C already he has a decent introduction as well. Maybe not the best place to learn C but it suits well enough for game development projects. The nice thing I find with C is that bringing life back to older machines is definitely possible -- the homebrew scene for various old consoles is very much alive and well and there's probably a C compiler that targets it.

u/skeetoin r/C_Programming • Mentions

On “Learn C for Cybersecurity”

Unfortunately nothing all in one place. I'm also quite disconnected from the introductory stuff at this point. The best I can do is say something like learn X from resource A, Y from resource B, etc. You can get a thorough tour of the features of the language from Modern C. However, there is no pragmatic information in the book whatsoever. The first section shows a basic compile command with `-Wall`, but that's the extent of it. It never mentions sanitizers, doesn't discuss debugging, and you won't learn good program design. (In fact, you'll have to *unlearn* a bit.) Handmade Hero is at the extreme other end. It's eminently practical and hands on. It's a wealth of information on great pr…

u/skeetoin r/C_Programming • Mentions

On “I feel like I'm stuck”

Handmade Hero shows a highly skilled, knowledgeable person building moderately complex software from scratch. It demonstrates good program structure, and a lot of practical techniques that you won't find written down anywhere.

u/skeetoin r/C_Programming • Mentions

On “Your Thoughts on C vs Go”

To clarify, I'm talking about a workflow of edit, build, then switch focus to a long-running debugger instance with the project loaded and hit "run." Repeat. You can see this basic workflow in action in [Handmade Hero] for thousands of hours, first with Visual Studio and later with RemedyBG. A debugger is [integral to the workflow]. If you've never experienced this, you should try it out. Visual Studio (esp. 2008 or earlier), raddbg (open source), or RememdyBG (cost some money). Though currently this wealth of debuggers is Windows-only. (Or maybe don't try it out, because ignorance is bliss and it will ruin Delve for you.) Delve is like he opposite of this, and everything about it indicates…

u/skeetoin r/C_Programming • Mentions

On “Ruby Outperforms C: Breaking the Catch-22”

Thanks! Handmade Hero taught me a ton of great practices, none of which appear in any conventional programming education. Untangling Lifetimes: The Arena Allocator made some concepts finally click into place that I'd been missing. For personal projects: I use w64devkit every day and, while it began merely as scratching an itch, I'm especially proud of how well u-config turned out earlier this year. I've also a big pile of ideas in my scratch repository.

u/skeetoin r/C_Programming • Mentions

On “shibajs1.h: Quick and Dirty JSON Parsing (not an advertisement!) --- Seeking comments, good ones. Thanks”

You tried something, built something that actually works, and learned from it, so you're off to a good start! > it actually does not care if the JSON itself is null-terminated. Ah, got it. That explains the behaviors and limitations I observed. The syntax itself delimits the buffer, which of course limits it to valid JSON input. Though it's undefined behavior to use such buffers with `strtol`, etc. if they're not null-terminated *even if you expect they'll stop reading soon enough*. For instance, it would be legal for implementations to `strlen` first to see how much it's dealing with, and that would obviously be undefined. > I assumed encoding the length like this would be useful in decr…

u/andaiin r/C_Programming • Mentions

On “Why is C so freaking troublesome to use with windows ?”

See also: Casey Muratori's Intro to C on Windows playlist: link to this video which is an introduction to his Handmade Hero series, making a Windows game from scratch (no libraries, except those built in to Windows): link to this video
5View on Reddit

u/mikkolukasin r/C_Programming • Mentions

On “Good YouTubers who program 'live'?”

Video 001 here

u/notU15in r/C_Programming • Mentions

On “C for non beginner”

link to this video Handmade hero is by far one of the greatest resources to learn c, how to manage large projects, and design an API

u/okovkoin r/C_Programming • Mentions

On “C programming in windows 10”

If it's just a single C program and the class isn't about learning C, the best way is to install MSVC just for the compiler and do all the work on the windows command line. Here's a tutorial.

u/CharlesHenry8in r/C_Programming • Mentions

On “C programming project”

I have been doing a 2D game from c/c++ for the past year and have learned a ton. One of the best people to learn from is Casey Muratori he has an amazing in depth tutorial on how to do exactly that. YouTube series

u/michaelshmittyin r/C_Programming • Mentions

On “How to display an image with WIN32 api and C ?”

As others have suggested, check out Handmade Hero. It will show you how to blit stuff to the screen using the Win32 API. link to this video Skip the intro to C part and start here: link to this video Edit: Added win32 API more specifically. Edit 2: Add note to skip intro to C.

u/ProducerMattin r/C_Programming • Mentions

On “Configuring a basic C-programming setup avoiding any IDE”

You should take a look at Casey Muratori's setup for Emacs. He programs 2d & 3d games without external dependencies.

u/skeetoin r/C_Programming • Mentions

On “General advice on my first C library”

Untangling Lifetimes: The Arena Allocator: About an old-school technique for simpler memory management. No more pairing up `malloc` and `free`. No more worrying about memory leaks. Feels like using garbage collection. Not every problem fits, but most do. *Writing Solid Code* is about techniques used at Microsoft in the 1980s and early 1990s for quickly finding bugs. One of my own recent articles relevant here: My favorite C compiler flags during development. The gist is that the `-Wall -Wextra` warning baseline should see a lot more use. Most of the time someone shares their project, merely compiling with these options discovers bugs. Similarly the sanitizers built into compilers are rarel…