This guide aims to aid developers downloading the CRYENGINE source code from GitHub with getting set up and compiling the engine.
This article assumes that you have the main CRYENGINE programming prerequisites referenced in Getting Started__.
The CRYENGINE source code is hosted on GitHub - allowing anyone to access the source for the triple-A engine for free, and providing the ability for users to send improvements back to Crytek and the community.
To get started, open the repository in your web browser by clicking this link. Once open, click Clone or Download and then Open in Desktop to open the repository in the GitHub Desktop client.
The GitHub Desktop client should then pop up asking where you want to store your repository. Choose an appropriate location and wait for the download to finish.
Once finished, you should see the CRYENGINE repository in the GitHub Desktop client as pictured below.
As you may notice in the screenshot above, the default CRYENGINE branch is release. This branch represents the latest stable release of the engine. In total we currently have three branches:
If you are looking for a specific revision, such as the latest preview release for example, you can choose this within the GitHub Desktop Client. Know that when changing the branch, you may need to clean your build directory before compiling again as the new files will not be tracked by Git.
Once you have successfully cloned the CRYENGINE repository you can then begin the installation process.
First we will want to install the latest project management system CryVersionSelector, this is recommended so that we can be sure we have the most up-to-date options and routines when, for example, right-clicking a project file. You can do this by executing the following file from your cloned repository: Tools/CryVersionSelector/Install.bat
By running cry_cmake.exe file we will first download the required Third-Party SDKs for the engine and then proceed to configure, generate and then open the Visual Studio solution file seamlessly.
Begin by running the mentioned cry_cmake.exe file in the root directory of your cloned CRYENGINE repository and select Download SDKs.
Once the download is finished you will be presented with a choice of which solution configuration to build. It is recommended to choose the 64bit (x64) configuration of whichever version you wish to use.
Once the next step is completed you should be presented with the CMake Configuration GUI. Here you can simply select Configure until there are no more red-highlighted options, then Generate and finally Open Project. Feel free to select the options you wish once you are more familiar with what they are.
You should now be able to compile the engine source code and run directly from within Visual Studio.
It is a good idea to register this engine with the project manage system with a unique identifier. This will allow projects to be assigned to use this particular engine installation. The unique identifier should be unique for every unique file path you want to register with an engine.
To do this we will modify the cryengine.cryengine file in the CRYENGINE root directory.
You may open this file with your preferred Text editor. Notice at the top of this file there are default values defined for the id, name and version properties. For now we are only interested in the id and name properties.
For more information on the structure of this file, please refer to the Projects & Plugins document.
For our purposes we will add 'github' as a suffix to both values.
Simply save and close this file. Now we can easily register this engine in the project system by executing the cryengine.cryengine file. Alternatively you can right-click the modified file and choose Register engine. This will allow you to choose this engine in the drop-down menu displayed when using the Switch engine version option on a project.
Notes: