Book Review: CryENGINE Game Programming with C++, C#, and Lua

CryENGINE is the popular and insanely powerful game engine used in games such as Crysis, Ryse, and originated with Far Cry 1. Developed by Crytek,  it supports the latest and greatest visual renderers such as DX11. CryENGINE 4 is coming soon as well as Linux support. A modified version of the CryENGINE spawned the Dunia Engine, which is used by Ubisoft Montreal for Fary Cry 2 and 3.

I wanted to try my hand at playing around with the famous engine and thus I am reviewing  CryENGINE GameProgramming with C++, C#, and Lua by Filip Lundgren and Ruan Pearce-Authers, published by Packt Publishing. Read on to see how it went.

CryENGINE GameProgramming with C++, C#, and Lua covers various CryENGINE systems and how to program your own concepts into the systems to make your game. It focuses primarily on the programming, FlowGraph system, and very little else in the engine design wise. So, don’t read the book if you’re expecting to learn how to use the engine to make a game from scratch but rather read it to learn how to program in each of the systems the engine provides.

To elaborate further: the book covers how to create custom nodes, entities, actors, game rules, a little animation, custom AI, and shaders in C++, C#, and Lua. But when I say cover, I mean the book briefly highlights how the systems work in CryENGINE, how to setup a framework for programming for the systems, but never really how to use them all together. It certainly accomplishes teaching the reader how get started on programming a game and does a pretty good job, you just need to understand it is in no way a design book. Don’t expect to come out of the book with a game prototype like I did with Unity Multiplayer Games.

The book comes with a pre-setup CryENGINE version on Github. Basically, its a version of the engine with CryMono presetup and all the tutorial code in place for you to modify, use, and follow along with the book. It was quite nice to have, although I came across a few errors when using the editor I still can’t get rid of. Note that the book does walk you through setting up CryMono on its own should you opt to use a fresh version of CryENGINE. I believe the version of the engine used by the book is already a few versions behind so its nice to see that the book will help start you in that direction should you choose.

Screenshot 2014-03-15 18.47.06

Flow graphs are a really cool system in CryENGINE, and is one that is gaining a lot of ground in the industry. Essentially it is a visual editor for game logic that is highly customizeable. This allows designers to jump right into creating games without having to constantly harass programmers every time they want something done. Programmers create these “nodes” that take inputs and provide outputs for data, allowing nodes to be linked together in a huge web of logic. For example, a Car node might be programmed to allow a designer to place multiple car entities in the game world, give it the Car node logic, and hook that node up to other nodes and make every car unique. It is similar to Unity’s object/script relationship model, but it doesn’t allow designers to make indepth changes and forge relationships without programming. It is really fascinating, powerful, and still allows for indepth modifications behind the nodes.

The issue for me was actually going into the CryENGINE editor and figuring out how to even access the FlowGraph nodes and even the game entities. Once you create an entity and place it in the game world, I couldn’t find a way to get back to that entity and modify it. As if placing an invisible dot in space, and never being able to find it again. It exists, I just don’t know where. The book initially describes how to access features like the FlowGraph as if you’ve never used the engine before, but then doesn’t describe anything else and jumps into programming. So right now, I have these entity objects for team spawns and I have no idea where they are. I also have an ocean when I start the editor, but the book has a perfectly solid floor. How to create that floor and learn how to put the systems together, I had to find other tutorials and materials outside the book. It just felt a little disjoint.

Capture

The book lightly talks about animations and AI, but again nothing comes out of it. The book just talks briefly about creating the definitions for the AI, registering them with the engine, the signals that the AI would give off. But I still don’t know enough there to apply the AI inside the engine, like attach it to an actor and setup everything up, even if I implemented AI logic in the code.

UI and Networking is also covered, which I found could be followed and implemented much easier based on what the book provides and shows. Physics and rendering, shaders and such, get discussed as well. I found the rendering particularly interesting because rendering is where CryENGINE really shines. Its a visual feast to say the least. It was cool to learn how to make a tree lose its leaves for example using alphas on materials. Sound and effects get discussed as well, learning how to trigger sounds inside the editor or through code as well as particle effects. The last chapter shows how to use the debugging and profiling tools inside CryENGINE, which was interesting due to the relevant work I’m currently doing at Ubisoft regarding profiling, and I managed to get some of the material working in editor from here without needing anything extra.

CryENGINE GameProgramming with C++, C#, and Lua

Pros

  • Touches upon each critical system in CryENGINE
  • Provides a pre-setup version of the engine
  • Demonstrates most of the code in 3 different languages
  • The code that is presented is explained well
  • Screenshots help demonstrate flow graphs or editor settings

Cons

  • Doesn’t actually give a complete game tutorial
  • Some code provides logic, other code is merely framework
  • Doesn’t describe the editor and how to hook up some of the code pieces, such as entity management

Conclusion: Half Recommendation

Who for: If you’re interested in getting you feet wet in CryENGINE, but if you’re looking for an indepth how to – this isn’t it.
Requirements: Appears to expect you to already know how to use the CryENGINE editor

3 thoughts on “Book Review: CryENGINE Game Programming with C++, C#, and Lua

  1. Ryan

    Nice review. I came across this page as I was looking for how to setup CryMono with CryEngine and Visual Studio. Anyway, if you haven’t already, check out the bundle package at Eat3d.com. As of 5/18/2014, this is the link – http://eat3d.com/bundles/cry3_bundle. I have the bundle and highly recommend it.

    Regards,

    -R

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *