This article assumes that you have the main CRYENGINE programming prerequisites:
The following applications will need to be installed in order to compile projects and the engine itself.
|Name||Minimum Version||Latest Supported Version||Notes|
|Visual Studio||2015 (All Editions), vc140 compiler||2017 (All Editions), vc141 compiler|
Early installations of Visual Studio 2015 may have installed 10.0.10150.0 instead.
Please note that you have to restart your computer after installing the Windows SDK before attempting to compile the engine.
In addition, the CRYENGINE Launcher will be needed.
Creating a new project
In this section we will go through the process of creating a new project through the CRYENGINE Launcher. Creation of a project is always done by first selecting a template, giving you the foundations you need for the type of game you wish to create.
To start, open up the CRYENGINE Launcher and press +New in the Projects menu.
This will then take you to the Create Project screen, in which we can select an engine version, preferred language, a project template, a project filename and finally, a path or location.
Once you can see the screen pictured above, follow the steps below:
- Select the Blank C++ game template
- Name your project
- Select where the project should be stored.
The project files are stored separately from the engine. A .cryproject file will be generated for you, which can be right-clicked to show helper functionality or opened with a text editor to reveal JSON detailing the project.
When you're done, press Create Project in order to trigger the project generation. Once this is done you will be returned to the main Launcher screen where you can launch the Editor or the Game. I.e. creating a project does not automatically open it.
Generating a Visual Studio Solution
In order to start generating a Visual Studio solution, we need to go to our project directory. This was configured in the step above in the Create Project screen.
An easy way of opening the project directory is by clicking on the gear icon in the Launcher and selecting Reveal in Explorer.
Once you have the folder open in Explorer, right-click the Game.cryproject file and select Generate Solution. This will output a Solutions directory in the same directory. Opening this reveals a win64 directory, containing Game.sln. This solution file can be used to build your game project.
Now, double click your Game.sln file to open the solution with Visual Studio. Once opened, you should have a view similar to the image below:
This presents us with our project; Game (seen under the Project folder in the Solution Explorer), contains all C++ source files contained in our game plug-in.
Even game projects are represented as plugins in CRYENGINE. This means that any game code you write is technically a plugin for the engine.
In addition, we are presented with three executable files that can launch the engine:
- GameLauncher - Used to play your game as an end-user would
- GameServer - Used to start a dedicated server running your project
- Sandbox - Used to open the CRYENGINE Editor to create levels for your project
By default, the GameLauncher is selected. This means that if we press F5, the project will be built and launched in a pure game context.
This concludes the article! You are now able to continue building your C++ powered game using CRYENGINE.
If you are interested in going further, we recommend checking out: