Visual C++, Visual Studio Community (recommended), version 2013 (12.0) or later. Make sure you read Installing Visual Studio caveats below or you will have to run/download the installer again.
Python 2.7+ or Python 3.5+.
Pywin32 Python Extension for parallel builds (which increase the build speed by a great factor).
Python adds the interpreter (python.exe) to the path. It usually installs in C:\Python (or C:\Python[Version]). SCons installs inside the Python install (typically in the Scripts folder) and provides a batch file called scons.bat. The location of this file can be added to the path or it can simply be copied to C:\Python together with the interpreter executable.
To check whether you have installed Python and SCons correctly, you can type python --version and scons --version into the Windows Command Prompt (cmd.exe).
If commands above do not work, make sure you add Python to your PATH environment variable after installing it, and check again.
Pywin32 is required for parallel builds using multiple CPU cores. If SCons is issuing a warning about Pywin32 after parsing SConstruct build instructions, when beginning to build, you need to install it properly from the correct installer executable for your Python version located at Github.
For example, if you installed a 32-bit version of Python 2.7, you would want to install the latest version of Pywin32 that is built for the mentioned version of Python. That executable installer would be named pywin32-221.win32-py2.7.exe.
The amd64 version of Pywin32 is for a 64-bit version of Python pywin32-221.win-amd64-py2.7.exe. Change the py number to install for your version of Python (check via python --version mentioned above).
If installing Visual Studio 2015 or later, make sure to run Custom installation, not Typical and select C++ as language there (and any other things you might need). The installer does not install C++ by default. C++ was the only language made optional in Visual Studio 2015.
If you have already made the mistake of installing a Typical, installation, rerun the executable installer you downloaded from internet, it will give you a Modify Button option. Running the install from Add/Remove programs will only give you the "Repair" option, which will do nothing for your problem.
If you're using Express, make sure you get/have a version that can compile for *C++, Desktop*.
Godot's source is hosted on GitHub. Downloading it (cloning) via Git is recommended.
The tutorial will presume from now on that you placed the source into C:\godot.
SCons will not be able out of the box to compile from the Windows Command Prompt (cmd.exe) because SCons and Visual C++ compiler will not be able to locate environment variables and executables they need for compilation.
"Developer Command Prompt for VS2013"
"VS2013 x64 Native Tools Command Prompt"
"VS2013 x86 Native Tools Command Prompt"
"VS2013 x64 Cross Tools Command Prompt"
"VS2013 x86 Cross Tools Command Prompt"
You should be able to find at least the Developer Command Prompt for your version of Visual Studio in your start menu.
If you found the Developer Console, it will do for now to create a 32-bit version of Godot, but if you want the 64-bit version, you might need to setup the prompts manually for easy access.
If you don't see some of the shortcuts, "How the prompts actually work" section below will explain how to setup these prompts if you need them.
There is a few things you need to know about these consoles and the Visual C++ compiler.
Your Visual Studio installation will ship with several Visual C++ compilers, them being more or less identical, however each cl.exe (Visual C++ compiler) will compile Godot for a different architecture (32-bit x86 or 64-bit x86; the ARM compiler is not supported).
The Developer Command Prompt will build a 32-bit version of Godot by using the 32-bit Visual C++ compiler.
Native Tools Prompts (mentioned above) are used when you want the 32-bit cl.exe to compile a 32-bit executable (x86 Native Tools Command Prompt). For the 64-bit cl.exe, it will compile a 64-bit executable (x64 Native Tools Command Prompt).
The Cross Tools are used when your Windows is using one architecture (32-bit, for example) and you need to compile to a different architecture (64-bit). As you might be familiar, 32-bit Windows can not run 64-bit executables, but you still might need to compile for them.
"VS2013 x64 Cross Tools Command Prompt" will use a 32-bit cl.exe that will compile a 64 bit application.
"VS2013 x86 Cross Tools Command Prompt" will use a 64-bit cl.exe that will compile a 32-bit application. This one is useful if you are running a 32-bit Windows.
On a 64-bit Windows, you can run any of above prompts and compilers (cl.exe executables) because 64-bit Windows can run any 32-bit application. 32-bit Windows cannot run 64-bit executables, so the Visual Studio installer won't even install shortcuts for some of these prompts.
Note that you need to choose the Developer Console or the correct Tools Prompt to build Godot for the correct architecture. Use only Native Prompts if you are not sure yet what exactly Cross Compile Prompts do.
In general, it is OK to have at least as many threads compiling Godot as you have cores in your CPU, if not one or two more. Feel free to add the -j option to any SCons command you see below if you setup the "Pywin32 Python Extension".
If all goes well, the resulting binary executable will be placed in C:\godot\bin\ with the name of godot.windows.tools.32.exe or godot.windows.tools.64.exe. SCons will automatically detect what compiler architecture the environment (the prompt) is setup for and will build a corresponding executable.
This executable file contains the whole engine and runs without any dependencies. Executing it will bring up the Project Manager.
The Visual Studio command prompts are just shortcuts that call the standard Command Prompt and have it run a batch file before giving you control. The batch file itself is called vcvarsall.bat and it sets up environment variables, including the PATH variable, so that the correct version of the compiler can be run. The Developer Command Prompt calls a different file called VsDevCmd.bat but none of the other tools that this batch file enables are needed by Godot/SCons.
Start the creation of the shortcut by pressing the right mouse button/New/Shortcut in an empty place in your desired location.
Then copy one of these commands below for the corresponding tool you need into the "Path" and "Name" sections of the shortcut creation wizard, and fix the path to the batch file if needed.
Visual Studio 2013 is in the "Microsoft Visual Studio 12.0" folder.
Visual Studio 2015 is in the "Microsoft Visual Studio 14.0" folder.
Path: %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat""
After you create the shortcut, in the shortcut's properties, that you can access by right clicking with your mouse on the shortcut itself, you can choose the starting directory of the command prompt ("Start in" field).
Some of these shortcuts (namely the 64-bit compilers) seem to not be available in the Express edition of Visual Studio or Visual C++. Before recreating the commands, make sure that cl.exe executables are present in one of these locations, they are the actual compilers for the architecture you want to build from the command prompt.
x86 (32-bit) cl.exe for cross-compiling for 64-bit Windows.
x64 (64-bit) cl.exe for cross-compiling for 32-bit Windows.
In case you are wondering what these prompt shortcuts do, they call cmd.exe with the \k option and have it run a Batch file.
For most projects, using only scripting is enough but when development in C++ is needed, for creating modules or extending the engine, working with an IDE is usually desirable.
You will be able to open Godot's source in a Visual Studio solution now, and able to build Godot via the Visual Studio Build button. However, make sure that you have installed Pywin32 so that parallel (-j) builds work properly.
If you need to edit the compilation commands, they are located in "Godot" project settings, NMAKE sheet. SCons is called at the end of the commands. If you make a mistake, copy the command from one of the other build configurations (debug, release_debug, release) or architectures (Win32/x64). They are equivalent.
Cross-compiling from some versions of Ubuntu may lead to this bug, due to a default configuration lacking support for POSIX threading.
You don't even need to copy them, you can just reference the resulting files in the bin\ directory of your Godot source folder, so the next time you build you automatically have the custom templates referenced.