Book Image

CryENGINE 3 Cookbook

By : Dan Tracy, Sean P Tracy (USD)
Book Image

CryENGINE 3 Cookbook

By: Dan Tracy, Sean P Tracy (USD)

Overview of this book

With every successive console generation, the cost, time, and complexity of developing games has grown. Meet CryENGINE3, a middleware engine that is the perfect fit for most developers allowing users to exceed current generation quality standards while using less people and time than ever thought possible.The CryENGINE3 CookBook is packed full of recipes for junior and senior developers alike. It covers everything from creating photo realistic architectural visualizations to implementing advanced physics such as ragdoll and tornado effects. Topics covered include the sandbox, level layout, environment creation, AI, character creation, creating vehicles, and game logic. Every recipe is designed to add AAA quality to your games. The CryENGINE3 SDK has many tools immediately available to developers of all disciplines. For designers the book has recipes for building up your own levels and populating your levels with intelligent AI and photo realistic assets. For artists we have recipes for practical workflow tools and techniques used when working with the advanced CryENGINE shaders and materials. For animators we have recipes that will bring your creations to life using skinned characters and advanced animation systems like locomotion groups. Finally for programmers we have recipes that show how to employ the core mechanics behind entities such as vehicles and weapons while also utilizing the strengths of the physics engine to create a unique and exciting game.
Table of Contents (18 chapters)
CryENGINE 3 Cookbook
Credits
About the Authors
www.PacktPub.com
Preface
Index

Narrowing the AI's FOV to allow attacks from behind


In this recipe, we will be showing you how you may be able to manipulate the AI's primary and secondary FOVs to allow the player to have an easier time to sneak up on the AI from behind.

Getting ready

  • Before we begin, you must have Sandbox 3 open

  • Then open My_Level.cry

  • Complete the Placing the Enemy AI recipe

How to do it...

  1. Change the following entity parameters on the AI Grunt that is placed:

    • awarenessOfPlayer = 0

  2. Perception sub rollout

    • FOVPrimary = 40

    • FOVSecondary = 80

How it works...

  • awarenessOfPlayer handles if the AI knows where the player is at all times. Making sure this value is false makes the AI do perception checks to see if it can find the player.

  • FOVPrimary handles the main FOV of the AI and uses a quick reaction system if the player is caught within this FOV.

  • FOVSecondary handles the peripheral vision, which uses a slower reaction system to investigate the location of where the AI spotted suspicious activity within that area...