O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Mastering CryENGINE

Book Description

Raise your CryENGINE capabilities even higher with this superb guide. It will take you into a world of advanced features and amazing possibilities, teaching best practices and Lua scripting for sophisticated gameplay along the way.

In Detail

CryENGINE is one of the most powerful real-time 3D engines available today; its rendering and real-time capabilities are unmatched. Mastering CryENGINE will take your CryENGINE skills to the next level, allowing you to unleash the full power of the engine. Whether you are working on a small mod or a large-scale production, the user-friendly steps and illustrations in this book will help you master the wide range of features of the CryENGINE toolkit.

The book begins with the setting up of a CryENGINE-ready production pipeline, further introducing you to the advanced features of CryENGINE. You will learn advanced techniques, best practices, and various methods utilized in production by CryENGINE veterans. You will also explore how to use the Lua scripting language to build more sophisticated gameplay elements.

What You Will Learn

  • Build a solid and flexible CryENGINE production pipeline
  • Use the CryENGINE input system to react to mouse, keyboard, and game controllers and to filter the input when needed
  • Create a facial setup for your characters and lip synch to audio
  • Use Lua script to create new, powerful entities for your game
  • Use CryMannequin to set up and trigger animations
  • Add some eye candy to your game using the particle system, the lens flare editor, and CryENGINE's real-time post processing effects
  • Get your game ready to ship and make sure your build is ready to go out to the public

Downloading the example code for this book. 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.

