Back in Chapter 1, Introduction and Setup, we took a first look at compiling and running the GameDLL, packaged here as MiniMonoGameSample.sln
for Visual Studio. Let's load that up again, making sure that any CryENGINE instances such as the Launcher or Sandbox are closed, as we're going to overwrite the CryGame.dll
file that's used at runtime.
The standard practice for CryENGINE games is to have a filter in the GameDLL project, CryGame, called Nodes. If this doesn't exist, go ahead and create it now.
Nodes are never referenced in other areas of the project, so it's fine to simply implement a node as a single .cpp
file without a header.
In our case, let's just add a new file, TutorialNode.cpp
, and create the basic structure:
#include "stdafx.h" #include "Nodes/G2FlowBaseNode.h" class CTutorialNode : public CFlowBaseNode<eNCT_Instanced> { }; REGISTER_FLOW_NODE("Tutorial:Multiplier", CTutorialNode);