CryENGINE 3 Game Development - Beginner's Guide - Sean Tracy - E-Book

CryENGINE 3 Game Development - Beginner's Guide E-Book

Sean Tracy

0,0
39,59 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

CryENGINE is a complete game development environment used by AAA game development studio Crytek to produce blockbuster games such as Crysis 1, 2 and 3. This complete Beginner's Guide takes the would be game developer through the steps required to create a game world complete with event scripting, user interface and 3D environment in the free CryENGINE SDK.
Learn to create game worlds with the CryENGINE 3 Sandbox, the tool used to create AAA games like the soon to be released Crysis 3. Follow straightforward examples to sculpt the terrain, place vegetation, set up lighting, create game sounds, script with Lua and code with C++.
Learn to navigate the interface within the CryENGINE 3 Sandbox, the tool used to create AAA games like Crysis 1 and 2, as well as the soon to be released Crysis 3. Learn to create your own worlds by following straight forward examples to sculpt the terrain, place vegetation, set up lighting, create game sounds, and script with the Lua language. The book covers all beginner aspects of game development including an introduction to C++ for non- coders.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 412

Veröffentlichungsjahr: 2012

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

CryENGINE 3 Game Development Beginner's Guide
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Time for action – heading
What just happened?
Pop quiz – heading
Have a go hero – heading
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Introducing the CryENGINE 3 Free SDK
What is the CryENGINE?
Applying your vision
Far Cry by Crytek – first-person shooter
Aion by NCsoft – massively online role-playing game
Crysis by Crytek – first-person shooter
Crysis Warhead by Crytek – first-person shooter
Crysis 2 by Crytek – first-person shooter
CryENGINE 3 Free SDK
What's in it for me?
Do I need a full team to develop with the CryENGINE?
Learning by example
Time for action – installing the CryENGINE 3 Free SDK
What just happened?
Come in...stay awhile
Time for action – load the sample map in the launcher
What just happened?
Visual Studio Express and C++ game code
Acquiring the sample source assets
Time for action – installation of the 3ds Max exporter Plugin
What just happened?
Time for action – downloading and opening the sample assets
What just happened?
Time for action – installing the Adobe Photoshop plugin-CryTif
What just happened?
CryENGINE 3 Sandbox
Time for action – starting Sandbox and WYSIWYP
What just happened?
Getting around in the Sandbox Editor
Time for action – manipulating the perspective camera
What just happened?
Handling level objects
Time for action – selecting and browsing objects
What just happened?
Time for action – saving our work
What just happened?
Have a go hero – free your mind
Summary
2. Breaking Ground with Sandbox
What makes a game?
Reducing, reusing, recycling
Developing out of the box
Time for action - creating a new level
What just happened?
Using the right Heightmap Resolution
Scaling your level with Meters Per Unit
Calculating the real-world size of the terrain
Using or not using terrain
Time for action - creating your own heightmap
What just happened?
Have a go hero – using additional brush settings
Using alternative ways for creating terrain
Generating procedural terrain
Have a go hero – generating procedural terrain
Importing a pre-made heightmap
Pop quiz – level size and scale
Creating terrain textures
Time for action - creating some basic terrain texture layers
What just happened?
Adding altitude and slope
Adjusting the tile resolution
Pop Quiz – terrain texture layers
Creating vegetation
Time for action - creating some flora for your level
What just happened ?
Time for action - setting up time of day and its basic parameters
What just happened?
Have a go hero – moving the sun
Adding Atmosphere
Summary
3. Playable Levels in No Time
Building levels with entities and objects
Starting a level
Creating a spawn point
Time for action - creating a spawn point
What just happened?
Landmarks to guide the player
Using roads in levels
Time for action - creating a road object
What just happened?
Have a go hero – mastering roads
Utilizing layers to organize level objects
Time for action - creating and managing layers
What just happened?
Have a go hero – utilizing layers for multiple developer collaboration
Adding objects using the asset browser
Time for action - adding brushes to the level
What just happened?
White boxing
White boxing using Constructive Solid Geometry (CSG)
Time for action - creating constructive solid geometry
What just happened?
Have a go hero
Adding characters with Artificial Intelligence (AI)
Time for action - place a basic AI entity
What just happened?
Have a go hero
Create an archetype entity
Time for action - creating your own archetype
What just happened?
Pop quiz – essential game objects
Exporting to engine
Time for action - exporting your level to engine
What just happened?
Have a go hero
Summary
4. I'm a Scripter, Not a Coder
Scripting and the CryENGINE 3
Lua usage in the CryENGINE 3
Visual scripting with Flow Graph
Scripted events
Time for action - making a Flow Graph to spawn the player at a specific location
What just happened?
Component and entity nodes
Composition of flow nodes
Have a go hero - experimenting with different flow nodes
Using trigger entities with Flow Graph
Time for action - adding a trigger to Flow Graph and outputting its status
What just happened?
Pop quiz - scripting
AI scripting with Flow Graph
Time for action - creating a patrolling AI
What just happened?
Debugging Flow Graphs using the visual debugger
Time for action - debugging the patrol Flow Graph
What just happened?
Using breakpoints with the visual debugger
Time for action - adding and removing breakpoints
What just happened?
Summary
5. C++ and Compiling Your Own Game Code
Installing Visual C++ 2010 Express Edition
Time for action - downloading and installing Visual C++ 2010 Express
What just happened?
Starting CryENGINE 3 with Visual Studio
Time for action - starting CryENGINE with the debugger attached
What just happened?
Have a go hero - debugging the launcher
Breakpoints, watches, and code
Time for action - setting up your first breakpoint
What just happened?
Have a go hero - stepping through the code
Create a new Lua entity and call C++ code to interact with it
Time for action - creating a new entity
What just happened?
Time for action - placing your entity into your level
What just happened?
How to interact with entities via Lua script
Time for action - making the teleporter usable
What just happened?
Have a go hero - adding Flownode input/outputs to your Lua entity
Time for some real code
Time for action - writing a new scriptbind function in C++
What just happened?
Call the new C++ function from your Lua script
Time for action - changing the teleporter entity to execute the C++ code
What just happened?
Have a go hero - doing the complete teleporter logic in C++
CryENGINE specific data types
Pop quiz - Lua entities and scriptbind functions
Summary
6. User Interface and HUD Creation with Flash
Adobe Flash as a very powerful UI design tool
Time for action – creating a new Flash asset with Adobe Flash
What just happened?
Have a go hero – adding a crosshair to the HUD
Bringing your Flash asset into CryENGINE 3
Time for action – bringing your Flash asset into CryENGINE 3
What just happened?
Time for action – making functions, variables, and movieclips accessible in CryENGINE 3
What just happened?
Different alignment modes for UI elements
Dynamic alignment
Fixed and fullscreen alignment
Using the UI Emulator to display and test your asset
Time for action – starting Sandbox and testing your UIElement
What just happened?
Have a go Hero – extending the ActionScript function
Creating a new UI Action for the new HUD
Time for action – making the HUD work
What just happened?
Have a go Hero – hiding the crosshair if the weapon is zoomed
Basic event handling from Flash to CryENGINE 3
Time for action – creating a simple interactive menu
What just happened?
UI Emulator, UI Actions, and FreeSDK example menus
UI Actions – Flow Graphs to control the UI
UI Action is a standalone, level-independent Flow Graph
UI Action can have start and end nodes
UI Action can be in a disabled state
UI Actions support multitriggering
UIEventSystems and UI Emulator to test your UI
Time for action – using the UI Emulator to test the FreeSDK demo menus
What just happened?
Have a go Hero – creating a new menu page
Pop quiz – UI Actions
Summary
7. Creating Assets for the CryENGINE 3
What are assets?
Understanding the CryENGINE 3 asset pipeline
Exploring the CryENGINE 3 asset file types
Following a workflow for artists
Working with units and scale in CryENGINE 3
Time for action - setting up 3ds Max units to match CryENGINE scale
What just happened?
Matching grid and snap settings between 3ds Max and Sandbox
Using real-world measurement reference
Creating textures for the CryENGINE
Time for action - creating your own texture
What just happened?
Working with the CryTIF (.TIF) format
Creating and exporting custom assets
Time for action - creating and exporting your first model
What just happened?
Using a physics proxy instead of the render geometry for collision
Adjusting physical dynamics with user-defined properties
Creating destructible objects
Time for action - making your object destructible
What just happened?
Have a go hero - use some of the other breakability types
Specifying physics and render dynamics with user defined properties
Breaking two-dimensional assets
Designing breakables with constraints
Pop quiz - creating assets for your games
Using character assets
Following the character creation pipeline
Creating your own characters
Time for action - creating your own skinned character
What just happened?
Creating a character LOD (Level of Detail)
Bone attachments
Creating animations for your character
Time for action - creating animation for a skinned character
What just happened?
.chrparams wildcard mapping
Have a go hero - using the animobject entity for animation playback
Creating animation for rigid body assets
Time for action - creating animation using rigid body data
What just happened?
Have a go hero - using pre-baked physics with .cga objects
Summary
8. Creating Real-time Cutscenes and Cinematic Events
Discovering the Track View editor
Creating a new Track View sequence
Time for action – creating a new sequence
What just happened?
Have a go hero – using Sequence Properties and director node tracks
Adding tracks to the director node
Adjusting Sequence Properties
Animating a camera in Track View
Time for action – animating a camera
What just happened?
Have a go hero – doing more with the tools available
FOV
Playback speed
Curve Editor
Triggering a sequence using Flow Graph
Time for action – triggering a sequence
What just happened?
Have a go hero – triggering sequences even faster and adjusting the PlaySequence FlowNode
Using the Input:Key node to trigger a sequence
StartTime property
BreakOnStop property
Animating entities in Track View
Time for action – animating an entity in Track View
What just happened?
Have a go hero – using other tracks on entities
Entity Visibility track
Animating scale
Entities and their tracks
Playing animations on entities in Track View
Time for action – playing an animation on an entity in Track View
What just happened?
Have a go hero – using more properties for animations on entities
Using Console Variables in Track View
Time for action – adding a Console Variable to a sequence
What just happened?
Have a go hero – animating CVAR values
The t_scale CVAR in Track View
Using Track Events
Time for action – creating some Track Events for a sequence
What just happened?
Capturing video from CryENGINE 3
Time for action – capturing frames from CryENGINE
What just happened?
Have a go hero – increasing frame size and setting useful CVARs for video recording
Useful CVARs for high resolution capturing
Pop quiz – creating cinematics and cutscenes
Summary
9. Immersion through Audio Design
Introducing sound design
Understanding the CryENGINE sound event system
Setting up a project structure
Event grouping
Using categories
Adding events
Reviewing sound event system file formats
Using wavebanks
Getting your first sound into the CryENGINE
Time for action - creating an ambient sound event
What just happened?
Have a go hero - using more ambient volume properties
Leveraging advanced parameters of ambient sounds
Time for action - nesting ambient sounds and using other parameters for sound events
What just happened?
Have a go hero - sound obstruction using area shapes and boxes
Randomizing sounds
Time for action - creating random sounds
What just happened?
Reverb volumes
Time for action - create your own reverb preset
What just happened?
Have a go hero - setting parameters in the reverb preset editor
Adding sounds to particle effects
Time for action - add a sound to a particle effect
What just happened?
Have a go hero - changing sound over time on particles
Using the three different sound control overtime functions
Sound events and weapons
Time for action - add sound to a weapon
What just happened?
Weapon sound workflow tips
Pop quiz - creating sound for your game
Summary
10. Preparing to Share Your Content
Profiling performance in Sandbox
Profiling with display info
Time for action – enabling and reading display info
What just happened?
Understanding draw calls
Visualizing triangle count
Setting budgets
Saving a level's statistics
Time for action – Save Level Statistics
What just happened?
Have a go hero – view additional statistics in the save level stats file
Viewing textures and render targets in the Textures tab
Viewing physical triangle count and physics memory footprints
Reading the Detailed Dependencies tab
Enabling Debug Draw modes
Time for action – enabling Debug Draw modes
What just happened?
Profiles
Time for action – using profiles to break down frame-time performance
What just happened?
Optimizing levels with VisAreas and Portals
Time for action – set up a VisArea
What just happened?
Ambient color of VisAreas and Portals
Blind spots
Using VisAreas and Portals vertically
Light clipping boxes and areas
Time for action – create a light clipping box
What just happened?
Using a concave light shape
Linking to multiple light shapes
Activating and deactivating layers
Time for action – use layer switching logic
What just happened?
Limitations of layer switching
Cinematics
Pop quiz – performance profiling
Packaging your content to share
CryDev project database
Time for action – create a team, project, and share an upload
What just happened?
Summary
A. Pop Quiz Answers
Chapter 2, Breaking Ground with Sandbox
Pop quiz – level size and scale
Pop quiz – Terrain texture layers
Chapter 3, Playable Levels in No Time
Pop quiz – essential game objects
Chapter 4, I’m a Scripter Not a Coder
Pop quiz – scripting
Chapter 5, C++ and Compiling Your Own Game Code
Pop quiz – lua entities and scriptbind functions
Chapter 6, User Interface and HUD Creation with Flash
Pop quiz – UI Actions
Chapter 7, Creating Assets for the CryENGINE 3
Pop quiz - creating assets for your games
Chapter 8, Creating Real-time Cutscenes and Cinematic Events
Pop quiz – creating cinematics and cutscenes
Chapter 9, Immersion through Audio Design
Pop quiz – creating sound for your game
Chapter 10, Preparing to Share Your Content
Pop quiz – performance profiling
Index

CryENGINE 3 Game Development Beginner's Guide

CryENGINE 3 Game Development Beginner's Guide

Copyright © 2012 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: September 2012

Production Reference: 1140912

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-84969-200-7

www.packtpub.com

Cover Image by Hazel Denise Karunungan (<[email protected]>)

Credits

Authors

Sean Tracy

Paul Reindell

Reviewers

Marcieb Balisacan

Michelle M. Fernandez

Christos Gatzidis

Sascha Hoba

Robertson Holt

Lee Chiu Yi Joanna

Adam Johnson

Morgan Kita

Acquisition Editor

Robin de Jongh

Lead Technical Editor

Dayan Hyames

Technical Editors

Sharvari Baet

Manmeet Singh Vasir

Jalasha D'costa

Copy Editors

Insiya Morbiwala

Laxmi Subramanian

Project Coordinator

Leena Purkait

Proofreader

Clyde Jenkins

Indexer

Monica Ajmera Mehta

Graphics

Valentina D'silva

Aditi Gajjar

Production Coordinators

Nitesh Thakur

Manu Joseph

Cover Work

Nitesh Thakur

About the Authors

Sean Tracy is Crytek's Senior Field Application Engineer for the award-winning CryENGINE. He is responsible for adapting the engine and its features to individual licensees, as well as developing full technical and "vertical slice" demos for prospective and existing clients. Describing himself as a "generalizing specialist", he also gives support directly to CryENGINE licensees while designing and maintaining their workflows, pipelines, and development techniques.

Sean was recruited by Crytek in 2008 after working as an electronics technician for the Canadian military. He was recruited due to his role in founding and leading development on the award-winning total conversion project—MechWarrior: Living Legends. Since then, he has been featured in numerous gaming magazines and has been invited to speak at many game-related trade shows, conferences, and seminars. He is an avid gamer with extensive modding experience on titles, including Never Winter Nights, Battlefield, Doom, and Quake.

This is Sean's second book.

I would first like to thank my beautiful wife, Kristy, for her love and support throughout the process of writing this book and for her ongoing support allowing me to do what I truly enjoy for a living. I also want to thank her for giving us a gorgeous baby girl who is the light of my life. I would also like to thank my colleagues for taking the time to review the book with me, as it's a pleasure to work with people with the same love for real-time technology as I have. Finally, I'd like to thank Crytek and Packt for their support in allowing me to write this book and for making one of the best game engines on the market.

Paul Reindell has been an Engine Programmer in the SDK team since June 2010. He is responsible for UI programming, next-generation features, and the development of new tools for the CryENGINE 3 Sandbox, as well as for forum support for CryENGINE licensees. He has also worked on projects for licensees and evaluators.

During his diploma thesis, Paul started as an Intern at Crytek in March 2010. He finished his diploma theses successfully in June and started directly as a Junior Programmer in the SDK team. During his academic studies, he created a mod prototype with CryENGINE 2 (GarbageWarz); and during his diploma thesis, he was able to connect CryENGINE 3 successfully with a Head tracking API. Before working at Crytek, he worked for three years as a programmer at DENSO Germany besides his studies.

I would like to thank my family, who have been positive and unconditional supporters. I would also like to thank my girlfriend, who always encourages me more than anyone else.

I would also like to thank my colleagues, who have provided invaluable opportunities for me to expand my knowledge and shape my career.

About the Reviewers

Marcieb Balisacan is a game programmer, designer, and producer working in the Philippines. Being from a computer science and multimedia background, he has released several games for mobile devices and social networks on the Web since 2006. His passion for game development is equaled only by his passion for music and storytelling, all of which he uses to share his love for the art of creation.

I would like to acknowledge my newborn daughter, Nikita Lyric, who during the time of this review, kept me awake and inspired me to move ahead.

Michelle M. Fernandez is a mobile game developer for iOS/Android platforms, and co-founder of MobiDojo (http://www.mobidojo.com), which is based out of San Diego, California. MobiDojo has released apps in the marketplace for iOS, Android, Nook, and Kindle. Michelle has had numerous years working in the game industry, in the development and e-commerce environment. She is a mentor for aspiring artists and programmers trying to break into the industry. She also extends her expertise as a panelist at the University of California, San Diego Extension—DAC and The Art Institute of California, San Diego—by participating in sessions relating to game production, design, and marketing.

Michelle is the author of Corona SDK Mobile Game Development: Beginner's Guide, which was published by Packt Publishing. She has also written an article called How to Create a Mini-Game in Corona SDK for Game Coder Magazine. You can also view her personal website at http://www.michellefernandez.com.

Dr Christos Gatzidis is a Senior Lecturer in Creative Technology at Bournemouth University, UK at the School of Design, Engineering, and Computing. He has a PhD from City University London, UK and an MSc in Computer Animation from Teesside University, UK; he has also previously published work in a number of academically edited books, conferences, and journals. He is also the framework leader for the Creative Technology collection of degrees at Bournemouth University (which includes the BSc in Games Technology and the MSc in Computer Games Technology courses). Christos teaches a variety of units on these courses and uses game engines (such as Epic's Unreal Development Kit) across all years of the undergraduate course, to cover topics ranging from basic-level design fundamentals to more advanced scripting.

I would like to thank the authors of this book and also the great people at Packt for producing this excellent guide in one of the most engaging game development tools around today.

Sascha Hoba is an Engine Programmer for Crytek's award-winning CryENGINE. He is responsible for implementing new features, improving existing ones, and keeping the engine up-to-date with improvements made across all Crytek teams to increase the overall quality of the engine. He also gives direct support to CryENGINE licensees around the world, guiding them on how to use CryENGINE from a programmer's perspective and trying to find possible solutions for special requests made by licensees.

Sascha was recruited by Crytek back in 2010 after studying IT—Information Technology—at university. He was recruited due to his experience in working with all the revisions of CryENGINE since CryENGINE 1, back in 2004. He gained his experience as an active member of the FarCry and Crysis modding communities, where he always tried to push the engine to its limits and solve individual problems on how to implement certain features with the available CryENGINE SDK.

I would like to thank Sean Tracy and Paul Reindell for giving me the opportunity to review this book, which has been quite an interesting experience.

Robertson Holt is a polymath autodidact with a formal education. He is the founder of http://www.headshrinkerstudio.com/ and http://www.anatomicrecords.com/. When Robertson is not engaged with these activities, he's goofing off with his two little pugs, living his fun-loving life in downtown Toronto.

I would like to thank Bob Edward Wilson and Yog Sothoth.

Lee Chiu Yi Joanna is an experienced game developer. She started her game development career in game programming. She has programmed for an action game, KengoZero on the Xbox360, and for a Massively Multiplayer Online Game (MMOG), Otherland, on the PC. She is now also a game designer and has a collection of game designs/writings. Her interest in the mobile/web has led her to develop apps and games for these popular platforms as well. Do keep a look out for her apps/games when they are launched! She is also currently translating and reviewing another book about another interesting topic, Unified Communications. Just a note, she is not just a tech mouse; she also loves food, traveling, taking photos, and spending time with family and friends.

I would like to thank my family and friends for letting me take time away from them to review this book.

Morgan Kita is an AI Engineer working at Crytek in Frankfurt, Germany. He has a background in Computer Science and Genetics. He started his career in the biotech industry and later moved over to the games industry. He has experience in various aspects of the software industry, from databases and tools development, to multiple aspects of games development, such as artificial intelligence and multiplayer networking.

I would like to thank my mother and my brother for encouraging me to follow my passion.

www.PacktPub.com

Support files, eBooks, discount offers and more

You might want to visit www.PacktPub.com for support files and downloads related to your book.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

http://PacktLib.PacktPub.com

Do you need instant solutions to your IT questions? PacktLib is Packts online digital book library. Here, you can access, read and search across Packt's entire library of books. 

Why Subscribe?

Fully searchable across every book published by PacktCopy and paste, print and bookmark contentOn demand and accessible via web browser

Free Access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.

Preface

The complexity and difficulty involved in making current generation games is increasing. Even the games industry itself is becoming a more competitive and demanding industry to work, than it has been in the past. Project budgets are smaller, production times are shorter, and milestones seem to come more often, especially when working with a publisher. With the increased time and expertise required to engineer these games, many professional and hobbyist developers alike have turned to middleware game engines, such as the CryENGINE, to save them time, money, and frustration, while manifesting their ideas into releasable games.

The CryENGINE is a comfortable fit for most developers, because it allows users to create their content quickly, iterate on that content, and to finalize it without leaving the comfort of the CryENGINE's Sandbox Editor. I often refer to the CryENGINE as a force multiplier, since its tools make it possible for smaller teams to accomplish what used to take an entire development studio, full of people. This book is an introduction to the CryENGINE technology, and is comprised of achievable, small-scale examples, which can be applied in almost any game genre. This book is not designed to cover exhaustively every feature and function in the CryENGINE, but rather is designed to give you the knowledge and tools needed to get you of to a smooth and painless start when making your own games with the CryENGINE 3.

What this book covers

Chapter 1, Introducing the CryENGINE 3 Free SDK, covers the beginning to developing your own games of any scale by learning to harness the power of the award-winning CryENGINE® 3 game engine. In this chapter, you will learn to navigate and interface within the CryENGINE® 3 Sandbox, the tool used to create AAA games, such as Crysis 1 and 2, as well as the soon to be released Crysis 3.

Chapter 2, Breaking Ground with Sandbox, covers building your game worlds in real time with CryENGINE® 3 Sandbox, as we share insights into some of the tools and features useable right out of the box. In this chapter, you will learn how to create your own worlds by following straightforward examples that use some of the important fundamental features available to developers of the CryENGINE®. This includes tools and techniques related to sculpting, molding the terrain, and placing vegetation.

Chapter 3, Playable Levels in No Time, covers more advanced level design tools, which are discussed in the chapter, as well as simple modeling techniques using the integrated CryENGINE solids system.

Chapter 4, I'm a Scripter, Not a Coder, covers learning the method of visual scripting used to create amazingly complex scripted events.

Chapter 5, C++ and Compiling Your Own Game Code, follows along with in-depth C++ programming examples, designed to expose powerful game customization opportunities available to game programmers.

Chapter 6, User Interface and HUD Creation with Flash, covers how to use Autodesk Scaleform in conjunction with the CryENGINE® 3 to create high fidelity 3D heads up displays and menus for the player.

Chapter 7, Creating Assets for the CryENGINE 3, covers how to create your own custom characters and objects for use within the examples.

Chapter 8, Creating Real-time Cutscenes and Cinematic Events, covers how to create your own cutscenes, animations, and videos using the power of the CryENGINE 3 engine to maximize the output.

Chapter 9, Immersion through Audio Design, covers how to use the FMOD designer along with the CryENGINE 3, to add sound and music to your game.

Chapter 10, Preparing to Share Your Content, helps you explore some of the key performance and optimization strategies for levels, and helps you learn to share your content with others.

What you need for this book

CryENGINE 3 Free SDK v 3.4Autodesk 3D Studio Max 2010Adobe Photoshop CS4Notepad++Visual Studio Express 2010Adobe Flash CS 5.5

Who this book is for

This book has been written with the beginner and casual developer in mind. That being said, however, the professional developer will still find valuable knowledge related to other specialties within the examples of this book. For some of the examples in this book, the reader should have some fundamental knowledge of some Digital Content Creation tools, which include Photoshop and 3D Studio Max. Though not a fundamental requirement, having some basic knowledge of real-time graphics software and, consequently, the terminology used, will make the goal of these tutorials more clear. The freely available version of the CryENGINE® 3 has been used for all the examples in this book, and Chapter 1, Introducing the CryENGINE 3 Free SDK will guide the reader to download and install the CryENGINE® 3 Free SDK.

Conventions

In this book, you will find several headings appearing frequently.

To give clear instructions of how to complete a procedure or task, we use:

Time for action – heading

Action 1Action 2Action 3

Instructions often need some extra explanation so that they make sense, so they are followed with:

What just happened?

This heading explains the working of tasks or instructions that you have just completed.

You will also find some other learning aids in the book, including:

Pop quiz – heading

These are short multiple choice questions intended to help you test your own understanding

Have a go hero – heading

These set practical challenges and give you ideas for experimenting with what you have learned.

You will also 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 are shown as follows: " If you now navigate to the level directory using Windows Explorer, you will notice a new folder called Layers. Inside that folder, you will see a file named SpawnPoints.lyr."

A block of code is set as follows:

<Constraints> <Align mode="fixed" /> <Position top="100" left="100" width="800" height="600" /> </Constraints>

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: "Look in the UI:Functons:MainMenu:AddButton node of the mm_main UI Action that creates the button with the @ui_SoundSettings caption".

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 <[email protected]>, and mention the book title through 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.

Downloading the color images of this book

We also provide you a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output.

You can download this file from http://www.packtpub.com/sites/default/files/downloads/2007_graphics.pdf.

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/support, 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 to our website, or added to any list of existing errata, under the Errata section of that title.

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 <[email protected]> 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 <[email protected]> if you are having a problem with any aspect of the book, and we will do our best to address it.

Chapter 1. Introducing the CryENGINE 3 Free SDK

The CryENGINE 3 Software Development Kit (SDK) comes from a pedigree of high fidelity, real-time game engines. It is now freely available for non-commercial use, which allows anyone to leverage the power of the CryENGINE 3 to make their own games and simulations.

In this chapter we will be:

Joining the development community on http://www.crydev.netDownloading and installing the CryENGINE 3 SDKReviewing past and present games created using past and present iterations of the CryENGINEExploring some of the latest features available in CryENGINE 3 SDKRunning the sample content in the launcher.exe applicationAnalyzing the typical roles that developers undertake to create a game on the CryENGINE, and establishing where we fit inInstalling the 3D Studio Max exporter tools and acquiring the sample source asset packageInstalling the Adobe Photoshop CryTif pluginOpening the Forest map in the CryENGINE 3 Sandbox applicationInteracting with objects and entities in the CryENGINE 3 Sandbox application

What is the CryENGINE?

Not every new computer game needs to start from scratch. A technique that's becoming increasingly common for most developers is to reuse existing game engines. This is where the CryENGINE 3 SDK comes in. The CryENGINE 3 SDK is a game engine which drives the visual actions taking place on the screen. Within this engine are the rules that dictate the way the game world works, and how objects and characters should behave within it. Due to the fact that creating the underlying code for the variety of systems within a game engine is usually very expensive and time consuming, the starting point of working with a game engine thus makes excellent financial sense for most developers. Throughout this book, and for all intents and purposes, we will be referring to the CryENGINE 3 SDK as the engine.

The CryENGINE has been developed over the past 10 years by the award winning independent developer, Crytek. Crytek has made major iterations to the original CryENGINE over a number of years and is currently on the third iteration, which is why we refer to this version of CryENGINE as the CryENGINE 3.

Arguably, the most prominent tool provided by a game engine is the level, or World Editor. The editor used with CryENGINE is known as the CryENGINE Sandbox, and it contains a whole suite of tools and sub-editors for developing games.

You can think of the CryENGINE Sandbox as a game compositing tool that acts similarly to any digital video compositing software such as Sony Vegas, Adobe Premiere, and even Windows Movie Maker. However, as opposed to inserting video and audio clips, the developer inserts art, design, and code that will all eventually come together to create a game.

Applying your vision

Many people will have their own ideas for games. The first step on the path to manifesting that idea into reality is to undertake some basic research in order to expand the idea into a robust proposal, or "pitch" as it's in the game industry. There are simple considerations that a game designer can make in order to take their loosely defined idea into a solid concept. It might be tempting for some of us to jump straight into designing levels, characters, icons, and other fine details but as the saying goes, "the devil is in the details". It is best to avoid getting caught by this. If the basic premise of the game changes in the early development stages, much of the work on these small details will be wasted. A good practice is to spend a relatively short but valuable amount of time at the outset making sure the idea has the potential for development.

There are some genres that are inherently easier to achieve in CryENGINE simply due to the nature of its underlying design. Developers should consider that the CryENGINE has historically been used to create realistic and highly interactive experiences.

Creating a game that uses the first-person or third-person perspectives is relatively easy compared to creating something as a full scale real-time strategy game. To get some inspiration, let's explore the pedigree of the CryENGINE and what other visions have been achieved using it. As you browse through these games, remember that none of these were created in a day! These games were built with large teams over a number of years and thus, we should be realistic with ourselves about what we can achieve and how long it will take.

Far Cry by Crytek – first-person shooter

Far Cry, launched in 2004, sporting the first version of the CryENGINE used the technology that changed the face of gaming.

Tip

Downloading the color images of this book

We also provide you a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from http://www.packtpub.com/sites/default/files/downloads/2007_graphics.pdf.

Far Cry was the first full game developed on CryENGINE. It can be argued which came first, the engine or the game; but so as to not commit to either side, I would like to say the vision and requirements that were put forth for the game drove the technology, or the engine, into what would finally be known as CryENGINE 1.

This critically acclaimed game put to use the technology that allowed for a level of graphical fidelity, never seen before in games, such as huge view distances, high precision HDR lighting, and even more importantly, the game introduced a toolset for development that expressed the what you see is what you play (WYSIWYP) philosophy. This philosophy describes how Far Cry was created as the designers were able to enter in and out of game mode instantly using a shortcut key without having to wait for any saving, compiling, or baking. Designers were thus able to try as many iterations as it would take to create a particular aspect of gameplay in far less time than it would take in other game engines.

The game was truly a Sandbox first-person shooter. To be more precise, it was designed so that the player is directed to achieve certain goals, but the way in which they can accomplish these goal is completely up to him or her. The developer decides to give the player certain tools, which they can use or combine for a unique experience while accomplishing these goals. To be able to do this requires technology to be able to support huge maps and thousands of game entities.

Aion by NCsoft – massively online role-playing game

First released in Korea in 2008, Aion redefined the standard for the quality of art and rendering achievable in such a massive world, populated by thousands of players at once.

Aion was developed by NCsoft on the CryENGINE 1, with a significant amount of customization done to the engine to support the complex database and server requirements of a massively multiplayer online role-player game. It also demonstrated some unique gameplay features never before seen in an MMO. For example, the ability to fly and glide with your character's wings to travel in the world.

Expecting to create Aion in our spare time is largely beyond the scope of this book and likely also beyond the scope of any small development team. Aion was created by a large team and required developers who were experienced in creating MMO games.

This is a good example demonstrating how the engine is easier to adapt to certain genres than others. Of course, Sandbox and the CryENGINE can be used to achieve this; but it requires significantly more customization and innovation than a first-person shooter would.

Crysis by Crytek – first-person shooter

Crysis truly drove the next generational leap for the CryENGINE. Crysis, upon its launch in 2007, exceeded all expectations and set the new standard for real-time PC gaming.

CryENGINE 2 was made available for licensing shortly after the release of Crysis,due to popular demand of many developers in the industry.

The big technological jump for CryENGINE 2 was in sheer rendering fidelity and hyper-interactivity of its physical worlds.

This leap made it even more ideal for developing open-world Sandbox games. Though Crysis was a first-person shooter, the engine lent itself well to third-person adventure games and even vehicle simulations. In addition, visualization with CryENGINE 2 expanded as artists discovered the ability to create photorealistic scenes in comparatively less time than was considered possible at that point in time.

Crysis Warhead by Crytek – first-person shooter

CryENGINE 2 was further updated, in tandem, with the release of Crysis Warhead in 2008. This expansion took the player back to experience the same timeline of events from the original Crysis, but from a different protagonist's perspective.

In terms of technology, the engine's performance was further optimized to allow for a truly cinematic experience. It was designed to be a faster, more intense an experience than the original and it achieved its goal.

At this time, it was recognized by Crytek that to remain competitive, games must be able to run on the Xbox 360 and PS3, as such, development began in earnest of the console-friendly future generation CryENGINE 3.

Crysis 2 by Crytek – first-person shooter

Finally, we end our nostalgic journey at the current generation of CryENGINE 3.

Crysis 2 was released in March 2011 on Xbox 360, PS3, and PC. This was a huge milestone for CryENGINE, as it demonstrated that CryENGINE could achieve its historic rendering quality on this generation of gaming consoles, namely, Xbox 360 and PS3. Finally, the console users were able to experience the level of fidelity demanded by Crytek games, and other developers began actively pursuing their own AAA games using CryENGINE 3.

CryENGINE 3 Free SDK

This brings us to the present as the package that you will be soon downloading and running, is the freely available CryENGINE 3 SDK, initially released in August 2011. It gives anyone with an Internet connection access to the CryENGINE 3 game engine. It continues to be updated to keep it in line with the same features and tools Crytek uses internally, bringing a huge advantage to anyone wanting to make high quality games and simulations.

The following screenshot is a depiction of a CryENGINE 3 creation:

What's in it for me?

Having seen some of the games that have been released on CryENGINE, you may have dreams and visions of creating huge open world online role-playing games, or AAA first-person shooters. This is quite normal, as the most aspiring and even veteran game developer's bite off more than they can chew in their initial designs. Creative and passionate people typically have big ideas, and this is great! I say that, with my fingers crossed behind my back, as there is one caveat to this, that it's ok as long as you practice a very important skill, which is, to be able to temper those huge ideas and split them up into smaller, more achievable goals. Achieving smaller victories while approaching such a vast and complex piece of technology will keep you far more motivated and will build confidence so that eventually you will be able to solve creatively just about any problem that you are faced with while creating your game.

Do I need a full team to develop with the CryENGINE?

As we mentioned before, the previous games we explored were created by huge teams, and you might think it's impossible then to create a game by yourself or even with a small group. I have some good news though! In the examples to come, you will not require an entire team. We will create some customizable elements, which are useable in games through a set of understandable examples. Working as a team, however, is becoming increasingly common even among hobbyist game developers. When working in a team you should recognize that there can be generalists and specialists in every field. Typical teams break down to the following groups. It should be noted that there are a variety of subcategories within each group, and the following breakdown doesn't claim to describe them all:

Programming: The entire gaming industry was created by programmers. Without programmers this industry simply wouldn't exist! They are the specialists who take the expectations and designs of everybody else and are tasked with finding a way to make them a reality. They are tasked with everything from creating and modifying the game engine to developing tools, and implementing game mechanics. If there are bugs or important changes to be made usually it's the programmer who must work late to fix or implement changes. There are a variety of subcategories of programming, which include physics, rendering, shaders, animation, sound, tools, and so on.Art: Artists have become increasingly important in the production of high-quality games. Having truly talented artists can take a bland game created using teasingly named, programmer art to an AAA photorealistic experience. There are many subdisciplines within art as there are in programming, some of which include concept, environment, character, technical, lighting, and visual effects.Animation: Animators are the ones that perform the role of providing life to otherwise static games. This is just as essential to a game's immersion as the texture or geometry of any model. There are a few subcategories to animation which include riggers, facial animators, technical animators, cinematic animators, and others.Design: I really think designers can come from anywhere within all the disciplines and roles! They are typically people who excel at combining mechanics to make fun! Creating fun, as strange as that may sound, is the main goal of the designer within any game production. During my career, I have personally seen a trend in the industry where designers are often undertaking the role of what I would term game compositors. Game compositors take all the different aspects of a game's production, including art, animation, code, cinematics, and so on, and combine them all together in creative ways that challenge and reward the player. For this reason, being a designer can be a demanding, yet rewarding role, as it allows you to generalize in many areas. One thing I have personally found as a designer is that the more you know about each area of the technology with which you are working, the more tools you will have at your disposal while creating interesting puzzles, challenges, and adventures for your players.Sound: