I know I'm very late to the party on this one, but better late than never. I recently discovered Casey Muratori's educational project called Handmade Hero, where he develops a game from scratch on Windows. This project, which began in 2015, spans over 600 videos and is currently on hiatus.

My interest in this series isn't to learn game development, but rather to better understand the game developer mindset. Working in robotics, I've noticed a significant overlap in skills between game developers and robotics engineers - things like 3D/GPU programming, simulation, AI, and systems-level coding. And yet, despite this strong technical common ground, I don't see nearly as much cross pollination between the two fields as I would have expected. Even more puzzling, I've struggled to recruit highly skilled game developers into robotics roles. Why is that?

A possible answer hit me about two years ago when I watched John Carmack's interview on Lex Fridman's podcast. Carmack expressed his frustrations working at Meta and pointed out a stark cultural divide: game developers and "venture-backed Silicon Valley developers" different groups. He argued that big tech could learn a lot from the hardcore game development world - but that unfortunately this doesn't seem to happen. I have to admit that I think I resemble that remark, and now I want to learn differently.

So far, Casey Muratori's Handmade Hero has been a fascinating deep dive into what game developer culture can teach someone like me. And I'm ready to unlearn some of my "big money, Silicon Valley ways." I've personally witnessed how game developers and robotics engineers struggle to communicate, even when working on similar problems. I've seen this kind of friction before on interdisciplinary teams, and one of the best ways to bridge the gap is to deeply understand the mindset of the other side. Meet them halfway, and then some.

What humbles me is that I didn't recognize this divide sooner. It took John Carmack spelling it out - drawing from his 10 years at Meta - to really make me see the pattern.

If you’ve got experience moving between game development and robotics, or if you’ve faced the cultural divide between game devs and robotics engineers, I’d love to hear your thoughts. Where else can we bridge this gap? What else have I been missing?

Catching Up on a Decade of Evolution in Windows Development Tooling

Coming back to Windows development after 10-15 years has been fascinating. I've enjoyed catching up on a decade of evolution and incremental improvements all at once:

  • Windows ARM virtual machines are now a thing, and Windows retail keys work on them, making it possible to do Windows development in a VM on an Apple Silicon Mac.
  • Visual Studio has a community edition for academic and personal use that is functionally equivalent to the professional version, so there's no need for an MSDN subscription just to get professional-grade tools.
  • The Visual Studio cl compiler is finally a native 64-bit executable (which should have happened years ago, but hey, we got there).
  • Visual Studio works great on Windows ARM-based machines, and very few code changes are needed to support x86_64 and ARM64.

Installing Windows 11 in a virtual machine

When you try to install Windows 11 in a virtual machine, you'll likely get stuck with the install prompting you to install a driver (or to use a Microsoft account):

Why is Next disabled?

As a workaround, hold down SHIFT+F10 to open up a command prompt, and run the following command: OOBE\BYPASSNRO

This command was introduced in Windows 11 as a way to skip the mandatory network connection requirement during the Out-of-Box Experience (OOBE) setup. BYPASSNRO (Bypass Network Requirement for OOB).

This will restart the install, adding an "I don't have internet" button enabling you to proceed through setup wizard:

Select "Continue with limited setup" to create a local account.

Installing Visual Studio Community 2022

The workflow for installing and configuring Visual Studio Community is slightly different than what was shown in the early Handmade Hero videos. Here's a list of the differences:

Configuring a minimal Visual Studio 2022 project

Similarly the steps for configuring are slightly different:

  • When creating a new project choose "Windows Desktop Wizard" to ensure you get prompted to be able to choose an empty desktop project.
  • Choose the location and click on the "Create" button.
  • You will be presented with a dialog to choose the application type and additional options. Choose:
    • Application type: Desktop (.exe)
    • Additional options: Empty project
  • Once the project has been created, in your solution, right click in "Source files" and choose "Add new file"
  • Add "test.cpp" (or whatever C++ file you like)

The boilerplate for a basic Windows Desktop application has changed, per https://learn.microsoft.com/en-us/windows/win32/learnwin32/winmain--the-application-entry-point

#include <windows.h>

int WINAPI WinMain(
  HINSTANCE hInstance,
  HINSTANCE hPrevInstance,
  PSTR lpCmdLine,
  int nCmdShow)
{
  return 0;
}

A more detailed walkthrough for creating a Windows Desktop application with Visual Studio 2022 can be found here: https://learn.microsoft.com/en-us/cpp/windows/walkthrough-creating-windows-desktop-applications-cpp

Visual Studio 2022 VCVARSALL.BAT location

Now that Visual Studio is a native 64-bit executable, the VCVARSALL.BAT script is located under \Program Files\Microsoft Visual Studio

"%SystemDrive%\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat"

So the misc\shell.bat script in your Handmade Hero work project will look something like this:

REM misc\shell.bat
@echo off

REM
REM To run this at startup, use this as your shortcut target:
REM %windir%\system32\cmd.exe /k w:\handmade\misc\shell.bat

REM https://hero.handmade.network/forums/code-discussion/t/2691-day_001_with_visual_studio_2017
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" arm64

The "Archicture" parameter changed for VCVARSALL.BAT in this native 64-bit version. It's no longer vcarsall.bat x64 but rather now it's vcvarsall.bat amd64 or vcvarsall.bat arm64 depending on your host. The value should match your host platform so that your binaries don't run in compatibility mode with emulation.

  • vcvarsall.bat amd64 - Produces x64 binaries (that can run in emulation on arm64)
  • vcvarsall.bat arm64 - Produces arm64 binaries

The "Architecture" parameter specifies host and target architecture. Cross-compiling is also supported:

Architecture Compiler Host computer architecture Build output (target) architecture
x86 x86 32-bit native x86 x86
x86_amd64 x64 on x86 cross x86 x64
x86_x64 x64 on x86 cross x86 x64
x86_arm ARM on x86 cross x86 arm
x86_arm64 ARM on x86 cross x86 arm64
amd64 x64 64-bit native x64 x64
x64 x64 64-bit native x64 x64
amd64_x86 x86 on x64 cross x64 x86
x64_x86 x86 on x64 cross x64 x86
amd64_arm ARM on x64 cross x64 arm
x64_arm ARM on x64 cross x64 arm
amd64_arm64 ARM64 on x64 cross x64 arm64
x64_arm64 ARM64 on x64 cross x64 arm64
arm64 arm64 arm64
arm64_amd64 arm64 x64
arm64_x64 arm64 x64
arm64_x86 x86 arm64

You can use the dumpbin command to determine the architecture identifier for binary application:

dumpbin /headers <binary.exe> | findstr "machine"

Startup Folder

On Windows 11, the startup folder is located in the following location:

"%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"

You can use File Explorer to add a script as a startup task

  1. Right-click on Start and select "Run"
  2. In the Run dialog box, enter shell:appsfolder
    A File Explorer window opens, containing a list of all applications installed on the device. Keep this first window open
  3. Right-click on Start and select "Run"
  4. In the Run dialog box, enter shell:startup
    A second File Explorer window opens, containing a list of applications that start automatically when a user signs in
  5. Drag and drop the applications that you want to start automatically from the first window to the second one

References