Table of Contents

  1. Mastering CryENGINE
    1. Table of Contents
    2. Mastering CryENGINE
    3. Credits
    4. About the Authors
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
        1. The jump to CryENGINE 3.5
        2. Other required software
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Setting Up the Perfect Pipeline
      1. What is a production pipeline?
      2. Importance of a strong pipeline
      3. Version control for CryENGINE projects
        1. What version control does for you
        2. Production without version control
          1. Working from a shared folder
        3. Selecting a VCS for CryENGINE projects
        4. Setting up version control for CryENGINE
          1. Sandbox
            1. Perforce setup
            2. Exploring digital content creation tools such as Photoshop and 3ds Max
            3. Visual Studio
            4. Notepad
        5. Identifying CryENGINE project files to be excluded from version control
      4. Automated builds and build scripts
        1. Creating nightly builds
        2. Setting up a build server
          1. Operating systems
        3. What build scripts should do
        4. Creating your custom build script
          1. Writing your own script
            1. Getting the latest files from your version control
            2. Compiling the code
            3. Compiling the assets
          2. Wrapping it up
        5. Scheduling automated builds
      5. Automated performance tests
        1. Using level statistics to profile the performance of a level
      6. Build integration
        1. Integrating a new version of CryENGINE
          1. The engine depot
          2. Project branch
          3. Integration
      7. Quality assurance processes
        1. QA pipeline in larger scale teams
        2. QA pipeline in smaller teams
        3. Working without a QA pipeline
      8. Understanding issue tracking in CryENGINE
      9. Summary
    9. 2. Using the CryENGINE Input System – Keyboard, Mouse, and Game Controller
      1. The CryENGINE input system
        1. A layer of abstraction
        2. The input event system
      2. Game actions
        1. Action Maps
          1. Multiple Action Maps
        2. Creating a new Action
          1. Setting up an Action event
          2. Adding an Action mapping
            1. Optional parameters
              1. Trigger options
                1. OnPress parameters
                2. OnHold parameters
                3. OnRelease parameters
              2. Analog input
              3. Modifiers

            2. Triggering console commands
        3. Reacting to Action events
          1. Action events in code
            1. Setting up a new Action listener
            2. Extending PlayerInput
              1. Creating a new handler function
              2. Registering your handler function
            3. Custom Action Maps
          2. Action events in FlowGraph
        4. Filtering Actions
          1. Creating Action Filters
          2. Using Action Filters
        5. Reacting to Input events
          1. Code
          2. FlowGraph
      3. User profiles
        1. Modifying user profiles
          1. DLCs and patches
      4. The input event names reference
        1. Keyboard
        2. Mouse
        3. Xbox 360 controller
        4. PS3 controller
      5. Summary
    10. 3. Building Complex Flow Graph Logic
      1. Who uses the flow graph system?
      2. A more complex application of the flow graph
      3. Revisiting the basics of flow graphs
        1. Types of nodes
        2. Entity nodes
        3. Component nodes
      4. Flow graph data format and storage
      5. The entity nodes with dynamic targets
        1. What happens if we input the wrong EntityId?
        2. A more complex application of dynamic EntityIds
      6. Let's take a shortcut
        1. Q – node quick search
        2. F/G – link highlighting
        3. Ctrl + Shift + V – paste nodes with links
      7. Embedding the flow graphs
      8. GameTokens
        1. The GameToken libraries
        2. Reaction to a game token changing its state
        3. The GraphTokens variable
        4. Accessing the Lua functionality
      9. Creating nodes in C++ and Lua
        1. Adding ports to an entity flow graph node
        2. Creating flow graph nodes using the Lua script
        3. Creating flow graph nodes using C++
      10. Summary
    11. 4. Morphs and Bones – Creating a Facial Setup for Your Character
      1. Creating a facial setup for a character
        1. Exporting the character's head
        2. Using facial expression libraries
          1. Creating a new facial expression library
            1. Manually creating a library
            2. Automatic creation
              1. Bone rig requirements
              2. Creating expressions in 3ds Max
              3. Creating a Facial Library with Morphs
          2. Mapping the library
          3. Creating expressions
      2. Facial animation
        1. Creating facial sequences
        2. Using facial sequences in the engine
          1. Inside the TrackView editor
          2. Inside the FlowGraph node
        3. Using expressions
      3. The Lip Sync feature
        1. Manual lip synching
        2. Automatic phoneme extraction
        3. Lip sync playback
        4. Quality
          1. Quality – phoneme extraction
          2. Quality – visimes and phonemes
          3. Quality – adding emotions
      4. Summary
    12. 5. Mastering Sandbox
      1. Don't stop getting better
      2. Getting faster with keyboard shortcuts
        1. Thinking about hand placement
        2. Object editing modes
          1. Test it!
        3. Aligning objects
        4. Using the deep selection feature
        5. Using the Goto Selection feature
        6. Using camera tag-points
        7. Top five shortcuts
      3. Customizing Sandbox
        1. Customizing the Sandbox window layout
        2. Saving and loading layouts
      4. Working with cameras
        1. Camera targets
        2. Switching cameras
      5. Exploring Sandbox custom commands and macros
        1. Sandbox custom commands and macros
      6. Looking at some lesser-known features
        1. Video recording
        2. Mesh editing
        3. Managing PAK files
        4. Renaming multiple objects
      7. Summary
    13. 6. Utilizing Lua Script in CryENGINE
      1. Understanding the relevance of the Lua script in CryENGINE
      2. Lua-based entities
        1. Creating a new Lua-based entity
        2. Assigning a 3D object to an entity
          1. Using entity slots
          2. Setting up physics
      3. Making an entity multiplayer-ready
        1. Understanding the dataflow of Lua entities in a multiplayer environment
          1. The Client/Server functions
          2. The Remote Method Invocation definitions
      4. Using the state machine
      5. Using script binds
        1. Calling script binds
        2. Creating new script binds
      6. Using engine callbacks
      7. Using the Lua debugger
      8. Summary
    14. 7. Animating Characters
      1. The CryENGINE animation system
      2. Introducing CryMannequin
        1. Splitting up the game and animation logic
        2. Understanding CryMannequin's purpose
          1. Selecting animations
          2. Starting animations
        3. Fragments, Fragment IDs, and Tags
      3. Extending the state machine
        1. Understanding the state machine hierarchy
        2. Creating a new state
        3. Triggering the new state
      4. Playing animations without CryMannequin
        1. TrackView
          1. Multiple animation layers
          2. CryMannequin tracks
        2. Triggering animation from FlowGraph
          1. The PlayAnimation node
          2. Other animation nodes
        3. The code
      5. Summary
    15. 8. Mastering the Smart Objects System
      1. What are SmartObjects?
      2. Where the Smart Objects system is used
      3. Smart Objects categories
        1. Environmental SmartObject
        2. A time-based SmartObject
        3. Navigational SmartObject
      4. The concept of the SmartObject system
      5. The SmartObjects editor
        1. The Window layout of the SmartObject editor
          1. The Rules and Tasks windows
          2. The Rules List window
          3. The Rule Properties window
        2. The SmartObject library
      6. Creating a new SmartObject rule
        1. Preparing the level
        2. Creating the SmartObject rule
        3. Creating the SmartObject classes
        4. Creating the SmartObject states
        5. Creating a SmartObject state pattern
          1. User and Object
            1. Setting up the User and Object class
          2. The state pattern
        6. Creating an AIAction
          1. Selecting actions
          2. Creating the action
          3. Setting up the action and state changes
        7. Getting the level ready
      7. Testing the SmartObject rule
        1. Troubleshooting
        2. Debugging SmartObjects
          1. Debugging AIActions
        3. Changing states from Lua
      8. Summary
    16. 9. Eye Candy – Particles, Lens Flares, and More
      1. Types of eye candy
      2. Particle effects
        1. Working with particle effects in CryENGINE
        2. The particle editor
        3. Creating a new particle effect
          1. Customizing the particle parameters
          2. Tweaking the effect
        4. Particle effects at runtime
      3. Lens flares
        1. The lens flare editor
          1. Creating a new lens flare effect
          2. Assigning a lens flare effect to a light
          3. Lens flare effects caused by the sun
      4. Postprocessing effects and the flow graph
        1. Using material FX graphs
          1. Creating a custom material FX graph
          2. Testing the new material effect
          3. Debugging material effects
      5. Postprocessing in TrackView
        1. Using effect tracks in a TrackView sequence
        2. Using track events
      6. Performance considerations
        1. Overdraw
        2. Draw calls
      7. Summary
    17. 10. Shipping the Build
      1. Getting your game ready to ship
        1. Optimizing performance
          1. Optimizing levels
            1. Level configuration files
          2. Optimizing shadows
          3. Vegetation
          4. Layers
        2. Testing and QA
        3. Errors and warnings
          1. Log verbosity
      2. Tackling legal issues
        1. Copyright
        2. Credits
        3. CryENGINE license
        4. Things to consider for indies
          1. MobyGames
      3. Preparing your build
        1. Building a release candidate
          1. Auto-loading the first level
          2. PAK files
            1. Fast-loading PAK files
          3. Removing all debug features
        2. Reducing your build size
        3. Shaders
      4. Creating an installer
        1. A ZIP file
        2. Selecting an installer
        3. Dependencies
        4. An icon for your executable
      5. Summary
    18. Index