Install GitHub for Windows then fork our repository and clone it to your computer. If you’d rather use Git from the command line, see the Setting up Git and Fork a Repo articles. If you’d prefer not to use Git at all, you can download the source as a zip file.
Make sure you have Visual Studio 2013 installed. Any desktop edition of Visual Studio 2013 will do, including the free version: Visual Studio 2013 Express for Windows Desktop.
Open your source folder in Explorer and run Setup.bat. This will download binary content for the engine, as well as installing prerequisites and setting up Unreal file associations. On Windows 8, a warning from SmartScreen may appear. Click “More info”, then “Run anyway” to continue.
A clean download of the engine binaries is currently around 2.5gb, which may take some time to complete on a slow internet connection. Subsequent checkouts only require incremental downloads and will be much quicker.
Run GenerateProjectFiles.bat to create project files for the engine. It should take less than a minute to complete.
Load the project into Visual Studio by double-clicking on the UE4.sln file. Set your solution configuration to Development Editor and your solution platform to Win64, then right click on the UE4 target and select Build. It may take anywhere between 10 and 40 minutes to finish compiling, depending on your system specs.
After compiling finishes, you can load the editor from Visual Studio by setting your startup project to UE4 and pressing F5 to debug.