Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
CryEngine Game Development Blueprints
CryEngine Game Development Blueprints

CryEngine Game Development Blueprints: Perfect the art of creating CRYENGINE games through exciting, hands-on game development projects

€28.99 €19.99
Book Aug 2015 322 pages 1st Edition
eBook
€28.99 €19.99
Print
€37.99
Subscription
€14.99 Monthly
eBook
€28.99 €19.99
Print
€37.99
Subscription
€14.99 Monthly

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Aug 28, 2015
Length 322 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781784399870
Vendor :
Crytek
Category :
Table of content icon View table of contents Preview book icon Preview Book

CryEngine Game Development Blueprints

Chapter 1. Getting Started

In this chapter, we will discuss the following topics:

  • How to download the CRYENGINE "Blank" Game Starter-Kit

  • How to install the starter-kit

  • Important classes of the starter-kit and the roles they play

  • How to compile a game project

Downloading the starter-kit


In order to create any CRYENGINE game, there is a need to have a clear place to start. For us, this comes as a blank slate using my very own starter-kit. By using it, we rid ourselves of overcomplications and gain several advantages:

  • All code written is ours, so we have a clear and precise understanding of what the code does.

  • All code written is specifically for our game, so we don't have unnecessary code bloat.

  • Since all of our code is exactly and only what we need, our code will run faster.

  • All starter-kit code is written cleanly and is heavily documented. This allows us to have a better understanding of how to use CRYENGINE's interfaces.

Now that we know why we will be using my starter-kit, let's see how to download it:

  1. Navigate to the download page at http://www.cryengine.com/community/viewtopic.php?f=355&t=124265. It should look like this:

  2. Scroll down the page to the Download section and download Version 2.1.0 by clicking on its link.

    Note

    For the sake of clarity and consistency, even if there is a newer version of the starter-kit available, it is strongly recommended that you stick with Version 2.1.0. Version 2.1.0 of the starter-kit is fully compatible with CRYENGINE Version 3.8.1 and, as such, it is strongly recommended that you use that version for the remainder of this book.

Installing the starter-kit


Before the starter-kit can be used, it must be installed. Installing the starter-kit is very easy and it is responsible for adding a project wizard to Visual Studio and setting up the needed CRYENGINE environment variables. So let’s get started.

Part 1

Now that we have downloaded the starter-kit, it's time to install it:

  1. Unzip the downloaded archive using 7-Zip (http://www.7-zip.org/) or any other file archiver that supports the 7z file format with LZMA2 compression.

  2. You should now see an application (.exe) called CRYENGINE Game Starter-Kit - Blank Installer V2.0.8.exe; launch it. It should look like this:

  3. Click on the Browse button to search for the path to CRYENGINE's Code folder. It should look like this:

    Note

    It is important to note that CRYENGINE's Code folder is the one that contains all of CRYENGINE's code. It contains the CryENGINE, GameSDK, and SDKs subfolders. In the event that you do not have a Code folder at all, you will need to extract CRYENGINE_GameCode_xxxxx or a similar zip archive located in CRYENGINE's root folder. It is very important that the Code folder is in the right location. There should be exactly 2 subdirectories in CRYENGINE’s root folder, like this: CRYENGINE_ROOT/CRYENGINE_pc_eaascode/Code.

  4. Check all of the Visual Studio versions you want to install the starter-kit to, shown here:

  5. Lastly, click on the Install button to actually install the starter-kit. After the installation completes, you will get the following message:

Part 2

Now that we have successfully installed the CRYENGINE "Blank" Game Starter-Kit into Visual Studio, we can create our CRYENGINE game project:

  1. Launch your preferred and supported Visual Studio IDE.

    Note

    For this book, I will be using Visual Studio 2013 Ultimate. You are free to use any supported version you wish. However, you may notice some slight differences. Current supported versions of Visual Studio include any edition of 2012, 2013, and 2015.

  2. Now that we have launched Visual Studio, we can create our game project by using the CRYENGINE "Blank" Game Starter-Kit we installed earlier. To do this, go to File | New | Project. You will see the following menu options:

  3. Go to Templates | Visual C++ | CRYENGINE. Select CRYENGINE Game Starter-Kit - Blank and fill in your project information.

    Note

    You are free to choose whatever name and location you wish. However, I strongly recommend you choose a location outside your CRYENGINE install directory. Throughout this book, we will be calling our game project GAS, which stands for Great Action Side-Scroller. Make sure to uncheck Create directory for solution.

  4. Click the OK button. This will launch the CRYENGINE game starter-kit Project Creation Wizard. It should look like this:

  5. Fill in all of the information for your game project, as shown here:

    Since we have chosen to call our game GAS, it is recommended to set Project Name as GAS too. Also, it is strongly advised that you check the Include PluginSDK and Set As Active Game options. Including the PluginSDK developed by Hendrik Polinski allows users to add plugins to their game without modifying any actual game code. The advantage is that everything is modularized and features can be bundled up and shared between many projects. If you would like to get in contact with Hendrik, you can do so at https://github.com/hendrikp. Setting our game as active allows CRYENGINE to detect and use our game by modifying the system.cfg file in CRYENGINE's root folder. Although this is all advised, you are free to fill in the data however you wish.

  6. Click on the Create button. After the project has been created, you will get the following screen:

Important classes within the starter-kit


As we have concluded the setting up of the starter-kit, it is probably a good time to bring up a few disclaimers:

  • While starter-kits in general are extremely helpful, they are technically not a true blank slate.

  • There are a few interfaces and classes that will need to be explained before writing code.

  • Since there is absolutely no gameplay-specific or genre-specific code or classes, the gameplay mechanics and many other things must be implemented from scratch. Although I consider this to be a good thing, some may not.

To address the previous concerns, let's take a closer look at some of the more important classes within the starter-kit that we will be using on a regular basis, keeping in mind that the names of these classes will be different for you as they are based on the project's name:

  • CEditorGASGame: This class implements CRYENGINE's IEditorGame interface. It is used to create, update, and shut down your game while you are running it inside the CRYENGINE Sandbox Editor. You often need your game to behave differently while testing inside the editor; this class allows us to do just that. It acts as a proxy for our game, giving us the ability to add or remove functionality that should only exist while playing your game in the editor. For now, we simply forward most calls to the actual Game class so that our game behaves similarly in the editor and in the Launcher.

  • CGASGame: This class implements CRYENGINE's IGame interface. It is used to update your game and the rest of CRYENGINE's systems. It acts as a hub that manages every system that your game will use, controls communication between them, and facilitates all of the core mechanics of your game. You can view this class as your game's manager—something that orchestrates all of the little moving parts of your game. For now, we simply update the Game Framework, which, in turn, updates the rest of CRYENGINE's systems such as the Renderer, Input Manager, and Physics System.

  • CGASGameRules: This class implements CRYENGINE's IGameRules interface. It is used to carry out your game's rules and works hand-in-hand with your Game class. It is a class that does and should receive notifications about any gameplay-specific events so that it may decide how best to handle them in accordance with your game's rules. It is also common for this class to dispatch gameplay-specific events to your Game class. For now, this class simply creates the player when asked to do so.

  • CGASModule: This class is a completely custom class in that it doesn't derive from any CRYENGINE interface. I created this class to help you; by definition, it is a helper class. Its sole purpose is to provide project-wide access to all of your game's systems and instantiate them only when needed. It does so by exposing itself as a global pointer called g_pCGASModule, which can be used inside any scope, inside any class, and inside any file to retrieve/create any of your game's systems.

    Note

    It is strongly advised that if you create a custom system for your game, you should add and implement a singleton get method, as shown in the other get methods in this class.

  • CGASStartup: This class implements CRYENGINE's IGameStartup interface. It is used to create and initialize all of CRYENGINE's systems and your Game class. This class is instantiated automatically from outside your Game DLL by the Launcher, and is expected to create and initialize all of CRYENGINE's modules and ultimately create and run your game. For now, we load CryGameFramework.dll, retrieve its exported factory method, and call it to instantiate an instance of the IGameFramework interface. We then proceed to initialize it, which, in turn, loads, creates, and initializes all of CRYENGINE's modules.

  • CPlayer: This class implements CRYENGINE's IActor interface. Every CRYENGINE game needs to have a player implementation. This is the place to implement the logic that concerns the player, such as moving around the world and interacting with objects.

  • CSmoothCamera: This class implements CRYENGINE's IGameObjectExtension and IGameObjectView interfaces. It's used to provide a view for our player so that we may see the world. The CSmoothCamera class implements IGameObjectView so that it may control a CRYENGINE IView instance. It implements IGameObjectExtension so that they may be added to a game object that's in the game's world. This class is slightly advanced and it would be better to read the in-code documentation to get a clearer understanding of how this class works.

  • IWindowEventSystem: This interface is a completely custom interface in that it doesn't derive from any CRYENGINE interface. I created this interface to help you; by definition, it is a helper interface. Its sole purpose is to provide a mechanism for which to dispatch and handle various window events, such as window activation, closing, and various mouse/keyboard events.

  • CScriptBind_Game: This class implements CRYENGINE's CScriptableBase class. It's used to expose your game's functionality to Lua. Although not required, any game-specific functionality you want to be exposed to Lua should be added here. For now, only the ability to set the game's current spawnpoint has been exposed.

By now, you should have a good understanding of what each of the classes do and what they are used for. For a more thorough understanding, you may want to take a look at the in-code documentation.

Compiling our game


Now that we have all of the setup ready and have a clear understanding of what all of the important classes in our game do, let's compile our project. Get ready to venture into the world of game programming and create the Great Action Side-Scroller.

Right-click on your game project in the Solution Explorer and click on Build, as shown here:

Summary


This concludes the chapter. If you come across any issues while compiling the game project, I suggest that you take a look at the starter-kit Crydev forum thread at http://www.cryengine.com/community/viewtopic.php?f=355&t=124265. In this chapter, you learned how to download and install my CRYENGINE "Blank" Game Starter-Kit, what all of the important classes in the kit do, and how to compile a CRYENGINE game project. The future is very bright as we move forward with the rest of the book. Good job!

Left arrow icon Right arrow icon

Key benefits

What you will learn

Create a CRYENGINE game from scratch with the Game Starter-kit Add custom methods to allow the player/AI to use a weapon Create complete -start and -end game menus using Scaleform and C++ Discover how to use highpoly modeling workflow and techniques within the pipeline for the SDK to use Use the Crytiff exporter from Photoshop Export the CHR-the format the engine needs to read the skeleton Integrate the character in the engine using the character tool Better understand the rules to create and author skeletons to rig characters designed for CRYENGINE Debug common setup issues that might appear during production with useful tools

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Aug 28, 2015
Length 322 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781784399870
Vendor :
Crytek
Category :

Table of Contents

22 Chapters
CRYENGINE Game Development Blueprints Chevron down icon Chevron up icon
Credits Chevron down icon Chevron up icon
About the Authors Chevron down icon Chevron up icon
About the Reviewers Chevron down icon Chevron up icon
www.PacktPub.com Chevron down icon Chevron up icon
Preface Chevron down icon Chevron up icon
Getting Started Chevron down icon Chevron up icon
Creating a Playable Character Chevron down icon Chevron up icon
Implementing Weapons and Ammo Chevron down icon Chevron up icon
Creating an Enemy AI Chevron down icon Chevron up icon
Creating User Interfaces Chevron down icon Chevron up icon
The Modeling Workflow for Game Characters and Tools Chevron down icon Chevron up icon
Highpoly Modeling Chevron down icon Chevron up icon
Lowpoly Modeling Chevron down icon Chevron up icon
Texturing and Materials Chevron down icon Chevron up icon
Building the Character Rig Chevron down icon Chevron up icon
Exporting the Character to CRYENGINE Chevron down icon Chevron up icon
Initial Level Blockout and Setup Chevron down icon Chevron up icon
The Flow Graph Workflow Chevron down icon Chevron up icon
Scripting Gameplay Content Chevron down icon Chevron up icon
Maintaining Our Work Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.