Book Image

CryENGINE Game Programming with C++, C#, and Lua

Book Image

CryENGINE Game Programming with C++, C#, and Lua

Overview of this book

CryENGINE is a complete 3D game development solution that can run on multiple platforms. It is orientated around giving intuitive tools to the developer. A variety of interactive video games can be created using CryENGINE. CryENGINE is one of the most beginner-friendly engines out there to learn. If you are interested in diving into the various systems and understanding their workings in a way that is easily understood, then this book is for you. This book provides you with the knowledge to tame the powerful but hard-to-master CryENGINE. CryENGINE Game Programming with C++, C#, and Lua dives into the various systems and explains their workings in a way that can be easily understood by developers of all levels. It provides knowledge on the engine along with step-by-step exercises and detailed information on the backend implementation of the subsystems, giving you an excellent foundation to build upon when developing your own CryENGINE games. Written by developers with years of CryENGINE experience, this book breaks down the common confusion that encompasses the CryENGINE engine code, guiding you through a series of chapters aimed towards giving you the ability to create your own games in a rapid yet productive fashion. You will learn everything you need to know in order to create your own CryENGINE-powered games as well as detailed information on how to use the engine to your advantage. By teaching systems such as audio, particle effects, rendering, AI, networking, and more, we'll be exposing the most inner parts of CryENGINE that commonly confuse programmers. If you want to quickly gain the knowledge required to create your own CryENGINE game title, then this book is for you.
Table of Contents (19 chapters)
CryENGINE Game Programming with C++, C#, and Lua
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Compiling the CryGame project (C++)


The CryENGINE Free SDK ships with complete source access to the game logic library, CryGame.dll. This dynamic library is responsible for the main part of game features, as well as the initial game startup process.

Note

A library is a collection of existing classes and functions that can be integrated into other projects. In Windows, the most common form of library is a Dynamic Link Library , or DLL , which uses the .dll file extension.

To start off, open the main sample folder, and navigate to Code/Solutions/, in which a Visual Studio solution file named CE Game Programming Sample.sln should be present. Double-click on the file and Visual Studio should start up, displaying the included projects (see the following breakdown).

Note

A solution is a structure for organizing projects in Visual Studio. The solution contains information on projects in a text-based .sln file, as well as a .suo file (user-specific options).

To build the project, simply press F7 or right-click on the CryGame project in the Solution Explorer and select Build.

What just happened?

You just compiled CryGame.dll, which should now be present in the binary folder. (Bin32 for 32-bit compilation, Bin64 for 64-bit). Launching the sample application will now load the .dll file containing the source code you compiled.

The CE Game Programming Sample solution breakdown

The solution includes the following three projects, one of which compiles to a .dll file.

CryGame

The CryGame project includes the underlying game logic used by the engine. This compiles to CryGame.dll.

CryAction

The CryAction project includes partial source to CryAction.dll, which is responsible for a large number of systems, such as actors, UI Graphs, and game objects. This project does not compile to a .dll file, but is instead only used for interface access.

CryCommon

The CryCommon project is a helper containing all shared CryENGINE interfaces. If there is a subsystem you want access to, look for its exposed interface in here.