Book Image

Mastering CryENGINE

By : Michelle Martin
Book Image

Mastering CryENGINE

By: Michelle Martin

Overview of this book

Table of Contents (17 chapters)
Mastering CryENGINE
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Today, making games is easier than ever before. There are a plethora of game engines available for developers, and most of them can even be tried out free of charge or used to release games noncommercially. So, irrespective of whether you are modifying an already released game, building your own indie game, or maybe working on a big AAA production, the chances that you will be using a licensed 3D engine such as the popular CryENGINE are pretty big.

The times where development teams would write their custom game engine to produce a game are mostly over. The use of licensed 3D engines is very common and saves developers and publishers a lot of money. Using a licensed 3D engine instead of building a custom solution allows developers to focus on making a great game instead of developing and maintaining their own technology.

A result of this continually advancing technology development, however, is that it has become very difficult for developers to really master all aspects of a 3D engine. Engines such as CryENGINE are not simply rendering programs that are capable of drawing beautiful content on the screen in real time. Animation systems, physics simulation, AI behaviors, or particle systems are just a few parts of what makes up the CryENGINE. However, with the increasing complexity of game engines, it has become more difficult for today's game developers to stay on top of the technology.

This is where Mastering CryENGINE comes in. This book focuses on the professional CryENGINE developer and tries to provide an inside scoop on how to produce games at an AAA production level. Getting the most out of the engine and becoming a highly productive CryENGINE developer requires knowledge of the multitude of subsystems that CryENGINE offers.

The goal of this book is to provide you with valuable information about the most important aspects of CryENGINE production as well as guide you through the most common technical problems encountered when developing game content with the engine.

What this book covers

This book covers a wide range of topics that are closely related to making games with CryENGINE at a professional level. Basic elements such as setting up the engine, building simple environments, or other topics that might be of interest for beginners might be touched upon, but they will not be covered in too much depth. Instead, this book focuses on arming you with in-depth knowledge of the core systems of CryENGINE that are necessary to build high-quality content.

Chapter 1, Setting Up the Perfect Pipeline, focuses on one of the most important aspects of game production: a stable and flexible pipeline. This chapter covers the tailoring of the perfect pipeline for your project as well as the important aspects of setting up a new pipeline.

Chapter 2, Using the CryENGINE Input System – Keyboard, Mouse, and Game Controller, provides an overview of the CryENGINE input systems. You will learn how to create new action maps and handle user profiles as well as how to react to input events in code and flow graphs.

Chapter 3, Building Complex Flow Graph Logic, focuses on the more advanced features of the flow graph system. Nested flow graphs as well as graph tokens will be explained in detail and will be used to build a practical game example.

Chapter 4, Morphs and Bones – Creating a Facial Setup for Your Character, covers all the steps necessary to create a complete facial setup for a character. You will learn about facial libraries as well as how to get a character ready for lip syncing and procedural blinking.

Chapter 5, Mastering Sandbox, focuses on increasing your production speed, efficiency, and productivity when working with CryENGINE. Hidden features, important shortcuts, and relevant engine settings will be discussed in this chapter.

Chapter 6, Utilizing Lua Script in CryENGINE, teaches you how to use the Lua scripting language to build more sophisticated gameplay elements. The creation of new script binds and modification of the existing entities will be covered here.

Chapter 7, Animating Characters, will explain the principles of CryMannequin, the high-level animation system of CryENGINE. You will also learn how to extend the state machine to trigger your own mannequin animation sequences. The chapter will also cover other methods of triggering animations.

Chapter 8, Mastering the Smart Objects System, will provide an insight on how to use the SmartObject system. This system will be used to build a gameplay example of a security guard AI behavior. Furthermore, navigational SmartObject systems will be used to set up AI characters that can climb over walls.

Chapter 9, Eye Candy – Particles, Lens Flares, and More, focuses on adding some eye candy to your game. The setup and usage of particle effects as well as the brand new Lens Flare editor will be covered.

Chapter 10, Shipping the Build, focuses on getting your game ready to ship. It will cover how to prepare the build for release, remove unwanted source files, and reduce the overall build size.

What you need for this book

In order to make best use of the examples in this book, you should use the latest version of CryENGINE. Although much of the knowledge provided in this book can still be applied to older versions of the engine, it is recommended that you use this book with CryENGINE 3.5.2 or above.

The jump to CryENGINE 3.5

The CryENGINE technology has been around for over 10 years and the engine has undergone a lot of changes and improvements over those years.

Crytek released the latest version of the engine, CryENGINE 3, in 2009, which introduced a lot of improvements (for example, a deferred rendering pipeline) and brought the engine to XBOX 360 and PlayStation 3. Along with the addition of countless new rendering features, the Sandbox editor also underwent a big facelift.

Within the lifespan of CryENGINE 3, there has been one big transition: the jump from Version 3.4.5 to Version 3.5.

With the upgrade to Version 3.5, all the changes and improvements made during the development of the critically acclaimed games, Crysis 3 and Ryse, found their way into the CryENGINE 3 SDK.

All the new features that made Crysis 3 and Ryse look so stunning became available to developers with this upgrade. An improved rendering pipeline and the new animation system CryMannequin, which replaced AnimationGraph, are two of the biggest changes done to the engine in Version 3.5.

Most of the topics covered in this book will still be valuable for you if you are working with an older version of the engine. However, some of the newer features discussed in this book, for example the LensFlare editor, might not be available for you if you are working with an older version of the engine.

Other required software

In order to follow the examples in this book, we recommend that you obtain the following software:

  • CryENGINE SDK 3.5.2 or above

  • Photoshop Version 4 or above

  • Notepad++

  • Visual Studio 2010

  • 3D Studio Max 2010

Who this book is for

This book is aimed at an experienced CryENGINE developer. Although it is certainly possible to use this book as a beginner who is unfamiliar with the CryENGINE technology, it will be much more efficient when a certain level of experience with the engine is there.

Whether you are a CryENGINE enthusiast looking to turn your hobby into a full-time profession or you've just started working with CryENGINE on a professional project, this book will provide you with valuable information and deep insights into the engine. This is invaluable to produce content at a professional level.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The OnReset() function will be called every time the entity script is reloaded."

A block of code is set as follows:

  if (slot == 0) then
    self:DrawSlot(0, 1);
    self:DrawSlot(1, 0);
  else
    self:DrawSlot(0, 0);
    self:DrawSlot(1, 1);
end

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

  if (slot == 0) then
    self:DrawSlot(0, 1);
    self:DrawSlot(1, 0);
  else
    self:DrawSlot(0, 0);
    self:DrawSlot(1, 1);
end

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Clicking on Show Log File will open the respective logfile for you automatically."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.