Book Image

CryENGINE 3 Game Development: Beginner's Guide

Book Image

CryENGINE 3 Game Development: Beginner's Guide

Overview of this book

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.
Table of Contents (18 chapters)
CryENGINE 3 Game Development Beginner's Guide
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Different alignment modes for UI elements


As you already noticed, we have defined the alignment within the XML file. There are different alignment modes that can be used:

  • dynamic: A dynamic mode has dynamic horizontal and vertical alignment, without losing aspect ratio

  • fixed: A fixed position on the screen

  • fullscreen: Always fullscreen; you have to reposition your movieclips by yourself

Each alignment mode has some additional settings that can be used.

Dynamic alignment

In the dynamic mode, you need to define a horizontal and vertical alignment and a scale mode:

    <Constraints>
     <Align mode="dynamic" valign="center" halign="center" scale="1" max="0" />
    </Constraints>
  • halign: Can be left, center, or right.

  • valign: Can be top, center, or bottom.

  • scale: Can be 0 or 1. If scaling is enabled, the asset is scaled to fit into the screen. The asset is always 100 percent visible. If disabled, it will always stay in its original resolution (if the resolution is smaller than the asset...