Torque for Teens, Second Edition
Michael Duggan
Course Technology PTR A part of Cengage Learning
Australia • Brazil • Japan • Korea • Mexico • Singapore • Spain • United Kingdom • United States
Torque for Teens, Second Edition
† 2011 Course Technology, a part of Cengage Learning.
Michael Duggan
ALL RIGHTS RESERVED. No part of this work covered by the copyright herein may be reproduced, transmitted, stored, or used in any form or by any means graphic, electronic, or mechanical, including but not limited to photocopying, recording, scanning, digitizing, taping, Web distribution, information networks, or information storage and retrieval systems, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the publisher.
Publisher and General Manager, Course Technology PTR: Stacy L. Hiquet Associate Director of Marketing: Sarah Panella Manager of Editorial Services: Heather Talbot
For product information and technology assistance, contact us at Cengage Learning Customer & Sales Support, 1-800-354-9706
Marketing Manager: Jordan Castellani
For permission to use material from this text or product, submit all requests online at cengage.com/permissions Further permissions questions can be emailed to
[email protected]
Senior Acquisitions Editor: Emi Smith Project Editor: Jenny Davidson Copy Editor: Kim Benbow Technical Reviewer: Jacquie Finney Interior Layout Tech: MPS Limited, A Macmillan Company Cover Designer: Mike Tanamachi
Torque Constructor, Torque Game Engine, and Torque ShowTool Pro are either registered trademarks or trademarks of GarageGames.com, Inc. GarageGames is a registered trademark of GarageGames.com, Inc. Microsoft, Windows, and Internet Explorer are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Audacity and Blender are distributed under the terms of the GNU General Public License. Paint.NET is a trademark of Rick Brewster. Torsion is copyrighted by Sickhead Games, LLC.
DVD-ROM Producer: Brandon Penticuff
All images † Cengage Learning unless otherwise noted.
Indexer: Sharon Shock
Library of Congress Control Number: 2009942402 ISBN-13: 978-1-4354-5642-6 ISBN-10: 1-4354-5642-4 eISBN-10:1-4354-5643-2 Course Technology, a part of Cengage Learning 20 Channel Center Street Boston, MA 02210 USA Cengage Learning is a leading provider of customized learning solutions with office locations around the globe, including Singapore, the United Kingdom, Australia, Mexico, Brazil, and Japan. Locate your local office at: international.cengage.com/region Cengage Learning products are represented in Canada by Nelson Education, Ltd. For your lifelong learning solutions, visit courseptr.com Visit our corporate website at cengage.com Printed by RR Donnelley. Owensville, MO. 1st Ptg. 06/2010
Printed in the United States of America 1 2 3 4 5 6 7 12 11 10
This book is dedicated to all those dreamers who want to make homemade games a common reality and will one day.
Acknowledgments
For the construction of this book there have been many supporters, especially from the Torque community. This involved contributions from Christophe Canon, 3drt.com, Benjamin “Djaggernaut” Chavigner, Nermin, Josiah Pisciotta, Stephande Conde, Dylan Romero, Brett Seyler, Randel Reiss, Mark Frohmayer, Tony Ramos, Ian Hardingham, and Paul Taylor. Several people helped really hammer this tome into shape, including Emi Smith, Jenny Davidson, and Jacquie Finney. And my labors would have been a lot tougher it hadn’t been for the help of my family, particularly my wife, Krystal, and my kids.
iv
About the Author
Michael Duggan is an author and illustrator by trade, as well as a college instructor in digital media and game design. He created core curriculum for game development programs at both Bryan College and North Arkansas College. He has been a guest speaker on the topic of affordable game engine technology at several conferences. Other books he’s written include The Official Guide to 3D GameStudio, Torque for Teens, Web Comics for Teens, 2D Game Building for Teens, and Wii Game Creation for Teens. Michael spends most of his free time drawing children’s books and making cartoon animations and games. For more information about the author, go to mdduggan.com.
v
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xvii
Chapter 1
So You Want to Be a Game Designer? . . . . . . . . . . . . . . . . . . . . 1 What a Game Designer Is and Is Not . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 What About Indie Game Design? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Game Dev Step by Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Pre-Production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Concept Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Concept Finalization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Post-Production. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Testing and QA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Marketing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Expansion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Where to Get Those Killer Game Ideas . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 What Makes a Killer Game? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Gameplay Mechanics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Gameplay vs. Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Interactivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Give Players Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Teach Players to Play . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Give Players Choices to Make . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
vi
Contents Make Environments Reactive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Immerse the Player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Get Players Motivated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Make Your Game Emotional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Add Conflict to Your Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Make Your Game Challenging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Types of Game Challenges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 The Game Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Competition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Chance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 The Four Fs of Great Game Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Fun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Fairness. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Feasibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Accepted Game Genres . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Action Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Adventure Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Role-Playing Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Strategy Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Other Game Genres . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Chapter 2
Torque 3D: Under the Hood . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Why a Game Engine? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Torque 3D Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Games Made with Torque 3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Other Torque Products to Consider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Torque 2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 iTorque 2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Console Game Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 T for Wii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Torque 360. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Torque X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Components of Torque 3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 World Editor Toolset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 TorqueScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
vii
viii
Contents Coding Add-On Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Torsion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Plastic Tweaker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Universal AI Starter Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Codeweaver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Game Mechanics Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Next-Gen Rendering Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Web Publishing Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Chapter 3
Creating a Basic Game Outline. . . . . . . . . . . . . . . . . . . . . . . . . . 67 Game Design Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Questions to Ask Yourself . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 What Is This Game?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Why Create This Game? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Where Does This Game Take Place? . . . . . . . . . . . . . . . . . . . . . . . . . . 69 What/Who Do I Control in This Game? . . . . . . . . . . . . . . . . . . . . . . . 69 What Is the Point of This Game?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 What’s So Different About This Game? . . . . . . . . . . . . . . . . . . . . . . . 69 Game Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Write a Concept Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Think Up Your Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Define Your Target Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Establish the Scope of the Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Write the Feature Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Work Breakdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Task Determination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Estimating a Timeline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Estimating Costs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Asset Production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 The Game World . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 The Game Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 The Game Items. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Interface Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Sound Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Technical Specs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Game Outline Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Ravenscroft Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Myst Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Contents
Chapter 4
Opening Your Garage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Jump-Starting Your Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Install Torque 3D. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Install Additional Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 DirectX SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 2D Image Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 3D Modeling Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Script Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Take Torque for a Test Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Toolbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Demos. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Create a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Add Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 Add Quick Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108 Edit Project Thumbnail. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109 Get Started in the World Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 World Editor Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .111 Tools Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Preference Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Meet Gideon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114 Manipulate Objects with Gizmos . . . . . . . . . . . . . . . . . . . . . . . . . . .116 Translate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Rotate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Manipulate Objects with the Inspector Panel . . . . . . . . . . . . . . 119 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Chapter 5
This Is Your Land: The World Editor . . . . . . . . . . . . . . . . . . . . 121 Level Up! What It Takes in Level Design . . . . . . . . . . . . . . . . . . . . . . . . . 121 Level Designer Dos and Don’ts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Exterior and Interior Spaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Exterior Space: The Great Outdoors . . . . . . . . . . . . . . . . . . . . . . . . .126 Interior Space: Going Indoors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126 Creating a World with World Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 Adding Terrain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 Creating Blank Terrain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128 Creating Flat, Generic Terrain . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 Creating Mountainous Terrain . . . . . . . . . . . . . . . . . . . . . . . . . . 131
ix
x
Contents Creating Blank Terrain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 Terrain Editor Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Brush Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134 Terrain Editor Tool Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135 Making Ravenscroft Valley . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Sun and Sky . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140 Sun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Sky Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 Scatter Sky . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Clouds. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 Water . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149 Water Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 River . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Water Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Painting Your Terrain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155 Making Your Own Textures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Adding a Road . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .159 Adding Replicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160 Foliage Replicator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 Shape Replicator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Adding Weather Effects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Chapter 6
I No Ditz, I Know DTS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Games and 3D Art . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 3D Does Not Require Blue-and-Red Glasses!. . . . . . . . . . . . . . . . . . . . 167 Low-Poly Modeling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .168 How Do You Do 3D?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 From Sprite to 3D: Short History Lesson. . . . . . . . . . . . . . . . . . . 170 Tricks to Defeat Rendering Lag. . . . . . . . . . . . . . . . . . . . . . . . . . 172 Creating DTS Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Most Widely Used Modeling Packages for Creating DTS Files . . . . . 173 The Not-So-Affordable Programs: Max and Maya . . . . . . . . . . . . .173 The Affordable Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173 MilkShape 3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Blender. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Using 3ds Max to Make DTS Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Familiarize Yourself with Max. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 Viewports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Viewport Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176
Contents Viewport Rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177 Menu Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Command Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Create Subpanel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178 Modify Subpanel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179 Other Subpanels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .180 Select Objects in Max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 Select Object Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .180 Select by Name Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .180 Transform Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 Box and Segmented Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 Build Structurally Sound Models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 Editable Poly vs. Editable Mesh. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 Use Metric Units of Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 Build a Crate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Make the Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Change the Crate’s Texture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Add a Bump Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188 Add a Specular Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189 Create a Bounding Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Export the Crate to DTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 Install the DTS Exporter Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 What the DTS Exporter Does . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Renumber and Embed Your Crate Shape . . . . . . . . . . . . . . . . . . . . . . 194 Prepare Your Crate’s Collisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Export Your Crate Shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Import the Crate into Your Game. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Build a Medieval-Type Village. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 Make a Medieval House. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 Add a Door . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .202 Give It a Gable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .204 We Do Do Windows! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206 Add Little Details to Your House . . . . . . . . . . . . . . . . . . . . . . . . . . .208 Extend the Walls of Your House . . . . . . . . . . . . . . . . . . . . . . . . . . . .209 Put a Roof on It . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211 Make It Medieval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212 Export Your House to DTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
xi
xii
Contents
Chapter 7
This Isn’t the Runway: Modeling 101 . . . . . . . . . . . . . . . . . . . 217 How to Create Game Characters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 Define Your Character’s Personality. . . . . . . . . . . . . . . . . . . . . . . . . . . 218 Take the Old-School Approach to Character Creation. . . . . . . . . .220 Use David Freeman’s Traits Triangle. . . . . . . . . . . . . . . . . . . . . . . . .220 Add Idiosyncrasies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .221 Game Character Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 Use Artificial Intelligence for Enemies and NPCs . . . . . . . . . . . . . .223 Game Character Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 Write a Text Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223 Sketch Your Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224 Game Character Appearance . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 Make Up Your Own Characters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 Making Characters for Torque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 Animated Shapes in Torque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 Create a Character Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 Work Off of a Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228 Model the Head . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .232 Model the Torso . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238 Model the Limbs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .239 Add a Material to Gentry Jack. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 Rig Gentry Jack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242 Option A: Use Standard Player DSQs . . . . . . . . . . . . . . . . . . . . . . . .243 Scale and Rotate Your Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 Reset XForm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 Assemble a Biped . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 Add a Skin Modifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 Set Up LODs (Optional) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 Add a Detail Marker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 Add a Bounding Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Add Other Critical Markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Option B: Create Your Own Embedded Animations . . . . . . . . 251 Export Gentry Jack to DTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 Export DSQ Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .254 Export Skinned Mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .254 How to Animate Objects Instead of Characters . . . . . . . . . . . . . . . . . 257 Free Resources for Max Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 Affordable Resources for Torque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Contents
Chapter 8
Getting Gooey: Designing GUIs . . . . . . . . . . . . . . . . . . . . . . . . 259 Game Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 History of Game Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 Give the Player Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 Input/Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 Think Usability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 Predict Emergent Gameplay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 GUIs for Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265 Heads-Up Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265 Health Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 Player Score . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 Firepower. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 Map or Radar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Inventory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 GUI Layout and Screen Real Estate . . . . . . . . . . . . . . . . . . . . . . . . . .267 Planning a Game Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .269 The GUI Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 Under the Hood of the GUI Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 GUI Editor Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270 GUI Editor Tool Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 Control Palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 Parent Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 Edit the Ravenscroft GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 Change the Main Menu Background . . . . . . . . . . . . . . . . . . . . . . . .275 Edit Other Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .278 Add a Score Counter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279 Change the Mission Load Screen . . . . . . . . . . . . . . . . . . . . . . . . . . .282 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Chapter 9
The Sound and the Fury . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 Sound Used in TV and Film . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 A Short History Lesson of Sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 Hyper-Real Sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 Sound Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 Influencing Factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .288 Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289 Predictive Sound and Leitmotiv . . . . . . . . . . . . . . . . . . . . . . . . . 289 Situations and Outside Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .290
xiii
xiv
Contents Start Your Own Sound Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 Soundproof Your Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 Get Some Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 Get a Mic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292 Sound Recording. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 Listen to Yourself . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294 Posture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 Remember to Breathe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 Don’t Crack Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 Say It, Don’t Spray It . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 Digital Sound. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294 Sound File Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 Which to Use? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 Using Sound Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 Audacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 Record Audio in Audacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 Edit Audio in Audacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 Add Effects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298 Export Audio from Audacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 Sounds in Torque 3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 Sound Support in Torque. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 2D and 3D Sounds. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300 2D Sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 3D Sound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 AudioDescriptions (ADs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301 AudioProfiles (APs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .302 Engineering Sounds in Torque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 Edit In-Game SFX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .302 Use a Sound Emitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Chapter 10
Should I Stay or Should I Goal? . . . . . . . . . . . . . . . . . . . . . . . . 309 Code for Torque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 TorqueScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .311 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312 Al-Go-Rhythm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 Script Editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
Contents Under the Hood of TorqueScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 Edit Empty Terrain Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .316 Add Score Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .318 Script the Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 Create the Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 Add Other Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323 The Bouncing Boulder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 The Default Car . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 Health Packs and Ammo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 Other Things to Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Chapter 11
Multiplayer Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 Designing the Next Big MMO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 Torque Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 Ghost Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 Take Your Game to the Next Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Chapter 12
Put Your Game to the Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 Game Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 Bug Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 Iterative Game Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 Test as You Build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337 Have Others Test for You . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337 Top Issues to Watch Out For . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Chapter 13
Designing Other Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 Games Made with Torque 3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 Games Made with Torque 2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 Games Made for Consoles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 Game Creation for Xbox 360 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 Game Creation for Wii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 Games Made for Mobile Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 Final Thoughts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 Get a Gaming Education: College for Designers. . . . . . . . . . . . . . . . . 349 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
xv
xvi
Contents
Chapter 14
Get the Word Out: Play This Game! . . . . . . . . . . . . . . . . . . . . 353 Developing a Proposal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 Tooting Your Own Horn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 Develop a Clear Identity or Gimmick . . . . . . . . . . . . . . . . . . . . . . . . . . 356 Publish on the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 The World Wide Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 Web Speak . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 Web Browsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 Hosting Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 Build Your Own Website . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 Prep Your Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .361 Prep Your Images and Animations . . . . . . . . . . . . . . . . . . . . . . . . . .361 Put It All Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .362 Submit Your Site to Search Engines . . . . . . . . . . . . . . . . . . . . . . . . .363 Use a Community Profile to Advertise Your Games . . . . . . . . . . . . . . 364 Set Up a MySpace Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .365 Set Up a GGE Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .368 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Introduction
Welcome to Torque for Teens! Whether you’re looking forward to becoming a designer in the ever-growing game industry or just wanting to explore the software and show off your creations to your friends, this book will help you learn about the Torque 3D computer game engine and the techniques it takes to make your killer game ideas come to life. Torque for Teens is written in a tutorial format so that, as you read, you don’t just process information but put it to immediate use and get hands-on experience to reinforce that knowledge. You will start by creating an action game, but if you have the will, you can use the skills you’ve learned to springboard your talents into making dozens of other computer games. If you find that you love to make games, you could consider it your career goal and someday find yourself working in a company building the next Call of Duty or World of WarCraft.
What You Will Learn from This Book In Torque for Teens, you’ll learn about the game industry, the process by which your favorite video games are conceived, and how to make your very own computer games using Torque 3D from GarageGames. Torque is a handy tool for creating many genres of games, and even multiplayer online games, but it is vast and complex, and therefore, can be daunting at first. But Torque for Teens will break it down for you with easy-to-understand techniques and make creating games with Torque a cinch. xvii
xviii
Introduction
Who Should Read This Book Anyone who is interested in working in the rising game industry, who likes playing video games and wants a genuine chance to make their own, or someone who is interested in making games as a hobby and doesn’t know where to start will find the contents of this tome useful. The following chapters cover the specifics of creating games with Torque, but they also cover the very real day-to-day responsibilities game developers have to deal with. As this book is about designing computer games, you should have some experience with computers before you start.
How to Use This Book Each chapter in Torque for Teens details generic and academic information about the subjects. This content can seem dry at first, but once you get into it, you’ll be surprised at how much of it is important to you as a budding game designer; you will find the details rich and supportive. This information is followed by hands-on practice, to show you how to build a real game, from start to finish, using Torque. So you not only learn the interface and what all the fancy words mean, you learn the inner workings and how to construct a game all your own. Each chapter will in some way further the achievement of the entire game assignment, which is the creation of an action game. Beginning with the creation of the environments and the player character model, you will learn, step by step, the best techniques for completing a game using Torque 3D.
How This Book Is Organized Here are some specifics about the chapter breakdown for Torque for Teens. ■
Chapter 1: So You Want to Be a Game Designer?—Before actually picking up the tools of the trade, this introductory chapter will give you a quick run-down on the industry, how games are made, what is involved in game publishing, and the top tricks to give your game that WOW Factor.
■
Chapter 2: Torque 3D: Under the Hood—This chapter delves into the technical information and history behind the tools you’ll be using, and gives you a quick peek at other Torque products.
How This Book Is Organized ■
Chapter 3: Creating a Basic Game Outline—To start your game design, it is important to plan it first, and thus this chapter shows you all about game design documentation and planning.
■
Chapter 4: Opening Your Garage—In this project chapter, you’ll learn to start a new game project in Torque 3D.
■
Chapter 5: This Is Your Land: The World Editor—This project chapter reveals the World Editor and how you can make exterior game environments.
■
Chapter 6: I No Ditz, I Know DTS—This project chapter delves into the Torque Constructor kit and shows you how to make interior environments for your game.
■
Chapter 7: This Isn’t the Runway: Modeling 101—In this project chapter, you’ll use 3ds Max to model and animate your player character and essential props.
■
Chapter 8: Getting Gooey: Designing GUIs—This chapter covers creating graphical user interfaces (GUIs). Here you’ll lay out your game menu screen.
■
Chapter 9: The Sound and the Fury—This project chapter delves into the intricacies of sound recording, sound mixing, voice narration, and the placing of sound effects and music into your game.
■
Chapter 10: Should I Stay or Should I Goal?—Finally, you’ll learn how to program game features in TorqueScript to develop your first player mission.
■
Chapter 11: Multiplayer Setup—In this chapter, you’ll learn how to create online games.
■
Chapter 12: Put Your Game to the Test—This rather short chapter details bug reporting and fixing mistakes in your games.
■
Chapter 13: Designing Other Games—This chapter discourses on the designing of other kinds of games beyond the project detailed in this book. Learn how to make games other than action genre ones.
■
Chapter 14: Get the Word Out: Play This Game!—Finally, you will be shown how to publish and distribute your game, how to advertise it to get the most attention, and how to generate players.
xix
xx
Introduction
All of the files for use with the project herein, including the tools you need to download to make your game, are found on the companion DVD.
DVD-ROM Downloads If you purchased an ebook version of this book, and the book had a companion DVD-ROM, we will mail you a copy of the disc. Please send
[email protected] the title of the book, the ISBN, your name, address, and phone number. Thank you.
chapter 1
So You Want to Be a Game Designer? If you’ve picked up this book, you’re probably interested in making computer games. You almost certainly have played these games before. You know what would make a great game and what would not. You might even have had a cherished nugget of an idea for a game you’d like to make rolling around in the back of your mind. You would like to be a game designer, but may not know where to start. I’ll show you how to make your very own games through a step-by-step process. Along the way, you will gain further understanding of the principles behind game development. By reading this book, you will learn how to make your own video games using the popular Torque 3D, one of the most affordable and multi-featured game kits on the market today (see Figure 1.1). You will also learn whether you have what it takes to enter the exciting and multibillion-dollar industry of game design.
What a Game Designer Is and Is Not Game design uses cutting-edge computer technology to create electronic games for the masses. Electronic games, which first sprung up in the early 1960s, make a lot of money. ABI Research, an independent technology market research firm, estimates that video game sales from 2005, around $32.6 billion, are going to double to around 1
2
Chapter 1
■
So You Want to Be a Game Designer?
Figure 1.1 Torque 3D.
$65.9 billion in 2011. Right now, sales of video games have topped sales of CDs, videos, and DVDs—making more money than either the movie or music industry. This global economic expansion has ushered in a need for skilled programmers and talented game artists. Game design schools have sprung up all across the world in order to meet the rising demand for game development. A single game may take a team of 20 to 300 or more individual programmers, artists, animators, sound engineers, and directors—and may cost upwards of $500,000 (usually around $50 million for a big triple-A title) to make. A game design team is often funded by a game publisher, such as Microsoft, Nintendo, Electronic Arts, or Activision, for exclusive publishing rights. Once the game is made, it must hit the store shelves running and make as much money in the first month as possible, or it might wind up in the bargain bins or (gasp!) returned to the manufacturer. Game designers are often hired based on personality. This is because of the teambased work structure, and because everyone on the team must get along and work together like a well-greased machine. Game designers also get hired based on their skills. Designers fall into several classes (or categories) based on skill sets and specializations, as shown in Figure 1.2. The broadest classes of game designers are
What a Game Designer Is and Is Not
Figure 1.2 (A) Programmer, (B) Artist, (C) Writer, (D) Sound Engineer, and (E) Leader. ■
Programmers—These guys make the most money because they have to program the code that tells the computer what to do and how to react to the players playing the game. Programmers in the industry today are expected to know a lot of different programming languages (no one language standard exists in software development), but the main language they have to know is Cþþ, regardless of whether they work in graphics, AI, tools, or animation. In addition, coders ought to learn to use Microsoft Visual Studio’s Cþþ compiler/debugger, as it is the primary companion tool to the language. According to the Fall 2009 issue of Game Developer magazine’s Game Career Guide, the average entry-level salary of game programmers is around $64,500 per year. If you’re really good at math and excel in linear algebra, then programming is probably for you.
■
Artists and Designers—The work these guys do is the most readily apparent whenever you play a video game. They create the game’s assets, including its environments, characters, props, weapons, vehicles, monsters, and more. The look of a game, readily noticeable in its graphics, can make or break its commercial viability, or how well it sells. Game art and design reduces to 2D and 3D art, both of which are important in video game design. 3D artists should learn to use two or more major 3D modeling and animation packages, including 3ds Max, Maya, SoftImage XSI, or Lightwave. Designers are often differentiated from artists in the industry,
3
4
Chapter 1
■
So You Want to Be a Game Designer?
because designers are often in charge of UI layout and level design and use different toolsets to accomplish both. According to the Fall 2009 issue of Game Developer magazine’s Game Career Guide, the average entry-level salary of game artists is around $47,692 per year. If you’re good at drawing, or can see things visually in your mind really well, you might have what it takes to be a game artist or designer. ■
Writers—Not only are these guys responsible for writing the story line behind the game, they also script the dialogue and events that take place in the game and write the game manual, too. You don’t have to be an English or journalism student to be a writer. It takes proper use of grammar and written expression, as well as proficiency with Microsoft Word, to be a game writer. Writers are typically outsourced on a game project, so most of their income is from freelance jobs. If you find yourself making up stories and coming up with unique characters and events, then you could probably be a game writer.
■
Sound Engineers—The engineers set up the sound effects, compose the music mixes, and make the games sound sweet. Ever play a video game on mute? It’s not the same experience, is it? Sound is vital to the total gaming experience. According to the Fall 2009 issue of Game Developer magazine’s Game Career Guide, the average entry-level salary of audio developers is around $53,269 per year. You don’t have to be lead guitarist in a band to be a sound engineer. If you enjoy music and sound and have a distinct ear for the way things sound, then you could make a decent sound engineer.
■
Leaders—The leaders communicate between the rest of the team, making sure that everyone is doing what they should and that the game development deadlines are reached. Leaders include directors, team leads, producers, and managers. Leaders often have to communicate with everyone, from artists to engineers, so understanding the culture and vocabulary of these groups can add to their effectiveness. Being able to communicate using basic software, such as Microsoft Word, Excel, and Visio (for flowcharts) rounds out the skill set. According to the Fall 2009 issue of Game Developer magazine’s Game Career Guide, the average entry-level salary of game designers is around $45,896 per year and producers is around $45,259 per year. If you often find yourself coming up with all the ideas and talking your friends into making those ideas a reality, then you would probably make a great leader on a game design team.
What a Game Designer Is and Is Not Note One job role in game development not previously mentioned, but highly sought after by fresh-faced students, is Q/A, or quality assurance. This means working as a game tester. There's a persistent myth that game testers get paid big money to play games all day, but that's not true. Testers are outsourced by game developers to bring a pair of fresh eyes to their games. Testers sit in offices, testing just one level or one part of the overall game, day in and day out, and they have to fill out lots of paperwork on a regular basis. Testers let the team know what works and what doesn't, and then they test the same area where there was an issue to see if that issue has been fixed. The majority of programmers, artists, and other game designers got their start as game testers, so one reason to get a job as a game tester is to get your foot in the door. An informal apprenticeship exists between testers and designers, producers, or associate producers, with the more experienced group shepherding talented Q/A personnel who are determined to find a lasting career in the business. According to the Fall 2009 issue of Game Developer magazine's Game Career Guide, the average entry-level salary of Q/A testers is around $27,894 per year.
Pay is commensurate with location, as well. Most game companies are headquartered in large metropolitan areas like Austin, Texas, and San Diego, California. Companies pay better in those areas. A designer working in New York may make close to $68,000 a year, while a freelance designer living in the sticks in Wisconsin may only make $27,000. However, the guy living in New York will have higher living expenses, as the cost of living is higher there than for the guy living in Wisconsin. So a lot of salary earning must be balanced with your comfort level and where you want to live. Each of these designer’s roles can be further broken down by their special skill sets. Just to give you a short example, the game artists can include 2D texture artists, 3D model artists, 3D animators, riggers, sprite animators, interface artists, UV map artists, storyboard artists, animatic artists, motion graphics specialists, Web designers, and more. Skill sets are vitally important within a game design team. In fact, if you graduate from a game school, the majority of employers will judge you not on the classes you took in school but by your skills in computers or the portfolio of work done previously. So if you want to get a job in the industry as a 3D animator, you have to show an employer what 3D software you know really well—and you will have to show them a portfolio of original 3D artwork you’ve personally created. An employer may also want to see a demo reel of any animations you have made yourself. A preferred bonus to recruiters will be if you can show them a game you’ve already completed!
5
6
Chapter 1
■
So You Want to Be a Game Designer?
That is why it is so important for you—right now—to start making computer games. You want to show not only your friends and relatives, but the whole world that you have what it takes to be a game designer right this very moment. The beauty of Torque 3D is that you don’t have to be a computer genius to get started. You can make great games without hiring a whole game design team or spending $500,000. You can make games all by yourself! Note For more information on game design jobs and projected salaries, visit www.gamecareerguide.com today. The makers of Game Developer magazine can help you get prepared for a future career in game design.
Designer Talk "Neversoft is an energetic, fun, and dynamic place, and I've been lucky enough to work here for several years. As the lead programmer on Tony Hawk's Project 8, my job is a little different than it was when I first started here. I now spend a good portion of my day meeting with other team members, answering questions, and firefighting (quickly fixing high-priority bugs). Of course, I still do my share of programming as well. I'm part of the Skate programming team, which creates all the code specific to our skateboarding games. With each new release, we reinvent the series, which means there are always interesting new problems to solve." —Brad Bulkley, lead programmer at Neversoft "My primary responsibility at Rockstar San Diego is to build buildings that will populate the environment of the game I'm working on. To do my job, I've got to keep up with various levels of technology, all the way from simply making cool stuff in Maya (based on a detailed photo reference) to applying various shaders to these objects so that they look good within the context of the finished game." —Tom Carroll, environment artist at Rockstar San Diego
What About Indie Game Design? The music industry has existed for a lot longer than the game industry, and as anyone who knows music can tell you, the Top 40 pop music lists are fine for most listeners. But if you want to really hear some edgy tunes that take tired formulas for a ride on the wild side, indie music is where it’s at! Indie musicians are artists who aren’t afraid to take risks. They will settle for smaller gigs and less pay if they can play the music they want to and experiment
What About Indie Game Design?
with their sonic art. Indie musicians are often seen as rebels who thumb their noses at the big industry giants. Games work precisely the same way. When a corporate giant such as Electronic Arts pours thousands of dollars into creating a big-market game, they expect huge payoffs to compensate for their costs. They are understandably against taking any sort of risks, even if the payoff might come in better innovation or storytelling. This undeniable fact is why you see so many game sequels and imitation knockoffs instead of seeing original or ground-breaking games on store shelves. If you want to see real innovation in the game industry, you have to peer at the margins, at the indie game designers. Indie games are often shorter, cheaper-made games, developed by fewer than 20 people, and are free or sell for a low price over the Internet. Indie games usually rise out of amateur and hobbyist game designers. Just giving away your game doesn’t sound very smart, and when you see prices at $10 a purchase, it makes you wonder if indie developers ever make their money back—but if they can sell a minimum of 4,000 copies in one year, at $10 a pop, that comes to $40,000 in gross profits! Not bad for a part-time hobby, eh? The indie game movement grew out of the Mod (short for modification) community, where players of popular games such as Quake and Unreal began modifying the components to build their very own game experiences and swap them online. Now supercharged with cheaper game engine licenses, a growing number of schools teaching game design, in addition to cheaper hardware and the emergence of indie game festivals where designers share tips and tricks, just about anyone can get in on the ground floor as an indie game designer! Although much of the game industry’s big-budget efforts come from large team efforts, toiling on the production line is not the only model for game development out there. Lovingly crafted creations from indie game developers have proven that creativity flourishes when the development process is put back into the hands of a solo designer. As an indie developer, you can make any game you want. Because you’re not taking anyone else’s money to make your game, you can thumb your nose at tired conceptions and try radical things no one else has tried before. Working alone to build a game with art, music, and compelling play may seem daunting to a first-timer, but it’s never been easier for designers to create original titles
7
8
Chapter 1
■
So You Want to Be a Game Designer?
without committing themselves to programming from scratch or shelling out an exhaustive budget. And best of all, there is no reason to wait for permission to start working on a game. You can start right now and do it all yourself. Working alone on a game not only gives you complete control, but also it infuses your work with a personality that big team development rarely has. This book and the software that comes with it will give you all the tools you need to make your own computer games. Tip There is a great online community for gamers, developers, and publishers, and it should be your first stop when you are ready to advertise your homemade game. It is called the Great Games Experiment (or the GGE) and was created by Jeff Tunnel, one of the founders of GarageGames. It has built-in widgets, forums, groups, and places to upload and play games of all kinds. A lot of first-time game developers go there to get their work noticed, so you ought to check it out. You can find the GGE on the Web at www.greatgamesexperiment.com, and you can even follow GGE on Twitter or Facebook.
Game Dev Step by Step A game is not created willy-nilly. Every game made had a process behind its development. There are many levels, or steps, to designing killer games that you probably aren’t even aware of. When you play a game, you don’t see the years of sweat and hard work it took to polish that game into the fine piece of electronic make-believe you sit down to play. Though there are many steps taken to getting that game into your hands, the process can easily be broken down into three categories: pre-production, production, and post-production.
Pre-Production The pre-production stage of game design is where the concept is created and finalized, funds are sought after, and a team is put together to produce the game. The game design document is written, a game proposal or short demo may be shopped around to publishers, and a general inventory takes place before the designers ever get started. Concept Creation
That killer game concept has to come from somewhere. A board meeting might brainstorm ideas until one or two trickle together that show merits of
Game Dev Step by Step
profit-making potential. A bunch of guys sitting around eating pizza may be joking about what games they would like to see and suddenly one of them says, ‘‘That’s it!’’ Or one game designer may be taking a break from it all, enjoying a hot shower at home, and suddenly jumps out and grabs a notepad because a great idea has hit him. Whatever the concept is or looks like, it has sparked the development process. Concept Finalization
The core team of the game’s creators, often starting with the lead game designer, starts fleshing out the game. The artists come up with concept artwork, including drawings and paintings of the characters, vehicles, environments, and weapons that may be used in the game (see Figure 1.3). The writers come up with a game design document, which tells the team all the details of the game, including what levels there will be, who will be the characters in it, and how the player controls will work. The asset artists and programmers begin hashing together a short playable demo—what is
Figure 1.3 Concept art.
9
10
Chapter 1
■
So You Want to Be a Game Designer?
often referred to as a prototype. The lead game designer works with his team to prepare a game proposal that is sure to knock the socks off of prospective backers. Preparation
The team takes inventory of what software and hardware they have to start with, whether they have the office space needed to produce in, and how many members of the team they need to add by either hiring or outsourcing. This inventory helps shape their list of needed funds. Once they have the needed funds, they can get the help or tools necessary to produce the game.
Production The team is now ready to begin game development in earnest. The asset artists design 3D models, 2D artwork, textures, and environments on their computers. The programmers code the player controls and character behaviors, as well as the physics engine. The writers set out dialogue and scripted events. The cinematic artists take storyboards, a sample of which is shown in Figure 1.4, and create short animatic cut-scenes that will appear throughout the game (cut-scenes are those pauses in games where the player’s controls are taken away, and she must watch and listen for story exposition purposes). And the leaders make sure the office doesn’t burn down and that the team members don’t walk off the job. The production process often starts off dreamy and becomes more tense the closer deadlines get. Team members will often work obscene hours during the ‘‘crunch’’ time, even sleeping underneath their desks and avoiding their families.
Post-Production After the game is finished, it is still not finished. Testing, quality assurance, and bug-fixing commences, followed up by a PR (public relations) scheme that will market the game to its target audience. Even after the game is released and sitting on store shelves, more bug fixes may be required in the form of patch software. Testing and QA
Testing involves the team members who are finished with the earlier tasks of playing the game over and over, carefully following checklists to make sure
Game Dev Step by Step
Figure 1.4 A storyboard for an animatic.
every possible glitch is rooted out. After the team tests their game, they may pull in people not related to the team to test the game with fresh eyes (see Figure 1.5). A beta version of the game may even be released online, requesting players to tell the team if a bug is discovered or offering prizes if players discover any glitch. Team leaders are responsible, primarily guided by the project manager or head game designer, for making doubly sure that the game’s overall look and playability remain consistent with the original concept. It can often happen that while 40 or so designers are working on a single project, some of them will start jumping off on tangents or try to change the look of the game part of the way through the build. So it’s imperative that quality assurance, or Q/A, is maintained at every stage of production, especially during post-production.
11
12
Chapter 1
■
So You Want to Be a Game Designer?
Figure 1.5 Not a typical game tester.
Marketing
The game has to fly off store shelves within just a few weeks of getting there, so the PR department of a game developer or publishing company makes sure people know about the game before its release and that the target audience wants to buy it. Game magazines will feature previews of early prototypes of the game or interviews with its developers. Web forums are also a great place to hit the target audience. Any way that the PR people can whet the appetite of the public and make folks curious about an upcoming game is a good way to advertise it long before its release. Expansion
Although the designers never intend for bugs to happen, the game may need patches to fix bugs that still occur in the product after it’s shipped. The game may also prove wildly successful, and the developer may want to start work on expansion packs or sequels. If not, the game design team might get a moment to take a few breaths before starting their next new game project.
Where to Get Those Killer Game Ideas
Where to Get Those Killer Game Ideas Game ideas can come from anywhere, including other games, TV shows, movies, and alternative media. But you can’t outright steal another person’s intellectual property. You can’t make a game based on Pirates of the Caribbean without stepping on toes at Disney, but you can make a fun cheerful game about pirates, such as Twintale Entertainment’s The Pirate Tales game. You can find game ideas almost anywhere but only if you’re looking for them. Creativity is an active, not a passive, process. Be ready for it when you are struck by the video game muse. I bet you have plenty of game ideas. A lot of times these ideas will come from playing other games. You start by thinking, ‘‘I wonder if they did it this way . . . ,’’ or ‘‘I could make this totally better if . . . .’’ Write your ideas down. Get a notebook and start jotting down an idea the second you have it. Otherwise, you might forget that golden kernel and lose a killer idea that could make a name for yourself as a game designer. Your ideas don’t have to be complete or detailed. Just write down whatever occurs to you. If my bet was wrong, and you don’t have plenty of game ideas of your own, all hope is not lost. Here are some tricks to brainstorm ideas: ■
Take a retro classic 2D sprite game, like the ones on the early Nintendo or SEGA consoles, and make it a vast searchable 3D game (or vice versa— take a huge 3D game and try converting it to a much simpler 2D sprite game).
■
Choose one of your all-time-favorite games from the past and clone it using new technology.
■
Pick a game that you really like and tear it apart. Don’t do it literally, of course. Choose what you like about it, what you don’t like about it, and what could have been done to make the game better.
■
Watch a movie or read a book. Think about the possibilities. Could it be adapted into a game? What genre would it be? How would it play?
■
Ask your friends what kinds of games they would want to play.
13
14
Chapter 1
■
So You Want to Be a Game Designer?
■
You could use the Frankenstein method, which is to take two or more games you like, and find unique ways to combine them. The EXOR Studios’ game Zombie Driver does this by combining the driving elements of Grand Theft Auto and zombie destruction of Left 4 Dead to make a unique game where the player transports living survivors around a zombie-infested city, as shown in Figure 1.6.
■
Play lots of different games. If you usually play sports games, try a roleplaying game (RPG). Feel the field.
Remember that most of the ideas out there have been done over and over, and that there are no entirely new ideas. It doesn’t matter. You need to put your spin on the world. Take an existing idea and make it better. That is one creative aspect of being a game designer.
What Makes a Killer Game? Some developers are calling it the WOW Factor, after the hugely successful World of WarCraft enterprise by Blizzard Entertainment. What makes some games mediocre and forgotten, when others top the charts year after year?
Figure 1.6 A combat scene from the hybrid game Zombie Driver, from EXOR Studios.
What Makes a Killer Game?
There are many special ingredients that go into the WOW Factor. I’ll show you some of the most important details of game creation and how you can make your game absolutely killer. These include the following: ■
Gameplay mechanics
■
Interactivity
■
The Four Fs of Great Game Design (4FOGGD)
■
Accepted game genres
Gameplay Mechanics A game, by definition, is any activity conducted in a pretend reality that has a core component of play. Play is any grouping of recreational human activities, often centered on having fun. The pretend reality of most games is based on the mental capacity to create a conceptual state self-contained within its own set of rules, where the pretender can create, discard, or transform the components at will. This pretend reality is referred to by experts as Huizinga’s Magic Circle, established by Johan Huizinga in 1971. Huizinga’s Magic Circle is a concept stating that artificial effects appear to have importance and are bound by a set of madeup rules while inside their circle of use. For instance, the game of football is about a bunch of guys tossing a pigskin ball back and forth to each other, but inside Huizinga’s Magic Circle, the players abide clearly outlined rules to reach a victory for one team or another. Consequently, the concepts of win or loss within a game are not essential, but they do make a game more exciting, competitive, and positioned within a clear frame of reference. Electronic games have one drawback to traditional card or board games in that most of the game rules are hidden. The game still has its own rules, called gameplay mechanics, but they are rules that are rarely written down for the player to consult before playing. Instead, video games allow players to learn the rules of the game as they play. Hiding the rules this way offers video games one huge advantage over traditional card/board games. Because the computer sets the boundary of the Magic Circle, the player no longer has to think of the game as a game. This level of immersion is found lacking in traditional games. Most of the gameplay mechanics dwell on player interaction and randomization.
15
16
Chapter 1
■
So You Want to Be a Game Designer?
■
Player Interaction—Player interaction involves a complex humancomputer interface where the player gives her input to the game, and the game engine responds proportionally. In other words, the player tells the game what she wants to do, and the game reacts accordingly. This interaction can reside on mouse and keyboard or game console controller, but whatever the source of input, it directs the course of the game.
■
Randomization—This is the method by which a computerized system can change the way in which the game is played. Randomization encourages the replayability in games because the experience of playing the game is never the same twice. Replayability is the game designer’s ‘‘sweet spot,’’ or what every designer hopes to achieve. Randomization in tabletop role-playing games like Dungeons and Dragons was achieved by rolling dice to determine outcomes, and this can be reproduced electronically on the computer. However, in digital worlds, randomization can go much farther, often where whole game maps change each and every time the game is played, as in Blizzard’s Diablo game.
Gameplay vs. Graphics
There has long been a debate over which is more important in video games, gameplay or graphics. In truth, both are of equal value and should be treated as such. In the early days of arcade games, the weaknesses of the display hardware seriously hampered the aesthetics, resulting in ugly and oversimplified graphics. With the growth of modern display technology, graphics have taken on a much greater role, one that some game designers see as a handicap. In the 1990s, there was a major push by Hollywood film producers to take over the game industry, and to a certain extent because of this thrusting interest, game designers became focused on the outward appearances of the games they made. Part of your job description as game designer is to give players aesthetic entertainment. An ugly or awkward game with poor artistic style, clumsy animation, and sloppy artwork won’t cut it anymore. But the appeal for games lies just as heavily in consistently fun and innovative gameplay as it does in beautiful artwork. Just because a game looks great doesn’t mean that it is great, and many blockbuster games flop because they play horribly.
What Makes a Killer Game?
You don’t have to be a trained artist to make fun games. There are countless stick-figure games proving that games can get by on the merit of their gameplay. The goal is to make a fun game, and if your game is enjoyable, the graphics become window dressing. So if you aren’t confident in your artistic abilities, you can (a) take art classes and get better, (b) bribe your nearest artsy friend into helping you, or (c) do your best and move on. You have another trick up your sleeve, although you may not know it yet. The graphics of Torque 3D, which you’ll be using throughout this book, are really next-generation. They are just as state-of-the-art as the graphics in the latest Halo game, and you don’t have to do much to make amazing worlds with the tools Torque 3D comes with.
Interactivity When a player picks up the controller or takes over the keyboard and mouse, she wants to be able to explore make-believe worlds, encounter responsive creatures, and interact with her game environment. Games are not passive entertainment forms, such as watching football on television. Games are active: They put you into the football field and place a ball of pigskin right in your hands! They expect you to react. Games are not like traditional stories. Stories are typically a series of facts that occur in a time-sequenced order suggestive of cause-and-effect relationships. In other words, a story plods from one step to another in a fairly linear fashion. A story is a great way to represent reality as cause equaling an effect. In a game, however, the audience cannot understand the story from a typical causal relationship but, rather, is free to make choices and come at the options from every angle. This freedom of interactivity leads to immersion, which sells games. Indeed, a game that has a lot of immersion is a game that players will want to play over and over again to explore new opportunities and avenues for expression. A story is relatively static, while a game, on the other hand, is dynamic and constantly in motion! Have you ever played a game that appeared to be one long cut-scene after another, with only short pauses in between where you got to run around as your character before hitting another cut-scene? These games are closer to film
17
18
Chapter 1
■
So You Want to Be a Game Designer?
projects than really fun games. These games can be frustrating for many players, because games are meant to be interactive. Players don’t want to be told a story; they want to tell or discover the story themselves. Listening to long-winded expositions, being forced to watch long animated sequences, and even talking with characters should always be secondary to exploration, combat, manipulation, and puzzle-solving. In other words, story is supplementary to interactivity. If you fail to empower the player with interactivity, you have failed as a game designer. Give Players Control
Putting the controls in the player’s hands can sound scary for any designer at first. You are abdicating some of your control to allow the player to interact with, and possibly lose, at the game you’ve provided. However, without elevating your player to the status of co-creator of your game, you will never make a great fun game because games are all about interactivity. When your player picks up her game controller or sits at her computer to play your game, she wants to be able to explore make-believe worlds, encounter responsive creatures, and interact with her game environment in ways she can’t get out of watching a show or reading printed words. If you fail to empower your player with interactive control, you fail as a game designer. Teach Players to Play
First, you have to teach your player to play your game. Every game is slightly different in the way it is played. Games of the same genre are generally more similar in their gameplay, and thus players can figure them out more quickly than games of other genres. For instance, most first-person shooter games played on the computer use the W, A, S, and D keys for movement, the E key for action, and the mouse for moving the camera around and firing weapons. This is nearly standard in the industry when building first-person shooter games, but the standard is always changing. Tip "Communication is hard because players are not here to learn; they're here to play. But if they don't learn, they will never know how to play." —Tom Smith, Senior Producer, Disney Mobile
What Makes a Killer Game?
Things to think about when teaching a player to play your game include ■
Who is the player in your game?
■
What can the player do in your game? What are the controls?
■
Why should the player do anything in your game? What are the goals and rewards?
Probably the easiest way to tell the player how to play the game is through a short briefing before the game starts. This briefing can be so short it takes up a single screen with a picture of the game controls, or so long as to be an entry level in the game itself, often called a training level. Or you could weave the instruction into the beginning levels of the gameplay, where short pop-up messages give the player hints about how to play the game, like ‘‘Press A to jump over obstacles.’’ There are some games that use these pop-up messages as gates, blocking the player from moving on in the game until the player demonstrates that she understands the control system. As in Conker’s Bad Fur Day for the Nintendo 64, the player is told how to use the squirrel tail as a propeller to jump farther and is immediately given a challenge that forces the player to do so or else she can’t escape from the waterfall’s edge. Forcing the player to show they ‘‘get it’’ is a neat way of reinforcing your message, but it can also make your players feel like they aren’t in control, robbing them of their enjoyment, and on rare occasions it can reveal weaknesses in the game interface. Show the players the ropes and then step back and let them make the big choices governing the game’s direction. Give Players Choices to Make
Part of interactive control is giving the player choices. This involves two main things to be present in your game for it to work: ■
Difficult, not easy, decisions that have to be made by the gamer.
■
Tangible consequences for making these decisions.
Tabletop role-playing games like Dungeons and Dragons are predecessors to modern video games, but a huge difference between the two kinds of games lies in the type of decisions gamers have before them. Tabletop RPGs run on the imagination of the participants, including the Game Master, in ad hoc fashion, starting with one suggested possibility and continuing open-ended. Video games
19
20
Chapter 1
■
So You Want to Be a Game Designer?
don’t have that luxury. In video games, the narrative has to be completely decided on and programmed before letting the player toy with it, so there are fewer chances for leaving anything open-ended. There is a joint partnership between you, the game designer, and your future gamer. You essentially pass off partial control of your game and its contingent story to the person who plays your game. Doing this is exciting. It is even more exciting watching your testers for the first time playing through your game missions and seeing how they make different decisions than you would to come to the same resolution. When creating decisions for the player to make, keep these simple rules in mind: ■
Keep It Interactive—No gamer likes to be ‘‘led by the nose’’ or be given the feeling they have no control over what happens to them or their avatar.
■
Make It Reasonable—Don’t ask your player to go in a door marked ‘‘Great Stuff Inside,’’ and then have a brick wall on the other side of it. Likewise, don’t ask your player to choose between getting a magnificent sword and a pile of junk, because she’ll pick the sword every time. The choices a player is given should be reasonable ones.
■
Make It Real—Don’t invent arbitrary decisions, such as asking your player if she would rather go through Door A or Door B when both doors lead to the same place. To the player, this is as bad as cheating. The best choices of all to present your gamer with are difficult ones, especially if there is a perceptible tension surrounding the outcome of the decision.
■
Make It Informed—You must give the player enough knowledge to make a proper decision when faced with it. If you leave out the fact that if she keeps the Sword of Eons, she will have to slaughter her only surviving sibling, you are sure to see a player throw a tantrum.
Tip "Most narrative forms are vehicles of expression for authors. Games, at their best, are different, allowing a level of collaboration between creator and consumer that's completely unprecedented. Everything in a game story is driven by player choice, by player action." —Warren Spector, Studio Director, Ion Storm
What Makes a Killer Game?
Make Environments Reactive
The game world must react reasonably to the game’s player. The environment, meaning the virtual world in a game, must be somewhat reactive. Having reactive environments means that the game world responds to the player in logical and meaningful ways that help immerse the player in that game world. This can mean that if the player sees a guy standing around as if he’s waiting for something, the player should be able to walk up to him (in the game) and talk to the guy to find out some information about the place the player’s character has found herself in. Or if there appears to be a weak spot in a wall, a strong enough force should be able to knock a hole in it. Or if the player sees a neat-looking door and wants to open it, she should be able to do so, or you should let her know, ‘‘This door is locked. To open it, you must find the key.’’ This empowers the player to explore the game’s environment and to treat it as if it were its own self-contained world. One of the most common complaints about early video games, especially 3D shooter games, was the lack of reactive environments. Player characters were given powerful firearms such as shotguns or M16s and could freely explore mazelike level maps, but they were restricted to only shooting bad guys in those maps. If players shot at computer monitors or TV screens or vending machines, nothing happened. Eventually enough complaints forced developers to rethink their game levels and how they could make environments react more realistically, so when a player shot a computer monitor, TV screen, or vending machine, they would break, explode into bits, or show bullet holes. This took more time coding and prepping of the environments, but it paid off in the end because that’s what players wanted. Nowadays, it’s uncommon to find a 3D shooter where you aren’t capable of putting holes through or blowing up just about anything you find in the game’s environment (except what you see Figure 1.7). This is an important lesson about what players want and what you should provide. When in doubt about whether to make the game background more interactive, always opt for the affirmative answer, although it usually means more work for you. Immerse the Player
Have you ever been playing a game when your sibling or parent came up and broke your concentration, and you realized with shock that you had been playing it for two hours straight (or more)?
21
22
Chapter 1
■
So You Want to Be a Game Designer?
Figure 1.7 Shooters nowadays even allow you to open locked doors by blasting them, except for something this formidable. I mean, come on! (Image from Silent Hill: The Room)
Have you ever been playing a game so intently you didn’t want to stop? If the answer to either question is ‘‘yes,’’ then it’s because you found a key element every game designer wants to foster: immersion. Immersion can cause addictive game play. With immersion, you get so engrossed in a game that for a while you forget it’s not real. You lose track of the outside world. You also believe the intrinsic game rules more stringently than if you were not immersed, a trick called the suspension of disbelief. Following are the different layers of depth of immersion the gamer can feel: ■
Curiosity—The player feels a slight but fleeting interest in the game.
■
Sympathy—The player is paying attention to the game but is not personally moved.
■
Identification—The player identifies with her character and has a vested interest in the outcome.
What Makes a Killer Game? ■
Empathy—Even though the characters are make-believe, the player shares a strong emotional connection with them.
■
Transportation—This is the ‘‘plenary state’’ or dream-like trance that you enter into whenever you are really playing a game intensely. The game becomes more real to you than the room you’re playing it in.
You will learn that making players care is not always easy. Perhaps to better understand how to make a game more immersive, it is first imperative to appreciate why players play games to begin with. What are player motivations? Get Players Motivated
Tim Schafer, designer of Psychonauts and Brutal Legend, once said that all games, in his view, are about wish fulfillment. Whenever a player plays a game, she is put into a fictional scenario that she cannot experience in real life, and she can delight in the wonder, newness, and thrill of it all, at least for the duration of the game. But wish fulfillment is an over-generalization of why players play games. There are multiple factors that motivate players. Let’s take a look, briefly, at just a few. As you read through these motivations, think about what motivates you to play the games you like. ■
Escapism—After a long day of real life, it is nice to escape from the mundane world and enter an imaginative, sometimes ‘‘limitless’’ universe, where the player’s character might have superhuman powers or might be in the habit of breaking the law without facing ramifications. This is known as cathartic release by doctors, and it has been shown to improve mood and calm behavior.
■
Competition—Lots of people play multiplayer online games, or MMOs, in order to compete with other players, either indirectly by gaining more tributes than other players or directly in player-versus-player (PVP) confrontations. South Korea, the most wired nation in the world, is the hub of game competition. The World Cyber Games, a sort of Olympic event for video game competitors, got its start in South Korea, and today it still converges for world finals in their part of the world. Gamers are bigger-than-life there, appearing on billboards and committing to celebrity ad endorsements to further their sponsorship.
23
24
Chapter 1
■
So You Want to Be a Game Designer?
■
Social Interaction—All multiplayer games contain strong elements of social interaction, whether they are online, LAN-based, or multiplayer console games. Players can chat with other gamers over the Internet, and even talk to other gamers by using headsets; communication runs the gamut from taunts (‘‘U noob! I pwn you!’’) to strategy discussion (‘‘You take the left flank. I’ll take the right!’’). Some gamers band together in guilds, clans, or other social groups, often to team up or to manage simulated worlds and societies. These games have also sparked a micro-economy of gamers buying and selling in-game merchandise for real-world money.
■
Creative Expression—A lot of games allow players to exhibit some form of creative (or sometimes, destructive) expression. Games like Def Jam, Dance Dance Revolution, and Rock Band allow gamers to express themselves musically, while games like Dungeon Keeper, The Sims, and Spore allow gamers to build original environments and characters to be utilized in-game. Other games, from sports to role-playing games, allow for character customization so that the player’s avatar looks as original as the player wishes.
■
Therapy—For some players, games can even be a form of therapy, and I’m not talking about catharsis, as that is part of the escapism listed previously. Some doctors are beginning to prescribe game-playing to their patients in order to relax them emotionally and to engage their hand-eye coordination for physical therapy. Patients after surgery to their fingers and hands are often encouraged to play console games, like those for the Xbox 360, because they provide recuperative powers for the digits. One game in particular, a game called Re-Mission, developed by Pam Omidyar and the HopeLab, focuses on real-time cancer simulation, where the player controls Roxxi, a powered-up nanobot destroying cancer cells in the human body. Re-Mission has shown a small but marked improvement in the psychological well-being of cancer patients who have played it—proof of mind over matter perhaps. (See Figure 1.8.)
Make Your Game Emotional
I don’t mean your game needs to be a soap opera, or even that you should make a ‘‘girly’’ game. All games can benefit from using emotion in their make-up. One of the premier ways to inspire immersion in players is by getting them to care. Once a player cares about her character, the outcome of the game, or the game’s story and/or environment, then you’ve won.
What Makes a Killer Game?
Figure 1.8 HopeLab's game Re-Mission has shown its usefulness in physical therapy.
Making players care about what happens in your game is not always easy. A radical new way game developers are approaching their trade is through emotioneering, whereby they use gamer emotions as buttons to press to make the experience more fraught, immersive, and riveting. Fashion design guru Marc Ecko broke into the game industry with Getting Up: Contents Under Pressure (shown in Figure 1.9) and has a brilliant and methodical mind when it comes to game creation. He calls games ‘‘emotional entertainment products’’ because they are the only form of entertainment that force players to interact on a closely personal and emotional level. Emotions can be used to make players care about the games they play. Tip "When emotion is added to a game, then the game will appeal to wider demographics. The game gets better press, gets better buzz, and is more likely to generate allegiance to the brand. The development team will have increased passion for the project. All this translates to increased profits and a much richer game experience." —David Freeman, Creating Emotions in Games
25
26
Chapter 1
■
So You Want to Be a Game Designer?
Figure 1.9 Marc Ecko's Getting Up: Contents Under Pressure puts the player in the shoes of a young urban graffiti artist.
Marc Ecko’s not the only game creator out there who shares this point of view. Screenwriter David Freeman started the Freeman Group, which studies the many ways you can put emotions into games. Freeman pioneered emotioneering, a cluster of techniques seeking to evoke in gamers a breadth and depth of rich emotions. These emotions not only suck the player into the game’s world, furthering immersion, but they also form steering points for the designer to guide the player through the game world. To create emotionally complex moments in your game, consider the following: ■
Force the player to do something evil or violate her character’s integrity.
■
Foster a mysterious or interesting world that takes a while to sort out.
■
Give the player ambivalent feelings toward an ally or enemy character, like loving and hating him at the same time.
■
Have the other characters recognize or refer to one another as if they were real people.
What Makes a Killer Game? ■
Have the player discover she’s been tricked or betrayed by an ally.
■
Keep the plot twists coming. Remember: ‘‘Out of the frying pan, into the fire.’’ Never have a dull moment.
■
Set the player up so that she’s helpless to aid her friends.
■
Set up incongruous events (such as when the main character of Chrono Cross suddenly switches places with the main villain and has to gain new allies after losing all his friends).
■
Sometimes provide interesting and unexpected consequences to the player’s choices.
Add Conflict to Your Game
One way to keep players involved is through conflict, which can be very emotional for the player. Chris Crawford once said, ‘‘Conflict is an intrinsic element of all games. It can be direct or indirect, violent or nonviolent, but it is always present in every game.’’ He goes on to describe why: ‘‘Conflict implies danger, danger means risk or harm, and harm is undesirable.’’ Every human being is afraid of having harm come to them. No one likes getting hurt. Even humans who are long-time sufferers, the so-called victims of learned helplessness, are not really all that keen on being hurt; they get used to the greater rewards coming from being hurt a little, not a lot. The element of conflict is simple. Conflict in gambling means the player can win and gain big rewards or lose it all, and it is the cusp of both that makes conflict so emotional. Conflict in established storytelling is straightforward. The audience is introduced to a character, made to feel something about that character, and then shown a dilemma that character faces. Whether or not the character survives the dilemma or triumphs in the end is the suspense-building conflict the writers weave into the story. The writers know that to be successful they must keep the reader or viewer on the edge of their seat in anticipation of the outcome. Video games are not so static. A game’s audience includes the players of the game, and the player is often given control of the central figure in the game’s story. This puts the audience in direct control of, and gives them an abiding interest in, the main character’s future. The audience has a more intimate
27
28
Chapter 1
■
So You Want to Be a Game Designer?
experience with the character of the game story, because that character is, in essence, them. The player’s choices directly affect the outcome of the story, too, which adds an especially juicy wrinkle to this entertainment form. But how do you create tension? What could threaten the player enough to inspire dramatic conflict within the game? Surely there will be objectives for the player to succeed at in the game, but what threats will the player face? This all depends on the game you make. Most games feature ‘‘life points’’ where, after getting hit enough times, the player’s onscreen avatar will eventually expire. This is why so many games are slammed by the media for having too much violence—the threat of bodily harm drives the conflict. It is very important to know the difference between conflict and violence because they are not one and the same. Violence in Video Games. ESRB, the Entertainment Software Rating Board, which rates games, has eight different rating definitions for violence. They are ■
Animated Blood—Discolored and/or unrealistic depictions of blood.
■
Blood—Depictions of blood.
■
Blood and Gore—Depictions of blood and/or mutilation of body parts (as shown in Figure 1.10).
■
Cartoon Violence—Violent actions involving cartoon-like situations and characters; may include violence where a character is unharmed after the inflicted violence.
■
Fantasy Violence—Violent actions of a fantasy nature, involving human or non-human characters in situations easily distinguishable from real life.
■
Intense Violence—Graphic and realistic depictions of physical conflict; may involve extreme and/or realistic blood, gore, weapons, and depictions of human injury and death.
■
Mild Violence—Mild scenes depicting characters in unsafe and/or violent situations.
■
Violence—Scenes involving aggressive physical conflict.
What Makes a Killer Game?
Figure 1.10 Some games are notorious for their in-game blood and gore, such as Running With Scissors Inc.'s Postal 2.
Note that violence is ‘‘aggressive physical conflict,’’ as opposed to being conflict in itself. Violence, therefore, is one type of conflict that can be represented in games but doesn’t necessarily have to be. When asked if a game could be truly non-violent, Warren Spector, creator of Thief: Deadly Shadows and Deus Ex: The Invisible War, said that it was frankly impossible. In his opinion, conflict implies the risk of winning or losing and that in video games it is often how many times your character gets fragged that makes the difference. In the days of coin-op arcades, the loss of their quarters was enough to make players wag their heads in shame if they lost. Today’s players are forced back to previously saved checkpoints or made to lose treasure, experience points, or tributes as their punishment for losing. The penalty has to appear large enough to threaten players to seek greater rewards within the game, and one way to do that is through violence or implied violence. What are some other ways to threaten players that do not include violence? If you think about it, games have a penalty/reward system built into them, where the player can get hurt (penalty) or gain something (reward). The simplest game
29
30
Chapter 1
■
So You Want to Be a Game Designer?
is one where a player wins ambiguous score points for doing well in the game and loses those same score points for not doing so well. That being said, what you rate as ‘‘doing well’’ or ‘‘not so well’’ are dependent on you, the game designer, as long as you impart that difference to the player. Therefore, you could have a completely non-violent game that does not upset anybody and still have a fun game. Tip "The very best games are the ones where you have to figure out what the object is. The trick is to provide direction subtle enough that it's not perceived immediately. Theme parks have that, too. When you enter Disneyland, you don't know the Sleeping Beauty Castle is your objective, but there's no doubt when you're in Town Square that you should be walking up Main Street, USA. Just like in a great game, you always have an idea that you need to go this way or that way. Eventually you catch on to the themed worlds and the central hub." —Danny Hillis
Make Your Game Challenging
A real game wouldn’t be a game if it didn’t offer the player a challenge as well as a reactive environment, immersive world, and interactive control. The types of challenges games offer vary widely, from the accumulation of resources to intellectual challenges to self-preservation. Many challenges are staples of the game genres they belong in; others fit with the gameplay and are thus included. Most of the time, challenges take the form of obstacles that must be overcome. Either the player’s character faces hordes of hungry zombies shuffling along a grainy windswept city street, or the player’s character is trapped within a ski lodge during a blizzard while a serial killer erases all of the player’s in-game allies one by one. Types of Game Challenges
The most common game challenges include the following: ■
Gates—Gates, also called lock mechanisms, fence the player in, preventing access to some area or reward in the game world until that moment when the player beats the challenge and unlocks the next area or recovers the reward. The simplest and most prosaic gate is a locked door. The player is so familiar with this kind of gate that she knows to immediately start looking for a key to unlock it. Some gamers are fed up with the overuse of locked doors, however, so use them sparingly. For example, did you know that
What Makes a Killer Game?
Silent Hill: Origins features over 133 locked doors? That’s way too many! Blood locks are another kind of gate. In a blood lock, the player is locked within a single area with lots of foes to defeat, and the exit from the area will not appear until the player destroys all oncoming enemies. ■
Mazes—Below-average gamers can get lost in standard game levels, so making the level more difficult to get through by adding in lots of twists, turns, and dead-ends might quickly make for a player headache. On the other hand, if you use it wisely, a maze can become a wonderfully entertaining way to break the monotony of locked doors.
■
Monsters—Battles with monsters typify the combat mechanic in many games, including fighting games, shooters, and role-playing games. As classic as the gateway guardians of mythic lore, monsters are another form of obstacle to be overcome, and always with a reward. The toughest of all are the ‘‘boss monsters’’ that pose the largest threat in a level.
■
Traps—Traps are a hodgepodge of suspense, scenery, and intrigue. Good traps can have whole stories behind them. Give some thought to each and every trap you place. Traps, like monsters, have become a staple of popular games ever since the days of pen-and-paper games like Dungeons and Dragons. One of the earliest games to showcase traps was Atari’s Pitfall in 1982. In it, the player character Pitfall Harry had to leap or swing over tar pits, quicksand, water holes, rolling logs, crocodiles, and more. In the 2005 Tecmo game Trapt, the player used Princess Allura’s magic powers to set traps for the bad guys chasing her to escape capture. And Zombie Studios, late in the film series life, reprised the character concepts from Saw to make a Saw game, featuring gruesome traps and puzzles just like the movies (see Figure 1.11).
■
Quests—These are special sets of challenges that take place in both stories and games, thus linking narrative and play. Quest games, like the King’s Quest series, have quests that make up activities in which the player must overcome specific challenges in order to reach her goal. When the player successfully surmounts the challenges of the quest and achieves the goal, it unlocks another part of the game story. As Jesper Juul explains in Half-Real: Video Games Between Real Rules and Fictional Worlds, ‘‘Quests in games can actually provide an interesting type of bridge between game rules and game
31
32
Chapter 1
■
So You Want to Be a Game Designer?
Figure 1.11 Zombie Studios' Saw game follows Detective David Tapp, who awakens in a metal chair with a reverse bear trap affixed to his head.
fiction in that the games can contain predefined sequences of events that the player then has to actualize or effect.’’ Many standard action or shoot-’em-up games, including 2K Games’ BioShock, have implemented quests to reveal narrative and create further depth of player experience. ■
Puzzles—Aside from actual puzzle games like Bejeweled and Tetris, puzzles can be used to further the game story or as short games within a game. Some puzzles are cryptographic or clue-driven in nature, where the player must supply a crucial bit of info, such as a password, key code, whodunit, or similar, to pass by a guard, a locked door, open a wall safe, or close the case. To figure out what the code/password/other is, the player must search for clues. These clues are often left lying around in convenient journals, computer e-mails, tape recordings, or can be found by talking to people.
The Game Loop
The most common way players handle difficult challenges is what Andrew Glassner calls the Game Loop (a cycle or repetitive steps the player takes to win a game challenge): 1. Player observes the situation. 2. Player sets goals to win the challenge.
What Makes a Killer Game?
3. Player researches or prepares. 4. Player commits to a plan and executes decisions. 5. Player stops and compares the results of his actions to his original intention. 6. Player evaluates the results. 7. Player returns to step 1. If you’ve ever taken a science class, the Game Loop may sound kind of familiar. This is because the Game Loop, which gamers have adopted over years of playing video games, is identical to the scientific method. Scientists use the scientific method to analyze hypotheses. Players use the Game Loop to win games. Seasoned players know that they are not playing the game, but that they have to play against the game’s underlying programming. Most of the cheats you find on the Web have been discovered by sharp analytical gamers who figure out what the developers missed. Tip "You're always trying to find the right level of challenge. You can't be too simple or it's not fun. [ Nolan] Bushnell's famous quote is something along the lines of, 'A game should be easy to pick up and impossible to master.' We want that sweet spot where there's always another threshold to cross. In Halo 1, as we improved targeting, we found it was too intelligent and too simple. It was pretty straightforward for the Bungie team to fix that." —Dennis Wixon, Microsoft Games Studios
Competition
Some games may be competitive as well as challenging. There are several different types of competition in games, from playing solo (or solitaire) to playing co-op (or in cooperative teams) to playing against one another in a free-for-all. Not only does competition satisfy one popular player motivation, but it also sits well within typical gameplay mechanics. There are also some games, such as Chess, which are zero-sum games; zero-sum means that there can be only one winner. If you are playing Age of Empires and your goal is to acquire the most resources in your campaign, only one player can acquire the most resources. This makes the game a zero-sum game.
33
34
Chapter 1
■
So You Want to Be a Game Designer?
Chance
Chance is that slim margin of luck that can make the gamer a winner or loser. However, chance is not a vague whimsy. The following are types of chances you find in games: ■
Calculated Risk—The player knows there’s a 50/50 chance and takes it.
■
Built-In Chance—The game’s developer sets up parameters for the computer to calculate random odds of the player winning.
■
Player Error—The player or one of his allies makes a mistake and pays for it.
■
Opponent Error—The opponent makes a mistake and the player makes sure he pays for it.
■
System Error—The player discovers a brief flaw in the system and monopolizes on it, winning by cheating. Or the player is betrayed by a computer error setting him back in the game.
No matter the type of chance, luck plays a significant role in the outcome of a game’s challenges.
The Four Fs of Great Game Design There are Four Fs of Great Game Design, or 4FOGGD, that are listed in order of priority and should be considered whenever you have to make any design decision—they ensure that the game you build will be fantastic. The Four Fs of Great Game Design are Fun, Fairness, Feedback, and Feasibility. Fun Tip "I still think that people who make their own games still forget that it's supposed to be fun. I still play enough games where I'm really into it, and there's something just amazingly frustrating. Never give your player a reason to put your game down." —Todd Howard, Bethesda Softworks
Games are intended to be fun by their definition. Fun is a word often synonymous with play. Fun is a short and simple word, easy to spell, and it is innate.
What Makes a Killer Game?
Even the smallest child will begin inventing his or her own personal game when bored, an innate instinct meant to stave off ennui. The complexity and character of people’s games evolve with their age and mental acuity. A game that outreaches a participant’s age or understanding will quickly tire the participant and leave her bored. A boring game is no fun at all, as boredom is the antithesis of fun. Give your players a fun, fresh, and original experience, one that is sure to encourage replaying and word-of-mouth advertisement, and you’ve done your first duty as game designer. If your game is the slightest bit offbeat, offers cathartic release, or is irreverent and funny, it will get played. Games can seem like hard work and can sometimes be frustrating to play, but players are willing to put in as much work as required if they get back enough high-quality fun. Fun is what games are all about (see Figure 1.12). If you find that your game is not providing the player with high-quality fun, you have to stop, rewind, and erase what you’re doing right now and start building your game on the premise that every part of it has to be fun. A typical rule of thumb when making games is, if you are not having fun making the game, then your players probably won’t have fun playing it. Enjoy what you do.
Figure 1.12 For some, letting off a little steam can be fun. (Image from Atari's 2007 Bullet Witch)
35
36
Chapter 1
■
So You Want to Be a Game Designer?
Fairness Tip "Play is supposed to be the opposite of work, but most video games are just jobs with a little bit of fun thrown in. These games can leave players feeling abused, frustrated, and overly aggressive. Your game can either irritate or alleviate. Which would you rather do?" —Duane Alan Hahn, Game Aficionado
A player’s time must be respected. A great game should offer the quickest, easiest ways to have fun and accomplish all the challenges—unless there is some really entertaining reason to prevent it. Make all the player’s choices clear. If the player is asked to make a decision, she must be given enough information to make an informed one. Frustration can be a healthy motivator in games, challenging core gamers to achieve greater heights for themselves, but frustration can also lead to anger and throwing the game controller or beating on the keyboard to vent that anger. Playing fair with your player equals better rewards in the end. Do not force gamers to repeat complicated moves in the game or learn their lesson by seeing their character die over and over again. Endless repetition can be absolutely maddening, so don’t let your player fall into a rut. Never set the player up so that she has to perform a knotty set of maneuvers to get her character avatar to the top of a 100-foot platform, only at the last minute having her fall all the way back down to the bottom and making her start all over again. Likewise, don’t kill the player’s character off suddenly or inexplicably without giving her a heads-up as to why. Avoid meaningless repetition or wrist-slapping such as this. A player’s experiences through the game should always feel new, yet the player should never know ahead of time what is coming. Avoid frustration by making the game easier for the player. Don’t remove challenges from the game completely, but relieve the build-up of tension that could potentially lose the player’s attention. Feedback
If the player does something right, give the player a reward. Give that player a Twinkie! If the player does something downright stupid, show her that it was wrong to try that particular action: punish her. Video games are all about pushing a player’s
What Makes a Killer Game?
buttons. A game world is little better than a Skinner Box, and if you know anything about psychoanalytic theory, you will do just fine in the game industry. Feedback is just one of the primary components of the human-computer interface. Providing the player with adequate feedback will help the player know what to expect out of the game and frames the choices she will make from then on. However, there are two critical rules of thumb to use with regard to punishments and rewards. First, you should have your punishments and rewards fit the actions and environment, and you should always be consistent with your use of them. Second, you should make your punishments and rewards happen immediately so the cause-and-effect relationship is reinforced. A player is eager to know that they are doing something right or wrong so they can adjust their play style and master the game. They listen for the bells and whistles to instruct them in how to play better. You can use this knowledge to your advantage by creating a better game. Don’t hold back too long on the carrots, or your player will eventually give up. If you want the player to defeat all the Orcs in a single level of the game, you have to give that player some reason for doing so; and when she does beat the Orcs (especially depending on how long and hard it takes to do so), you have to give her some really significant reward, like loud fanfare, gold coins, or power-ups. Likewise, if you don’t want your player to do something, like hack up innocent bystanders, you have to set up punishments. Feasibility Tip "I would say simplicity is a key factor in any good game design—simplicity in interface, game systems, etc. Simplicity does not have to mean few possibilities (just look at chess), but creating a really good, well-balanced, simple game system is a much harder task than creating a very complex one." —Thorolfur Beck, Founder, CCP
Encourage player immersion whenever and wherever you can in your game. To this end, avoid inconsistencies and a little terror called feature creep. Feature creep happens when a game designer gets too close to his project and begins adding ‘‘neat features’’ that really add nothing to the game or do not fit with the original game concept. Keep your games simple. Anything goes as long as it’s fun, fair, provides adequate feedback, and makes sense.
37
38
Chapter 1
■
So You Want to Be a Game Designer?
You might say, ‘‘Most games don’t make a whole lot of sense!’’ I understand that. Take Super Mario Bros., for example. You play an overweight plumber who runs around killing strolling mushrooms and kamikaze turtles by squishing them with his own body weight. Meanwhile you have to navigate giant pipes and flaming pits in a world full of titanic toadstools and platforms in the clouds, all to face off with a giant redheaded turtle to win a princess in pink named Peach. The game doesn’t try to make a lot of sense, but it is fun as well as consistently feasible. If you set up your game so that yellow coins give the player boosts to her health, then every time the player sees a yellow coin, she will try to reach it. If suddenly coins start doing the opposite of what is expected with no good reason (in this scenario, start hurting the player), then the player will grind her teeth in frustration. As Atari veteran Mark Cerny puts it, ‘‘Keep the rules of the game simple. Ideally, first-time players should understand and enjoy the game without instructions.’’ Keep your game rules simple and consistently feasible. Accepted Game Genres
Now that you have learned the Four Fs of Great Game Design, let’s look at what games are ‘‘inside the box’’—the game types that have become traditional genres—and what they are made of. Tip "I tend to de-emphasize genre in my designing and thinking. I feel that genre is a bit of a doubleedged sword for designers. On one hand, genres give designers and publishers a common language for describing styles of play . . . . On the other hand, genres tend to restrict the creative process and lead designers toward tried-and-true gameplay solutions. I encourage students to consider genre when thinking about their games from a business perspective, but not to allow it to stifle their imagination during the design process." —Tracy Fullerton, Assistant Professor, Electronic Arts Interactive Entertainment Program at USC School of Cinema-Television
Action Games
Action games are made up of all the kinds of games where the player’s reflexes and hand-eye coordination make a difference in whether she wins or loses. The most popular action games include the following:
What Makes a Killer Game? ■
First-Person Shooters—Seen through the eyes of the main character, these games focus on fast-paced movement through detailed game levels, shooting and blowing up everything in sight (see Figure 1.13).
■
Third-Person Shooters—The player sees the action through a camera, which is aimed from behind the main character or over its shoulder. These games still focus on shooting and blowing stuff up, but the character is always visible onscreen and may have additional controls for actions like jumping, climbing, and performing martial arts.
■
Platform Jumpers—The player’s character is seen onscreen, sometimes from a side angle. The action no longer focuses on shooting and blowing up bad guys; instead, the main action focuses on the character running and jumping from one platform to the next in a fast-paced animated world.
■
Racing Games—Racing games feature fast vehicles along nasty tracks and difficult terrain in an all-out race to the finish line.
■
Sports Games—Featuring rules and scenarios just like the real-world counterpart games, sports games focus on (what did you expect?) sports. Popular sports found in video games include golf, soccer, basketball,
Figure 1.13 2K Games' drippy BioShock 2 is a classic first-person shooter with puzzle, quest, and role-playing elements to set it apart.
39
40
Chapter 1
■
So You Want to Be a Game Designer?
football, volleyball, and baseball, but any pastime can be a prospective electronic game. ■
Fighting Games—Fighting games have the player competing against a single opponent in an arena, where they must duke it out using feet and fists in elaborate combination moves.
■
Stealth Games—For those players who don’t like to rush into battle, there are games that reward the players for sneaking into and out of places without being seen and striking silently.
Adventure Games
One of the first original computer games ever made, with a history as far back as Zork and King’s Quest, adventure games primarily focus on story, exploration, and mental challenges. Most, if not all, adventure games don’t even have violent combat in them. Many are mystery games, forcing players to put clues together, like jigsaw pieces, to unravel secrets, while others are point-and-click puzzle games (see Figure 1.14).
Figure 1.14 Players help the little robot in Amanita Design's adventure game Machinarium.
What Makes a Killer Game?
Role-Playing Games
Role-playing games, or RPGs, got their start in pencil and paper in the 1970s with Gary Gygax’s Dungeons and Dragons. Since the first teens started with ‘‘I want to be a wizard!’’ to today’s more complex computer role-playing games, like Neverwinter Nights, Asheron’s Call, World of WarCraft, and EverQuest, players have enjoyed the pretend worlds RPGs offer because of the level of immersion capable in them (see Figure 1.15). Players create their own characters from scratch, and the goal of the game is often making their characters stronger and finding better weapons. One of the main resources you see in almost every RPG is Experience. Players get Experience for completing missions and beating monsters, and they spend
Figure 1.15 Assets such as those seen in role-playing games are available for download for Torque 3D from Arteria 3D (www.arteria3d.com).
41
42
Chapter 1
■
So You Want to Be a Game Designer?
Experience to raise their character’s skills or gain new powers. Another popular part of RPGs is communicating with non-player characters, or NPCs, through multiple-choice conversations called dialogue trees. Depending on what players decide to say to NPCs, they might make friends, or they might find the NPCs rushing them with swords drawn. Strategy Games
Strategy games envelop a great deal of mental challenge–based games, including real-time strategy (RTS) games, turn-based strategy (TBS) games, and construction-management simulations (CMS). In each, the core play has the player building an empire, fortress, realm, world, or other construct, managing the resources therein, and preparing against inevitable problems like decay, hardship, economic depravity, revolution, or foreign invaders. Other Game Genres
Besides the genres already mentioned, there are many more: ■
Casual Games—Chess, Poker, Texas Hold ’em, Solitaire, mah-jongg, trivia games, and others share a clustered category under casual or traditional games.
■
Online Games—Any game played through an Internet connection, including Xbox LIVE Arcade games, are considered online games. Ones with lots of players joining together in a co-op or versus modes in the same game realms are called massive multiplayer online games, or MMOs.
■
Artificial Life Games—The player of an A-life game cares for a creature or virtual pet. In Nintendogs, players can feed, play, and care for virtual canines.
■
Puzzle Games—These games never have much of a story. Instead, they focus on mental challenges alone. Popular examples include Bejeweled and Tetris.
■
Serious Games—Serious games are a serious business; many of them are educational games, which help schools teach subjects in the guise of having fun, or they can be training games, helping companies to instruct their employees in specific tasks.
What’s Next? Tip "One of the more interesting trends today is the plethora of 'mixed-genre' games. It seems that one way to mitigate risk, while still trying to innovate, is to take several popular genres . . . and mix them to create a new style of game. Deus Ex is a great example of this hybrid." —Tracy Fullerton, Assistant Professor, Electronic Arts Interactive Entertainment Program at USC School of Cinema-Television
What’s Next? Now that you’ve learned what being a game designer is all about, how games are developed, and what goes into making a killer game, let’s look at the software technology you’ll be using, Torque 3D, and how you can use it to make your very own games.
43
This page intentionally left blank
chapter 2
Torque 3D: Under the Hood
Tip "Torque is a complete game solution—not just another rendering engine. Rendering engines are easy. You do one thing, and you do it well. It starts getting challenging when you support multiple platforms (Mac/PC/Linux/others TBA), multiplayer (2 to 256þ players), a master server, physics, scripting, resource management, rendering, particles, GUI, terrain, interiors, meshes, multitrack animation, LOD, skies, water, fog, lens flares, sound, WYSIWYG tools (GUI editing, world editing, terrain builder), etc., etc., all running smoothly and efficiently together . . . whew!" —Rick Overman, GarageGames
GarageGames is an Internet game publishing company based in Eugene, Oregon. The founders, including Damon Slye, Jeff Tunnel, Rick Overman, and Tim Gift, previously ran a game development company called Dynamix that got started in 1984 and made games such as Earthsiege, Starsiege, Tribes, and Tribes 2. The Torque Game Engine, or TGE, was a modified version of a 3D computer game engine originally developed by Dynamix for their 2001 first-person shooter game Tribes 2 (shown in Figure 2.1). TGE is no longer sold, as it was superseded by Torque 3D in 2009, following significant changes to the software, and was modeled after GarageGames’ impressive Torque Game Engine Advanced package. Torque 3D is one of the most comprehensive and affordable game engines on the market today, and a license to use it is available from GarageGames (www.torquepowered.com). 45
46
Chapter 2
■
Torque 3D: Under the Hood
Figure 2.1 Dynamix' Tribes 2 was so popular it was later purchased by Sierra On-Line.
GarageGames’ name (see Figure 2.2) is purposefully based on the term ‘‘garage band.’’ As mentioned in the ‘‘What About Indie Game Design?’’ section of Chapter 1, many game companies start as ‘‘garage outfits’’ by a bunch of friends getting together to create entertaining indie titles for fun and not so much for profit. The primary mission of GarageGames is to offer the licensing of game engines and publishing to these indie developers and to increase the spread and prosperity of indie game developers, which includes you!
Why a Game Engine? To see why Torque 3D is so useful, it’s first important to know what a game engine is and how it works. If you have ever used a game map editor or built a mod for a game before, you’re ahead of the rest. If not, then most of this information will probably be new to you. A game engine is a software system designed for the creation and development of video games. There are many game engines designed to work on video game consoles and desktop operating systems. Most game engines include a rendering
Why a Game Engine?
Figure 2.2 GarageGames' logo.
engine for 2D/3D graphics, a physics engine or collision-detection system, sound, scripting, animation, artificial intelligence, networking, streaming, memory management, threading, localization support, and a scene graph. The process of game development is frequently economized by reusing the same game engine to create many different games. For example, one of the oldest and most popular game engines commercially is the Unreal Engine, which is now in version 3. The Unreal Engine was first developed for and is still used today in the Unreal game series, but it has also been sold to and used in games as widespread as Red Steel, Turok, Batman: Arkham Asylum, BioShock, BioShock 2, Borderlands, Mass Effect, Harry Potter and the Philosopher’s Stone, and Vampire: Bloodlines. A commercial license of the Unreal Engine, however, carries with it a hefty price tag. According to Epic’s new licensing terms, a commercial license of the Unreal Engine costs $2,500 per seat every year, plus 25% of all income generated after the first $5,000 earned. That’s astronomical to most indie developers. There is no one software package to make a game with. You can’t open up a program, click a few buttons, and have a game created. Games require not only
47
48
Chapter 2
■
Torque 3D: Under the Hood
game engines to simplify the coding and implementation, but they also require multiple programs working together seamlessly in what’s called a pipeline. Most game development pipelines include the following: ■
A 2D art editor (like Photoshop) to make the user interfaces, sprites, and textures.
■
A 3D art editor (like 3ds Max or Maya) to make the models, such as characters, buildings, weapons, and vehicles.
■
An audio recording editor (like Audacity) to make sound effects and music.
■
A game map editor to make the levels and terrains.
■
A script editor to customize the game’s programming.
■
A game engine that puts it all together and runs the game.
As this shows you, there are a lot of different tools that go into making a game. As you witnessed in Chapter 1, ‘‘So You Want to Be a Game Designer?,’’ there are a lot of different roles you take on as a game designer, each one requiring a special skill set, and many of these skill sets correspond to different parts along the pipeline. The attention is in the details. Mostly a game designer has to learn patience and fortitude because game design is not as easy as it looks. Creating just the right 3D model or bitmap texture map can take hours or even days, and testing them to see how they relate to the game world by dropping them into the levels and running the engine can be an arduous task, but in the end the amount of time and preparation always pays off. With a little know-how and the proper tools, however, you, too, can learn to master each of these areas of the pipeline and construct your very own games, with or without help. To speed things along, you’ll use the Torque 3D game engine, which is its own personal software development kit, or SDK.
Torque 3D Features Your first impression might be that Torque 3D appears to target the making of shooter games, but this belies the true power of Torque. Sure, you can make a shooter game, and you will, following the tutorials in this book, but you can also create a game of any genre.
Torque 3D Features
Torque 3D has the following features; if there are any that you are unfamiliar with or don’t understand, bear with me, because they’ll be explained in more detail later on (this is simply a brief overview of Torque 3D features). ■
Provides robust scripting, networking code, in-engine world editing, and GUI creation. The source code can be compiled on Windows, Macintosh, and Linux platforms. With a license of Torque 3D, you can fully customize the script. You can also integrate third-party middleware, such as physics and sound systems.
■
Uses TorqueScript for its coding. If you know Flash ActionScript, Visual Basic, or any other scripting language, you will have no problem coding in TorqueScript to make your game. It is easy to learn and flexible.
■
Allows you to publish games directly to the PC, Macintosh, Xbox 360, Wii, iPhone, or on the Web. (Torque 3D supports all major Web browsers, including Internet Explorer 7, Firefox, OS X, and Chrome.) You have the power to distribute games almost anywhere they are played, in fact. This versatility is really comprehensive.
■
Torque 3D’s World Editor provides an entire suite of what-you-see-iswhat-you-get (WYSIWYG) tools for designing and editing a game. The World Editor is fully integrated with the Torque runtime and provides full access to all Torque subsystems, allowing for terrain editing, shader definition and application, river and road creation, and more.
■
Supports the loading of COLLADA files, which are currently supported by every heavy-hitting 3D art tool, including 3ds Max, Maya, XSI SoftImage, Blender, and more. Torque’s Live Asset Update feature automatically updates any of these art assets in a project while they are edited and saved in a third-party application, even while you play the game.
■
Features a terrain engine that automatically creates LODs (levels of detail) of the ground surfaces so that it renders the fewest polygons necessary at any given time. Textures applied to the terrain can be blended together seamlessly.
■
Supports loading of 3D models in the DTS and DIF file formats. DTS models can be animated using skeletal animation or morph target
49
50
Chapter 2
■
Torque 3D: Under the Hood
animation; thus DTS models are typically used for characters and vehicles. DIF models have pre-calculated lighting, so they are less suitable for animation. ■
The game’s rendering engine features Gouraud shading, environmental mapping, volumetric fog, and many other effects, such as decals. (For example, if a player in a Torque-made game fires a weapon that leaves a bullet hole in the wall, the bullet hole is a decal.)
■
Torque 3D has been used to make both non-networked single-player games and networked multiplayer games. Torque 3D is both single-player and multiplayer ready. It is based on standard client-server architecture and is fully scalable.
■
Torque 3D has several starter kits for beginners. These starter packs can be modified to suit your needs, or you can start from scratch.
■
Supports a networked community of over 150,000 developers who use it. Many of these developers can help you if you get stuck, share some of their custom-created game content, help you find jobs, and share code secrets with you.
Okay, you should be forewarned. Torque 3D is a software development kit (SDK) and is therefore somewhat daunting at first impressions. It has lines of code after lines of code, lots of source files, libraries, demos, kits, resources, and multiple communities that drive it. It is flat out huge. Yet that’s what makes it the powerhouse it is, and when all is said and done, you can manage it and put yourself in the game designer’s chair. Torque 3D licensees receive one of the best support communities on the Web any indie developer could hope for. The community forums at www. torquepowered.com/community are really well attended, the staff and individuals are knowledgeable, and the GarageGames site provides excellent resources, including scripts, code snippets, links online, reference material, books to help you out, and so much more. The Torque 3D documentation site at http://docs.torquepowered.com/torque3d/official/ is absolutely superb and driven to providing you with all the help you need to get started, too.
Games Made with Torque 3D
Figure 2.3 Reiss Rascals Games at the 2005 IGC.
Spotlight on Reiss Rascals Games "My name is Randel Reiss, and I am one of the partners of Prairie Games, Inc, makers of the first indie MMORPG Minions of Mirth—based on GarageGames' Torque Game Engine. [In 2005], I took my two sons, Kyle and Connor, ages 13 and 11 years old, respectively, at the time, to the 2005 Indie Games Conference (IGC) in Eugene, Oregon. The conference was sponsored by GarageGames. The key reason why I took my sons there was because they had started their own garage-based game company, which they still run, called Reiss Rascals Games. They've fluently been using MilkShape 3D to create models, textures, skeletons, animations, and even rigging (rigging is pretty advanced, as you may know)—then importing them into Torque for their own games. At the conference, the youngest attendees to date, they showed their latest work to the well-known video game industry producer, Tony Ramos. Tony has produced games for Electronic Arts, Sony, and Sega. During their demonstration, Mark Frohnmayer, then president of GarageGames, original founder and the original lead engineer for Tribes and Tribes 2, sat in on the presentation." (See Figure 2.3.) —Randel Reiss, Prairie Games, Inc.
Games Made with Torque 3D Torque has consistently ranked high on the Top 10 Commercial Engines listed on DevMaster.net. Game designers have been proving time and again that
51
52
Chapter 2
■
Torque 3D: Under the Hood
Figure 2.4 Just a few of the games made with Torque 3D.
Torque works, making the list of games created using Torque an exponentially growing one (see Figure 2.4). At the time of this writing, the list of game titles made with Torque Game Engine or Torque 3D includes the following: ■
Ace of Aces
■
Age of Time
■
Blockland
■
Buccaneer
■
Dark Horizons
■
Desert Gunner
■
Dimenxian
Games Made with Torque 3D ■
Dreamlords
■
Fallen Empire Legions
■
Golden Fairway
■
Hinterland
■
Lore
■
Magecraft
■
Marble Blast
■
Minigolf Mania
■
Minions of Mirth
■
Once Upon A Time
■
Orbz
■
PCD Music Lounge
■
Penny Arcade Adventures
■
Rev
■
Rokkit Ball
■
Sachi’s Quest
■
Shelled!
■
Shokrok Throwdown
■
The Destiny of Zorro
■
ThinkTanks
■
TubeTwist
■
Ultimate Duck Hunting
■
Wildlife Tycoon: Venture Africa
53
54
Chapter 2
■
Torque 3D: Under the Hood
Licensing As of the time of this writing, Torque 3D is just $100, and Torque 3D Professional, with full source code enclosed, is right at $1,000. The difference between the two is that Torque 3D is binary-only, so it lacks the customizable source code to the engine. You are more limited in what you can create, but that difference is negligible unless you’re a professional programmer. I would stick with the $100 license, if you decide to purchase at all. Torque 3D also requires you to display the GarageGames logo before your game starts up, though this requirement is omitted if you buy the Professional license (the one for $1,000). Either of these two SDKs can be purchased from the GarageGames website at www.torquepowered.com/products/torque-3d. The Torque 3D demo is available from the GarageGames website and from the companion website for this book. One stipulation of the Torque 3D end-users license agreement, or EULA, is that the developer purchasing the game engine cannot be employed by a development company with annual revenues of $250,000 or more. You probably don’t own a game company that made $250,000 last year—do you? No. So you don’t have to worry about the stipulation! The Torque 3D licensing model is intended for low-budget designers, as it saves them time and effort of programming their own game engine without requiring a large amount of money to license. Compare that $100 to the $350,000 you would have to pay for the Unreal Engine 3! You pay no royalties ever with the Torque royalty-free licenses. You can publish your game anywhere you want, whether it’s on the Internet or in stores. It’s your game—you make the decisions. Tip "The general perception in the industry is that the more you pay, the better the product you get. The extra cost buys you, among other things, higher quality, responsive technical support, proper documentation, and so on . . . . So, if you can live without the mothering support that other middleware providers offer, [ Torque] really does measure up in just about every other area. You get the full source code, a rapid response on bug fixes and issues, and tools and technology that are comparable to other costly middleware packages." —Justin Lloyd
Other Torque Products to Consider
Other Torque Products to Consider Torque 3D is fine for what we want to use it for in this book, namely to create a 3D action game, but Torque doesn’t stop there. The folks at GarageGames have several other Torque products, each one suited for a specific project in mind, which you should take a look at. For instance, if you want to make a game sidescrolling platformer in 2D, you’d be better off using Torque 2D, and if you want to make a game for the iPhone, then iTorque is right up your alley. What follows is just a quick overview of GarageGames’ other popular products.
Torque 2D Torque 2D, also called the Torque Game Builder (TGB), is a separate game engine designed for 2D games. It is based on the Torque core architecture but customized for 2D gameplay (see Figure 2.5). TGB can be used to develop games for Windows or Macintosh, and with an additional license, you can also develop games for the Wii, iPhone, or Xbox 360. If you want to make classic retro games in 2D, TGB might be more up your alley than using Torque 3D, which is targeted toward 3D game creation. TGB also features some optimized starter genre packs, including an Adventure Kit, a
Figure 2.5 Torque 2D.
55
56
Chapter 2
■
Torque 3D: Under the Hood
Platformer Kit, a Kart Kit, and more. You can find downloads and more information about TGB at www.torquepowered.com/products/torque-2d. TGB has been used to develop a number of commercially published games, including the following: ■
Alchemist
■
And Yet It Moves
■
ArchMage
■
Astro Bugz
■
AstroRaider
■
Attack of the Creeps
■
Attack of the Dust Bunnies
■
Balloon Bliss
■
Balls Away
■
Be a King
■
Bee Oh Bee
■
Bikini Poker
■
Boot Wars
■
Bubble Warrior
■
Buggle
■
BuggOut
■
Bumble Tales
■
Caribbean Hideaway
■
Crunch Time
■
Defend and Defeat: Kingdoms
Other Torque Products to Consider ■
Defender Dib
■
Deltoid
■
Dragon Hatchery
■
Drums Challenge
■
Enchanted Gardens
■
Fix-It-Up: Kate’s Adventure
■
Flower Stand Tycoon
■
Fortune Tiles
■
Gold Fever
■
Grimm’s Hatchery
■
Hackers of 2073
■
Hospital Havoc
■
Insanely Twisted Shadow Planet
■
Larva Mortus
■
LEGO: Bricktopia
■
Mass Effect Galaxy
■
Ninja Rally
■
Phantasia
■
Puzzle Poker
■
Rack ’em Up Road Trip
■
Raycatcher
■
Restoring Rhonda
■
Sushi Frenzi
57
58
Chapter 2
■
Torque 3D: Under the Hood
■
The Pirate Tales
■
Toki Arcade Remix
■
Trick Bal
■
Turtix
■
Yard Sale Junkie
iTorque 2D Making games for the Apple mobile iPhone is a snap using the Torque 2D tools. With Torque Game Builder Pro, you can create any project you like and deploy it to the iPhone. You get all the same TGB features but optimized for iPhone usage, including PowerVR Texture Compression (to make your graphics as smooth and fast-loading as possible) and multi-touch and accelerometer input support.
Console Game Development Besides making games for the computer or iPhone, you can use Torque to make games for the most prominent game consoles currently on the market, including the Nintendo Wii and Xbox 360. T for Wii
Torque for Wii, or T for Wii, is a proven hardware-optimized branch of Torque engine technology. It enables the deployment of Torque 3D/2D games to the Nintendo Wii console. Use all of Torque’s tools to make your game, then test it on the Wii with just one development kit. T for Wii is built to natively load Torque games (see Figure 2.6) and supports targeting disc-based titles or those for the WiiWare downloadable channel. Torque 360
Torque 360 is the most widely used engine to date for publishing titles on Xbox LIVE Arcade. Torque 360 is a proven hardware-optimized branch of Torque engine technology. It enables the deployment of Torque 3D/2D games to Microsoft’s Xbox 360. Use all of Torque’s tools to make your game, then test it on the Xbox 360 with just one development kit. Torque 360 is built to natively load Torque games and supports targeting disc-based titles or those for the Xbox LIVE Arcade site.
Other Torque Products to Consider
Figure 2.6 Destiny of Zorro is one of many Torque-made games exported to the Wii. Use the WiiMote to swashbuckle your way to justice!
Torque X
Torque X is designed from the ground up to harness the power of Microsoft’s XNA. Written entirely in C# (pronounced ‘‘see sharp’’ or ‘‘C sharp’’), the result is the most powerful C# game engine ever built. You can code all of your games in C#, then run your games in Windows or on your own retail Xbox 360 using XNA Game Studio 3.0 and XNA Creators Club. Torque X is loaded with systems that make debugging, journaling game events, and testing features easier than messing with XNA Game Studio 3.0 by itself. Torque X is built on XNA for deployment on PC and the Xbox 360. Reach millions of Xbox 360 owners by creating your game with Torque X and posting it on the XNA Community Games Channel for anyone to play. Choose from Torque X 2D or Torque X 3D (see Figure 2.7), depending on which kind of game you’d prefer to make.
59
60
Chapter 2
■
Torque 3D: Under the Hood
Figure 2.7 In the Torque X 3D game Box Macabre, from Perfect Dork Studios, you play a soul trapped in a box who must jump, swing, roll, and fly to find the key to salvation.
To read more about the XNA Game Studio, go to www.xna.com. To read more about the XNA Creators Club, go to http://creators.xna.com. C# is its own code language. To find out more about it, including a list of books and tutorials that will help teach you C#, go to www.csharp-station.com.
Components of Torque 3D Torque 3D is ready right out of the box to make games. Its looks may be deceiving, because so many components are hidden and context-relevant. Following are some of the most important components Torque 3D comes with that you’ll be using in later chapters.
World Editor Toolset Torque 3D contains a whole suite of visual tools designed for rapid iterative development. Rapid iterative development means you can add this feature or that, test it, and if it doesn’t work, you edit it or delete it and move on. It’s a fluid and, some might say, intuitive development process. The Torque 3D editors can be
Components of Torque 3D
used to manipulate objects and terrain in-game so you can quickly see what elements work and what don’t, tweak your game while playing it, and polish your project to the nth degree. Torque’s World Editor toolset includes the following: ■
Terrain Editor—You can sculpt terrains interactively just like sculpting with clay, or you can import height fields generated in other applications for instantaneous terrain generation.
■
River/Road Editor—Make rivers or roads with just a few mouse clicks. Define the path you want your river or road to take, adjust its height, add bends or curves wherever you like, and presto! You have a river or road that blends seamlessly with your terrain and looks realistic.
■
Particle Editor—Edit and create particle effects to simulate a variety of environmental and gameplay effects, such as smoke, sparks, explosions, steam, and more.
■
Material Editor—Set materials for your game without coding them, and apply them in real-time to your models to see what they’d look like rendered.
■
Shape Editor—Preview and play back animations from a scene or library. The Shape Editor allows you to merge animations, define nodes, rename meshes, and much more. You can apply changes to a 3D model mesh after it’s been loaded and watch it run in-game.
■
Decal Editor—Paint and edit decals in your 3D scenes to create realistic effects on top of objects already in your game. You can preview and tweak properties on-the-fly so your decals get just the right look. You can even layer your decals, or stack them one atop the other, for a look of depth.
■
Torque Toolbox—Manage the many levels of your game project as well as the packaging and publishing of your game from within the Torque Toolbox. The Toolbox is the main hub for your game development projects. You can select which of Torque’s runtime editors you’d like to jump to, access third-party middleware like 3ds Max or Photoshop, or view the Torque 3D documentation and tutorials, all from within the Toolbox.
61
62
Chapter 2
■
Torque 3D: Under the Hood
TorqueScript TorqueScript is a really easy-to-use scripting language, along the lines of Cþþ. TorqueScript is built with an abstracted Cþþ Physics API object-oriented logic, and many programmers prefer to use Cþþ instead of TorqueScript for their games, which is fine. It is so well integrated, you can use third-party code libraries, such as PhysX, in your game development with Torque. TorqueScript brings together all the elements of your game. It is the programming that runs your actual game and makes things happen. Most of your game can be programmed in TorqueScript, and additions, such as engine physics or tougher enemy artificial intelligence, or AI, coded in Cþþ, can be called from the script. Coding Add-On Tools
Besides using external code libraries, there are several scripting tools you can add to Torque 3D to increase functionality and use of coding in your games. The most popular tools follow. Price costs were correct at the time of this writing but could have gone up or down since. Personally, I have always favored the use of Notepad or another text editor to do basic coding in, but that is entirely up to you. Torsion
One separate add-on tool, Torsion, created by Sickhead Games, allows you to program faster in TorqueScript and in a more focused way. A demo for Torsion is provided for you on the companion disc for this book, but Torsion is only for Windows users. You can read more about Torsion online at www.torquepowered.com/products/torsion. Torsion costs $39.95 to buy. Plastic Tweaker
Another add-on tool, Plastic Tweaker from Plastic Games, allows you to adjust scripting datablocks from within the World Editor. Change the input fields of datablocks and objects in-game on-the-fly, and when you’re done, the values are correctly written back out to the source files they came from. You can read more about Plastic Tweaker online at www.torquepowered.com/ products/plastictweaker. Plastic Tweaker costs $35 to buy.
Components of Torque 3D
Universal AI Starter Kit
This add-on tool is specifically created (by Twisted Jenius) to build and customize artificial intelligence, or AI, for bots you use in your game. Universal AI Starter Kit can help you make your game fun and challenging. You can find out more about Universal AI Starter Kit online at www.torque powered.com/products/ai-starter-kit. Universal AI Starter Kit costs $34.95 to buy. Codeweaver
You could also choose to use Codeweaver, which is a totally free development tool for TorqueScript editing. You can find out more about Codeweaver online at www.torquedev.com/download.php. Game Mechanics Kit
Torque 3D has support for another add-on kit worthy of note, however. LogicKing’s Game Mechanics Kit, or GMK, provides added functionality and tools for programmers as well as game designers. GMK includes a templates library of AI bots, doors, triggers, exploding/destructible objects, helper objects, and more. You can add ready-made objects and script, as well as edit the mechanics of the game process, all from within the World Editor, in a very fluid and visual way. GMK also has a full-featured editor to make animatic cut-scenes for games. GMK costs $95 to buy. You can read more about GMK online at www.torque powered.com/products/gamemechanicskit.
Next-Gen Rendering Capabilities Torque’s rendering model has all the latest bells and whistles for making the best and most popular next-generation games for the latest computer graphics cards and gaming consoles. The power to create cutting-edge, photorealistic simulations, including sunlight and water ripples, is within your grasp (see Figure 2.8). Plus, you have the added capability of customizing the renderer for an original style all your own. Some of the rendering capabilities Torque 3D ships with include the following. If you don’t understand the terminology, that’s okay, because it will be discussed in detail later on, or it’s not that important to know as a beginner. ■
Light-weight dynamic lighting as well as static lighting can run great on low-end hardware and can appear as Hollywood-blockbuster quality on higher-end hardware.
63
64
Chapter 2
■
Torque 3D: Under the Hood
Figure 2.8 As shown in this screen from Torque-made game Fallen Empire: Legions, special lighting situations can be shown dynamically in-game with amazing realism.
■
Various models of shading and an extensible set of shaders are included to make your in-game objects look as real as you want them to.
■
A powerful ‘‘scattersky’’ system for making sun, stars, and skies that look believable.
■
Advanced lighting (using Wolfgang Engel’s ‘‘Light Pre-pass’’ rendering method) that creates real-time dynamic shadows to blow your socks off.
■
Support for pureLIGHT, a $500 add-on tool for Torque 3D created by 3D Interactive Inc., which gives you high-quality, static global illumination, as shown in Figure 2.9. You can read more about pureLIGHT online at www.torquepowered.com/products/purelight.
■
For Microsoft users, Torque 3D is built with the ability to be integrated with major third-party physics libraries, especially PhysX. PhysX can handle cloth dynamics, ragdoll physics, dynamic fluids, fluid buoyancy, artificial intelligence algorithms, and much more. You might have noticed a lot of published games use PhysX, and those are some of the reasons why!
What’s Next?
Figure 2.9 One example of the pureLIGHT add-on used in a game level.
Web Publishing Capabilities You can publish any Torque 3D game from the World Editor to a Web browser in seconds with GarageGames’ Web Publishing option. Torque 3D supports all major browsers and operating systems, including Internet Explorer, Firefox, OS X, and Chrome. Torque’s networking code is scalable. You can use Torque 3D to make latencysensitive fast-paced multiplayer online games for up to 256 players per server. For latency-insensitive games, like virtual worlds or massively multiplayer online role-playing games, or MMORPGs, Torque 3D can support more than 1,000 individual players per server.
What’s Next? That’s the grist of Torque 3D. You should now know where GarageGames came from, their mission statement (where they’re going), and the basic nuts-andbolts of Torque 3D. You should also have a quick appreciation for the Torque products and be able to approximate what’s possible to make using Torque 3D and what limitations you might be facing with your first Torque game project. Next you will start the basic planning for your first game project, and you will see how a paper description becomes a finished game.
65
This page intentionally left blank
chapter 3
Creating a Basic Game Outline As mentioned in Chapter 1, ‘‘So You Want to Be a Game Designer?,’’ game developers never start working on a design without knowing where they’re heading. They always have a road map, obviously depicting where they are headed, so they don’t become lost or confused or waste time. The reason for this road map should be patently obvious. Say you and five of your friends were going to throw an ice cream party. Some planning would be involved. You’d decide upon what time to have the party, where to have it, and who would bring the music, party games, and, of course, the ice cream. If the friend who was bringing the ice cream thought the party was on a different day, or only brought rocky road ice cream because that’s the flavor he likes, but everyone else wanted butter pecan, the get-together would be a disaster. Proper planning helps everyone stay on track and get the job done right. That’s where game design documentation comes into play. This typically falls under the purview of a project manager or lead game designer on a team. In most cases, it’s considered good practice to write out your game design documentation before you ever start to build. Most production will be fluid, meaning that changes can occur at any time, but it never hurts to know where you are going so you don’t get lost along the way. In this chapter, I’ll show you how to make a strong game outline.
67
68
Chapter 3
■
Creating a Basic Game Outline
Game Design Document A game outline is the cusp of a game design document; essentially, a game outline contains the highlights, while a game design document contains the bare-bones details. Though this chapter is about writing a game outline (and if you’re working by yourself, a game outline is all you’ll need), it is significant to know what goes into most game design documents so you know what’s important and what not to include in a game outline. Each game design document (also known as a GDD or game bible) is set up and handled differently for each individual game project. There does not exist a single standard template in the industry for how a GDD should read. Part of the reason for this is because games come in as many different flavors as ice cream, and no two are made exactly the same. However, there are some basics. Typically a GDD does two things: ■
Reveals Details—If it isn’t specified in the GDD, it isn’t getting done. The GDD tells the development team every tedious detail that will go into the game, like ‘‘Put feature B at position X and Y, and hook it up to widget C.’’
■
Conveys Vision—The GDD can sometimes sound like a proposal. It has a load of ‘‘Let me tell you a tale about widget C and why it’s so cool.’’
Some writers of GDDs can get a little too exhaustive on the details, creating dreary monstrosities that are ponderous to carry around and even worse to have to read. Today’s developers are starting to use electronic tools to make GDDs, including online blogs or a wiki, which enables them to have interlinked pages. So if a designer wants more information about a feature, he can click and jump to another page to read more about it. No matter the medium you decide to write your GDD in, there are typical similarities between all GDDs.
Questions to Ask Yourself Everyone will have questions about the game, including the folks who may give you the funds to make it and the teams of designers who may help you build it. Plus, your friends and family will want to know what you’re spending your time building on your computer. So answering several questions upfront will not only help you come up with answers to tell them, it will also steer the direction of your GDD.
Game Design Document
What Is This Game?
Describe the game in a single simple paragraph. This is the answer to the most frequently asked question you will hear, including from your mom. What are you working on? What’s the name of your game? What’s it about? Why Create This Game?
Why are you creating this game? Do you love military-based shooters? Do you think there is a gap in the market for another zombie game? Do more RPGs need to have magic-casting elves in them? Why make this game? Answering this will help you clarify what makes your game so different from the rest. Where Does This Game Take Place?
Describe the world your game takes place in. Help frame the game’s setting in the reader’s mind by spending a paragraph on it here. Later, you can go into it in more lengthy detail in a section dedicated to describing the world. What/Who Do I Control in This Game?
Describe what (or rather, who) the player will control in the course of the game. Don’t forget this, as this answer may make your game stand out if you have a cleverly created game character. After all, if the game is a third-person action or adventure game, your player will be looking at the character 90% of the time or more. What Is the Point of This Game?
Now that you know where the game is going to take place and what (or who) the player controls, the next big question is, what is the player supposed to achieve in this world? Are they doing something as cliche´d as saving the world? Are they trying to amass the largest ore mines? What? Generally, the answer you give to this question helps cement the scope of the game, because a game where the player has to save the world will probably be larger and more complex than a game where the player has to scrub several train station commodes. What’s So Different About This Game?
This question comes up a lot. Tell them what is different from the hundreds of competitive games attempting to break into this market right now. If you can’t
69
70
Chapter 3
■
Creating a Basic Game Outline
think of anything, be honest. Say ‘‘This is another Pac-Man clone, but it was done by me, so it’s cool!’’
Game Overview After coming up with a killer game idea, you will need to set out your objectives for your game project. Many developers do this through the creation of a game overview. The game overview is often the cornerstone of a game project’s build, and without it the project has a shaky foundation. The overview contains the game’s major objectives, the target audience, and its scope. Write a Concept Statement
The concept statement describes what your game is all about in one sentence or one small paragraph. Paraphrase the answers you gave in the last section here. Put them all together, including the who, what, why, where, and how. Shigeru Miyamoto, the legend in the game biz who invented Mario and Link, and practically spearheaded Nintendo for years, advises revisiting—not revising!—this statement often, particularly whenever new features are added or features are going to be cut, to make sure that you’re still on track and keeping with your concept statement. Mind you, it’s probable for the core of a game to change partway through development because it’s definitely happened before. When it does happen, and a game’s concept statement is rewritten, the development team must revisit all aspects of the game to make sure that every feature emboldens the new core. Game concept statements can be generated by starting with the words, ‘‘This game is about being a/an . . . ’’ or ‘‘This game lets you . . . .’’ Or the core statement might already exist as part of the game’s chosen genre. A concept statement can also be created from a genre. If you’re already locked into a genre, you have a precedent to go by for writing a concept statement. Look at some of these: ■
■ ■
First-Person Shooters—FPSs and even third-person shooter games are about survival of the fittest. Racing Games—Racing games are about being the first one at the finish line. Real-Time Strategy Games—RTS games are about resource capture: This land is my land, NOT your land.
Game Design Document ■
Role-Playing Games—RPGs are about character development (going from zero to hero).
■
Sims Games—Simulation games are about building empires, worlds, backyards, or communities.
Here is one example of a game concept statement as written by Andrew Rollings and Ernest Adams in their book Andrew Rollings and Ernest Adams on Game Design, published by New Riders 2003: ‘‘Diablo meets The X-Files in 3D. A new threat has appeared on the streets of America: a mysterious drug code-named Indoctrinol. No one sent to investigate it has ever come back, and it’s clear that something sinister is going on. To neutralize this menace, you’re given command of a super-secret team of four psychic warriors—psychically talented and superbly trained individuals drawn from the Special Forces of the U.S. Armed Services.’’ The first part is actually a high concept, something you could say in one line, while the rest actually gives the concept statement of the game. Think Up Your Objectives
Draft objectives based on what you want to see come of your game idea. When writing your objectives, you should follow the SMART methodology as defined by James Lewis in his book Fundamentals of Project Management, published by the American Management Association in 2002. Make each objective ■
Specific—The objective should be direct, to the point, and never vague.
■
Measurable—The objective should have a measurable outcome, or a way to tell when it is reached, such as in, ‘‘I want to make $10 to buy a bicycle’’; $10 is the measure you’re shooting for.
■
Attainable—Don’t say things like, ‘‘This game will gross more money in its first year than any of the Halo games!’’ That’s unattainable.
■
Realistic—What was stated in the last entry also applies here; that sort of objective is not only unattainable but also unrealistic.
■
Time-Limited—If you don’t set a deadline for a task, the task will never get done.
71
72
Chapter 3
■
Creating a Basic Game Outline
Define Your Target Audience
Next, define your target audience. You cannot create something unless you know who you are creating it for. In other words, who are the players of your proposed game supposed to be? In many cases, it is alright to make a game for yourself. If you have fun playing the game, then chances are good there are niche markets of people out there just like you who will love the game, too. But to truly reach a broad market, you will be better off considering the following: ■
Geographics—Where your target audience lives. Where do you think they live? Are they in the United States, United Kingdom, or elsewhere? Are they in big cities or small rural towns?
■
Demographics—Statistics about your audience, like age, gender, and income. Where do you think your audience fits? Are they young or old? Male or female? Do they come from an upper-income, middle-income, or low-income family?
■
Psychographics—Values, attitudes, and beliefs of your audience. What kind of ethics do they adhere to, do you think? Is killing wrong, or is it right? What does your audience believe?
It is just as important to consider the target audience for your GDD, too. Who will be reading it? Don’t write a GDD that is aimed at gamers because they’ll never see it (unless you decide later on to post its contents online or in the game manual). Usually, a GDD is read by producers, publishers, investors, and developers. So target them in your writing. Don’t give vague details about your game, such as, ‘‘Players fire laser cannons at space dirigibles.’’ Say this instead: ‘‘Players can operate laser cannons that have infinite ammo by standing next to one and pressing the spacebar on their keyboard; each laser cannon takes 6 seconds to recharge between shots. Cannon fire has a range of 300 feet and can do –75% damage to space dirigibles.’’ This saves someone a headache, too, because if your lead programmer is pulling an all-nighter and sees the first statement (‘‘Players fire laser cannons at space dirigibles’’) and you give no further details than that, he’s going to chuck the GDD out the window. The second, more specific statement he’ll appreciate because it tells him how the cannons operate and how much damage they can actually do.
Game Design Document
Establish the Scope of the Project
No, when I mention scope, I’m not talking about mouthwash. To determine the scope of your game, you must look at the big picture. You should establish the following: ■
Platform—Is the game going to be developed primarily for the computer or a console platform?
■
Genre—What is the game’s primary genre (for example, is it a first-person shooter, RPG, strategy game, or something else)?
■
Player Mode—Is the game primarily a single-player or multiplayer game?
■
Player Point of View (POV )—Which camera perspective will be forced through most of the game (for example, first-person, third-person, or other)?
■
Content—What content should be included in your game?
■
Style—What is the overall aesthetic style of the game? What will its look and color scheme be like? What kind of mood do you want to effect?
■
Interface—How will users navigate through the information? What types of interfaces will be required? How will the interface components be laid out?
■
Time Interval—Will the game be real-time, turn-based, or time-limited?
■
Audio—How will audio be used in the game (for instance, music, sound effects, dialogue, and compositions)?
■
Technology—What technology will be required to create the game? If you are using Torque, what limitations with the software will you have to overcome?
Tip Each game project is unique. Remember that your game can only be as successful as the preparation that's put into it. Determine the scope of your game before moving on, and never make assumptions about the project. If you leave any gray areas, you might get lost in them later on—so be careful.
73
74
Chapter 3
■
Creating a Basic Game Outline
Spotlight on Mode 7 Games Mode 7 Games is the small indie game company responsible for Determinance, the sword-fighting third-person game made with the Torque Game Engine and the upcoming tactics game Frozen Synapse (shown in Figure 3.1). As they say, "We believe in creating fun, intelligently tactical action games and releasing them at a minimal cost to gamers. If you're interested in our work in any way, we'd love to talk to you." Mode 7 Games' core team is made up of two people: Ian Hardingham and Paul Taylor. After graduating in 2003, Ian Hardingham started Mode 7 Games to explore his interest in creating a multiplayer game. Ian is the lead designer, producer, and programmer on Determinance. Paul Taylor began his association with Mode 7 by working on Determinance's music and sound but is now responsible for PR and future efforts at Mode 7. Determinance is a pretty unique game. What is so unusual about it, first of all, is the sword fighting. How did Mode 7 Games come up with that idea, and how easy was it to implement in Torque? IAN: "I've always wanted to make a sword-fighting game where the mouse controls the sword: I wanted it to be all about the geometry and not just about triggering combos. The thing about an engine that's as fully featured as Torque is that, on the plus side, you get a load of features you really need; however, when implementing new features, you have to do the added work of understanding everything about the engine first and making sure the features are implemented in a 'Torque-consistent' manner. One of the reasons we chose Torque is because we wanted a mid-number-of-players
Figure 3.1 The upcoming game Frozen Synapse from UK-based company Mode 7 Games.
Game Design Document multiplayer game that had flying in it, good collision, and large outdoor environments. Torque is perfect for this. The majority of the work was on the player skeleton and muscle systems, which were in fact very easy to integrate into Torque's player system."
How difficult or easy were the Torque editors to use, and did you use TorqueScript, Cþþ, Python, or another programming language to script Determinance? IAN: "The Torque level editor is very easy to use and, while it lacks some features of other editors, it really did the job for us. The Torque GUI Editor and the GUI system in general are truly superb and industry-leading. We used TorqueScript, although I was tempted by Python. I like TorqueScript—it allows you to write game mechanics very easily. Determinance had an unusually high amount of low-level engine coding in Cþþ, and we ran into Torque's general bloatedness a few times; however, the advantages of all the small, but completely necessary, features that Torque includes outweigh this particular disadvantage. Determinance is an online game, and our backend services are written in Python using Twisted and SQLAlchemy."
A lot of indie developers work on a small scale, and team members have to multitask to get the job done. Were there any conflicts of team work? Did you have a team leader or project manager to maintain creative vision? PAUL: "Ian took charge of project management as well as design and development for the vast majority of the time it took us to develop the game. I originally joined the team to do the music, but I later ended up taking over some parts of the business, such as PR and marketing, as well as assisting Ian with getting resources and so on. Ian would actually have melted from stress and then resolidified into some kind of odd human cheese if I hadn't done this. By the end, once we had the assets in place, it was mostly just us and our testers working on getting the game into shape, and having a more pared-down team towards the end certainly helped." IAN: "Absolutely. The real challenge was to get people who weren't being paid to do work when they didn't feel like it. I had to approach each individual differently to achieve this, and most of them are still talking to me."
What advice would you give to teens looking to become indie developers themselves? PAUL: "Ian's better qualified to talk about design and programming, but if you want to be an artist or a musician working on games, all I can say is get good at what you do and get noticed for doing it. Look at professional-quality art in your chosen medium and work out how it was done, find out how you can do something of that standard, and then learn to do it better. Set small goals and be ruthlessly persistent in achieving them. When you feel you're at a high standard, look at ways of getting into the industry. Most people will be happiest working in a mainstream games company at first to learn their craft. If that's not for you, then try to find other like-minded people! If you're an amazing artist, we might need you, so drop us a line via our website and show us your portfolio." IAN: "Artists, modelers, and musicians: Find an indie team, and do what they ask of you to a professional standard. Coders: Make a small, not-too-ambitious mod in Torque to get a general feel for what's going on, and then start assembling a team. If you want to design a game, you'd better learn coding, because until you can pay one, you won't find a coder who will do what you want."
75
76
Chapter 3
■
Creating a Basic Game Outline
What advice would you give to someone just starting to use Torque? PAUL: "Get help from other Torque users at GarageGames and elsewhere. It's invaluable." IAN: "Start off by taking five of the most popular code resources on GarageGames and implement them carefully, doing your level best to understand what's going on at all stages. Start implementing something not too ambitious. Whenever you come across a Torque system, don't be impatient; take a couple of hours to research and try and understand it. Those couple of hours will save you days. As for what Paul said, try to ask questions intelligently, and make sure you're doing as much work as you are asking someone to do by helping you. People will not do anything for you, but if you ask nicely, they will help you out." You can read more about Mode 7 Games online at www.mode7games.com.
Write the Feature Set This section of your GDD should document exactly what special features you have decided to put into your game. List all the essential selling points about your game right here. If they are purely technical features, then you can leave them for the technical specs section later on. The feature set is critical to understanding the overall direction of a game before starting to create it. The feature set should also depict how the player plays the game and what the highlights of the gameplay experience will be. Feature sets consist of 5 to 15 things that will make up your game, each one making the core statement stronger. Remember, if a game feature doesn’t strengthen your core statement directly, the feature should be revised or cut. Think about it for a moment. If you have nothing to put here, is this game really worth doing? Let’s take a look at a space pirate adventure game where you play an eyepatchwearing feline named Kat (see Figure 3.2). Here are some possible ideas to include in this game: ■
A spaceship
■
A wide galaxy to explore
■
Other spaceships to be plundered
■
Spaceport towns to be plundered
■
A combat system
Game Design Document
Figure 3.2 Kat, the space pirate queen. ■
A place to sell stolen goods
■
Lasers
■
Some indication of the intimidation power the player generates by being a pirate
■
A pirate crew
A feature set turns these random elements into concrete verbal statements: ■
Command and customize your very own spaceship.
■
Explore the far extents of the galaxy and stake claims over your territory.
■
Seize and plunder other spaceships and grow your pirate armada.
■
Raid, pillage, and plunder spaceport towns and distant planets.
■
Wield dozens of weapons, including space blasters, laser swords, and photon cannons.
■
Sell your ill-gotten booty to increase your armada and customize your pirate ships.
■
Recruit new pirates to join your crew of scallywags.
77
78
Chapter 3
■
Creating a Basic Game Outline
Feature sets usually take a ridiculous amount of time to develop and refine. The list above, if subjected to a group of fellow designers, would likely be revised numerous times. By yourself, an initial feature set may take you an hour or two. To see feature sets for other games, check out the back of any game box you happen to have. Though these lists will usually be written in ‘‘marketing speak,’’ the desire of the designers is clear.
Work Breakdown A work breakdown simply breaks down your game project into tasks and subtasks, assigns team members to those tasks, and estimates the number of hours it will take to get those tasks done. Task Determination
Tasks can be either specific or general to the project. ■
Specific tasks are the steps needed to complete a feature of the finished project. A feature may be a player character. To create this character, you or your team need to write a character description, draw concept artwork, create a 3D model, and animate the character in motion. Each of these is a specific task.
■
General tasks include the broad steps applied to almost every feature within your product to create the best player interface, style, story, and gameplay— including quality assurance.
Estimating a Timeline
Once you have generated all your tasks, you can begin estimating how long it will take to complete each one. There are interdependencies that can stand in the way of progress. You cannot begin play-testing until all the assets are in place, and you cannot finish the assets until the concept artwork has been reviewed. You cannot finalize the enemy AI until the first prototype is finished. Steps like these are points in a project in which nothing else can be accomplished until that step has been completed. These points are considered milestones, but they can also become bottlenecks if you don’t figure them into your timeline properly. One of the ways that game companies discover a timeline is by developing a working game prototype. A prototype that isn’t all that great to look at but has
Game Design Document
most of the conceptual ideas worked out into feasible features can set an estimated deadline for when the fully realized game will be done. Many game companies start with a prototype and build around it. Estimating Costs
Your next step is to identify how much things will cost. Game development requires the integration of art, design, writing, audio, and programming elements into a seamless package. In a ‘‘garage’’ game outfit, people share multiple design roles in this production. Of course, your cost can be as low as nothing if you have a place, a computer, the right software, and the time to do all the work yourself. Otherwise, cost factors can include the following: ■
Employees—Costs associated with your team, including salary, benefits, bonuses, and reimbursements.
■
Talents and Licensing—Outsourced staff or companies (such as composers, writers, VFX artists, or voiceover talents).
■
Equipment—Servers, workstations, networking equipment, scanner beds, digital cameras, printers, and software packages that you need to complete the game project.
■
Overhead—Cost of maintaining your office and work environment, such as rent, utilities, and office supplies.
Asset Production Most asset production is done through a collaboration of designers, going from sketches to wire mesh to 3D models and virtual terrain. Typically, you should have some of the major assets halfway completed before starting to script a game so that programmers will have something to test with. The Game World
This is the area where you provide an overview of the game world. Break down the game world into smaller component pieces, often game levels, and describe what’s so important about each of them. Most game level designers will offer
79
80
Chapter 3
■
Creating a Basic Game Outline
top-down maps of each of the environments, and writers will offer physical descriptions and key locations. Some things to remember when designing a game world are ■
Climate—Is it day or night? Is it wet and rainy, snowing, or fair?
■
Lighting—How is the area going to be lit, and what are the light sources?
■
Objects—Here you must spell out the main objects, power-ups, and items found in location.
■
Scale—Describe how big each area is supposed to be.
■
Theme—Indicate if there should be a specific style, mood, or gimmick to the location.
■
Travel—How does the player move characters around the game map?
The Game Characters
Describe not only the player’s character(s) but also ally characters, enemy characters, monsters, bosses, and more. Provide statistics and descriptions of each. The more onscreen time a character gets, the more details you should furnish. If the player can change or customize her character, you had better describe how that works in this section. The Game Items
Write a brief overview of each of the items players might find and use in the game, including weapons, inventory items, puzzle pieces, keys, ammo, or powerups. Items should be depicted by concept artwork and given unique looks based on the game’s style before they are created in 3D.
Interface Design A game interface designer must understand how to display information visually so that players understand how to play the game. A designer typically uses a navigational flowchart to document the interface and how the player would navigate through the game. Most interface designers use simple flowcharting software packages, such as Microsoft Word or Visio, to get started.
Game Design Document
I’ll discuss interface design further in Chapter 8, ‘‘Getting Gooey: Designing GUIs.’’
Sound Design Take a shot at describing in words what sound will be included in the game. Some composed music can be triggered by events or set to specific game environments. You should also consider the sounds used for special effects, including weapons fire and dialogue voiceovers. The sound engineering in a game is very particular, and I will cover it in more detail in Chapter 9, ‘‘The Sound and the Fury’’ (see Figure 3.3).
Technical Specs The technical specs include information like target platform or screen resolution, and it also outlines peripheral requirements. Make sure your GDD includes the following:
Figure 3.3 The audio recording/mixing sound lab at High Moon Studios. Yes, he really is smashing stuff with an aluminum bat, all for the sake of making great sound effects!
81
82
Chapter 3
■
Creating a Basic Game Outline
■
Database, Server, or Network—Will a database be needed? What platform or version is preferable?
■
Development Software—What software will be needed by the programming team, art team, and design team?
■
Display—Screen resolution, bit number of colors, or monitor size.
■
Internet—If the game will target the online platform, what is the expected access speed, browser type, and other ISP-related needs?
■
Platform—Will the target platform for the game be computer, console, online, or arcade? If the game targets a computer platform, what are the minimum and recommended requirements (involving operating system, processor speed, memory, or hard disk space)?
■
Security—What level of security is needed?
Game Outline Example First, I will show you the game outline I’ll be using for the lessons in this book for the game, Ravenscroft (shown in Figure 3.4). Then I’ll reveal an early game outline/proposal for Myst, designed by Rand and Robyn Miller, before it was finally accepted by Broderbund.
Ravenscroft Outline The core statement for the game, Ravenscroft, reads as follows: ‘‘Play as Gentry Jack, a pitiful goblin who must do his master’s bidding and find all the treasure in the dark lands of Ravenscroft.’’ Ravenscroft is described as, ‘‘A dark and stormy land somewhere between modern-day and medieval fantasy. It exists outside time and space. There are both modern objects and fantasy elements.’’ Although you don’t meet Jack’s master, he is described as a ‘‘fearful and mysterious evil sorcerer who will turn Jack into a toad if he does not find all the treasure.’’
Game Outline Example
Figure 3.4 Screenshot from Ravenscroft.
This gets you busy. Next, you can define the feature set: ■
Gentry Jack is a grubby goblin who can walk, jump, and swim through various foul levels.
■
Find treasure chests filled with gold hidden in despicable places in Ravenscroft.
■
Wield a powerful rocket launcher to ward off enemies and move obstacles out of Jack’s way.
■
Explore woebegone woods and barren terrain as well as spooky ghost towns in your search for gold.
■
Drive a dune buggy, shoot boulders, and swim rapids along your quest.
See Figure 3.5 for the Ravenscroft Valley map. This is the top-down map of the first game level you will make.
83
84
Chapter 3
■
Creating a Basic Game Outline
Figure 3.5 The Ravenscroft Valley map.
Myst Outline Figures 3.6 through 3.9 are excerpts from the initial game proposal for the popular adventure game Myst, as designed by Rand and Robyn Miller, which was finally accepted by Broderbund. Game proposals derive most of their content from the GDD but are mostly sales pitches to get a game accepted by a publisher, production company, or investor. Take a look at what went into the making of Myst.
What’s Next? In this chapter, you learned what a game design document is and what goes into it, how to write a game outline, and how to plan the work structure behind a game design. In the next chapter, you’ll be hitting the ground running. You’ll build the game world you’ll use in Ravenscroft via the Torque World Editor.
What’s Next?
Figure 3.6 Description and setting of Rand and Robyn Miller's Myst game.
85
86
Chapter 3
■
Creating a Basic Game Outline
Figure 3.7 History and gameplay of Myst.
What’s Next?
Figure 3.8 Map B. Stoneship Age of Myst map.
87
88
Chapter 3
■
Creating a Basic Game Outline
Figure 3.9 Map C. Mechanical Age of Myst map.
chapter 4
Opening Your Garage Torque takes some patience to learn, but with a little practice and the added incentive that you will be building your very own game, you will become a Torque master. In this chapter, you will learn the basic Torque workspace, so that you know your way around the interface and are capable of accomplishing the tasks found in Chapter 5, ‘‘This Is Your Land: The World Editor.’’
Jump-Starting Your Engine Before you begin, it is crucial that you download and/or install several software components you will be using in the ongoing lessons in this book. Let’s do that now.
Install Torque 3D Install the trial version of Torque 3D from the companion DVD for this book. You could, optionally, download Torque 3D from the GarageGames website, but it might not be the same edition of the software used in writing this book; thus menu commands and images may not be the same. If you download Torque 3D from this book’s DVD, then you know you have the correct edition of the software. If later, you’d prefer to upgrade, then you can head over to the GarageGames site for purchase and download choices. The program should add a shortcut to your Desktop, but if not, you can find it under Start > All Programs (Windows), and create a shortcut on the Desktop. 89
90
Chapter 4
■
Opening Your Garage
It will say Torque 3D Demo 2009 Tools Demo 1.01. The shortcut will help you find the tools you need to run Torque 3D every time. At the end of the installation, the installer may inform you that you need to install PhysX and will offer to open NVIDIA’s site if you’re online. This is required if you do not already have PhysX on your computer. Search the NVIDIA website for PhysX SDK, or go to http://developer.nvidia.com/object/ physx_downloads.html. Download the PhysX System Software, which includes the latest PhysX runtime builds, as well. If you already possess the latest PhysX run-time builds, which may be the case if you play a lot of computer games or have an elite graphics card, then you may not need to download anything. The Torque 3D Demo 2009 Tools Demo 1.01 will have the following shortcuts: ■
Documentation—This will launch the HTML documentation for the software.
■
Torque 3D Toolbox—This opens the Toolbox, which is kind of a central hub and the place from which to publish your games.
■
Uninstall—This will uninstall the Torque program when you are through using it.
You will also find links to GarageGames, the public forums, online software documentation, and purchase website. I will not be using these in this book, but you might find them useful.
Install Additional Software There are other programs you should download. The most critical ones, meaning that you will definitely need them for your project development, will come first. If free or open-source alternatives exist, they will be listed for you in the content description, but feel free to browse the Internet for more, because you never know when a new program will come along or work better than the ones listed here. DirectX SDK
The DirectX SDK (DirectX Software Development Kit) is a set of tools used for developing graphical applications, such as games. The SDK contains multiple libraries that handle rendering, audio, input, video, and more. DirectX is for Windows only, and it should be the very next software you download.
Jump-Starting Your Engine
There are multiple versions of the SDK available, but the recommended version for Torque 3D is the March 2009 version. You can obtain it from the companion DVD for this book. 2D Image Editor
You will need a complete 2D art software package, one that can create 2D art with brushes and other tools, as well as one that can edit existing 2D images, such as digital photos. This can be Adobe Photoshop (www.adobe.com/downloads), which is what I’ll be using in the following lessons, or you can use an alternative to Photoshop, such as GIMP. GIMP (GNU Image Manipulation Program) is a completely free, cross-platform 2D image editor. While not as comprehensive as Photoshop, it does offer layers and effects similar to Photoshop. You can download GIMP from their website at www.gimp.org. Another free 2D image editor you might try is Paint.net. You can read more about Paint.net online at www.paint.net. Optionally, Aviary.com (www.aviary.com) provides a free browser-based 2D image editor called Phoenix. Phoenix delivers many of the key features of a desktop image editor with the ease and accessibility of a web-based application, and it’s free. Whatever 2D art software package you choose is up to you, based on availability and your comfort level with the program. 3D Modeling Program
You will need a complete 3D art software package, one that can take primitive shapes and bend them into 3D models, such as characters, weapons, vehicles, and other props for your game. This can be 3ds Max (http://usa.autodesk.com), which is what I’ll be using in the following lessons, or another 3D modeling program, such as Maya (also at http://usa.autodesk.com), Blender (http://www.blender.org), or MilkShape (http://chumbalum.swissquake.ch). Blender and MilkShape are free, or opensource programs, while Max and Maya each have a steep price.
91
92
Chapter 4
■
Opening Your Garage
The main 3D model formats used by Torque 3D are COLLADA and DTS. COLLADA is a standard model format supported by multiple applications of varying brands. DTS is a proprietary format only supported by a select few. Check to make sure whichever 3D art software package you have can export to COLLADA or DTS; otherwise, the choice of application is up to you, based on availability and your comfort level with the program. Script Editor
You will need a script editor to edit program code for your game. On Windows, you can use Notepad or Notepadþþ (a free source code editor and Notepad replacement) or UltraEdit (www.idmcomp.com). On OS X, you can use Xcode (http://developer.apple.com/TOOLS/Xcode), Apple’s premiere development environment for Mac OS X, or TextEdit, the default OS X text editor. It is recommended, however, that you download one of the scripting editors specifically built for Torque 3D; these include Torsion, Plastic Tweaker, Universal AI Starter Kit, or Codeweaver (all of which were mentioned in Chapter 2, ‘‘Torque 3D: Under the Hood,’’ where you will also find their website links). Torsion has a free demo available on the companion DVD for this book. Many of these programs are Windows-only, so be sure to search for the best option for your machine. The choice of script editor is entirely up to you. File Type Descriptions The following are popular file types used with, or in conjunction with, Torque 3D. Hopefully this list will clear up a few questions you may have about these files. ■
*.bat—Windows batch files that contain OS commands, mostly used in the Torque environment for deleting multiple files (.dso, prefs, .uft, and so on).
■
*.c / .cpp—This is a source code file. These contain the source code that is compiled by the engine.
■
*.cs—A CS file is a TorqueScript file. These script files will contain most of your game logic and code.
■
*.command—The Mac equivalent of a BAT file.
■
*console.log—This file is generated by your game whenever you run it. A lot of the critical events that occur during your game are written and saved here.
Jump-Starting Your Engine ■
*.dml—Configuration file used for combining environmental textures, mostly used by precipitation and clouds.
■
*.dso—This is a TorqueScript file that has been compiled into an encrypted format.
■
*.dsq—This is another proprietary format that stores animation information. A DSQ is used in conjunction with a DTS file.
■
*.dts—This is a proprietary format that stores model information (geometry, textures, nodes). A DTS file is loaded directly into Torque to render 3D models, such as players, items, weapons, and vehicles.
■
*.dll—Dynamically linked library files (DLL) contain code that can be used during runtime, instead of being compiled directly into binary. This is useful for common libraries, such as OpenGL, OpenAL, Havok, and so on.
■
*.exe / .app—This is a binary, most commonly used to launch your game or one of your tools.
■
*.glsl—OpenGL Shading Language file.
■
*.gui—A GUI file contains the data used to create your graphical user interfaces (GUIs). They are also created using TorqueScript, but the special extension allows the GUI Editor to open them for visual modification.
■
*.h—This is a C header file. These typically contain declarations of classes, structs, variables, and more, which are compiled by the engine.
■
*.hlsl—High Level Shader Language file (Windows only).
■
*.mis—MIS files are game levels. When you are creating a new mission and adding terrain, models, lighting, and environment, they are stored and organized in an MIS file.
■
*.ogg—Ogg Vorbis audio file format.
■
*.png / .jpg / .gif—Raw image files.
■
*.ter—Terrain data file loaded directly into Torque 3D.
■
*.torsion—This file contains the project information that can be loaded into Torsion for cleaner and more organized editing, as well as debugging and test runs. This is a Windowsonly file.
■
*.uft—These files contain pre-cached font information.
■
*.wav—Waveform audio file format.
93
94
Chapter 4
■
Opening Your Garage
Take Torque for a Test Drive Open Torque 3D Demo 2009 Tools Demo 1.01. Do so by clicking on your Desktop shortcut, if you’re using Windows, or by finding it in your available programs. The program will open to the Torque Toolbox. Toolbox
The Torque Toolbox (see Figure 4.1) is an application provided by GarageGames to act as your development ‘‘toolbox.’’ Key features of the Toolbox include the following: ■
Project Creation/Management—Create new projects, use templates and genre kits to build new projects, or modify existing projects from right here.
■
Editor Shortcuts—Buttons that launch your selected project in the World Editor, GUI Editor, script editor of choice, or basic play mode for testing.
Figure 4.1 The Torque Toolbox.
Jump-Starting Your Engine ■
Project Deployment—You’ll hear the word ‘‘deployment’’ a lot. With Torque 3D, deployment means publishing. You can package your game in ZIP format, generate an installer, or deploy to a web browser.
■
Quick Links—Create shortcuts to your favorite third-party programs in your production pipeline, such as Photoshop, Max, and more.
The Toolbox can be broken down into five major sections, from top to bottom: menu bar, Projects tab, Documentation tab, Project Information, and Editor Quick Links. ■
Menu Bar—The menu bar gives you access to tool options and settings not concerning your game projects.
■
Projects Tab—The Projects tab contains a list of demos, genre kits, and user-generated projects. Clicking on one will make that project’s information fill the Project Information window.
■
Documentation Tab—The Documentation tab contains links to the mostused documentation for project development, including Getting Started and using the editors. It also contains links to video tutorials covering materials, road/path editing, decals, lighting, and river editing.
■
Project Information—This area contains information about the currently selected project, including the time it was last modified and the number of working levels. It will also contain the main editor shortcut buttons for editing your project, including opening the World Editor and GUI Editor, source code, and deployment.
■
Editor Quick Links—The Quick Links bar can be customized to your liking and can contain shortcuts to third-party applications and utilities you use regularly throughout game development, such as Photoshop, 3ds Max, Notepad, and so on.
Demos
The Demos section allows you to launch standalone Torque 3D applications developed for specific technical purposes. Demos are there to show off certain aspects of the Torque 3D engine and are not useful to base games off of. The only available demo with this version of Torque is PhysX, which shows you how well PhysX is integrated with Torque.
95
96
Chapter 4
■
Opening Your Garage
Examples
The Examples section contains game packages with a full assembly of assets and code you can use as a game base. These projects are meant to give you a springboard for developing games, usually of a specific genre. The one that comes with this version of Torque 3D is the FPS Example, which gives you the essentials needed for making a first-person shooter game. Other projects might include a racing game, a real-time strategy (RTS) game, or an isometric role-playing game. Some of these examples are user-generated, and you can find them for sale and/or download online. Check GarageGames’ site at www.torquepowered.com for further updates. Preview the FPS Example. For now, you should click on FPS Example (see Figure 4.2) in the Examples section. The Project Information field (see Figure 4.3) fills in with information about the FPS Example project. Most of your interaction with the Toolbox will be in the Project Information field, as this is where a lot of editing and testing commences. Thumbnail Image. At the top left you will see a preview image, or thumbnail, selected to showcase the game. The thumbnail image used can be changed at any time. The image is found in your project’s root directory (the main folder holding your game), and is called ‘‘thumb.png.’’ No one will see this image but you, whenever you have the Toolbox open, but if you want to stay organized in the future, you can replace this image with another. Comments. At the top right you will see a comment by the project’s author telling you a tidbit about the project. The text that shows up in this box is read from a text file in your project’s root directory and filled out by an SVN hookup.
Figure 4.2 FPS Example project.
Jump-Starting Your Engine
Figure 4.3 Project Information section.
SVN (Subversion) is a version-control system initiated in 2000 by CollabNet Inc. so that multiple programmers can maintain current and historical versions of files, such as source code and documentation (http://subversion.apache.org). If your project is not under SVN source control, the Comments section will remain empty, or say ‘‘No comments,’’ but your Last Update time and date will still be accurate. Project Levels. At the middle left you will see the Project Levels list, which is an inventory of all available levels found within your project’s game\levels directory. There are three levels of this game project. One is a blank room, another called Burg, which is the image in the preview (a steampunk city street), and lastly Deathball Desert, which might remind you of the desert planet Tatooine from the Star Wars saga. Shortcut Buttons. In the middle center are four main buttons you will use to drive the project.
97
98
Chapter 4
■
Opening Your Garage
■
World Editor or GUI Editor—You can open any of the available levels in the World Editor, or choose a specific interface to create or edit in the GUI Editor.
■
Play Game or Play in Web—You can click Play Game to test-play the game and see what it would look like from the player’s viewpoint. You can also click Play in Web to launch the game in your web browser. You’ll test-run the game in a moment. First, let’s look at the rest of the Project Information field.
The middle right has four other shortcut buttons used for editing the project. ■
Open Folder—This button opens the actual directory folder for your project to show you the files that make up your project.
■
Torsion—Once you have Torsion installed (Windows users), you can click this button to open and edit your project’s program code in Torsion.
■
Edit Source—If you have another source code solution or development platform you’d like to use to program your game, such as Microsoft Visual Studio (Windows) or Xcode (Mac), you can click Edit Source to open and edit the project’s program code from within either of those programs. If you decide to use Visual Studio, version 2005 or 2008 work well with Torque 3D.
■
Clean-up—Do not click Clean-up until you are ready to clean and re-create your game’s Cþþ projects, because it takes awhile, and if you’ve made any modifications to the project’s structure, they can become lost.
■
Package Project— When you are finished with and ready to distribute your final game, or publish a demo, you can click Package Project. This will bring up a dialog box that provides you with an automated process for publishing your game. In the past when you wanted to publish a game, you had to come up with your own method of doing it manually. This often meant compiling the program code, zipping the files, and finding a third-party installer creator. Now it’s all done for you with just a few simple clicks!
You’ll add some items to the Quick Links section later. For now, let’s test-run this game!
Jump-Starting Your Engine
Play the Game. Click the Play Game button. A window will come up telling you that the game is launching and that the Toolbox will be minimized to your System Tray. After that, you should see a new window open. After the Torque 3D logo fades away, you will see something like what’s shown in Figure 4.4. This is only because you’re using a demo version of Torque 3D. With Torque 3D Pro, this screen is removed. Click Continue Using Demo and then click Play to proceed. Another screen comes up, as shown in Figure 4.5. This is the main game menu, which—for your game later on—you will be able to customize. For now, go ahead and click Play. In the window shown in Figure 4.6, you can choose which level you want to load: Blank Room, Burg, or Deathball Desert. Select Blank Room and click Go! to launch that level. You start in first-person mode, although you can switch to third-person mode and back again by pressing the Tab key. Use the movement keys of W, A, S, and D
Figure 4.4 Demo user screen.
99
100
Chapter 4
■
Opening Your Garage
Figure 4.5 Main game menu.
Figure 4.6 Choose Level screen.
Jump-Starting Your Engine
to explore your environment. Jump with the spacebar, and crouch with the X key. You have firearms in this game. Switch weapons by pressing Q or using the mouse wheel. You have two preprogrammed weapons at your disposal: a grenade launcher and a rocket launcher. Fire either of these weapons by left-clicking with your mouse. Use your mouse to rotate the camera and, consequently, your aim. To zoom in on your target, or in third-person to switch to an overthe-shoulder view, press and hold the Z key. To see any of these options, and many others within the game, press H. While you’re here, take note of a few important things. First, you have a single light source, similar to a bright halogen light or artificial sunlight, coming from one direction. This casts smooth realistic shadows on the ground and shiny highlights on your character model, which is named Gideon (the Steampunk Man). Gideon’s animations and mesh deformations are fluid and realistic, making him a believable character. See Figure 4.7.
Figure 4.7 The character model Gideon in action.
101
102
Chapter 4
■
Opening Your Garage
The weapon fire and explosions are highly detailed and believable, as well, leaving scorched ground in their wake (see Figure 4.8). If you fire too close to yourself, however, Gideon will take damage. His health, which starts at 100, is shown in the lower left. The weapon currently equipped is shown next to his health, along with how much ammo is left in the gun. A Torque 3D logo is displayed as a clear watermark at the bottom middle of the screen. This can be removed if Torque 3D Pro is purchased. This level is just what it says it is: one big blank room! There’s nothing here to interact with or do. It’s sort of like landing on the Moon. However, this level is a great starting point for something else. You could start adding objects and enemies and end up with an entirely original game level, practically from scratch. To exit, press the Esc key, and when it asks you if you want to leave the mission, click Yes. You will be returned to the demo screen shown earlier. If you press Esc again, or attempt to close the window, the Continue Using Demo button will
Figure 4.8 Blowing stuff up looks amazing onscreen.
Jump-Starting Your Engine
change to an Exit This Demo button, which you can click to close the game completely. Play in Web. To see the difference between playing your game on your desktop and playing it in a browser, test out the next two game levels from the FPS Example game in your web browser. Compare your screen to mine, shown in Figure 4.9 (mine opened in Mozilla Firefox), which shows the game as it’s loading and before the demo screen opens. Let’s start with the Burg. When you get to the Choose Level screen, click on Burg’s thumbnail to see a larger preview image of it and its description, as shown in Figure 4.10. Then click Go! to launch the level. The description of this level, ‘‘a dark steampunk alley,’’ is very accurate. The Victorian layout of the buildings, lampposts, and stairways is balanced against the futuristic mechanical engineerings all around. Cogs, gears, pistons, and globes are in motion all around you. Explore this environment (see Figure 4.11)
Figure 4.9 Playing the FPS Example game in the Firefox browser.
103
104
Chapter 4
■
Opening Your Garage
Figure 4.10 Pick the Burg in the Choose Level screen.
Figure 4.11 The steampunk alley environment is full of interesting details.
Jump-Starting Your Engine
as much as you like. The 3D modeling that went into making this level is impressive. When you are through exploring, press Esc and select to quit the current mission. In the demo screen, click Continue Using the Demo to return to the Choose Level screen. This time pick Deathball Desert (see Figure 4.12), and click Go! to start. Explore this terrain, filled with sand and several guard towers. The towers appear to belong to two separate guilds or clans. One set is green, the other red. Look for the sun, which is high overhead, and then try climbing to the top of one of the tallest towers. There’s an airlift system that works like an elevator to transport you to the top of the tower. From there, you can escape to the balcony and take in the view, as shown in Figure 4.13. Exit the game when you’re through, and close your browser or browser tab. By now you are probably itching to get started developing in Torque. Creating a new project is a simple process.
Figure 4.12 Pick the Deathball Desert level to play.
105
106
Chapter 4
■
Opening Your Garage
Figure 4.13 Climb to one of the tallest towers and take in the view.
Create a New Project In your Torque Toolbox, click the New Project button when you’re ready to get started. A new project creation dialog will pop-up, like the one shown in Figure 4.14. Note the directory that it will save your new project in, which is on your hard drive in the My Projects folder inside the Torque folder. You can name your new project whatever you like. Torque will automatically make a new folder in your My Projects folder. For instance, if you name your new project ‘‘Beefcow,’’ a folder will appear in your My Projects folder called Beefcow, with all your asset and script files generated in it. Bear in mind, however, that your project’s name will be used for more than just naming the folder containing your game. Toolbox will reference your project by this name, and this name will also change several script variables that customize your game’s title bar, server name, and so on. For the purposes of this lesson, call your new project Ravenscroft.
Jump-Starting Your Engine
Figure 4.14 Create a New Project dialog box.
The Template drop-down menu allows you to pick an existing project type to generate your game from. The demo Torque 3D has Full and Blank templates to choose from. The Blank template is completely bare-bones; it has no starting assets or game scripts attached. The Full template contains some assets and a sample script. Select the Full template for your Ravenscroft project. Click Create when you’re done, and watch as your new project is generated for you. When the process is finished, a window will come up telling you that project creation is complete, as shown in Figure 4.15. Click OK, and then click Finished to return to the Toolbox. Notice that the Projects tab auto-updates to include a new section called My Projects. In My Projects should be your new project, Ravenscroft. Any future games you make will also be added to the My Projects section of the Projects tab. Click on Ravenscroft to display its information in the Project Information section. Add Comments
Let’s start changing things up. In the Toolbox, click Edit in the upper-right corner of the Comments field. In the new dialog that pops up, click on Add to add a new comment. Type in your name and then a short description of your game. When you’re done, click OK, and then click Close to exit the Comment Editor.
107
108
Chapter 4
■
Opening Your Garage
Figure 4.15 Project creation is a snap in Torque 3D.
Add Quick Links
Before getting carried away with level creation, you need to add some Quick Links to your Toolbox. At some point during the following pages, you must use tools and programs not provided by Torque 3D. These are part of your designer pipeline. Quick Links allows you to add your favorite tools directly to your Torque Toolbox for quick access. This can be any shortcut to a binary, such as an executable (such as an EXE or APP file). Begin with the 2D art image editor you’ve chosen to use. At the bottom right of the Toolbox, click Edit Tool Bar to bring up the Quick Links Editor dialog box. From here, click the Add button to add a new Quick Link. In the Add/Edit Quick Link dialog box (shown in Figure 4.16), click the multi-dot ( . . . ) button beside the File field to bring up a browser window.
Jump-Starting Your Engine
Figure 4.16 Add Quick Links to your Toolbox.
Search for the program executable for your chosen 2D image editor program. As you can see in Figure 4.16, I will be using Adobe Photoshop CS3, but you use whatever program you currently possess. Do the same with your 3D modeling program and any other programs you’ve installed, besides Torsion, that can be used in conjunction with Torque 3D. Mine include Photoshop and 3ds Max. Others can be added later, as you discover you need them. Edit Project Thumbnail
That image of Gideon standing in a desert landscape is fine as a placeholder, but it helps keep you better organized and makes your Toolbox look better if you replace him with a different image. So let’s edit the thumbnail. Click the Open Folder button at the middle right of the Project Information field. You should be taken to your Ravenscroft folder in your My Projects folder of the Torque directory. There you will see all the files and folders making up your main project directory for Ravenscroft. The file you want is called Thumb.png. Open it with your chosen 2D art image editor.
109
110
Chapter 4
■
Opening Your Garage
Once you have it open in your image editor, design it any way you want. Experiment with the art tools, layers, and effects for a while. Experimentation is one of the finest ways to learn a new software program if you’re unfamiliar with it. Besides, what your image looks like should be original and totally up to you. In my example, shown in Figure 4.17, I placed a dark fill color, used some grunge brushes to give the background some texture, and then layered some text over the top that spells out the name of my project: Ravenscroft. You can do something similar, if you like. Be sure to save Thumb.png by the same name to the same location; this will overwrite the existing thumbnail. Changes in the Toolbox will be applied next time the Toolbox is loaded. The way most of the project thumbnails were designed in Torque 3D is that, after the game project was nearly built, the designers took screenshots of the game while it was running and made those screenshots fit the dimensions of the thumbnail (300 pixels by 225 pixels, if you were wondering). You can do the same thing. Thumb.png can be edited at any time. To make screenshots in Windows, press the PrntScrn key and then paste (CTRLþV ) into your image editor. Of course, you’ll have to resize and edit your screenshot from there, but that should be enough to get you going. The PrntScrn key, if you didn’t already know, takes a snapshot of your computer screen and stores that snapshot as an image on your Clipboard. Alternately, inside the game, you can press AltþP (Win) or OptionþP (Mac) to take a screenshot of the game window by itself, minus the GUIs; the screenshot renders as a PNG image file in your directory folder.
Figure 4.17 Example of a thumbnail image you can make.
Jump-Starting Your Engine
Get Started in the World Editor There are two ways to open the Torque World Editor. ■
From the Toolbox—One is to use the button in the Project Information section of the Projects tab. When you click the button, the World Editor loads your project and a selection menu appears, from which you can select the level you want to modify or create a whole new one.
■
During Play—The second way you can open the World Editor is from within a game you’re already playing. While play-testing your game, as you were earlier, you can open the current level in the World Editor for ease-of-use editing. For Windows users, press the F11 key. For Mac OS X users, press CmdþFnþF11. You can do this at any time while play-testing a level.
World Editor Interface
The World Editor has five main sections to its interface, shown in Figure 4.18. ■
Menu Bar—This is where various drop-down menus are that contain menu commands and functionality within the World Editor, including opening and saving levels, toggling camera modes, and so on.
■
Tools Bar—Located just beneath the menu bar, the tools bar contains icon-based shortcuts to tools and their settings. The upper portion of the tools bar contains Tools Settings, and the lower portion of the tools bar contains the Tools Selector. The Tools Settings part changes based on what tool you currently have selected, as each tool will have different settings.
■
Scene View and Tool Palette—The center of the screen is filled with the main scene view of your level and its objects. In the upper-left corner, you can see the Tool Palette, which automatically changes based on what tool you currently have selected.
■
Scene Tree Panel—This floating panel (upper right) contains two tabs: Scene and Library. The Scene tab contains a hierachical list of all objects currently in your level. Each object in your level—and in your Scene tree— has an icon, unique ID number, object type, and name. You can click on and select specific objects to modify them. You can also use SimGroups like folders to organize related entries on the tree. The Library tab has new
111
112
Chapter 4
■
Opening Your Garage
objects you can create and add to your level. The Library tab has four subcategories: Scripted (containing objects that serve very specific purposes), Meshes (containing 3D model files in DTS, COLLADA, and DIF formats), Level (containing objects with similar themes, including Environment, ExampleObjects, Level, and System), and Prefabs (groups multiple objects together into singular *.prefab files for ease of duplication). ■
Inspector Panel—This floating panel (lower right) shows you all of the selected object’s properties, which can be edited. This gives you the freedom of never having to leave the World Editor to change the base values or scripting of in-game objects.
Tools Bar
The tools bar bears more explanation. The first three icons of the Tools Settings portion never change. Look at them in Figure 4.19. The left-most button, which
Figure 4.18 (A) Menu bar, (B) Tools bar, (C) Scene view and Tool Palette, (D) Scene Tree panel, and (E) Inspector panel.
Jump-Starting Your Engine
Figure 4.19 World Editor button, GUI Editor button, and Play button.
has a tiny picture of a sun coming up over a mountain, opens the World Editor, if you’re not already in the World Editor. The second one, which looks like three dark boxes, toggles the GUI Editor on and off. The third button is fairly obvious—the Play button—which closes either editor and launches the game so you can play-test it. Beside these buttons are the camera settings, which also never change. Look at them in Figure 4.20. Click the camera icon, which looks like a person’s silhouette, to choose your camera type. The drop-down menu beside it will let you switch camera speeds, and the icon that looks like a camera inside a frame will transport your camera directly to whatever object you currently have selected so you can see it better. Preference Settings
There are two preference settings dialog boxes you cannot see at first glance but which are very important, as they dictate the performance of the game product and the editor itself. They are Game Options and Editor Settings. Game Options. The Game Options dialog, as shown in Figure 4.21, is used to change your current session’s audio and video properties. The Graphics tab dictates the default screen resolution for your game when you play it, what type of image file is created when you take a screenshot (when using the in-game AltþP/OptionþP screenshot method), the bit depth and texture quality of your game at runtime, and advanced lighting options.
Figure 4.20 Camera settings.
113
114
Chapter 4
■
Opening Your Garage
Figure 4.21 Game Options dialog.
The Audio tab allows you to adjust your current game’s volume, both globally and channel specific. And the Controls tab allows you to adjust the key mapping for game controls. You can reach Game Options by going to Edit > Game Options on the menu bar. Editor Settings. Through the Editor Settings dialog box, shown in Figure 4.22, you can change various aspects of how your tools render and function. You can control Axis Gizmo, which is something you will learn about in a moment, the Mesh Road Editor, the Object Editor (including what renders on selected objects), the River Editor, the Road Editor, and the Terrain Editor. You can edit the context options and colors of bounding boxes or drag handles in these sections. To access the Editor Settings, go to Edit > Editor Settings on the menu bar. Meet Gideon
Go to Camera > Place Camera at Player (or tap AltþQ). You have left your camera behind and are floating around. Using the W, A, S, and D keys will allow you to move around in any direction, and you can still look around using the right mouse button. The camera may be too jumpy for adequate movement. If
Jump-Starting Your Engine
Figure 4.22 Editor Settings dialog.
this is the case, you can change the camera speed between 1 and 200, 1 being the slowest, 200 being the most sensitive, and 100 being normal. Look around the expanse of terrain for a while using the floating camera. If you get lost, you can always switch back to the first-person camera mode by pressing AltþC or going to Camera > Toggle Camera. Using Place Camera at Player (or free-floating mode, where you leave your model behind), scan the terrain until you see Gideon. If you see a gun in front of you bobbing up and down, you know that you’re standing in Gideon’s virtual shoes. Zoom and pan around Gideon until you see him onscreen. Notice that he is resting, or animating through his ‘‘idle’’ pose. Choose your Select Arrow, or press the 1 key, to enter object selection. When you move your cursor over Gideon, it will change into a selection cursor to show you that he can be selected, and a white selection box shows which object will be selected (see Figure 4.23). Gideon (and just about every other object that winds up in your world) has a handle. This handle often appears as a number and name that float beside the objects they refer to. The number is set according to where the objects lie in the
115
116
Chapter 4
■
Opening Your Garage
Figure 4.23 Gideon is waiting for his close-up.
object mission list and is also the server-side ID for the object, which will be important when you make an online game. The default name for objects is ‘‘null,’’ which means it has no name. Names are really optional, but you can assign names for objects to do some scripting. With Gideon selected, you should see all his information appear in the Inspector panel (refer to Figure 4.24). There you should see an input field for Name. Place your cursor in this field, and type in Gideon. On the screen, you will see Gideon’s handle has changed to reflect his new name. Cool, huh? Manipulate Objects with Gizmos
Gideon also has a gizmo that pops up when he’s selected. The gizmo, as seen in Figure 4.25, is a three-rayed device that should be fairly familiar to you if you have ever worked in a 3D program before. Each axis is used for a different direction in the virtual world. These axes give you the ability to move, rotate, and scale objects like Gideon here. When we say 3D, we mean that the world is
Jump-Starting Your Engine
Figure 4.24 Give Gideon a name for his handle.
Figure 4.25 The gizmo with handles for X, Y, and Z.
117
118
Chapter 4
■
Opening Your Garage
three-dimensional, and in Torque these dimensions show up most prevalently as the Cartesian coordinate system that geometry buffs use. The Cartesian coordinate system plots paths and points on a grid using values X, Y, and Z, for left and right, forward and back, and up and down. Note If you happen to notice computer lag or slow response, then it is probably your computer. You may have other programs open and running in the background that are taking up valuable memory space, not enough or faulty RAM in your computer, or a video graphics card that is out-of-date or just not up-to-snuff. GarageGames says the minimum system requirements for Torque 3D Windows users include Windows XP/Vista/7, an Intel or AMD Processor running at 1 Gigahertz, 512 MB RAM (1 GB for Vista), 100% DirectX compatible video card with at least 256 MB video RAM, and DirectX 9.0c or higher. For Apple-based computers, they recommend you have OS X 10.6.1, an Intel base, at least 2 GB RAM, an ATI/NVIDIA shader model 4.0 video card (or better) with at least 256 MB video RAM, and XCode version 3.2 or higher.
To know how to use the gizmo, give it a whirl. There are three main things you can do to manipulate objects in Torque 3D: translate, rotate, or scale them. These are icon buttons in your Tools Palette, and are hot-keyed to number keys: Translate=2, Rotate=3, and Scale=4. To return to the Select tool, press 1. Translate
To move Gideon around, simply right-click with your cursor on one of the X, Y, or Z handles and move him in that direction. Moving a 3D model is often called translating, so you will sometimes see a direction that tells you to translate an object. To translate means to move the object. Notice that when you move your mouse over one of the rays, or the squares inbetween them, or over the spot where they intersect, different parts will turn yellow; this gives you an indication of what will change when you click and drag. Click and drag in between two axes in one of the connecting squares, and he’ll move in both directions at once. Click and drag in the exact center of the gizmo, where all three rays intersect, and he’ll move in all three directions at once. Rotate
Rotate presents the same directional axis handles, but this time they curve to follow a spherical shape. Click and drag any of the axes to make Gideon move around that axis. Notice that because you have a ground in the level, and Gideon
Jump-Starting Your Engine
is programmed to keep his feet on the ground (unless jumping or falling), he does not rotate along any axes but the blue one (Z). Scale
To make Gideon bigger or smaller, use the Scale tool. Your axis handles now have boxes on the ends of them instead of arrows, but they work similarly to the Translate tool. Click and drag one of the axis handles toward or away from the center origin of the model to squash or stretch him, respectively, along that direction. Click and drag in the square between two axis handles, and you’ll squash/stretch him in two directions at once. Click and drag directly on his center origin, and you’ll scale him universally, which means in all three dimensions at once. Try squishing Gideon, as shown in Figure 4.26. Manipulate Objects with the Inspector Panel
You could translate, rotate, or scale Gideon in the Inspector panel just like you did with the gizmo, by entering values in the Inspector panel. Under the Transform section, you should see values for position, rotation, and scale. Position
Figure 4.26 Stretching Gideon can be fun!
119
120
Chapter 4
■
Opening Your Garage
and Scale have a series of three number values beside it. These three values reflect the X, Y, and Z axes of the object, in that order. You can change the values by typing in new numbers to make them take effect. Rotation has four number values, but you won’t use these to control rotation, because it’s much easier to use the Rotate tool.
What’s Next? In this chapter, you installed the necessary and optional software programs you’ll need to complete the lessons in this book. You have opened up Torque Toolbox and created a new project called Ravenscroft. And you have learned how to navigate the Toolbox and the World Editor. Next you’ll design some basic outdoor terrain for your first level, and I’ll talk about why level design is such an important aspect of game design.
chapter 5
This Is Your Land: The World Editor
Tip "A game should stroke the players' egos, and there's no better way to do this than to present them with levels and situations that allow them to flex the skills and abilities they spent the most points on." —Chris Avellone, Obsidian Entertainment
Many of you may not find this to be work. It is a lot of work, but it’s also like playing. If you used to enjoy playing with LEGOs or construction kits as a kid, or if you lost yourself in imaginary worlds of castles and kingdoms, you will find designing game worlds to be an exciting pastime that can make you money. In this chapter, I’ll talk about what it takes to create game worlds, what has been known to work before, and what you should keep in mind. You will also build your first scene in Torque 3D using the World Editor.
Level Up! What It Takes in Level Design Inside each game world, there are several scenes, or chapters, called levels. Each level is its own distinctive region with its own set of objectives that the player must reach before she can travel to the next level. Kind of like a haunted house amusement park, levels are like each of the spooky rooms visitors go into to get scared.
121
122
Chapter 5
■
This Is Your Land: The World Editor
Level design is formally defined as the creation of environments, scenes, scenarios, or missions in an electronic game world. Level designers create the environments that you move through and enjoy when playing video games. While the volume, complexity, and style of game levels may change between each game, designers use the same tried-and-true methods, architectural plans, and placement of obstacles to keep players consistently entertained and challenged. A large part of the game design document you draw up for your game will be composed of area maps and notes, and those are translated into game levels. A game level, whether it’s a building interior or outdoor terrain, sets the stage for the achievement of gameplay. Almost every single level is composed of the following: ■
Basic geometry or architecture (you know—the stuff player characters walk or jump on).
■
Details, such as textures or sprite decals.
■
Stage props, such as furniture, trees, rocks, and so on.
■
Environmental lighting and effects, such as sun, wind, rain, and so forth.
■
Interactive objects, such as characters, switches, pick-up items, power-ups, enemies, allies, and/or obstacles.
Levels add variety and spice to a set of gameplay mechanics. If you have a 3D shooter where the player is an espionage agent sneaking around and shooting bad guys with tranquilizers, the places where he sneaks around and tranquilizes enemies should be different enough from one another to add entertainment, diversity, and challenge to the game. A level designer has to make a level work in terms of fooling the player into believing that this image on the computer screen could be a real place and make it work as a stomping ground for the actions the player will take in it. Think of every game level you create as a movie set. Some of it will only have facades, or fake fronts. Some doors may lead to nowhere. Some elements may be incomplete. All that they have to do is operate on a psychological level to make the player think that she is somewhere you want her to think she is.
Level Up! What It Takes in Level Design
Levels often reflect the artistic choice for the game, so if you have a cartoony style, it would work to have cartoony game worlds. If you are making a grungy spy thriller, you will more than likely have environments based on real places that are given a darker look (see Figure 5.1 for a comparison). Level designers must also plant landmarks in these environments. Landmarks are easily recognized ‘‘set pieces’’ that have unique enough features to keep players from wandering lost around the game world or from going around in circles. Landmarks can be anything (see Figure 5.2), as long as they stand out and get noticed.
Figure 5.1 Top: The cartoony brilliance of Penny Arcade Adventures, from Hothead Games, is carried over in their use of virtual objects. Bottom: GarageGames Studios' Fallen Empire: Legions has a more solid-feeling pseudo-realism.
123
124
Chapter 5
■
This Is Your Land: The World Editor
Figure 5.2 One example of a landmark is an easily identifiable world object, such as this church in Hothead Games' Penny Arcade Adventures.
A game level should do the following: ■
Set the pace of game flow, including where resources and obstacles are laid.
■
Fence the player in so she doesn’t wander outside the main mission area.
■
Act as a backdrop to the action that will take place.
■
May be destructible or react in interesting ways to the player’s actions.
■
Tease the player with glimpses of a much wider world ‘‘out there.’’
Level Designer Dos and Don’ts The following are the best suggestions for you to keep in mind before developing a game world: ■
Design your levels outside of the World Editor first. Even if you jot down a quick blueprint on a scrap piece of paper, put your design to work before putting any work in on your design. This helps you avoid wasted time and gives you purpose.
Level Up! What It Takes in Level Design ■
Don’t keep fiddling with a level. Build it and move on. You can always edit later.
■
Save and save often. Computers can crash, power can go out, and little brothers and sisters can bang the keyboards. While the game engine itself is very stable, any number of accidents can come up, losing hours of hard work if you’re not careful. Be sure to save your game files often.
■
Be frugal what you build first. Design your sky, sun, and terrain before adding rivers, roads, and foliage because if you have to make an adjustment to any of the big things, it will wreck the smaller ones and make more work for you in the end.
■
Don’t design a level so large that it becomes confusing and the player doesn’t know where you want her to go next. Keep your levels tight.
■
Don’t place all your monsters, power-ups, and weapons in one single area. Spread them out and pace the game flow properly.
■
Don’t forget to give your player enough power-ups to survive but not so many that they make the game too easy.
■
Don’t make a game level so difficult it forms a ‘‘choke point’’ that frustrates the player. It can be easy to stump the player with puzzles, so be lenient.
■
Like the theory behind feng shui, always keep the action in a game level moving.
■
Play your level frequently to see how your game will look from the player’s perspective and to see what tweaks may be needed.
■
Try to accommodate all types of players, young and old, experienced and not so experienced.
■
Always think of your game environment as an amusement park ride or a tourist vacation trap: You do want to make it interesting, fun, and an escape away from the ordinary.
On that last point, think of yourself as an amusement tycoon. You must design for the player a place to come to, play, and leave with a sense of a unique experience. The more exciting your game world, the less likely players are to get
125
126
Chapter 5
■
This Is Your Land: The World Editor
bored playing your game. The more games you design, the more you will discover this to be true. No gamer has ever quit a game wishing it had been made less fun. As one reviewer said of Mario 64 after its release, ‘‘It was simply a lot of fun just running around, not really doing anything!’’ Tip "You want your game to be convincingly real to truly inspire mood and drama—and yet you have to be inventive, without straining credulity. It's a matter of combining and synthesizing, keeping the aspirations in your head, but looking for new ways to fit it all together." —Marc Taro Holmes, Obsidian Entertainment
Exterior and Interior Spaces In games, you have basically two kinds of spaces: exterior and interior. Each has its unique qualities. Mostly, they work in tandem to create the illusion of a wide responsive world. Exterior Space: The Great Outdoors
Exterior spaces don’t have a ceiling, not counting the sky. Exterior spaces allow the player to see for a great distance and to see more of the background, as shown in Figure 5.3. Frequently, you’ll use a type of exterior landscape geometry called terrain. Terrain is organic, and it can appear very natural. Terrain can take the shape of rolling hills or steep mountains or cliff faces. Terrain can take up most of the real estate, with just a few buildings and other architecture for cover. In Torque 3D, terrains are made using the World Editor and its sub-editors. There’s also a file type for external terrains you make in other programs and can import into the World Editor; this terrain file format ends with a TER extension. Interior Space: Going Indoors
Interior spaces work differently from exterior spaces. In video games, an interior space is any space that is indoors and has a ceiling, as shown in Figure 5.4. Interiors are often smaller, man-made instead of organic, and typically have more visible detail because they cause less strain on computer memory resources.
Level Up! What It Takes in Level Design
Figure 5.3 An exterior space (Dreamlords by Lockpick Entertainment).
Figure 5.4 An interior space (Penny Arcade Adventures by Hothead Games).
127
128
Chapter 5
■
This Is Your Land: The World Editor
Interiors are usually created separately from exteriors and then brought into the World Editor. Interiors, just like character models and models of vehicles, weapons, rocks, or trees, are made in 3D modeling programs and exported as DTS files so they can be loaded in the Torque World Editor. So if you want a creepy haunted house for one of your game levels, it’s best to make it in a 3D software program and then bring it into the World Editor.
Creating a World with World Editor The World Editor is the Torque 3D tool used to help you build your game’s levels. This includes adding and modifying terrain, sun, sky, game objects, models, environmental effects, lighting, rivers, roads, and so on. It is also where all game assets are brought to make a complete game level and where scripted or triggered events are placed. There are two ways to access the World Editor. If you’ll remember, the first involves opening the Toolbox, selecting a project, and clicking the World Editor button. The second way is to play your game, and at any time during play, press F11 (Win) or Cmd+Fn+F11 (Mac). Open Ravenscroft in the Toolbox. Select Empty Terrain from the level list and click the World Editor button now.
Adding Terrain Depending on your game genre and needs, you will most likely need terrain added to your level. This is especially true of outdoor scenes. To do so, the first thing you should put in your level will be a TerrainBlock. As its name implies, a TerrainBlock adds terrain to your level. This includes rendering, collision data, texturing, and the ability to edit the terrain object in real time. There are multiple ways to add a new terrain object to your level. I’ll start with the simplest. Creating Blank Terrain
First, there’s a terrain object already in your level. If you do not already have your level open, go to the Torque Toolbox, select Ravenscroft, and click the World Editor button to open your Empty Terrain level in the Torque World Editor.
Creating a World with World Editor
In the Scene Tree panel, expand your SimGroup – MissionGroup to see the TerrainBlock object. It will have an icon of a mountain with two peaks out beside it. That is what is generating the sandy dunes you see in Figure 5.5. Click to select the TerrainBlock in your Scene Tree and press the Delete key to remove it. Your sandy dunes will go away. Creating Flat, Generic Terrain
Click the File menu on the main menu bar, and select Create Blank Terrain. A Create New Terrain dialog box will appear. This window allows you to name your new TerrainBlock, assign an existing material as the texture for it, adjust its resolution, and choose the generator type (Flat or Noise). Name your new terrain flatplane. Click the drop-down list arrow beside Material and select dirt_grass from the list of available materials. Use the default generator value, or the Flat radio button. Compare your dialog box to Figure 5.6. Click the Create New button when you’re ready.
Figure 5.5 A terrain object comes ready-made with your level.
129
130
Chapter 5
■
This Is Your Land: The World Editor
Figure 5.6 The Create New Terrain dialog box.
A flat, 256-resolution TerrainBlock called TerrainBlock – flatplane will automatically be added to your level, as shown in Figure 5.7. You might need to move it to see it better. To do so, select the Move tool and click the red, green, or blue arrow handle on the gizmo to move it around. Once it’s in a position, use the
Figure 5.7 A flat plane.
Creating a World with World Editor
W, A, S, and D keys to move your camera position and, holding down the right mouse button, move your mouse cursor to look around. Get closer to see your flat plane and notice the texture detail as you do, then get farther away to see how limited the size is. For one thing, notice that your terrain is completely flat, with zero variation in height. Also, it isn’t that big. This is great if you’re creating manicured suburban yards for terrain and will place houses and fencing on top of it, but it really doesn’t portray a real landscape, does it? Select and delete that TerrainBlock. Let’s try something different. Creating Mountainous Terrain
Go to File > Create Blank Terrain on the main menu bar. In the Create New Terrain dialog, this time name your terrain mtrange. Choose rocktest from the available materials, set the resolution to 1024, and click the Noise radio button. Noise will randomly generate height points on your terrain using a noise algorithm. Compare your dialog box to Figure 5.8. Click Create New when you’re done, and you should see your new TerrainBlock – mtrange added to the scene, as shown in Figure 5.9. Now this is more like it. You have random slopes and crags, and some definite dimension to your terrain. However, you can tell that this level map would be difficult for a player to navigate. A gamer would be hard pressed to move his or her character up and down all those slopes. There’s another option. You can create, then edit, your terrain to get the most control over its appearance. So let’s delete TerrainBlock – mtrange from the Scene Tree and get started.
Figure 5.8 Creating mtrange in the Create New Terrain dialog.
131
132
Chapter 5
■
This Is Your Land: The World Editor
Figure 5.9 A mountain range.
Creating Blank Terrain
Go to File > Create Blank Terrain from the main menu bar. Fill in your Create New Terrain dialog box to look like Figure 5.10. Be sure to name your new terrain rcterrain. Set its material to dirt_grass, its resolution to 2048, and its generator to Flat. Click Create New when done, and your new TerrainBlock will be added to the level (see Figure 5.11).
Figure 5.10 Create the rcterrain TerrainBlock like so.
Creating a World with World Editor
Figure 5.11 A ground plane will be created for you.
Don’t worry if you think this is just as dull as the flat plane you created earlier. You are going to jazz up this ground plane. It’s just a start. You’re going to use the Terrain Editor to get a hands-on feel for sculpting and manipulating terrain.
Terrain Editor Interface Click the Terrain Editor button at the top left of your screen (it looks like a pair of mountain peaks) or press F2 to launch the Terrain Editor. You might not see a whole lot of difference between the World Editor and Terrain Editor at first, except that you won’t have the Scene Tree and Inspector panels obscuring your view. You’ll also notice that wherever you move your cursor, a little colored grid follows, as shown in Figure 5.12. This colored grid reflects the size, shape, and type of brush you have selected, and your brush will affect the terrain when you start clicking. Click-drag somewhere on the terrain to see what I mean. When you have made a tiny hill, you can use Ctrl+Z (Win) or Cmd+Z (Mac) to undo it.
133
134
Chapter 5
■
This Is Your Land: The World Editor
Figure 5.12 The default brush area.
There are two new displays at the top of your screen: brush options and the Terrain Editor Tool Palette. Brush Options
The brush is what you use to alter the detail or shape of the terrain. It is just like sculpting, using click-and-drag commands to reshape the landscape. The brush options at the top of your window help you set your brush’s settings, size, pressure, and softness. ■
Brush Settings—Toggles between a round or square brush.
■
Size—Changes the size of the colored grid that makes up the brush, increasing or decreasing the amount of terrain being modified.
■
Pressure—Determines the amount of modification being applied to the terrain.
■
Softness—Determines how much of the brush is affected by the pressure and intensity.
Creating a World with World Editor
You can change brush size from 1 to 40 on a slider. As you can see, changing the brush size affects the number and complexity of red-to-green squares you have following your mouse around. In terms of relative pressure, these squares are as follows: ■
Red—100% pressure
■
Orange—More than 50% pressure
■
Yellow—Less than 50% pressure
■
Green—Almost 0% pressure or totally neutral
Where the pressure is weakest (green), adjustment will be next to nothing. The stronger pressure (red) will result in very dramatic modifications with the least amount of clicking. When you wish to reduce the pressure, making your terrain edits more precise, move the Pressure slider (in the brush options) to the left or input a lower percentage. The brush will begin weakening toward the middle. You can also change the shape of the brush from a circle brush (hotkey C) to a box brush (hotkey B) (see Figure 5.13). If you want to make a hard wall or cliff face out of the terrain, you should use a box brush. Otherwise, the most organic brush to use would be a circle brush. If you click the curved line next to the Softness slider, a new dialog box will appear that contains a graph with multiple nodes you can move by clicking and dragging them up or down (see Figure 5.14). The graph, going from left to right, will determine the changing hardness of your brush. This can give you even more control over your brush. Experiment with different brush sizes, pressures, and softness. You can always undo your experiments by pressing Ctrl+Z (Win) or Cmd+Z (Mac). Terrain Editor Tool Palette
The Terrain Editor Tool Palette contains tools specific to editing terrain objects. These tools are hot-keyed to correspond to the number keys on your keyboard, from 1 to 9. Some of these tools will come in real handy making Ravenscroft, while others will hardly ever be touched.
135
136
Chapter 5
■
This Is Your Land: The World Editor
Figure 5.13 The difference in working with a box (on the right) or circle (on the left) brush.
Figure 5.14 The Brush Softness Curve dialog.
Creating a World with World Editor
1. Grab Terrain—This tool allows you to move a section of terrain up or down depending on which direction you click and drag your mouse. 2. Raise Height—This tool used to be called the Add Dirt tool for a very good reason: It only lets you elevate a section of terrain. Click and drag your mouse across the terrain, and wherever your brush touches will be raised up; if you go over the same area twice, it will be raised doubly. 3. Lower Height—This tool lets you lower a section of terrain, creating a depression in the ground. Click and drag your mouse across the terrain, and wherever your brush touches will drop down; if you go over the same area twice, it will go down even further. 4. Smooth—This tool lets you smooth jagged edges or rough terrain as you click-drag across their surfaces. 5. Paint Noise—This tool is used to give your terrain a more random, defined look by taking the noise algorithm that made the mountain range earlier and doing sporadic elevation and excavation. This is great for adding that random natural appearance popular in landscapes. 6. Flatten—This tool allows you to flatten terrain to the same height as the brush’s starting point, or where you first start clicking and dragging. (Used rarely.) 7. Set Height—This tool determines a specific height that the terrain must be taken to whenever you click and drag. By default, this will basically punch huge holes in your terrain. (Used rarely.) 8. Clear Terrain—Just like an eraser, this tool removes terrain wherever your brush touches. (Used rarely.) 9. Restore Terrain—Just like a paint brush, this tool adds terrain back where there is no terrain wherever your brush touches. (Used rarely.)
Making Ravenscroft Valley Go ahead and use the movement and Terrain Editor tools you’ve learned about to create the sort of terrain you see in Figure 5.15. This is going to be the main level for your first 3D game in Torque.
137
138
Chapter 5
■
This Is Your Land: The World Editor
Figure 5.15 The start of constructing a level rests in the base geometry, which in this case is the terrain. Here I have started developing the terrain to match the Ravenscroft valley sketch shown in Chapter 3.
Of course, this map is based on the one in the Game Design Document (see Chapter 3, ‘‘Creating a Basic Game Outline’’). The terrain in Figure 5.15 extends farther than the sketch I drew, because I might want to add more to the level at a later time. To make this terrain, I started with the Paint Noise tool and drew the outside walls. These will be impassablelooking mountains that enclose the valley. Then I added inside lines of mountains using the same tool. Once I had the general map outlined, I went back over the outside walls with the Raise Height tool, until I was satisfied with the height of the mountains (see Figure 5.16). I started out with a large brush and intense pressure and shifted to a smaller and smaller brush with less and less pressure as I progressed. This way I could add soft details to the heavier construction for an overlaid design. I don’t expect your map to look exactly like the one I made. For one thing, the noise algorithm the Paint Noise tool uses is completely random. For another, the exact size and height will be different for everybody.
Creating a World with World Editor
Figure 5.16 A preview of the mountains outlined against the sky.
Use a combination of the Terrain Editor tools and brush options at your command to sculpt the terrain into a decent structure. If you make a mistake, don’t hesitate; remember that most of the time you can undo your changes by pressing Ctrl+Z (Win) or Cmd+Z (Mac). You can iron out a mistake on the terrain usually by switching brush actions. Keep your construction loose and organic so that it doesn’t look too rigid or man-made. Make sure your player spawn point and Gideon model are set above your terrain. You do not want to switch from World Camera to Player Camera and find yourself outside or underneath your terrain. So either move your terrain down, or bring the player above it. Also, the position of the player should be set at the start position on the Chapter 3 Ravenscroft map sketch for game purposes later, but you can set him anywhere you like for testing purposes now. To select both the player spawn point and Gideon model, hold down the Shift key as you click on both. Move them using the Move tool. Remember to save often, as you never know when something might go wrong.
139
140
Chapter 5
■
This Is Your Land: The World Editor
Tip You can test the way a level looks from the player's perspective by going to Camera on the main menu bar. Select Camera > Player Camera > First Person, or Camera > Player Camera > Third Person to see the game level from the player camera. To return to the previous view, go to Camera > World Camera > Standard, and you will be able to fly above the scene without restraints.
After saving a final time, having completed the first step of level construction (the basic terrain), return to the World Editor. Sun and Sky
The environment isn’t just all about the terrain. Sun and sky play an important role in Torque. Sun
The Sun object (found in the Scene Tree panel under the Library tab, in the Level > Environment subsection) is used to control the level’s global lighting settings. The main settings include ambient coloring, azimuth, and elevation. The lighting effects produced by the Sun are completely dynamic, which means as soon as you start changing Sun settings, the effects are instantly reflected in the level. To add a Sun to your level, or any other object for that matter, find the template (in this case, Basic Sun) under the Library tab in the Level > Environment subsection and double-click it (see Figure 5.17). This will open a Create Object dialog box, which allows you to fiddle with the default settings and give a name to your new object. Once you click the Create New button, the new object will be added to your level and will automatically appear in the Scene tab list. When you select your new object in the Scene tab list of the Scene Tree panel, that object’s properties will fill the Inspector panel at the bottom right. Several of the object’s properties can be edited inside the Inspector panel. Azimuth and Elevation. Azimuth and Elevation are very important Sun properties you might want to edit. They determine the Sun’s relative position in the sky, which also affects light intensity and shadow casting for your level. They are, also, both angles, not just numbers. Elevation is measured between 0 and 180 degrees. 0 degrees would mean the flat geometric horizon (early morning), with a zenith at 90 degrees (being directly in
Creating a World with World Editor
Figure 5.17 Creating a Sun object: (A) Find and double-click Basic Sun in Library > Level > Environment subsection, (B) enter a name and change any default settings in the Create Object dialog box, and (C) edit object properties in the Inspector panel.
the middle of the sky, or high noon). 180 degrees, by this same pattern, would also be the flat geometric horizon, but at dusk. Azimuth ranges between 0 and 360 degrees, referring to the horizontal angle, which determines the direction the Sun is facing. 0 degrees means true north, 90 degrees is east, 180 degrees is south, and 270 is west. 360 degrees is almost right back to north again. Color and Ambient Color. On top of casting shadows and providing illumination in your level, the Sun also affects the color shading of all the surfaces in your level. It does this by two factors: color and ambient color.
141
142
Chapter 5
■
This Is Your Land: The World Editor
The value in the Color field will shade all surfaces that are in direct Sun light that color. For example, if you click on the color thumbnail to open the color picker and choose an orange hue, your result would be a sunset look for your level. The value in the Ambient Color field is applied to everything and will shade not only the surfaces but the color of your shadows, as well. For example, if you set your ambient value to a purple color, most of your level’s shadows will appear to have a purple hue. Sky Box
Now we’ll look at adding a Sky Box. The Sky Box object produces a level’s sky. The Sky Box is just what it says: It’s actually a cube map. This means that multiple images are used to create the sides of a cube that encapsulates the game world and makes it look like there’s an atmosphere around the world. The Sky Box can be used for day, night, or completely blank scenes for your environments. No Sky. Without a Sky Box object, there is nothing Torque 3D can render for a sky. So the color shown instead is whatever color is set in your LevelInfo, which is the first item in the upper hierarchy of your level’s SimGroup in the Scene Tree panel. Click LevelInfo in your Scene Tree panel and look at the properties in the Inspector panel. The canvas clear color field is what sets the color of the level when there is nothing to render. You can click the color thumbnail to open the color picker and choose whatever color you want the engine to render when nothing else is being rendered. Sky Box Materials. Now add a Sky Box. The Sky Box template can be found in the Scene Tree panel under the Library tab, in the Level > Environment subsection. Double-click it to add a Sky Box to your current scene. Save your level. If you don’t designate a material for your Sky Box, it will render a single color. You can change that by clicking on the Sky Box object in your Scene Tree panel and view its properties in the Inspector panel. The Sky Box > Material field determines the materials to be used for the Sky Box. You can click on the field button beside the Material field to open the Material Selector, and from there, pick a material you want the Sky Box to render. Default materials are stored in the My Projects\Ravenscroft\game\core\art\skies directory folder.
Creating a World with World Editor
You can also generate new materials for your Sky Box from scratch, but you’d have to do a little scripting. The script for these materials (if you are using the Full template for your level build, which we are) is in art/skies/NewLevel_sky/ materials.cs. Look for CubemapData. The CubemapData sets the images that will be used as part of a cube map. This is a singleton object that includes six surface images, such as skybox_1.png, skybox_2.png, and so on. Then you must have a material that references the CubemapData. Find the singleton material (NewLevelSkyMat) to peer at. This material references the cube map and becomes the material you can pick in the Material Selector in the World Editor. Since I have not really covered scripting games just yet, don’t worry about it right now. Later, you can return to this section and have a better understanding how these materials are scripted. Scatter Sky
A combination of Sun and Sky Box can add realism to your game level. A third object exists, however, that can be used instead. It is called the Scatter Sky object. We will be using the Scatter Sky object in place of a Sun or Sky Box, so if you have created either of those, delete them now. The Scatter Sky object (found in the Scene Tree panel under the Library tab, in the Level > Environment subsection) produces your level’s sky and adds level lighting, Sun positioning, and a hook for time-of-day manipulation. As your Ravenscroft level starts with a Scatter Sky object already in it, let’s look at its properties. Click on the Scatter Sky object in Scene Tree panel (Scene tab list) to bring up the Scatter Sky’s properties in the Inspector panel (see Figure 5.18). Sky Brightness. You can change the illumination level of your level through the Scatter Sky object. Look for the Sky Brightness field in the Scatter Sky properties of the Inspector panel. The stock value here is 30. Try reducing the Sky Brightness value to 2 and note how the illumination in your game level dims until it looks almost like twilight (see Figure 5.19). To change the value of this or any other property field, highlight the number with your cursor and type the desired amount in with your number keys, then press Enter (Win) or Return (Mac) to input the value. Changing the value to 2 darkens the
143
144
Chapter 5
■
This Is Your Land: The World Editor
Figure 5.18 Scatter Sky object properties in the Inspector panel.
Figure 5.19 Nighttime comes early to the valley, thanks to adjustments in the Sky Brightness value.
Creating a World with World Editor
whole level because Sky Brightness affects the overall illumination in your level, from night to day. Now change Sky Brightness to 100. The sky brightens up until it is extremely bright, almost like noontime in a cartoon world. You can change the sky brightness to whatever you want, but for now set it to 45. Scattering. Scattering changes the look of your level’s sky through the use of the Scatter Sky object. Scattering is controlled by two factors: mieScattering and rayleighScattering. Both are difficult to describe because both consist of fancy algorithms that do complex operations. Let me break it down for you in the simplest terms: ■
mieScattering—Higher values equal a bigger sun and more scattered sunlight. Lower values equal a smaller sun with fewer sun rays.
■
rayleighScattering—Higher values equal less blue sky, fading to pure black. Lower values equal more blue sky, fading to pure black.
The values of each do not need to change very much to see dramatic changes in your level. Usually, using values between 0.1 and 0.0001 are decent enough. For now, set both to 0.0045. Scatter Sky’s Sun. You can create a Sun or Moon through your Scatter Sky object, without actually having either of those objects in your level. That’s the beauty of using the Scatter Sky object. You have all the same controls you would with a Sun object in the Scatter Sky object. These include azimuth, elevation, color, and ambient color. You can also turn shadow casting on or off, although it is usually more realistic and dramatic-looking to leave shadow casting on. Scatter Sky’s Moon. You also have the option of replacing day with night and replacing your Sun with a Moon. Set the elevation value (found in the Orbit list) to 200. I’ve already talked about how elevation decides the Sun’s level placement. A value of 200 would put the Sun on the opposite side of the globe, placing the level in the dark of night. Move your camera around, and you should see that a Moon has appeared in the sky in place of the Sun, as shown in Figure 5.20. In the Lighting list is a value for Brightness. This controls the intensity of light rays cast by the Scatter Sky’s light object, be it a Sun or Moon (in this case, the
145
146
Chapter 5
■
This Is Your Land: The World Editor
Figure 5.20 A full Moon appears in the night sky.
Moon). Change the value of Brightness to 45. This will brighten up the level. It also improves visibility in a game set at night (see Figure 5.21). Clouds
Once you’ve added a sky to your level through the use of the Scatter Sky object, you can dress your level up even further by adding clouds. There are two clouds in Torque 3D’s templates you can choose from. You’ll use Basic Clouds for now. In the Scene Tree panel, go to the Level > Environment subsection of the Library tab and double-click on Basic Clouds. You can name your Basic Clouds myclouds. Click Create New when you’re ready, and the Basic Clouds object will be added to your level and placed in your Scene tab list. Go there now, and select your Basic Clouds object from the list to show its properties in the Inspector panel beneath. Cloud Layers. Let’s take a look at some of the layers that make up Basic Clouds. Look for Layers (about halfway down the properties list) and click the
Creating a World with World Editor
Figure 5.21 Now you can see the lay of the land better in the brighter moonlight.
plus sign beside it to expand it. There are three layers: 0, 1, and 2. Expand all three to see what they include, as I did in Figure 5.22. Turn each layer off and back on again by clicking the check box beside layerEnabled in each. What is removed is what is on that layer. The texture file used is the property just beneath layerEnabled, which you can change by browsing to a new transparent PNG image file. If you know how to set transparencies in a 2D art image editor program and save as or export as a PNG image file, then you can create your own cloud images and bring them into Torque 3D here. For our purposes, leave layers 0 and 1 enabled, but turn layer 2 off. This will decrease the amount of clouds in the sky (see Figure 5.23). Cloud Scale. You can also adjust the texScale property to change how often the texture is repeated in the given layer. Decreasing texScale will cause your texture to render over a larger area, which may be ideal for high-resolution textures, and increasing texScale will cause your texture to be tiled multiple times over a smaller area, which may be useful for low-resolution textures.
147
148
Chapter 5
■
This Is Your Land: The World Editor
Figure 5.22 The three layers that make up Basic Clouds.
Figure 5.23 Turn layer 2 off in the Inspector panel for this look.
Creating a World with World Editor
Try it now. Set textScale for layer 0 to 3 (tiling more of it across the sky) and texScale for layer 1 to 0.5 (spreading it out over a wider area of the sky). Cloud Height. Clouds should not always be rendered at the same altitudes, either. Clear days may have clouds extremely high in the atmosphere, whereas severe thunderstorms would have thicker banks of clouds closer to the ground. This is why Torque 3D has a Height value for each of its cloud layers. The Height value is an abstract number controlling the curvature and height of the dome mesh the cloud layers are attached to. Try it now. Set height for layer 0 to 5 and height for layer 1 to 1. This will make the main cloud bank, which isn’t in motion, appear to be higher in the sky than the smaller, fleeting clouds beneath. Water
There are two types of water used in Torque 3D: Water Blocks for lakes and ponds, and Rivers for winding creeks. A third type is the Water Plane, which is useful for making horizon-extending oceans. Water Block
Water is supposed to be a liquid, you might be thinking, so why do I call it a ‘‘water block’’? In 3D worlds, designers create cubes and apply water effects to them. These cubes then get sunk into the world terrain so that you just see their surfaces. That way you don’t have to model the interior contours of the water shape, which would end up being a long haphazard affair. To have a place for water, you have to simulate lake beds and/or creek beds. So go ahead and use the Lower Height tool (in the Terrain Editor) to create depressions for both a decent-sized lake or pond and a curving creek, as shown in Figure 5.24. Next switch to the World Editor. Go to Library > Level > Environment in your Scene Tree panel and find Water Block. Double-click on Water Block, and in the Create Object dialog box, call it lake01. Immediately after you click Create New, a square body of water will be dropped into your level. This is your Water Block. Just like any other object you have in your world, you can manipulate its transform using its gizmo. Scale it, then move your Water Block into the crater you
149
150
Chapter 5
■
This Is Your Land: The World Editor
Figure 5.24 Make your beds for your water to lie in.
made in the terrain for a lake. Note that Torque 3D’s Water Block will actually produce smooth shorelines whenever it comes in contact with surrounding terrain. The edges will clip and reflect the physical contact using wave-like textures, as shown in Figure 5.25. The Water Block object actually has to be low enough to meet the terrain for shorelines and clipping to take place, so if you don’t see adequate conforming, lower your object further into the terrain. Water Color. You can change the default blue color of your Water Block by clicking the color picker thumbnail beside BaseColor in the Water Block’s Water Object properties in the Inspector panel and UnderwaterColor in the Water Block’s Basic Lighting properties in the Inspector panel. BaseColor sets the overall hue of your Water Block, while UnderwaterColor sets the hue of the water seen from inside it, or when you swim into the depths. Water Fog. Water Blocks have fog, which corresponds to how murky they are underwater. You can change the Water Block’s fog by adjusting the value for waterFogDensity in the Water Block’s Underwater Fogging properties in the Inspector panel. Try it. Change waterFogDensity to 0.0045 and notice how clear the water becomes. Change it to 1.0 and notice how solid it becomes. Finally, set
Creating a World with World Editor
Figure 5.25 Waves are auto-generated wherever the water comes in contact with land.
it at 0.05. This is a decent water value. It is still very clear so that you can see through it, but it’s not too clear (see Figure 5.26). Waves and Ripples. Water Blocks display waves and water ripples, both of which are controlled by layer settings in the Water Object section of the Water Block’s properties in the Inspector Panel. You can adjust values for waveDir (which way the wave moves), waveSpeed (how fast the wave moves), waveMagnitude (how big the waves get), rippleDir (which way the ripples move), rippleSpeed (how fast ripples move), and rippleMagnitude (how big ripples get). This gives you a lot more control over your Water Blocks. You can make them appear smooth and calm or frenzied and white-capped, with just a few tweaks. River
The River Editor is a new tool for Torque 3D that allows you to quickly and easily place and modify creeks and rivers. The River Editor is accessible from the Editors drop-down list from the main menu bar or from a button icon on the tools bar. Go to it now. Click anywhere on your terrain to place the first node of a new river. Place it at the start of your creek bed, where you planned to make a river. Nodes appear as
151
152
Chapter 5
■
This Is Your Land: The World Editor
Figure 5.26 Make your water a more transparent liquid.
colored cubes. Subsequent nodes are added by clicking along the terrain. You will be given a visual demonstration, first, of how the river will move along the terrain that will help you know where to place nodes, as shown in Figure 5.27. Keep your river moving along the direction of your creek bed. Move your camera (with the W, A, S, and D keys) so that you can see where you’re taking your river. Double-click or press the Esc key when you are finished placing your river. Notice that a green node represents the start of your river, and a red node represents the end of your river. In-between nodes appear pink, as do the lines demarcating fluctuations in the river’s direction. The river’s current will move from the green node in the direction of the red node, and objects and player characters will be pulled by the river’s current. Adding new nodes can be done easily by selecting the Insert Point tool and clicking anywhere on the river’s central segment line. More nodes equals more control over the shape of the river. Each node has its own gizmo, which can be used to transform that part of the river. You can raise nodes up or down or side to side using the Move Point tool.
Creating a World with World Editor
Figure 5.27 Build a river by placing nodes along the creek bed.
A red area along a Z axis of the river will appear wherever the water does not extend through the terrain. You can use the Scale Point tool (shown in Figure 5.28) to fix this problem. Adjusting a selected node’s scale for width (red gizmo handle) will easily remedy this. If you see green patches where the water does not reach the bottom of the creek bed, you can repair this by changing the selected node’s scale for depth (blue gizmo handle). When you finish constructing your new river, return to the Object Editor and select your River object from the Scene Tree panel. In the Inspector panel, note that River objects share a lot of properties in common with Water Block objects. You can adjust your river’s water fog and color, the size and shape of waves and ripples, and fog density to make your River object blend more seamlessly with the natural terrain, as shown in Figure 5.29. Water Plane
The Water Plane operates about the same as a Water Block, but it is an infinite body of water with an adjustable height. The moment you add a Water Plane to your level, everything below the height of the Water Plane will be submerged, as
153
154
Chapter 5
■
This Is Your Land: The World Editor
Figure 5.28 Use the Scale Point tool to adjust the width and depth of your river.
Figure 5.29 There! You've made a river.
Creating a World with World Editor
it would be in a Water Block (great for making sunken cities), and everything above the Water Plane will be dry land and reflected in the water object. Painting Your Terrain
The Terrain Painter (see Figure 5.30) is another editor built into Torque 3D that allows you to paint your terrain with various materials, such as grass, dirt, rocks, and so on, so that your terrain isn’t just made up of one material. This adds variety, aesthetics, and immersion to your virtual world. The Terrain Painter is accessible from the Editors drop-down menu from the main menu bar or from a button icon on the tools bar. Go to it now. The first thing you’ll notice is that, just like the Terrain Editor, you have a brush made up of a colored grid that can be set to a circle or box shape. At the top right you have a material preview window that will show you a detail of the material currently selected, which in this case is none, so it shows you a transparent grid of white and gray boxes.
Figure 5.30 Terrain Painter.
155
156
Chapter 5
■
This Is Your Land: The World Editor
In the middle is the Material Selector, which shows you available materials, including the one(s) currently used in your level. Click the New Layer icon in the Material Selector. This will bring up the Terrain Materials Editor, where you can pick and modify materials you wish to paint with. Choose rocktest from the list and click Select. Rocktest is now an available material in your Material Selector. With rocktest as your selected material, start painting the lake and creek beds to appear rocky (see Figure 5.31). You can add other materials to your Material Selector and paint other parts of your terrain anything you wish. Rocky areas are perfect for mountain peaks, creek and lake beds, steep slopes, and areas in Ravenscroft valley where people might put their buildings. Sandy areas are perfect for soft river beds, shorelines, pits, and sand dunes. Grassy areas are perfect for cultivated and forested areas. Experiment with your materials. The more random details you give your terrain, the more life-like it will become.
Figure 5.31 Make the lake and creek beds rocky by painting the rocktest material on their terrain surfaces.
Creating a World with World Editor Tip You can change the size of your brush incrementally by pressing the left bracket ( [ ) and right bracket ( ] ) keys on your keyboard. Each tap will raise or lower the size value of the brush, and this hotkey can make terrain construction and painting faster and more controlled for you.
Making Your Own Textures
Textures are used to enhance the 3D game environment, pure and simple. The proper use of textures can also convey a mood or feeling, as well as establish a time and place. You can get textures from almost anywhere. Many game developers actually use digital cameras to take close-up photos of buildings, walls, drainage pipes, metal grills, and more. If you don’t have a digital camera, which can plug right into your computer, you can use a basic film camera and scan in images. Scanners are pretty low-cost items these days. When you do find a perfect candidate to use as a texture, remember to snap shots of it from as many angles, distances, and lighting situations as possible. Besides using photos, you can draw or paint your own textures using traditional media, such as oil paints, pastels, or other. Or you can go all high-tech and create your textures inside the paint software program of your choosing. There are several plug-in brushes for Adobe Photoshop, for instance, you can download that are very useful for creating random rough surface textures. One matter to always bear in mind when getting textures is that they have to balance well with the other textures you are going to use for your game. The lighting, color contrast, and shape have to be fairly decent matches and coordinate well when stuck on 3D objects in a game level. Textures are also meant to be tiled. Say that you found a great image of some rough patch of ground. If you do nothing to it and try to use it in Torque, you might see some hard edges where the texture meets up with itself and doesn’t blend very well. If this happens, there is a straightforward process you can use to make the image tile properly. This technique works with all paint packages, including Adobe Photoshop or an open-source program, such as GIMP, Paint.net, or Aviary.com. Let’s try it now. Make a Brick Texture. On the DVD in Data Files > Chapter 5, there’s an image file called bricks.jpg. Open it into your 2D image editing program.
157
158
Chapter 5
■
This Is Your Land: The World Editor
Drag your marquee selection tool over the left-most edge, as shown in Figure 5.32. You’re going to mirror the sides to their opposite edges. So with this small edge on the left, copy it and horizontally flip its duplicate copy over to the right side. Do the same with the bottom edge up to the top edge using a vertical flip. After you place these duplicated edges, you’re going to have to merge them with the underlying layers and spend some time getting them to blend well with the original. The more complicated the pattern on the texture, the more work you’ll have to do to keep the entire image consistent. When you’re done, your image should look similar to Figure 5.33. Save it as bricks_final.jpg in your My Projects\Ravenscroft\game\art\terrains directory folder. Launch Ravenscroft’s new terrain in the World Editor. Open the Terrain Painter and click the New Layer icon. In the Terrain Materials Editor, the left side (Terrain Materials) has two icons near the top: a page, which is the New Material button, and a trash can, which is the delete button. Click the New Material button. Leave the material named newMaterial for now. On the right of the Terrain Materials Editor window (where it says Material Properties), click the topmost thumbnail preview, the blank gray-and-white grid, to browse for your bricks_final.jpg image file. Click Select when done.
Figure 5.32 Duplicate this edge.
Creating a World with World Editor
Figure 5.33 Your final bricks texture.
In the Terrain Painter, use your chosen brush to paint the terrain with the bricks and see how well they tile. You can always fix your texture image, if need be, or undo your painting with Ctrl+Z (Windows) or Cmd+Z (Macintosh). Adding a Road
There are two kinds of roads you can add to your levels: mesh roads, which have a thickness and depth to them (where they ride above the surface of the terrain); and decal roads, which are painted directly over the top of the terrain surface. By and large, the latter are the roads you will more likely use in your level construction. Switch to the Road Editor. Just like drawing the line for the river you made earlier, start by clicking somewhere on your map and create new nodes with each subsequent click. Draw the curve of a road that runs from Outpost A to Fortress B in the Game Design Document for Ravenscroft (as shown in Chapter 3, ‘‘Creating a Basic Game Outline’’). When you reach the end of the Road (literally) press Esc or double-click to close the Road. Again, just like making a river, you can expand the width of segments along the road by selecting the nodes on that segment and using the Scale Point tool to
159
160
Chapter 5
■
This Is Your Land: The World Editor
stretch the road. You can also use the Move Point tool to transform the direction or positioning of each of the points along the road. The default material for the road fits with your game (see Figure 5.34), but if you decide to change the material or are working on your own, you could click on the Mesh icon beside Material in the Decal Road properties in the Inspector panel to bring up the Material Selector. Here you could find another image file to use for your road’s material. Adding Replicators
Another effective level detail is to scatter objects around the terrain to fill it up and to make it appear more natural at the same time. You can do this by using Torque 3D’s replicators. Foliage Replicator
The Torque 3D Foliage Replicator allows you to spread multiple objects throughout your level based on a diameter focus.
Figure 5.34 A road across Ravenscroft Valley.
Creating a World with World Editor
The most practical uses of foliage include the following: ■
Creating fields of foliage, such as grass, cornstalks, wheat, clover, and such.
■
Providing another layer of immersive environmental realism.
Switch to the Object Editor inside the World Editor. You can access the Foliage Replicator from the Scene Tree Library tab, in the Level > Environment subsection. Double-click on Foliage Replicator to open the Create Object dialog box. Name your new replicator weeds, and click Create New. Your Foliage Replicator will appear in your level. It is imminently visible, as it has a glowing colored ring around its outside parameter. This parameter shows you where the replicating stops and can be extended or shrunk by adjusting the OuterRadiusX and OuterRadiusY properties in the Area section of the Inspector panel. You can move your replicator using the Move Selection tool from the Tools Palette. Let’s set the Replicator to create duplicate weeds over the area of influence. In the Media section of the Inspector panel, click the multi-dot ( . . . ) browser icon beside FoliageFile. Go to Ravenscroft/Game/Art/Environment to find plant1. png, then click Open. This places that 2D image file on the ground plane of your terrain at random intervals. The number of plants added to the Replicator area are controlled by the FoliageCount property in the Media section of the Inspector panel. Set this to 20, and 20 plants will appear randomly within the Replicator area (see Figure 5.35). Scroll down to the Animation section of the Inspector panel and put a check next to SwayOn to make the weeds sway in a virtual breeze. If you want them to sway together, as though ruffled by the same breeze, then check SwaySync as well. You can add other foliage areas, if you like, using different plants. Shape Replicator
The Torque 3D Shape Replicator works just like the Foliage Replicator. Drop one into your level. Then, under the Media section of the Inspector panel, click the multi-dot ( . . . ) browse icon next to shapeFile and go to Ravenscroft/Game/Art/ Shapes/Rocks to find boulder.dts. Then click Open. In the Replications section of the Inspector panel, raise the ShapeCount value to 20. This will place 20 of these boulder shapes randomly around the Replicator
161
162
Chapter 5
■
This Is Your Land: The World Editor
Figure 5.35 Add some plants to your otherwise barren landscape.
area, an area that you can change (again) by adjusting the OuterRadiusX and OuterRadiusY properties in the Placement Radius section of the Inspector panel. This was just an experiment to show you what the Shape Replicator can do. For now, go ahead and delete the Shape Replicator instance from your Scene Tree Scene tab list. Adding Weather Effects
A couple of really nice effects that Torque 3D comes with are Precipitation and Lightning. These are objects you can add to your scene, and they are found in the Scene Tree Library tab, in the Level > Environment subsection. Try Precipitation. Double-click Precipitation, and don’t worry about naming it in the Create Object dialog box. Instead, click the Precipitation data drop-down list arrow and select Heavy Rain. Then click Create New. Instantly, raindrops will fall from the sky, splattering against the terrain and road, and you will hear sound effects of rain and thunder (see Figure 5.36). Not bad for basically clicking a couple times, eh?
Creating a World with World Editor
Figure 5.36 It's raining, it's pouring . . .
Next, try Lightning. Double-click Lightning and make sure its Data block is set to DefaultStorm in the Create Object dialog box before you click Create New. Now at regular intervals the sky will be split with white and blue jagged lightning bolts and an electric crackle. These are just a couple of weather effects. You can create more, with just a little scripting and setup. For now, you can remove either, as the lightning can become annoying in a short amount of time, and the precipitation may or may not be effective in the game you want to create. Q & A with Dylan Romero of GarageGames
What was Torque based on? What formed its origins? "When GarageGames was formed, an engine was needed to build games and tools on. Since the founders of the company had worked extensively on Tribes 2, they decided to use the code behind that game to form the first iteration of the Torque engine."
Who can use Torque? Is it best for programmers, artists, designers, or students?
163
164
Chapter 5
■
This Is Your Land: The World Editor
"Torque is best used by a team consisting of programmers, artists, and designers, because all these skills are necessary to create a great game—even if that game is created by a 'team' of just one person. Students are of course included in this summary. As long as you have the skills, you can create a game using Torque. DeVry, ITT Tech, Brown, Michigan State University, and many other colleges and tech schools use Torque in the classroom as a useful tool for learning game development."
What game genres are best to develop using Torque? Are there any limits? "Torque was initially made for Tribes 2, so first-person shooters are obviously one of the genres Torque supports. Since its release, however, nearly every game genre has been created using Torque. Platformers, MMOs, fighting games, RTSs, puzzle games . . . all of them have been created using the Torque engine. Tweaking of the source code might be necessary to create certain aspects of gameplay, but the engine itself provides almost everything a developer needs."
What is the youngest age of a developer using Torque to date, and what have they created? "Many teens own a copy of Torque, the youngest of which I know about is 14 years old."
What has been the most popular best-selling game using Torque in recent years? "The Marble Blast series has easily been the most popular GarageGames-developed Torque title in recent years, thanks in part to its success on Xbox LIVE Arcade. It still sells very well to this day."
To someone just starting out in game design, what would be your most important advice to them? "Start small. Many people never finish projects because they want to create something like a Halo-killer or an MMORPG right off the bat. Finishing a relatively modest project will give you a realistic idea of what problems and challenges can spring up during the course of creating a game. The last 10% of any project is the hardest to complete."
What’s Next? That pretty much concludes the discussion of making outdoor environments for games. Next you’ll peek at making 3D models for games using 3ds Max. The principles for game level design stay the same, no matter what editor or engine you use. What you’ve learned you can apply to all kinds of different games when it comes to designing levels. So scale those peaks, and you’ll be surprised what you find for yourself!
chapter 6
I No Ditz, I Know DTS In the preceding chapter, I made the distinction between interior and exterior spaces. I focused on outdoor, or exterior, environments in that chapter, especially creating rolling terrain with rivers and roads. To create these, you use the Torque World Editor. This chapter is just the opposite. You’ll be going inside. You’ll look at what it takes to create indoor environments and other physical structures for use in Torque. You’ll also look at extra 3D models that you might want to add to your game. For this, you use a third-party 3D modeling and animation program. Your game’s world geometry is one step, and adding 3D models is the next. 3D models make up most of the objects in your game. This includes players, items, weapons, vehicles, props, buildings, and so on. Torque refers to these 3D models as shapes. Torque 3D currently supports three model formats: DTS, COLLADA, and DIF. ■
DTS—Short for Dynamix Three Space, DTS is a proprietary format first developed for a Dynamix game called Tribes. The format is binary, which means it is not in a standard readable format.
■
COLLADA—Short for Collaborative Design Activity, COLLADA is a file format emerging as the standard for interchanging models between digital content creation (DCC) applications. The file extension is .dae (digital asset
165
166
Chapter 6
■
I No Ditz, I Know DTS
exchange) for COLLADA files. The data is stored in an open standard XML schema, meaning it can be read and tweaked manually in a text editor if needed. ■
DIF—Short for Dynamix Interior File, this is another proprietary file format developed during the Tribes days of Dynamix and has survived through the evolution of Torque. DIFs have generally been used for buildings and other enclosed structures. While the binary space partition (BSP) functionality is useful, and the constructive space geometry (CSG) model editor Torque Constructor is free, using a DTS or COLLADA file with Polysoup collision enabled will save you time on asset generation, so in this chapter, you’ll be using those instead.
I’ll use 3ds Max for the following lessons, although there are several other 3D programs you could use. The file format I’ll focus on using will be DTS. 3D modeling and animation is a vast subject and is not intended for beginners. In fact, it is more for intermediate users. If you want to learn how to make really cool 3D models and animate them, you should read another book, but which one depends on the software program you pick. For that reason, Torque for Teens has been designed so you can skip the following two chapters if you want, because both of them are about 3D modeling. However, if you feel like you are capable or want to get the ‘‘gist’’ of 3D down, then go right ahead and read along. That being said, let’s get started!
Games and 3D Art What you look at over half the time that you’re playing video games (and what most players base their purchase of a new game on to start with) is the artwork. Game artwork that got started with 8-bit graphics has utterly exploded in the gaming industry, and today it stands as a very important part of game design. There is a recurring debate about which is more important in game design: gameplay or artistry. Gameplay is vital–if a game does not play well, meaning that the controls are quirky or unresponsive or the player gets lost too many times and does not know what to do, then the game gets terrible reviews and does not get played. Yet games sell, for the most part, because of the graphics. If the game art looks amazing, then people will play the game. Therefore artistry is just as vital as
Games and 3D Art
gameplay, but in the end the success of your game rests on whether it is Fun, Fair, has Feedback, and is Feasible. Your artwork will either attract users to your games or put them off before they even play. Therefore it’s imperative to learn about game art, even if you’re not an artist, and even if you’re a programmer. Being an artist myself, rather than a programmer, I can assure you that it can be learned, that it doesn’t require talent, and that even a math whiz can construct decent game graphics.
3D Does Not Require Blue-and-Red Glasses! The reason for the title of this section is because there is a misconception, especially in our current theater crowd, that 3D means having to wear blue-and-red specs to see things on the screen appear larger or as if they’re coming off the screen. This is just one type of 3D. 3D, which stands for three-dimensional, is any art or entertainment product that appears to be made of more than just two dimensions. Flat line-drawings are two-dimensional, or 2D. Part of game artwork is 2D, and it gets used for the graphical user interface and materials used to paint your terrain and models. You create 2D image files using software programs like Photoshop, GIMP, or Paint.net. The rest of game artwork is 3D, and I’m not talking about the Ravenscroft world you’ve built. 3D files, often called models, are important for creating characters, weapons, vehicles, and so much more. They flesh out your 3D world, making it appear more realistic to the gamer. It’s vital to know how to make 3D models, know how to get your models into Torque, and also how to model efficiently for a real-time game engine. That last part takes some explaining. Unlike 3D films like Avatar, a game engine must be able to render huge amounts of geometry and effects in real time. In order to do this, the game engine relies heavily on the user’s computer and how much virtual memory it has. Shortcuts are taken in the rendering process to optimize frame rate on any computer screen. Torque has its own unique shortcuts. One shortcut is to make low-poly models, and another is to use DTS or COLLADA files for models. I’ll discuss the finer points of these two file types later. Right now, let’s take a closer look at low-poly modeling.
167
168
Chapter 6
■
I No Ditz, I Know DTS
Low-Poly Modeling
In order to understand what is meant by ‘‘low-poly,’’ you must first have a firm grasp of 3D space. Perhaps you are already something of a 3D artist, or perhaps the tutorials so far in this book have taught you a great deal about working in 3D. If you already think you know all about 3D, skip over the next section. If not, read on. How Do You Do 3D?
Those geometry lessons in school should really come in handy because, when you learn geometry, you’re learning the concepts behind virtual 3D space. Virtual 3D space emulates the real world all around us, but it only exists in a computer, which has to reflect back to you, the viewer, what the virtual 3D space looks like at a given angle as a single flat image on the computer screen. 3D space has height, width, and depth, which are often measured by the Cartesian coordinates X, Y, and Z. The following is terminology most often referred to when working in 3D (see Figure 6.1 for examples): ■
Vertex/point: A vertex or point is a single point in 3D space.
■
Edge/segment: Edges or segments are lines that run between vertices.
Figure 6.1 (A) Vertex/point, (B) Edge/segment, (C) Polygon, and (D) Mesh.
Games and 3D Art ■
Triangle/face: A triangle or face is the plane made up by three intersecting edges.
■
Polygon: Polygons are often witnessed as squares made up of two (or more) triangles.
■
Mesh: Polygons interconnect to form a wireframe outline of a model; this wireframe is called a mesh.
■
Surface: A surface is the outside of the mesh, which you put a texture or material on (see Figure 6.2).
Figure 6.2 A texture applied to the surface of a 3D mesh. Models are part of the Gremlins Model Pack, available from 3drt.com (www.3drt.com).
169
170
Chapter 6
■
I No Ditz, I Know DTS
This is a lot of information to digest right away, so re-read this last bit if you’re still lost; and if you still don’t get it, just continue right along because it will eventually come to you through practice with the 3D software. From Sprite to 3D: Short History Lesson
In the first generation of electronic gaming, back in the golden years of Atari and the first Nintendo, graphics were not 3D but only 8-bit sprite images. Pixels at that time were large colored squares, and characters couldn’t have a whole lot of details. The graphics depended on a programmer hard-coding graphics programming on a chip, which limited the look that game developers could go for. At that time, incidentally, most games were coded and implemented by one person, who was both programmer and artist. 3D Monster Maze was a computer game developed by Malcolm Evans in 1981 for the Sinclair ZX81 home system. Although incredibly low-res and difficult to play, 3D Monster Maze was the first computer game to really incorporate 3D graphics. In it (see Figure 6.3), players had to outrun a mighty Tyrannosaurus Rex while navigating a twisting maze.
Figure 6.3 Malcolm Evans’ 1981 home game 3D Monster Maze.
Games and 3D Art
The game Quake, from id Software, released in 1996 and shown in Figure 6.4, was the first shooter game to incorporate 3D graphics. Before that, even with earlier shooter games such as Wolfenstein and Duke Nukem 3D, 2D sprite graphics were used to simulate 3D. Quake really set the stage for the use of 3D polygons in hardcore gaming. In the second generation, when we saw the burgeoning of Super Nintendo, Nintendo 64, SEGA Genesis, and Sony PlayStation, games truly entered the 3D spectrum, but they were still limited to around 700 polygons per character. Pixels had shrunk but were still very noticeable, and many of the models were flat shaded, giving them an almost origami, or folded paper, look. Now in the ‘‘next gen,’’ or third generation, of games, with higher-rate computer processors and better video cards, characters are limited to around 1,500 polygons, and pixels are so minute that displays look flawlessly detailed even when you stare at them a while. And with light blooms, bump maps, and anti-aliasing (all big terms that make 3D game art sound more complicated than it really is!), you’d never be able to tell the difference between big-budget games and
Figure 6.4 id Software’s Quake set the standard for 3D shooter games to follow.
171
172
Chapter 6
■
I No Ditz, I Know DTS
computer-animated movies. In fact, many movie-to-game crossovers have been nearly identical to their parent licenses! Tricks to Defeat Rendering Lag
Cinema that uses CG (computer graphics), such as the movie Avatar, is composed of several layers of 3D renderings over time. You don’t have this luxury in a game graphics engine. Games are meant to be played in real time, and the rendering can only be as good as the user’s video hardware, as previously mentioned. Thus game asset artists have tried many tricks to keep the rendering time low and the game moving at a rapid pace. ■
Player Visibility Limitations—One trick has been to limit the visibility of any one screenshot. For instance, if you are going to show the player an entire alien landscape, with sharp protruding mountains on the horizon and villages in the valley, without taking any shortcuts, you will cause the player to have difficulty with the frame rate. This is why most games take place in twisting corridors and with limited visibility.
■
Polygon Limitations—Another trick is to limit the number of polygons in any given scene. As previously mentioned, a good rule of thumb with today’s games is keeping polys for each character under 1,500. Overall, using fewer polygons on a character can make it look less smooth and less realistic, but making better texture maps to cover the model can hide this fact. Painting in just the right amount of light, shadow, and detail in the 2D texture map can make a relatively flat character come to life.
■
Level of Detail (LOD)—The last trick to mention is using level of detail, or LOD. LOD is a programming algorithm whereby characters that appear closer to the screen have more polygons, and characters farther away are swapped for models with fewer polygons, until they are nearly blurred beyond all recognition. This not only works with 3D models. You can also use LOD on texture maps, swapping one high-res texture (seen close up) for a low-res one (seen far away). This not only helps solve rendering lag, but it also simulates field of view (FOV ), a camera trick that makes objects outside the peripheral view appear blurry.
All these tricks (limiting visibility, using lower polygon counts, painting better texture maps, and incorporating LOD) save processing time and decrease lag.
Creating DTS Files
Creating DTS Files DTS is one of the 3D model formats optimized for rendering in Torque. The other model format often used by designers is COLLADA, but first let’s examine the DTS file and what it does. The following list outlines the kinds of models the DTS format is designed for: ■
Character models animated using bones.
■
Small complex objects such as rocks, trees, chairs, tables, weapons, ammo packs, flags and more, which can also be animated or attached to player or vehicle models.
■
Vehicles, which player character models and weapons can be mounted onto.
■
Dynamic animated details to be added to DIF structures, such as turret cannons, revolving radio dishes, roosting birds, and more.
In this chapter and the next, you’ll look at the creation of DTS files using several of the most widely used modeling packages in the industry, and you’ll also create the player character for the Ravenscroft game.
Most Widely Used Modeling Packages for Creating DTS Files It can be tricky figuring out which modeling package to use for Torque, as there isn’t currently one made specifically for the engine. So you have your option of several affordable and not-so-affordable programs to choose from. The Not-So-Affordable Programs: Max and Maya
The top two industry-standard packages model artists use in game design are 3ds Max (or just plain Max) and Maya—both of which can be purchased from Autodesk (http://usa.autodesk.com). Max and Maya help you create super-efficient 3D models and, using special plug-in exporters, can export them to DTS files. However, both programs can cost you quite a bit of money, so be prepared to budget it in. The Affordable Programs
Thankfully, on the other hand, there are low-cost solutions. These include both MilkShape 3D and Blender.
173
174
Chapter 6
■
I No Ditz, I Know DTS
MilkShape 3D
The most commonly sought program for Torque developers on a shoestring is MilkShape 3D, which has similar tools to Max or Maya but is quite a bit cheaper. MilkShape 3D is made by Chumbalum Soft. You can find the program online at http://www.chumbalum.swissquake.ch. MilkShape 3D comes with a built-in plug-in exporter you use to export files to DTS. Blender
Another modeling program, Blender, is open-source, which means that it’s free! That’s great news for people new to modeling, who just want to try 3D, but it also means that the program is built by community access and may lack documentation if you get stuck. You will find the installation files for Blender for download on their website at www.blender.org. There’s a different Blender installer for each operating system. For the Windows 64-bit build of Blender, you may need to install an official update from Microsoft called Microsoft Visual C++ 2008 SP1 Redistributable Package (64). As a side note, most Torque users who use Blender are now switching from DTS to Blender’s built-in COLLADA exporter.
Using 3ds Max to Make DTS Files I will be using 3ds Max (version 2011) for the following modeling tutorials, but the same basic principles apply no matter what program you get your mitts on, so you can still follow along. If you would like to use 3ds Max, you can download a 30-day trial version of it from Autodesk. Just Google for ‘‘3ds max trial,’’ and you’ll find the latest-andgreatest software trial online. The Torque DTS Exporter is a plug-in for 3ds Max. It is used to export Max content as DTS files you can use in Torque. There is a DTS Exporter that works for 3ds Max 9 and yet another for 3ds Max 2010 and 2011. These two DTS Exporters are on the companion DVD, in Software > Max2DTS, and are for Windows users only. Place the appropriate file for your version of 3ds Max into the plug-ins folder of 3ds Max. Then restart 3ds Max in order for the plug-in to be seen by the software.
Familiarize Yourself with Max
That’s all it takes to turn Max into a Torque-DTS-generating machine! A really good resource for using 3ds Max to create DTS files for Torque is Brad Strong’s book Creating Game Art for 3D Engines (Charles River Media, 2008). Strong covers additional tips and tricks for using Max to create assets for Torque, so if you find this to be an area you enjoy, be sure to pick up his book.
Familiarize Yourself with Max The first time you start 3ds Max, you’ll see its main interface window, as shown in Figure 6.5. This interface is logically laid out and easy to use. I’ll go through the various elements, so you understand how to work with them and the terminology used. Every time you start 3ds Max, a welcome screen gives you the opportunity to review essential skills by playing back short movie clips. Go ahead and watch
Figure 6.5 The Max interface: (A) Viewports, (B) Menu bar, (C) Toolbar, (D) Command panel, (E) Selection tools, (F) Transform tools, and (G) Viewport navigation tools.
175
176
Chapter 6
■
I No Ditz, I Know DTS
them now, if you haven’t already. Once you are familiar with those, you can then turn them off by disabling the check mark in the bottom left corner of the dialog box. The welcome screen, and other help topics that will get you started in Max, can be called back from the Help menu.
Viewports The viewport area of the Max interface displays the scene you are currently working on. Max is quite flexible with how you can arrange these viewports and how your model appears in each viewport. The size of the viewports can be easily adjusted by clicking the line between the viewports and dragging it to another point in the viewport area. All the viewports are looking at the same scene. That’s important to remember, as sometimes it’s difficult to wrap your head around. Consider the interface as if it were a shoebox. Inside the shoebox you have a tiny diorama set up. The outside of the shoebox has holes cut in to the sides, top, and bottom. When you look through these holes, you’re seeing your diorama from only that angle. When you take the lid off the shoebox and look inside, you’re seeing all the angles at once, or what 3D programs call the Perspective view. Besides the Perspective view, which shows three dimensions at once, there are usually flat views called orthographic views, that are each locked to two dimensions at a time. By default, the four viewports that are displayed when you start Max are the Perspective view, Front view, Top view, and Left view. Each one of these viewports has its own home grid, which is the working plane of the view. By default, objects created in Max are placed on that plane. When you make a viewport active by clicking on it, a yellow border appears. The corresponding grid is also activated. Viewport Navigation
The viewport navigation tools are found at the lower right of the 3ds Max interface. These buttons let you control the positioning of the vantage point of the viewer of the 3D scene. The icons are context sensitive and can change depending on the type of view that’s currently active.
Familiarize Yourself with Max
Viewport Rendering
The viewports offer a number of different rendering modes for previsualization purposes only. This means that the finished object will not appear as it does in the viewports but depending on the settings in the Render Scene dialog. Instead, depending on what you are working on, you can make an object appear in shaded, wireframe, or edged faces mode. The F3 function key toggles between Wireframe display and Smooth þ Highlights. The F4 function key toggles the Edged Faces display. You can also turn the background grid of any viewport on or off. Press the G key to toggle the grid status on or off.
Menu Bar The menu bar, found at the top of the 3ds Max interface, contains a series of drop-down menus. These include some common menus, such as File and Edit, found in most Windows applications. It also includes functions in Max that appear in other menus or contexts, such as the Create menu, which duplicates the Create commands on the command panel.
Toolbars Toolbars play an important role in 3ds Max. You can dock toolbars at the edge of viewports or float them on top of the 3ds Max window or off to the side, such as on a second monitor. Toolbars are not always displayed by default. For instance, toolbars such as Layers or Reactor do not show up when Max opens. To display one of these toolbars, right-click on a blank part of the toolbar, such as the area just below a drop-down list. A list of available toolbars appears. The check marks indicate which toolbars are currently visible onscreen.
Command Panel The command panel is the most frequently used area of the 3ds Max user interface. The command panel is organized in a hierarchical fashion, with six subpanels, each activated by clicking on their name tabs at the top of the panel.
177
178
Chapter 6
■
I No Ditz, I Know DTS
Some of the command panel subpanels contain buttons and drop-down lists that further organize the panel. For instance, the Create subpanel includes a row of buttons. Depending on which button is active, there may be a drop-down list. As with toolbars, you can float or dock the command panel. Create Subpanel
The first command panel subpanel is the Create panel, shown in Figure 6.6. It contains different levels of creation parameters that allow you to build all kinds of different geometry. By default, the Create > Geometry > Standard Primitives area of the panel is displayed, as that is the one most often used. Standard primitives are rudimentary 3D geometric objects. Extended primitives are more complex than standard primitives. And compound objects usually combine two or more objects together.
Figure 6.6 The Create subpanel.
Familiarize Yourself with Max
Shapes are divided into two basic types: splines and NURBS curves. Shapes are typically 2D curved lines but can be created in 3D as well. Splines are based on Bi-Cubic Rational B-Splines. This allows you to draw straight lines and curved lines based on the properties of the vertices of the spline. NURBS, or Non-Uniform Rational B-Splines, function differently from other splines in Max. With NURBS, you can control the curve from a point or from a control vertex that is off the actual curve. Modify Subpanel
The Modify subpanel (see Figure 6.7) controls let you modify the base parameters of objects or change their appearance using modifiers. Most of the actual work in 3ds Max occurs between the Create and Modify subpanels.
Figure 6.7 The Modify subpanel.
179
180
Chapter 6
■
I No Ditz, I Know DTS
Other Subpanels
There are several other subpanels in the command panel that are not used frequently enough to go into here. They include the following. ■
Hierarchy Subpanel—The Hierarchy subpanel is used when manipulating objects that are linked to one another. In such a situation the objects share a parent/child relationship. This subpanel controls the relationship between these kinds of objects.
■
Motion Subpanel—The Motion subpanel is used to control the animation of objects. Animation controllers can be assigned to objects in this panel.
■
Display Subpanel—The Display subpanel is used to control an object’s color, visibility, freeze/thaw status, and other viewer display properties.
■
Utility Subpanel—The Utility subpanel contains a variety of commands generally not found elsewhere in the Max interface.
Select Objects in Max 3ds Max gives you numerous ways to select objects. The two most-used selection methods include using the Select Object tool and Select by Name tool. Select Object Tool
The easiest method of selecting objects is by using the Select Object tool on the main toolbar. When you have the Select Object tool active, you can click on an object to select that object. Any prior selection is cancelled. If you click in an empty area and then drag across a viewport, by default you will select whatever objects are crossed by the selection marquee you create. If you hold down the Ctrl (Win) or Cmd (Mac) key while you click objects individually, the objects will be summarily added to or subtracted from the selection set. Select by Name Tool
In a scene, you may already know an object’s name, or you might need to select numerous objects with similar names. To save time, then, you can click the Select by Name button in the main toolbar and a Select Objects dialog box will pop up (see Figure 6.8); here, you can select objects by their name.
Familiarize Yourself with Max
Figure 6.8 The Select Objects dialog box.
One great way to remain organized when developing scenes in Max is to name all your objects appropriately. You should attempt to use an appropriate naming convention for your objects. When Max makes an object, it first looks in the list of objects already in your scene to see if there is one like it, and then names the object after the primitive type it is along with a numeric designation, starting with 01. You can choose a more appropriate name for your object during or after it has been created. For instance, if you are creating a car object, you might want to name its component features Car Body, Car Wheel Rt 01, Car Wheel Rt 02, Car Wheel Lf 01, Car Wheel Lf 02, Car Seat Front, Car Seat Back, and so on. That way, all the objects pertaining to your car will appear together in your Select Objects dialog, and their names are descriptive enough to tell what they are without guessing.
181
182
Chapter 6
■
I No Ditz, I Know DTS
If you forget to name your objects as you create them, never fear. Max has a flexible tool for your use called Rename Objects. It can be found in the Tools drop-down menu of your main menu.
Transform Tools You use basic transform tools in 3ds Max to move, rotate, and scale objects you have created. Each of these tools has a red, blue, and green gizmo used to adjust the object’s parameters in a more intuitive fashion. ■
Select and Move—The Select and Move tool lets you position an object anywhere in the scene you like. You can move objects freely or along a specific axis or plane. If you drag one of the Select and Move tool gizmo’s three axis handles, movement is constrained to that direction. If you drag one of the rectangles connecting axis handles together, you restrict motion to a plane.
■
Select and Rotate—Rotating objects is a piece of cake. By default, the pivot point around which Max rotates objects is at the object’s center point. The results of rotation depend greatly on the axis, or which circle in the gizmo, you use to rotate.
■
Select and Scale—3ds Max provides three commands for scaling objects: Select and Uniform Scale, Select and Non-uniform Scale, and Select and Squash. The difference between the first two is whether the three dimensions of the object are scaled equally. Select and Squash lets you adjust one or two dimensions while the other axis or axes automatically adjust in the opposite direction. You can also use the transform gizmo to scale an object along one axis, two axes, or uniformly.
Now that the 3ds Max tools have been explained, I think we’re ready to start modeling!
Box and Segmented Modeling One of the most popular methods for low-poly construction is box modeling. Box modeling starts with a primitive shape (most often a box or cylinder) that gets subdivided into multiple smaller faces that are moved and transformed into the shape required. Box modeling is also good because it gives us a clear seam when it comes to unwrapping the model to texture it.
Box and Segmented Modeling
Many artists for film and print make smooth whole characters, but for low-poly characters in games, artists typically make them out of multiple segments and stick them together like construction sets. Artists may make a leg here, an arm there, then a torso and head; when they are all through, they wedge them together, either using a skeleton rig underneath or through the engine’s programming.
Build Structurally Sound Models Before beginning, I want to remind you that it is imperative to build only structurally sound models. Leaving mistakes in a model or making a poorly constructed model and then hoping that it will still work is never enough. The main problems to look out for as you build are: ■
Stray Vertices—Those vertices that do not tie at least three edges together or float out in space without anything to connect them.
■
T Junctions—Edges that do not meet with other edges correctly, either overlapping or stopping short of meeting other edges.
■
Sliver Planes—Those triangles or polygons that are so thin that their corners where edges meet are often less than 35 degrees or greater than 190 degrees.
Editable Poly vs. Editable Mesh For Torque, your model should be composed of triangles instead of polygons. Therefore, when working with 3ds Max, you must convert your model to Editable Mesh, which is made up of triangles, before you export. A triangle is also called a face. One polygon is usually equal to, or made up of, two triangles or faces. Torque suggests a maximum of 500 faces for weapons and smaller objects and a maximum of 2,250 faces for detailed characters. This is a short budget to work with, but it is absolutely doable.
Use Metric Units of Measurement Torque requires some precise size measurements when working with external software programs like 3ds Max. For instance, Torque is based on the metric system.
183
184
Chapter 6
■
I No Ditz, I Know DTS
So the first thing that you must do before starting a new shape in 3ds Max is to select Customize > Units Setup. Select Metric by clicking on its radio button and make sure that 1 unit is set to 1 meter (by clicking System Unit Setup at the top of the Units Setup dialog). See Figure 6.9. This gives you the correct scale in 3ds Max for exporting to Torque.
Build a Crate A crate, you ask? Yes, a crate. You’re going to make a crate—because every game ever made has had crates in some form or another in them somewhere. And because crates are quick and easy to learn to make, and therefore provide the perfect opportunity to gain hands-on experience with Max.
Make the Geometry Launch 3ds Max or create a new scene to refresh.
Figure 6.9 Set your units of measurement in Max to metric.
Build a Crate
In the Command panel, go to the Create subpanel and click on Box (one of the standard primitives). Click and drag in one of the viewports. You are defining the base, or bottom, of the box. When you let go, drag and click once more to define how tall to make the box. After creating your box, you can define its values and refine its shape in the Create subpanel. Name your box crate01. Under Parameters, set its Length, Width, and Height values to 1.0m, then set its Length Segs, Width Segs, and Height Segs to 4. The first set of values will make the box appear smaller. You still want to be able to see your box, so use the Zoom tool (found in the lower-right corner of the Max interface window) or click inside a viewport and use the mouse scroll wheel to zoom in so you can see the box. The Segs values create additional segment lines all around your box, which will be useful for editing it later. Compare your screen to Figure 6.10. Right-click on your box and select Convert To > Convert to Editable Mesh from the pop-up list. You will need to use Editable Mesh for all your shape modeling needs for Torque, as mentioned earlier.
Figure 6.10 Set the values of your box like so.
185
186
Chapter 6
■
I No Ditz, I Know DTS
Max will automatically open up the Modify subpanel of the Command panel, where you will see that your box has been changed into an Editable Mesh. Click the plus sign out beside Editable Mesh to expand it, and you will see that it is composed of vertices, edges, faces, polygons, and elements. Each of these properties can be selected and edited separately by clicking on them or by clicking on the red graphic icons just below the Modifer List panel. Note This is important! To make sure your model—or any model you make, for that matter—is facing the right direction, the front should be facing toward the positive Y axis in Max. When using the Move tool, and with the model selected, the positive Y axis is the green arrow handle. Your model should face that direction. If it does not, rotate it around so that it does. Also, align your model to world center (where the major grid lines intersect).
Change the Crate’s Texture Your crate (for that’s what your cube’s supposed to be) doesn’t look like much of a crate with that default color applied to it. You are going to have to add a unique material to it to really make it into something. Materials describe how an object reflects or transmits light, as well as define what the object will look like. For example, a glass object will have a different material than a wooden one. Within a material, texture maps can be used to define the color and character of a surface. Texture maps used for the Torque engine should have a resolution to the power of two, such as 256 256 or 64 64. The maximum texture map size supported is 512 512. Texture maps don’t have to be square. If the Torque engine has an issue with a texture map, it may not render it correctly. Keep these things in mind as you fiddle with textures. Press M on your keyboard to open the Slate Material Editor (see Figure 6.11). On the left-hand side, minimize all the sections except for Sample Slots, which you should expand by grabbing the bottom edge of it with your cursor and dragging down. The Sample Slots part of the Material Editor has a preview window that shows you the materials so far that have been provided for your scene. The rightside of the window will show the properties for the material currently selected when you double-click on one of the Sample Slot spheres, such as 01-Default shown in Figure 6.11. Double-click on the 01-Default sphere now to see what I mean.
Build a Crate
Figure 6.11 The Material Editor.
There’s a file, wood1_diffuse.jpg, saved on the companion DVD in the Data Files > Chapter 6 folder. Save that file to your computer. Preferably, put it wherever you will be saving your Max files that you create, because you do not want to inadvertently create broken texture links later on. After you save wood1_diffuse.jpg to your computer, return to your 3ds Max Material Editor. With 01-Default open, double-click the round circular button out beside the second tab in the column, marked Diffuse Color. This will open a Material/Map Browser dialog, as shown in Figure 6.12. Expand Maps and double-click on Bitmap to open the Select Bitmap Image File dialog box. Search for the wood1_diffuse.jpg file you saved on your computer, then click Open when you’ve found it. Your 01-Default sphere will change its appearance to reflect the added diffuse map. Click the Assign Material to Selection button (found just below your Material Editor menu bar), and the wood material will automatically be added to your
187
188
Chapter 6
■
I No Ditz, I Know DTS
Figure 6.12 The Material/Map Browser.
box, which should still be selected in your viewports (but you won’t be able to see the material just yet). Also, note how the wood material’s preview slot will have solid white corners added to it; these are to show you that the material has been added somewhere to your current scene. Peek at your box in the Perspective viewport. To see how the wood texture looks on your box, go to Views > Show Materials in Viewport As > Standard Display with Maps. Your box should look similar to Figure 6.13. Add a Bump Map
You could stop there. But your crate would look very flat shaded. It probably will be anyway when you export it to DTS, but let’s add a bump map to make it more texturally appealing anyway. Bump maps make otherwise flat materials appear to have depth and physical texture in a virtual scene.
Build a Crate
Figure 6.13 The box in the Perspective viewport.
There’s another image in the Chapter 6 folder of the DVD Data Files. The image is called wood1_bump.jpg. Save it to your computer in the same place you saved your other image. With 01-Default still selected and visible in the Material Editor viewport, scroll down through its parameters on the right-hand side of the window until you find the Maps section. Expand the Maps section and look for Bump; it will have a default value of 30 out beside it, and a tab that says ‘‘None.’’ Click where it says ‘‘None’’ out beside Bump to open the Material/Map Browser, and double-click Bitmap to open the Select Bitmap Image File dialog box. Find the wood1_bump.jpg file you just saved to your machine, then click Open. A new Map number, with the name of the texture file used in parentheses, will appear in place of ‘‘None,’’ and a checkmark will appear in the checkbox out beside Bump. This tells you that a new bump texture has been applied. Set the Bump value to 120. The higher the number, the more depth and roughness will be added. Add a Specular Map
Specular maps make highlights and shadows on 3D objects. Besides adding depth and roughness to your crate, as you did with the bump map, you should probably add a specular map to give it a more believable look.
189
190
Chapter 6
■
I No Ditz, I Know DTS
An image found in the Chapter 6 folder of the DVD Data Files is wood1_spec.jpg. Save it to your computer in the same place you saved the other images. In the Material Editor window, with your 01-Default material still selected, look in the Maps section for Specular Level. Click on ‘‘None’’ out beside Specular Level to open the Material/Map Browser, then double-click on Bitmap. Find where you placed wood1_spec.jpg and click Open to add it to your current material. A new Map number, with the name of the texture file used in parentheses, will appear in place of ‘‘None.’’ The default value of 100 for Specular Level is a little too strong for what you are going for. Change 100 to 75. This will give your specular mapping a smoother feel. By now, your crate should be finished. Render it to see what it would look like in the game engine. Go to Rendering > Render Setup to open the Render Setup dialog box (shown in Figure 6.14). Make sure the View selected is Perspective, then click the Render button. After this, you can typically render out your image simply by going to Rendering > Render. You should see your crate rendered, like the one shown in Figure 6.15. That’s it! You now have a crate worthy of your game. Close the Material Editor and Render Setup dialog boxes, if you haven’t already, and save your file by going to File > Save As. Save your scene as crate.max.
Create a Bounding Box Ever seen in games, how your character cannot quite touch a 3D object, or when he or she is standing on the edge of a rocky knoll, there’s a slight gap between his/her feet and the knoll you’re supposed to be standing on? This is because almost all games use collision detection. Collision detection is a computation where the program (in this case, a game engine) detects when two or more virtual objects are going to collide with one another and attempts to replicate physical matter by making the objects stop or bounce off each other. As you can probably see by your experience in Max, 3D space is totally boundless. Your 3D objects can glide right through each other like ghosts, because they have no real physical substance. What gives them substance is the player’s expectations that they’ll behave like ordinary real-world
Build a Crate
Figure 6.14 The Render Setup dialog.
objects and the fact that a programmer somewhere has written code that focuses on collision detection. Torque 3D can use bounding boxes around its 3D models for collision detection. You have to create a bounding box surrounding your model before you attempt to export it. Make a box shape that encloses the entire shape. Do this from either the Top or Perspective view. For simplicity’s sake, make it the same size as your earlier box that you made your crate from. Name this box bounds. You don’t have to, because it will not be visible when exported, but if you want to for your own sake, you can make the box transparent. Press M to open the Material Editor. Click on an empty slot, like 02-Default, in the Sample Slots window to start a new material. Double-click the Ambient Color tab. In the
191
192
Chapter 6
■
I No Ditz, I Know DTS
Figure 6.15 The rendered box looks like a wooden crate now.
Blinn Basic Parameters, set the Opacity value to 15. Then, with the bounds box still selected, right-click on the material name 02-Default in the center View panel, and select Assign Material to Selection from the pop-up options list to apply your transparent material to the bounds box. Save your work. Now you’re just about ready to export your crate.
Export the Crate to DTS Now it’s time to export your crate out to Torque. To do so, you use a Torque DTS exporter for 3ds Max. This is a plug-in you have to install in Max so that it will export DTS files for Torque.
Install the DTS Exporter Utility The file pack containing the DTS exporter is on the companion disc in the Software > Max2DTS folder. There’s a separate exporter script, one for 3ds Max 9 and one for 3ds Max 2010 or 2011. The exporter in each folder will only work for the versions of Max it was compiled for, so make sure you use the proper file.
Export the Crate to DTS
To install the exporter, if you haven’t already, simply place the file in the 3dsMax\plugins directory folder on your computer. You will need to close Max (if you still have the program open) and then restart it for it to read the plug-in. Once 3ds Max has started, you need to make a button for the exporter in your Max interface. To do this, click on the Utilities subpanel name tab in the Command panel (Utilities is the one that looks like a little hammer and is farthest to the right). Then, click the Configure Button Sets button, which is on the top right under the Utilities roll-out (see Figure 6.16). This opens the Configure Button Sets dialog box. Change Total Buttons to 10. Then scroll down the list of buttons on the right to find the empty button you’ve just created, and scroll down the Utilities list on the left until you see the Exporter Utility: DTS Exporter Utility. Drag the DTS Exporter Utility to the empty button. When you let go, the new button should say DTS Exporter Utility. Click OK when you’re done.
Figure 6.16 The Configure Button Sets button is found near the top right, beside the Sets button, in the Utilities subpanel of the Command panel.
193
194
Chapter 6
■
I No Ditz, I Know DTS
What the DTS Exporter Does The exporter generates a dump file named dump.dmp in the directory you are exporting to. If your export fails, check the dump file first to see where it is crashing in the export process. Most of the time it is something simple, like spelling the word ‘‘bounds’’ wrong. The exporter is for the most part stable. Like all 3ds Max plug-ins, however, it can crash. If it is constantly crashing on export with all shapes, the error likely lies not in the exporter, but in your system configuration. If a particular model is continually crashing on export, corrupted meshes, bad texture vertices, or double faces in the model might be the cause. Check your dump file, and if it stops on a particular mesh, do a test by deleting it in your scene, then try exporting again.
Renumber and Embed Your Crate Shape Using the Select by Name tool, select your crate object (remember, you have two objects in the scene: your crate and your bounds box). I chose to name the crate object crate01 so I would be sure to tell the difference in the Select Objects dialog. Naming conventions come in handy when doing this. In the Utilities subpanel of the Command panel, click your new button named DTS Exporter Utility to expand its option commands. Click the General: Renumber selection button. A dialog box will open up. Enter the number 2 in the window and click OK. This will add a trailing number to your shape (this will be the detail resolution). It’s okay if it does not refresh the Max interface. Deselect your crate object by clicking somewhere off the grid beside it. Then use Select by Name to select it again in order to see the changes. Notice that its name may have changed since the last time you had selected it; it should have a 2 after it now. With your crate object still selected, click the General: Embed Shape button in the DTS Exporter Utility roll-out. Open a schematic view by clicking the Schematic View (Open) button on the Max toolbar, as shown in Figure 6.17. You should see a new dialog box open that appears similar to the one shown in Figure 6.18 (close the Display dialog box accompanying it).
Export the Crate to DTS
Figure 6.17 The Schematic View (Open) button.
Figure 6.18 What your Schematic View window should show you.
The General: Embed Shape button correctly created a hierarchy for your shape, which will allow it to export. It did so by creating a few dummy objects; then it named and linked them to your object. You can do this manually, too, by using Max dummy objects for the base and start shapes and the detail markers. Close the schematic view when you’re done.
Prepare Your Crate’s Collisions You have a bounds box. I know I told you that it was for collisions, but it’s not as simple as that. The bounds box tells the game engine what the limits of the model are, although it can also be set for collision detection.
195
196
Chapter 6
■
I No Ditz, I Know DTS
Now you are ready to set up proper collision detection. Use Select by Name to select your crate object, the one that a 2 was added to. Go to Edit > Clone on the main menu. In the Clone Options dialog that comes up, click the radio button to make this clone a Copy. Name this clone Col-1, just as you see in Figure 6.19. Click OK when you’re done. Now use Select by Name to select your detail object that was created when embedding the shape (named detail2). Go to Edit > Clone. Make this a Copy as well. Name it Collision-1, and click OK. This adds two new dummy objects to the Max file that you need on export to set up collision detection. That’s all you need for this file, but there’s more you can do with DTS exports. Here are some naming conventions for collision detection you can also use: ■
Collision-1 through Collision-9—These designations are for the collision markers.
Figure 6.19 Create a clone of your crate and call it Col-1.
Export the Crate to DTS ■
Col-1 through Col-9—These designations are for the actual collision shape geometry (try to keep the geometry simple or low-detail meshes, because collision detection can be processor intensive).
■
LOS-9 through LOS-15—These are markers used for line-of-sight, or bullet collision shapes.
■
LOScol-9 through LOScol-15—These designations are used for the collision shape geometry for line-of-sight collision.
You’re ready to export (finally)!
Export Your Crate Shape Go to the Utility subpanel and in the DTS Exporter Utility roll-out, then click Export: Whole Shape. Export your shape to your destination folder. In this case, you want to create a new folder in My Projects\Ravenscroft\game\art\shapes called myshapes. Name your shape that you put in your new folder mycrate.dts. Make sure you put your texture files (wood1_bump.jpg, wood1_diffuse.jpg, and wood1_spec.jpg) in the same folder as your shape file. If you don’t, the texture will not load and the shape will appear white in the game engine.
Import the Crate into Your Game Open your Torque Toolbox, and from it launch the World Editor for your Ravenscroft Empty Terrain level. In the World Editor, go to the Scene Tree panel. Click on the Library tab and go to the Meshes subpanel. Go to art > shapes > myshapes and you should see your crate DTS file listed, like mine is in Figure 6.20. Double-click it to add it to your scene. Although I had hoped to make my crate the correct size, it is still too large. You can use the Scale tool to resize your crate. If you click and drag from the center of the Scale tool gizmo (the little white box), you will resize it universally, or in every direction at once. Resize it to be half the size of your player model.
197
198
Chapter 6
■
I No Ditz, I Know DTS
Figure 6.20 Find your crate shape to add to your scene. Note It is advisable to start every level with a player model in it. This way, when reshaping terrain or adding and sizing objects in your level, you have a point of reference. Doorways, windows, crates, bridges, and so on should all appear to fit your player character proportionally. With a player model standing in your level, designing things to fit in proportion around it will be much easier. Conveniently, whenever you create a new level with Torque, a player model is automatically added for you, based on DefaultPlayerData’s settings. You can move this model all over the world, as you build it, to keep your proportions straight, and then move it back to the player start position when you’re done.
Use the Move tool to place your crate wherever in your level you prefer. It does not have any substance until the player character comes upon it, so you can sink models through the terrain, set them high in the air, or do whatever you like to them. This adds a touch of fantasy to 3D worlds. When you have your crate where you want it, it’s time to test it out. Save your level (go File > Save Level), and exit the World Editor for now. In the Torque Toolbox, click the Play Game button to play your Ravenscroft game. Go to the Empty Terrain level. Once the game level has launched, walk around until you find your crate (see Figure 6.21). Watch when you shoot the
Build a Medieval-Type Village
Figure 6.21 The finished crate as seen in the Ravenscroft game.
crate that scorch marks appear on and around it, and when you walk up to the crate it will push you back. You could even jump on and walk on your crate.
Build a Medieval-Type Village You’ve created a crate, but now you want to create larger structures, don’t you? Ravenscroft is essentially a backwater village, and it needs some homes built for it. Each one should be a little different. I’ll show you how to get started by building one house, and you can construct endless varieties for your game.
Make a Medieval House Open 3ds Max or create a new scene in it. Go to the Create subpanel of the Command panel and select Plane. Create a new plane in the Front viewport. Make it a rectangle with the following parameters: Length 8.0 meters, Width 6.0 meters, Length Segs 6, and Width Segs 1. Switch to the Modify subpanel. Right-click the plane and select Convert To > Convert to Editable Mesh. The Modify subpanel will automatically open. Expand the Editable Mesh item in the Modifier List by clicking the plus sign beside it. Click on the Edge component to select by edges.
199
200
Chapter 6
■
I No Ditz, I Know DTS
For edges to show in the Perspective viewport, right-click where it says Smooth þ Highlights in the top-left of that view window and select Edged Faces; this puts a check next to Edged Faces in that pop-up list, and it also reveals the edges on the shaded object (as shown in Figure 6.22). Using your Select and Move tool, click the second edge down the plane and use the Select and Move tool (blue arrow) to move it down, closer to the third. Take the fifth edge and move it up, closer to the fourth. Compare your work to Figure 6.23. Switch to polygon selection mode by clicking on Polygon in the expanded Editable Mesh list. Select the two thinner polygons you’ve just made, pressing and holding the Ctrl (Win) or Cmd (Mac) keys down to select them both at the same time. Look in the Edit Geometry roll-out section of the Modify subpanel for the button marked Extrude. Click this button and use the Extrude tool to extrude the selected polygons out away from the wall, which is what your plane will be (compare your work to Figure 6.24).
Figure 6.22 Set your Perspective view to display Edged Faces.
Build a Medieval-Type Village
Figure 6.23 Move edges as shown.
Figure 6.24 Extrude these thin polygons out from the wall.
201
202
Chapter 6
■
I No Ditz, I Know DTS
Extrude is used to create new geometry and to pull that new geometry away from the old. Bevel, on the other hand, creates new geometry, pulls it away from the old, and also resizes the new geometry, much like you would with the Select and Uniform Scale tool. Use a combination of both of these tools throughout this lesson to expand the existing mesh. Add a Door
Create a new box object. Its parameters should be: Length 0.45m, Width 1.8m, Height 2.8m, Length Segs 1, Width Segs 4, and Height Segs 5. Convert this box to an Editable Mesh. Select by vertices. Drag a marquee over the top-right two corner vertices (the one on the front and the one on the back) and, using the Select and Move tool, nudge them over and down. Do the same on the opposite side, moving the two corner vertices in the opposite direction, mirroring your actions. You will have to work on the door from multiple angles. One way to do this is through the Zoom, Pan, and Orbit tools (found in the lower-right corner of the Max interface). Another is to use the View Cube, which is the semitransparent cube in the upper-right corner of every viewport. You can click-and-drag on your View Cube to change the view angle in that particular viewport, or you can click on the edges or sides of the View Cube to switch to that view angle immediately. Get used to altering the view you are using to work in, because without being able to navigate your scene quickly and efficiently, you will find you have troubles working on these exercises. Work your way down both sides of the object. Reshape your box using the vertices, until you get something that looks like Figure 6.25. You can select multiple vertices at once by holding down the Ctrl or Cmd key while click-dragging a marquee around new selections, then use the Select and Move or Select and Uniform Scale tools to transform the shape of the box. There’s no simple way to do it; it’s a matter of patience and intuitive work. If you make a mistake, you can always undo from it. When you have your door, for that is what this will be, shaped the way you want it to look (and if you are skittish or want to take the easy route, your door could be left perfectly rectangular, rather than mouse-hole shaped), then click on the top item, Editable Mesh, from the Modifier List in the Modify subpanel. This exits select by vertices mode and allows you to select and move the whole object. Move
Build a Medieval-Type Village
Figure 6.25 Shape your box into a mouse-hole outline.
your door so that it goes through the wall you’ve created, as shown in Figure 6.26. You can look at your door in the other viewports, particularly the Left viewport, to make sure your door is running flush and even through the wall slightly. Select your main wall again, then go to the Create subpanel. Click on the list arrow where it says Standard Primitives and select Compound Objects from the drop-down list. Click on Boolean. Under the Pick Boolean roll-up on the righthand side of the screen make sure Operation > Cut > Split is selected, and if it’s not, select it. Note, you may have to scroll with the extremely skinny scroll bar down to see Operation > Cut. Directly under the Pick Boolean roll-up, click the button Pick Operand B, then click on your door object. Your door object will disappear, leaving an outline the same shape as it in your wall. Go to the Modify subpanel and note how your wall has changed from an Editable Mesh to a Boolean object. Change it back. Right-click on your wall in your viewport and select Convert To > Convert to Editable Mesh.
203
204
Chapter 6
■
I No Ditz, I Know DTS
Figure 6.26 Move your door flush with the wall.
Then in the Modifier List of the Modify subpanel, expand your Editable Mesh item and then click on Polygon to select polygons. The first polygons selected should be the ones that make up the door outline (see Figure 6.27). Use the Bevel tool to bevel the door into the interior of the wall, as shown in Figure 6.28. The idea is to inset the door so that it appears to be a physical structure. Save your work as House.max. Give It a Gable
Select the topmost edge of your wall and use the Extrude, Select and Move, and Select and Scale Uniform tools to extrude it upward, carefully tapering it inward as you go, for four new segments. Compare your work to Figure 6.29. You will probably have to do as I did. First, after clicking the edge on top of my wall, I clicked the Extrude button in the Edit Geometry roll-out to select the Extrude tool. I used the Extrude tool to click-and-drag a new piece of geometry out away from the wall.
Build a Medieval-Type Village
Figure 6.27 This will be where your door is situated.
Figure 6.28 Bevel the polygons in so that you have a visible doorway.
205
206
Chapter 6
■
I No Ditz, I Know DTS
Figure 6.29 Use Extrude, Select and Move, and Select and Scale Uniform to create a gable above your wall.
Then, I used the Select and Move tool to move it back into place above the wall (watching the Left and Top viewports for accuracy), and then dragged the piece of geometry up until I was satisfied with its height. Lastly, I used the Select and Scale Uniform tool to scale it in on the sides, to make it taper. I rinsed and repeated until done. We Do Do Windows!
Use the same method you used to make a doorway to make round or square windows in your wall. You can make one template object for your windows, clone an instance of it (Edit > Clone), and use your clone as the Boolean operand. That way, to make a new window, all you have to do is make a new instance clone of your original template. Keep your template off to the side of your design until you get all through, then delete it before exporting.
Build a Medieval-Type Village
The method you use for the windows is the exact same as the door: 1. Create a window shape. 2. Move window shape to go through the wall. 3. Select wall. 4. Go to Create > Compound > Boolean. 5. Make sure under Pick Boolean that Operation > Cut > Split is selected. 6. Under Pick Boolean, click Pick Operand B. 7. Click your window shape. 8. Right-click modified wall and go Convert To > Convert to Editable Mesh. 9. Select polygon selection mode in the Modify subpanel. 10. Bevel your window polygon into the wall, to give it depth. 11. Repeat with next window. What you get should look like Figure 6.30.
Figure 6.30 Create windows in your wall in the same manner you did the door.
207
208
Chapter 6
■
I No Ditz, I Know DTS
Add Little Details to Your House
Create a small box that has Length, Width, and Height Segs set to 1 and place it at the bottom left side of your wall. Use the Bevel tool to expand the box upward, forming the corner column of the house, as shown in Figure 6.31. When you get it all the way done, go to Edit > Clone and make a copy of the column object. Move the copy to the right side of the house, so that the two columns frame the front facade. Next, create a third box at the top of the gable. This will be the end of a beam that is supporting the roof, supposedly. Make sure it intersects the top of the gable but sticks out no farther than the furthest plane of the corner columns. See Figure 6.32 to see what I mean.
Figure 6.31 Create a corner column that goes on the corner of your house.
Build a Medieval-Type Village
Figure 6.32 An end roof beam goes at the top of your gable.
This should finish the front facade of your house. You can get crafty and add extra details, because the more details you add, the more visual interest your building will have for the player. But this should be good enough for what you need. Now let’s add some more walls. Extend the Walls of Your House
Select your primary wall and in the Modify subpanel, select Edges to be able to edit edges. Click the Window/Crossing button in your tools bar so that the black circle is entirely within the dotted rectangle; this will set it so that when you click and drag in your viewport to make a selection marquee with your Select Object tool, you will select only those components inside the selection marquee and not just what it crosses.
209
210
Chapter 6
■
I No Ditz, I Know DTS
Click and drag with the Select Object tool to select all the edges making up the left side of your wall, then hold down the Shift key while moving those edges with the Select and Move tool. Neat trick, huh? Pressing and holding down the Shift key while you transform edges in Max will automatically extrude them for you, without you having to select the Extrude tool from the Command panel. If you press and hold down the Shift key while transforming whole objects, you’ll automatically duplicate or make clones of the objects you’re moving. Extrude your wall to look like Figure 6.33. Do the same thing with the edges making up the right side of your original wall. Pay attention to your orthographic viewports as you Shift þ drag so that your side walls are even with one another. Add character to both of your side walls. Select the thinner polygons in the middle of the walls, the wood beams you extruded in the original wall, and extrude them, too. Add windows where you think windows would be appropriate. Using the same technique to make windows, you can also make objects that pop out of the walls. Try it. Make a lean-to that extends out one side of one wall, as shown in Figure 6.34. Instead of beveling the new geometry into the house, you bevel it out.
Figure 6.33 Extrude your wall to make the side of the house.
Build a Medieval-Type Village
Figure 6.34 Create a lean-to on one side of the house to experiment with making other extrusions.
With the edge of one side of one of the walls selected, press and hold the Shift key while dragging the edge to meet the other wall. This will enclose the house, or finish things off by building a back wall. Once you have it made, extrude the wood beams on it and add windows as needed. Select one of the corner columns on the front facade of your house. Clone a copy of it and move it to the back of the house, opposite the ones in the front. Clone a second one, so that there is a corner column for all four corners of the house. Add a second gable to the back of the house, too. Pay careful attention to all the viewports to make sure this new gable is the same height and width as the other one as you raise it up, segment by segment. Then Clone a copy of the end beam at the top of the first gable to go to the top of the second gable, as you see in Figure 6.35. Save your work. Put a Roof on It
In the Editable Mesh of your house, select by Edges. Select the topmost edge of one of your gables. Press and hold down the Shift key and click-drag your new edge geometry to the opposite gable.
211
212
Chapter 6
■
I No Ditz, I Know DTS
Figure 6.35 Make a clone of the gable’s roof beam for the back of the house.
Select by Polygons. Select the topmost polygon, the one you just created by extruding the gable edge. Extrude your polygon up in the air, flush with the top of the roof end beams, then extrude again to go a little higher and wider. This creates side planes that you can select individually and begin extruding. Extrude the side planes, moving them downward slightly and rotating them out, creating new segments as you go (see Figure 6.36). Follow the contour of your gables, and end with a slight overhang. Compare your work to Figure 6.37. Go to your Editable Mesh (your original wall). Select it. Look under the Edit Geometry roll-out for the Attach button. Click the Attach button. Now start clicking the unattached elements in your mesh, such as the gable end beams, the corner posts, and so on. Each time you do, they will be added to your Editable Mesh. When you are finished, you should have a single piece of geometry that is one Editable Mesh. When you do, rename it house. Make It Medieval
Add materials to color and accentuate the character of your rustic village house. Do this as you did the crate, or by several other 3ds Max material tricks, such as using Multi/Sub-Object material projection and selecting various material IDs
Build a Medieval-Type Village
Figure 6.36 Start extruding, moving, and rotating the side planes downward, following the contour set by your gables.
Figure 6.37 A finished roof.
213
214
Chapter 6
■
I No Ditz, I Know DTS
(one popular way to add multiple textures to a single object) or by adding an Unwrap UVW Modifier in the Modifier List of the Modify subpanel (another popular, though more difficult, way to add a unique texture to an object). Because these techniques go beyond the scope of this book, we won’t really cover them here, although you can read about them online. Use Google or any Web search engine to search for ‘‘3ds max material tutorials’’ to discover a wealth of competing information about adding complex materials to 3D models. Save your work when you’re done. Export Your House to DTS
After you complete the look of your house, it’s time to export your house to DTS so that you can use it in Torque. 1. Make a bounds box that is one piece of solid geometry surrounding the house. Remember to name it bounds. 2. Select your primary piece of geometry, which you named house earlier. Click General: Renumber selection in the DTS Exporter Utility roll-out of the Utility subpanel, type in 2, and close. 3. Deselect your house and use the Select by Name tool to select house2. 4. Click General: Embed Shape to add the dummy objects to your scene that you’ll need. This includes a start and detail marker. 5. With your house2 object still selected, go to Edit > Clone and make a copy named Col-1. 6. Use Select by Name to select the detail marker in your scene. Go to Edit > Clone and make a copy of it named Collision-1. 7. Deselect all. 8. Click Export: Whole Shape in the DTS Exporter Utility roll-out and export your file to your destination folder (continue using My Projects\Ravenscroft\game\art\shapes\myshapes) as myhouse.dts. 9. To import your house into your game level, go to the Torque Toolbox, launch the World Editor (Empty Terrain for Ravenscroft), and
Build a Medieval-Type Village
double-click on myhouse.dts in the art > shapes > myshapes section of the Meshes subpanel under Library in the Scene Tree panel. 10. The house may appear too large at first, so use the Scale tool to shrink it. Move it into place along the road. Make sure to sink the house slightly into the terrain, so that there isn’t a gap left between the bottom of the house and the ground plane. 11. Save your level and test-run it to see your house in action (see Figure 6.38). The important task to test-running an imported asset like the house is to make sure the collision detection is working, so don’t forget to try it out. Also, circle your house to get a glimpse at all sides of it, checking for gaps or leaks in its mesh or erroneous patches of texture mapping. Now that you have one house in your make-believe village, add several more. You can add the same one multiple times, but use the Rotate tool to change the directional angle of each one to give them variety. Of course, the same house multiplied twelve or so times will get redundant after a while. So make more houses in 3ds Max or whatever 3D modeling program you are using, all
Figure 6.38 The medieval house in the game level.
215
216
Chapter 6
■
I No Ditz, I Know DTS
variations upon a theme, and import them into your level, too. Build up your village in degrees, until it’s a twisting and enthralling affair. Note On the companion DVD are model packages containing 3D buildings, props, weapons, and characters; these packages are presented to you from two different companies, Frogames and 3drt.com. Give the DTS and Max files a try and see what you think. Besides using them in games you build, you can also peruse the files to witness how other model artists make their creations. If you like the files and want to purchase more, you can go to www.frogames.com to take a look at other model packs from Frogames or www.3drt.com to take a look at other models for sale from 3drt.com.
What’s Next? From this point on, your imagination will be the only limit. You can build castles, sewer tunnels, underground complexes, military bases, city streets, factories, and just about any other man-made structure with 3ds Max or any other 3D modeling program. Next, however, you’ll look at making character models with Max and how to rig them for Torque.
chapter 7
This Isn’t the Runway: Modeling 101 You learned about 3D modeling basics in the last chapter. What separates this chapter from Chapter 6 is that, in this chapter, you’ll look at how to make game characters. Then, I’ll show you how to make a basic player character for your Ravenscroft game using 3ds Max. Sound like fun? Okay. Let’s get go!
How to Create Game Characters Tip ‘‘Be your character what it will, it will be known; and nobody will take it upon your word.’’ —Philip Dormer Shanhope, Lord Chesterfield
Game character creation, especially if you’ve never played a role-playing game yourself, can seem complicated at first. Let me clue you in on the quickest and easiest ways to come up with fresh original characters. Conan, Sherlock Holmes, Doctor Who, Indiana Jones, Darth Vader, SpongeBob SquarePants—their names evoke memories and feelings, don’t they? All these characters, plus many more, have become memorable in their own right. They exist beyond the stories they were originally a part of. Some have become cultural icons.
217
218
Chapter 7
■
This Isn’t the Runway: Modeling 101
Often, a character becomes a legend overnight, but in fact, it is the struggle, creative vision, and luck of its creators that lead to a character’s ultimate success. No character starts fully formed. First, a writer must generate a character idea, add details to that original concept, and top off the details with a cool-sounding name. Then an artist must brainstorm the character’s look. Character concept sketches are drawn (see Figure 7.1). Amid countless variations, a single character sketch will be chosen and launched into a full-fledged character. Digital artists then perform color compositions, editing, and 3D modeling. Finally, a character is born. Before you go gallivanting off into the wonderful world of make-believe character generation, you need to take a look at the foundations of truly stupendous character building. What are the common attributes of the making of an icon? Let’s look at the work that goes into making memorable characters.
Define Your Character’s Personality Is there such a thing as an original character? Psychologist Carl Jung says there’s not, and that most people categorize others into neat classifications, which he called archetypes. So of hero archetypes, there might be the White Knight, the Moody Rogue, the Tough Brute, the Scholarly Wizard, and much more (for an example of stereotypical RPG villains, see Figure 7.2). The difficult article
Figure 7.1 This is Gentry Jack, the character you’ll be modeling in this chapter.
How to Create Game Characters
Figure 7.2 An example of stereotypical RPG villains is displayed in the Skeletons Swarm model pack from 3DRT.com (www.3drt.com).
about archetypes is drawing the line between a true archetype and a cliche´d stereotype. Don’t use cliche´s, because most players are sick of them. Creating a memorable character that audiences feel for and desire to know the outcome of conflicts the character might face is definitely rewarding, from the commercial aspect as well as the artistic and technical aspects. One of the most important elements of a character’s appeal is its personality. Character traits are important, not only because they influence the audience’s reactions, but because they can shape the character’s looks, behavior, and dialogue. All the most successful characters ever have well-defined personalities. Some may even appear as caricatures of ordinary personalities, full of quirks and odd angles. So before you make up a character, you have to make sure you know some of its primary traits and what skills it might possess. Some designers, especially for RPGs, take the old-school approach to this and use character sheets full of information about each character, much like the paraphernalia used for tabletop role-playing games like Dungeons & Dragons. You can also use the Traits
219
220
Chapter 7
■
This Isn’t the Runway: Modeling 101
Triangle proposed by David Freeman, the guy who came up with emotioneering. Let’s look at both. Take the Old-School Approach to Character Creation
Get yourself a piece of notebook paper or open up a new Word document on your computer, and get ready to fill in some blanks. Using the old-school approach to character creation, you have to make up details about your character and write them down, as if you were interviewing your character about his most intimate particulars or getting an ID at the Department of Motor Vehicles. Details you will want to know about your character include, but are certainly not limited to, the following: ■
Name
■
Education
■
Age
■
Income
■
Gender
■
Residence
■
Height
■
Skills
■
Weight
■
Friends and family
■
Eye and hair color
■
Pets
■
Race/nationality
■
Hobbies
■
Place and date of birth
■
Likes and dislikes
■
Profession
■
Background
If you happen to play tabletop RPGs and have an extra character sheet lying around, there’s no reason you can’t use one of those, as long as the game genre is close enough to match or be converted well. Use David Freeman’s Traits Triangle
Giving your character three foremost traits, displayed as three sides of a triangle (Freeman calls it a Traits Triangle) as shown in Figure 7.3, you can see straight away how the traits interrelate to shape a character’s behavior and the sort of choices he or she would make.
How to Create Game Characters
Figure 7.3 The Traits Triangle.
Whatever you do, don’t use dull or agreeable traits. Making your character ‘‘strong,’’ ‘‘loyal,’’ and ‘‘stalwart’’ is fine if you’re tailoring a stereotypical Prince Valiant character, but stereotypes are boring and predictable. Mix it up more. Try making your character ‘‘heroic,’’ ‘‘ugly,’’ and ‘‘clumsy,’’ like Shrek, or ‘‘wisecracking,’’ ‘‘oblivious,’’ and ‘‘charming,’’ like Donkey, and you’ll have a winner on your hands. Trust the process. Add Idiosyncrasies
Identify at least three, but preferably more, idiosyncrasies in the character’s makeup. An idiosyncrasy is defined as a personal peculiarity of mind, habit, or behavior—a singular quirk. These quirks can be totally useless skills or absurd qualities that stand out about the character. For instance, the character Tallahassee in the film Zombieland, has a deep-rooted emotional hankering for Twinkies. He’ll go out of his way—and even directly in the path of danger—to get himself a Twinkie. This is not only comical, it helps us identify with his character. These sorts of things make a character different, interesting, unpredictable, and identifiable.
Game Character Types With possibly the exception of puzzle games and the ever-popular Tetris, most games have characters in them. Even vehicles and weapons, in their own unique way, are characters in a game.
221
222
Chapter 7
■
This Isn’t the Runway: Modeling 101
There are, however, three major types of game characters that we see over and over again: ■
Player Characters—The player’s onscreen avatar, or the character the player has direct control over, which has to look good because it takes up nearly 90% of screen time and may indeed become an icon for the game itself.
■
Non-Player Characters—Also known as NPCs, these are any of the other characters that the player cannot directly control that may help, hinder, or advise the player during the course of the game (like the folks in Figure 7.4).
■
Enemies—Technically these bad guys are non-player characters, but since they perform a very specific role (and depending on the genre, they may even have a central role in the game, like targets in a first-person shooter), enemies are those characters that try to defeat the player.
Figure 7.4 One example of NPCs are the murder suspects in mystery adventure games.
How to Create Game Characters
Use Artificial Intelligence for Enemies and NPCs
AI stands for the TV program American Idol, but it also stands for artificial intelligence, a complex programming that makes non-player characters appear to have sentience or the ability to think for themselves. In other words, AI is where the computer controls a character. The way the game software controls characters is through several subroutines. Game characters not controlled directly by the player (such as enemies and NPCs) are becoming more and more lifelike because programmers are getting better and better at developing AI. Enemies and NPCs don’t just stand there looking pretty or run around shooting anymore; they can have complex emotional simulations and react to players with human characteristics. Torque allows scripting for AI. As this is a whole other area of study, it is not covered in explicit detail in this book, but you get the picture. Gamers expect more beautiful graphics, and because gamers are the ones who pay the overhead, game developers are focusing on more sophisticated characters.
Game Character Descriptions For your game design document, you need to describe all the characters that show up in the game. Descriptions should include illustrations, model sheets, and text descriptions. Write a Text Description
You should begin with text descriptions. Depending on the importance of each character and the scope of the game project, these descriptions can be one paragraph or one page long. What the development team needs to know is enough information to flesh out a full character, like the following questions: ■
What type of character is it?
■
What archetype best fits your character?
■
What role does your character fulfill?
■
What is your character’s overall personality?
223
224
Chapter 7
■
This Isn’t the Runway: Modeling 101
■
What does your character look like? What is its race, size, gender, and general look?
■
What does your character wear? Does its outfit match its occupation and personality?
If you have trouble envisioning your character, imagine sitting down at lunch with your character (or something else totally mundane) and asking him questions about himself. You may also look at the characters in books, comic books, and movies that you like. Just fill in the blanks, and you’ll be surprised how interesting your characters will become. Sketch Your Description
Once you have a rough idea in words about your character, it’ll become easier for you to sketch the character on paper (that is, given you are an artist of any caliber). Draw concept artwork of what the character will look like. Think in 3D, even while you’re drawing in 2D. In fact, most concept artwork of characters comes in the form of model sheets, which look like police lineups and mug shots in a way; the character is viewed from the front, left side, right side, and back, and then is asked to make a bunch of faces at the camera! In the industry, this is known as a turn around. Model sheets may look funny, but they let the team that makes the models for the characters know what this character looks like from any angle and in any pose, as shown in Figure 7.5. Game Character Appearance
Designers find that the greatest challenge to making a character is evincing a strong reflection of the character’s personality in a single visage that can be glorified in 3D art. Heroic characters are expected to look cute, handsome, winsome, clever, beautiful, elegant, grungy, powerful, tough, lithe, bouncy, dashing, and a string of similar adjectives that put them slightly above the stratosphere of ordinary. What are some of the most dramatic and telling features that will draw and hold your audience’s attention? What if your character was portrayed in film or appeared larger than life, billboard-sized? What do you think people would look at first? What would attract your attention to the character? Take a careful look at the Traits Triangle or any of the answers you gave to the old-school approach when deciding personality. How would each of these traits
How to Create Game Characters
Figure 7.5 Model sheet from the game PristonTale 2 (image used courtesy of Key to Play).
show up or be represented in the character’s physical appearance? If you wrote down that your character is ‘‘rich and powerful’’ and has a ‘‘vast inheritance’’ and lives during the Victorian era, wouldn’t he be dressed like a true Victorian gentleman and only in the best, neatest tailored attire? Create a crafted visual hook by selecting one or more specific traits about your character and accentuate them. Many characters have a distinct costume that sets them apart. Superman has his cape; Ash Ketchum from Poke´mon has his blue vest, green gloves, and cap; Mario, from Super Mario Bros., has his black mustache, red cap, and blue overalls; Link from Legend of Zelda has his pointy ears, green cap, and green tunic; and Indiana Jones has his fedora and bullwhip. Color schemes and noticeable familiar details should remain consistent, endearing your character to your audience. Set your character apart from the rest by developing habitual stances, looks, and a complete costume. The first impression audiences have of a character is its appearance, and often this impression is formed before the audience even picks up the game controls, through the box art or cinematic sequences. The character’s first impression must encompass personality, expression, vitality, and flair.
225
226
Chapter 7
■
This Isn’t the Runway: Modeling 101
Make Up Your Own Characters Now that you have a fairly solid framework for making game characters, try making up some of your own. It never hurts to at least have written and sketched descriptions of several because you never know when you’ll need to create a new one for a game; having made up the character concepts beforehand will save you time. Next you’ll begin creating the 3D animated models Torque will use.
Making Characters for Torque There are many reasons to animate 3D models. First, of course, there are character models, which you’ll be looking at momentarily. Character models, such as players, NPCs, and enemies, are often animated so that they can walk, run, jump, attack, and die—just like real live people. These animations are more complex than others because the animations are context sensitive: The character animations can change fluidly, depending on player input or reactions to player actions or because of scripted triggers within the engine. Other models may also be animated. For instance, a flag will wave in the wind, a tree’s boughs will bend as invisible gusts blow them, or a satellite dish will change angle to gain a better signal. Having otherwise stationary models move makes the 3D environment more realistic. The more animated models there are in a scene, the more active and vibrant the scene will appear.
Animated Shapes in Torque Animation in Torque can be done in two ways. The first is where the model and animation data are both stored in a single DTS file. The second method is where the model is stored in the DTS file, and each animation is stored in a separate DSQ file. On the book’s companion DVD, go to the Resource Files. In the Frogames sample pack, go to DungeonPack_1_0 > Art > Shapes > Windmill and open windmill.max in 3ds Max. This is an animated windmill object. Max will ask if you want to extend the length of your timeline to match the one in the Max file you’re opening; tell it yes. The first thing to do, right after opening the file, is to set the material of the bounds box because it may be difficult seeing a smooth textured view of your object with that in the way. Use the Select by Name tool to select the col-1 box.
Making Characters for Torque
You should see col-1 appear on the right-hand side of the screen in the Command panel. Press M to open the Slate Material Editor. Select an empty material slot in the Sample Slots section. Double-click on the material’s Diffuse Color circular button in the View area (the Diffuse Color circle will change color to yellow, showing that it’s selected) and in the Blinn Basic Parameters set its Opacity to 15. With the bounds box still selected in your view pane, right-click on the default material’s name in the View area of the Slate Material Editor and select Assign Material to Selection from the pop-up list to apply the material to the col-1 box. This will make your col-1 box appear transparent so you can see the objects within it. Now click the time slider (the button that starts at 0/160) at the bottom, above the time frame ruler and drag it across the screen. Go from Frame 0 to Frame 160. Notice that the object animates in your view pane as you do. What you’re doing is called scrubbing, which means you’re click-dragging back and forth through the animation timeline to preview the animation. Scrubbing does not accurately replicate the pacing of animation, which is set when rendering your scene out as an animated movie, typically an AVI file. This file was given a short animation. Basically, the windmill (see Figure 7.6) spins like a top. Click the Schematic View (Open) button on the right-hand side of the Max toolbar to see all the objects and how they relate in the scene. As shown in Figure 7.7, which shows the hierarchy scheme, you should see that there are multiple details. These were produced manually but are essentially the same as what you create when using the DTS Exporter Utility. The ‘‘ambient’’ dummy object, which is not attached to anything, is an animation helper. Close the windmill.max scene. Frogrames has already exported this animated model to DTS. Go to DungeonPack_1_0 > Ready_to_use DTS Files folder and find the windmill.dts and windmill.jpg files. The former is the DTS file of the animated windmill, and the latter is its texture map. There’s another file there, called windmill.cs. This is a CS file, which you’ll learn about a little later on. Basically, a CS file is a script file, so it tells the engine how to load and run the animations for the windmill DTS file. This will make more sense after you complete the lessons herein.
227
228
Chapter 7
■
This Isn’t the Runway: Modeling 101
Figure 7.6 The windmill seen in the four-panel view in Max.
Create a Character Model For your Ravenscroft game, you’ll add a single character model. This will be Gentry Jack, and he’ll replace the Gideon model you use now. You have a text description and sketch of Gentry Jack to work from already. All you have to do is model him in 3ds Max or whatever 3D software package you’ve chosen to use, export him for use in Torque, and import him into your Torque level. The following will reveal how to do all that. Work Off of a Template
Most artists do not work in a void. Model artists usually take the model sheets that sketch artists put together and build templates to model from. Typically, a front and side shot are enough to form templates to build the character around.
Making Characters for Torque
Figure 7.7 The windmill scene shown in the Schematic view.
It’s usually recommended to model characters from a pose such as Leonardo’s Vitruvian Man (see Figure 7.8). You can find the templates Jack_front.jpg and Jack_side.jpg on the companion DVD in Data Files > Chapter 7. Copy and paste them to your destination work folder. Open a new scene in Max to work with the following exercise. You can minimize or maximize selected viewports by pressing Alt+W, and while in one viewport you can swap to the next one by pressing F for Front view, P for Perspective, U for User, L for Left, and R for Right. This will help because oftentimes it’s necessary to zoom in on a single view when adding detail work.
229
230
Chapter 7
■
This Isn’t the Runway: Modeling 101
Figure 7.8 The Vitruvian Man by Leonardo DaVinci.
The majority of work will be done in the Front, Left, and Perspective viewports. Select the Front viewport now and press Alt+B (Win) or Option+B (Mac). A Viewport Background dialog box will come up. Under Background Source, click the Files button to open a browser. Find the Jack_front.jpg file you just placed in your destination folder and click Open. Under Aspect Ratio, select the Match Bitmap radio button. Put a check in the Lock Zoom/Pan box. If there’s a check there already, leave it alone. Then click OK. Your Jack_front.jpg image will appear in the Front viewport. Press G to hide the grid for now. If your image does not appear in the viewport, you might go back into setting the viewport background and make sure you have everything set correctly. Sometimes Max is slow and might take a little while to catch up to your selections.
Making Characters for Torque
Select the Left viewport and press Alt+B (Win) or Option+B (Mac) to bring up the Viewport Background dialog box for that viewport. For Background Source, click Files and find Jack_side.jpg to open. Under Aspect Ratio, select Match Bitmap, and put a check next to Lock Zoom/Pan before you click OK. Your Jack_side.jpg image will appear in the Left viewport. Press G to get rid of the grid here, too. Note that neither image shows in the Perspective viewport. They are only related to the view panes they were added to. Not only that, but they are fixed. You can’t accidentally select or delete them, and they won’t move. Plus, when you zoom in/out or pan back/forth, they will stay in place, which is on the origin. Compare your work to Figure 7.9. You now have a workable template. Having a template to follow allows you to keep your scale and shapes consistent as you build Gentry Jack.
Figure 7.9 The template images as placed in Max.
231
232
Chapter 7
■
This Isn’t the Runway: Modeling 101
Right-click where it says Wireframe, in the top-left of each viewport and select Smooth+Highlights. Then right-click Smooth+Highlights and select Edged Faces. Do this for all three viewports. The first selection gives you a shaded appearance, and the second makes edges visible. Model the Head
Be sure to set the units to metric, if they aren’t already. To do this, go to Customize > Units Setup. Usually Max is pretty good about recalling your preferences, but occasionally they can change between operations. In the Front viewport, create a Box (Standard Primitives) that fits where Jack’s head will be. In my example, I set the Length, Width, and Height values to 2.54 meters, Height Segs to 4, and Length and Width Segs to 8. Your parameters may be different, depending on how your viewports and units preference have been set. Try to make your box appear similar to the one in Figure 7.10. Use the
Figure 7.10 Move the box where Jack’s head will go.
Making Characters for Torque
Select and Move tool to place your newly created box where the head of Jack will go, as you see in the figure. Right-click on the box and select Object Properties. In the Object Properties dialog box that arises, select See-Through, as shown in Figure 7.11, before clicking OK. This will make the box transparent so that, as you’re modeling in the Front or Left viewports, you can still see the template behind it. Right-click on your box and select Convert To > Convert to Editable Mesh. The Command panel will automatically switch to the Modify subpanel. Expand the Editable Mesh modifier in the Modifier List by clicking on the plus sign beside it so you can see its constituent parts. Click on Vertex to select by vertex.
Figure 7.11 Select See-Through in the Object Properties dialog.
233
234
Chapter 7
■
This Isn’t the Runway: Modeling 101
Click on the individual vertices that will make up Jack’s head outline and move them to appear as shown in Figure 7.12. You can select more than one vertex at a time by pressing the Ctrl (Win) or Cmd (Mac) key as you click on multiple vertices. Move around your viewport using the Pan View tool (that looks like a hand) or the View Cube, the semitransparent cube found in the upper-right corner of each viewport, so that you can see what you are selecting. If you use the Pan View tool, once you change your view, you’ll have to return to the Select and Move tool to continue editing vertices. Edit the front and sides of Jack’s head, conforming with the general shape of Jack’s head in the template images. In the Modifier List under Editable Mesh, click on Polygon to select by polygons. Make sure your Window/Crossing mode is set to select by whatever is fully within the marquee (Window/Crossing is the icon button on the toolbar to the left of the Select and Move tool). Then, using the Select Object tool, drag a
Figure 7.12 Shape Jack’s head by moving the vertices into place.
Making Characters for Torque
marquee in the Front viewport over just one half of Jack’s head, as shown in Figure 7.13. Then press the Delete key on your keyboard to remove this half of Jack’s head. Exit polygon selection mode by clicking on Editable Mesh, at the top of the Modifier List. The yellow selection highlight surrounding Polygon in the Modifier List should disappear, and you now have the whole mesh selected in the viewport. Click the drop-down list arrow in the Modifier list and choose Mirror. In the Options section, put a check next to Copy to make sure the modifier creates a perfect copy, though reversed, of Jack’s head. With the mirrored copy visible, it should look just like his whole head is back again. Now select by polygon again. This will hide the Mirror modifier while you edit the head, but anything you do to the left side of his head will instantly be replicated on the right. Select the polygon that will make up Jack’s ear, and, using the Select and Move tool, move it. Using the Select and Uniform Scale tool, scale
Figure 7.13 Select half of Jack’s head and delete it.
235
236
Chapter 7
■
This Isn’t the Runway: Modeling 101
it, too. Then use the Bevel tool to extrude and reshape it. Finally, rotate his ear to face the front, as shown in Figure 7.14. When you’re through, click on Editable Mesh (parent) in the Modifier List to quit polygon selection. Deselect your mesh to view the Mirror modifier at work. Reselect your mesh. Right-click on the Mirror modifier in the Modifier List and select Collapse All. This merges your modifier into the existing mesh. You will receive an error message window, in which you should click Yes to continue. All the window is telling you is that if you have any elements contained within separate modifiers in the stack list, you might lose them if you choose to collapse all. It’s fine. The unfortunate thing about breaking up one side from the other to create a mirrored copy like this is bringing the pieces back together again. First, select by vertices. Make sure that Ignore Backfacing has a check mark beside it. Then scroll down to the Weld roll-out under Edit Geometry. Set Weld (Selected) to
Figure 7.14 Bevel out a polygon on the side of the head to make an ear.
Making Characters for Torque
100.0 meters; this is the max distance the vertices can be from one another and still weld them. I usually set it very high, because I know which vertices I want welded and which I don’t, and it’s a pain to have to keep fiddling with the weld distance. Now zoom way in and slowly orbit around Jack’s head, welding the middle seam of Jack’s head together. This technique is akin to sewing. You work on two halves of Jack and when you’re done, you have to sew him up the center. Drag a marquee over what appears to be the middle vertex of each row (but is actually two) and click the Weld (Selected) button to weld them together. Keep orbiting, selecting, and welding, until you come back to where you started. Done! Select by edge. Press and hold down Ctrl (Win) or Cmd (Mac) as you select all the edges along a line that will make up Jack’s grimace (see Figure 7.15). Then, using the Chamfer tool, add a chamfer to widen the edges into polygons the size you want for Jack’s lips.
Figure 7.15 The highlighted edges above are the ones you should select to determine where Jack’s mouth will go.
237
238
Chapter 7
■
This Isn’t the Runway: Modeling 101
Select by polygon. Select all the polygons making up Jack’s new chamfered lips and extrude to the polygons, as shown in Figure 7.16. Weld the corner vertices of Jack’s mouth together to create a seam rather than a bulge. Exit vertex selection mode by clicking on Editable Mesh (parent) in the Modifier List, so that you have the head selected as a whole again, and add a Spherify modifier to the head. Set the Percent parameter to 30.0. This will give Jack’s head a more rounded appearance. When you’re satisfied, right-click on Spherify and choose to Collapse All. Select the front-middle polygon, just above the lips, and extrude that polygon out to make a nose. If you have more than one polygon in the middle, select the two closest middle ones. Use the Bevel tool to carry your selected polygon(s) farther, and use the Select and Rotate tool to rotate the outward-facing polygon(s) upward like a pig snout, and then extend the top-middle edge to give the nose a rounded end, as shown in Figure 7.17. There! You’re done with the head. Now to make the body. Model the Torso
Select by polygon. Pick a patch of eight polygons on the bottom of Jack’s head, where his neck will be (see Figure 7.18). You’ll need to do this in the Perspective view, as it’s the only viewport that will have access to the bottom of Jack’s head (if you orbit under it to see). You’ll need to turn on Smooth+Highlights and
Figure 7.16 Chamfer and extrude to form Jack’s lower lip.
Making Characters for Torque
Figure 7.17 Give Jack a nose.
Figure 7.18 Select this patch of eight polygons.
Edged Faces for the Perspective view, unless you did so earlier, so that you can see a smooth shaded shape with the edges clearly visible. Use the Bevel tool and extrude these polygons outward and down six segments, rotating in between if you have to in order to stay in line with the template. Compare your work with Figure 7.19. Model the Limbs
Select a middle vertical line of polygons on opposite sides of Jack’s torso and move them so they’re almost center to him on the sides. This way, you can extrude the arms and legs directly from his torso.
239
240
Chapter 7
■
This Isn’t the Runway: Modeling 101
Figure 7.19 Use the Bevel tool to make Jack’s torso.
Before going any further, I will give you an option. You can either delete half of Jack’s mesh and use the Mirror modifier again (meaning you can expect to spend a lot of time welding his vertices together when you’re done), or you can attempt to eyeball it and do each limb one at a time and keep your fingers crossed that he comes out looking symmetrical. It’s your choice. Whichever you do, attempt to bevel and extrude polygons on his sides to make his arms and hands (extruding the thumb as a separate block but keeping the rest of his fingers as a solid block rather than separating them). Then bevel and extrude polygons from his hip to make his legs and feet. On the legs and feet, you will need to rotate after every extrusion to follow the template. (See Figure 7.20.) Once you are done, there will inevitably be some disproportioned areas. Go back and select by vertex. Move vertices carefully until your shape is more like what is desired. By the way, when using the marquee to select multiple vertices, check your gizmo. Whatever tool you’re using, your gizmo will float an equal distance
Making Characters for Torque
Figure 7.20 Pull Jack’s arms and legs out from his torso geometry, shaping them as you go.
between your selected components. If you are trying to select just one vertex and happen to see your gizmo jump off to the side, it is probably because you’ve erroneously selected more than the one vertex. Keep an eye on where your gizmo is, and it should help you realize when you inadvertently grab wrong vertices. Compare your finished work to Figure 7.21.
Add a Material to Gentry Jack Before rigging the model or doing anything else with it, you must put a material on it. Before adding a material to your mesh, check every inch of it for stray vertices, T junctions, and sliver planes and, if you find any, fix them first. Refer to Chapter 6, the section marked ‘‘Build Structurally Sound Models,’’ to see what these are and why you cannot have these in your model. Select your Editable Mesh object, right-click on it, and go to Object Properties. In the Object Properties dialog box, deselect See-Through, then click OK to exit
241
242
Chapter 7
■
This Isn’t the Runway: Modeling 101
Figure 7.21 The finished mesh for Jack.
the window. Now you should be able to see your mesh in all its shaded glory (if your viewport has Smooth+Highlights and Edged Faces turned on). Use one of the texturing methods you learned about in the last chapter. You can use Unwrap UVW or UVW Map modifiers or select by material IDs and attach materials. There are texture maps on the companion DVD, in the Data Files > Chapter 7 folder, that you can use for texturing purposes. Or you can use your 2D image editor to make your own. For the example in Figure 7.22, I simply added material IDs 7, 9, 12, and 15 and applied them to four different polygon selections; then I assigned materials to each ID. This is a sloppy way to do it, because there is a straying of texture along the edges I beveled or extruded, but you get the idea. To texture your Jack, you should use whatever method worked best for you when you textured the house in the last chapter.
Rig Gentry Jack First, let’s talk about setting up complex character animation in Max for DTS files in Torque 3D. You have, essentially, two options when dealing with DTS files: ■
Option A—Option A is to make a Biped rig (which I’ll talk about in a moment) that matches the standard player character in Torque and functions using the same animation DSQ files as the standard player character does.
Making Characters for Torque ■
Option B—Option B is to make a Biped or custom rig with your own builtin animations and export the DSQ files at the same time as the DTS file using the Torque DTS Exporter Utility. DSQ files, by the way, are animation sequence files used by Torque.
For the purpose of your Gentry Jack character, I would suggest Option A, but you can use Option B if you’d prefer or have better-than-average Max skills. Option A: Use Standard Player DSQs
So you decided to try and use the standard player DSQs? It is fast and easy, but it might be tricky if your mesh does not conform to the original player character’s. Following are the steps you need to take to make it work. Scale and Rotate Your Mesh
If you decide to go with Option A, using the standard player animation DSQ files, then you must match your skeletal rig exactly to the standard player’s rig. If the scale or size between your DTS and DSQ files do not match, the Torque engine will attempt to do its best to make it match. This is why you’ll sometimes see weird things happen in the game world or the model deformations will act oddly.
Figure 7.22 Gentry Jack gets some skin.
243
244
Chapter 7
■
This Isn’t the Runway: Modeling 101
You will find all of the standard player files, including DTS and DSQs, on the companion DVD in the Data Files > Chapter 7 > Player folder. The original mesh of the standard player character is 2.2 meters tall. The height of the mesh is important, but even more important is the hip height. The standard player character has a hip height at exactly 1.3 meters high. If you can get the character’s hip height to measure that, then you can scale the rest of your character’s height to fit. Use the Select and Scale Uniform tool to scale your character, matching the standard player character’s height settings. Your model must be facing down the Y axis, so when you look at it from the Front viewport, you should be looking at its backside. You probably don’t have your character set up that way now, because it’s opposite from the logical way users think. So after scaling the mesh to fit the standard player character’s hip and head height, rotate your mesh using the Select and Rotate tool so that your character faces away from you in the Front viewport. Reset XForm
You must reset the model’s XForm next. Of course, all modifiers should already be collapsed so that there aren’t any left in the Modifier stack list. With your model selected, click the Utilities subpanel tab, in the Command panel (Utilities is the one that looks like a little hammer farthest to the right). Then click Reset XForm, and then Reset Selected. This applies an XForm modifier to your mesh. Right-click your mesh and select Convert To > Convert to Editable Mesh. This maintains the Reset XForm but collapses the stack and removes the modifier from the list order. Assemble a Biped
Character Studio is a collection of tools that allows for the sophisticated animation of characters in the 3ds Max program. Character Studio used to be a standalone add-on package but is now included as part of the Max program itself. It has tools to create ‘‘smart’’ skeletons called Bipeds. These skeletons (like the one shown in Figure 7.23) can be animated by using traditional keyframe methods, but they also have the ability to accept motion capture data (like the kind you see actors in dotted suits doing) as well as generate their own walk and run cycles via footstep-based animation. There are two ways to create a rig for your character mesh. One is using bones, and the other is using Character Studio’s Biped skeleton.
Making Characters for Torque
Figure 7.23 A Biped skeleton.
A bones rig is not a real skeleton, by any means. It is a simple framework of bones that have the model skinned over the top of them. The bones share interlinked chains that allow for easier animation. The Biped is a pre-canned skeleton rig that has joint limits and other information built-in. You can use Bipeds for bipedal characters (such as Gideon or Gentry Jack here). A basic Biped is a humanlike skeleton made up of colored blocks. Bipeds can have tails as well as ponytails. Plus, the number of fingers and toes can be adjusted. With a little ingenuity and some tweaking, you can make a Biped customized to fit your character without having to create a bones rig from scratch. The Biped can be created from the Systems tab of the Create subpanel or by choosing Create > Systems > Biped. Click and drag in the Perspective viewport to create the Biped. Drag until your Biped matches the height of your mesh. Try to match head height, but given a choice between head and hip height, settle for hip height. As soon as you drop the Biped, you must set up the parameters. In the properties area of the Create Biped panel, set the Spine Links to 3 and Neck Links to 1. Your
245
246
Chapter 7
■
This Isn’t the Runway: Modeling 101
Leg Links, Fingers, Finger Links, Toes, and Toe Links are all up to you, but it’s suggested you stay between 1 and 3 on them. You can also set the height of your Biped here (and scale your mesh to it afterward, if you find that quicker). See Figure 7.24. Now pose your Biped to match the pose of your model. To do so, go to the Motion subpanel (the tab icon looks like a speeding wheel). This is where most of the Biped commands are found. Click the Figure Mode button (the one in the Biped roll-out section that looks like a paper doll); this will put you in an editing mode so you can actually pose the Biped. First select the Bip001 node, and then rotate the Biped to match the angle of Jack’s mesh. Click the Symmetry button in the Motion subpanel’s Track Selection roll-out; that way, whenever you move or rotate a Biped bone, the opposite facing bone
Figure 7.24 The Biped parameters.
Making Characters for Torque
will move in tandem. This can save you time as you move or rotate bones in your Biped. The Track Selection roll-out contains the Body Horizontal, Body Vertical, and Body Rotation tools that you use to move and rotate your Biped. The Bend Links roll-out, found below the Track Selection roll-out, contains the tools you use to bend and twist the individual joints and bones of the Biped. It is typically not advised to scale bones, but it is in most cases a requirement. This can be done simply by switching to the Select and Scale Uniform tool and scaling symmetrically across the X axis. Go back and forth between the Track Selection and Bend Links tools, matching the Biped’s pose and shape to that of your mesh. Do this while in Figure mode. Add a Skin Modifier
Though you may not realize it yet, your Biped is not attached to your mesh. It’s like having a skeleton that can walk or run around without its skin. You need to attach the mesh geometry you made to the Biped so that the skeleton will drive the mesh. To do so, you have to skin it. Exit Figure mode and go from the Motion subpanel of the Command panel to the Modify subpanel. Use the Select and Move tool to place your Biped inside your mesh, if it’s not there already, and then select your mesh when you’re done aligning the two. With your mesh selected in the scene, click the drop-down list arrow in the Modifier List to add a modifier and select the Skin modifier. A Skin modifier will automatically be added to the modifier stack. Click the Add button, which will pull up the Selection dialog box. Deselect the bone objects in the List Types section, and then click the Invert button. This will show you only the usable bones in the scene. Select all of them, but don’t choose Bip001—Bip001 must not become a part of the skin. Now it’s time to do your weighting. You see, the bones can only affect those parts of the mesh they are actually attached to, and by default each bone has an envelope of deformation surrounding it. Each joint produces a pill-shaped envelope that surrounds the mesh and includes those vertices closest to the joint. The size and shape of each envelope can be adjusted. Envelopes can also be set as deformable or rigid. When envelopes overlap, the weighting is balanced between the envelopes. Set the weight for your skin by making minor adjustments to your envelopes.
247
248
Chapter 7
■
This Isn’t the Runway: Modeling 101
Because this step is time-intensive, you can skip it until later, after your rig has been proven. Set Up LODs (Optional)
LOD stands for level of detail. The trick to LODs is that, whenever the in-game camera is far enough away from the character, one mesh can be swapped with another, essentially another mesh with fewer details. Whenever the camera zooms in for a close-up, the highest-resolution mesh is shown, while a character seen at a vast distance away will have the lowest resolution. This defeats lag time in video games—especially MMOs that are dependent on streaming content. You can use the Multires modifier to add multiple LODs, but in this case, you’ll stick with just one. Why do I say that? Because you’re only editing a player character. Usually, player characters are in first- or third-person in Torque 3D, and the in-game camera rarely strays far from the character, so there’s no call for LODs. Caution Be careful attempting to add LODs, because once you add two more copies of your character model, you’ll have more objects in your scene, which can make completing the exercise in this chapter more difficult. This is why this section is totally optional and only for more advanced users. In my opinion, try making a player character work first, then you can go back and add LODs if you feel ready to attempt it.
But in case you’re wondering how to set up multiple LODs, this is how you’d do it. Only add LODs when you’ve completed the model and don’t anticipate any further edits, because it’s harder to reverse your actions after adding LODs. With your mesh selected, you can click the Modifier List drop-down list arrow at the top of the Modify subpanel and choose Multires from the list of available modifiers. You clone the existing mesh shape two times (Edit > Clone). That way, you have your original model and two copies of it sitting in your scene. Then drop the Vertex Percentage value for each of the three meshes, starting with 100% and ending with 20%. (See Figure 7.25.) Then you name each of the meshes with numbers at the end, like shape128, shape64, and shape2. You are also required to have dummy objects, like
Making Characters for Torque
Figure 7.25 Three LODs: one set to 100% (left), another set to 50% (center), and the last one set to 20% (right).
detail128, detail64, and detail2, to correspond with your meshes for Torque to read them correctly. Your detail objects will be children of base01, while your shape128 will be the child of start01. Your shape128 will have the highest amount of detail, while your shape2 should have the least. When you go into the DTS Exporter, have shape128 selected and click the Embed Shape button. The Exporter should auto-generate a hierarchy of levels of detail for you. This means that whenever the character onscreen is seen at any size higher than 128 pixels, it will render as the most complex model, but as it gets farther away it will lose clarity, until it’s only at 2 pixels and will have the most blurred shape. This saves the user a lot of rendering lag time and improves the graphic performance of your game. Add a Detail Marker
Create a dummy node by going to Create > Helpers > Dummy in the main menu. Click and drag in one of the viewports, and the dummy marker will be created. Its default name will be something like Dummy001. Name this new node (which should be placed at the origin, where the main grid is centered) details#, where # is the size of the mesh. You can name the dummy marker in the Name and Color roll-out of the Create subpanel. At this point name your skinned mesh a unique name with the same # used after it, such as details15 and charactermesh15. Make sure you don’t use the sizes of
249
250
Chapter 7
■
This Isn’t the Runway: Modeling 101
1 or 2, as these clash with the spine bones and will end with your bones being exported as the mesh. Add a Bounding Box
Now is as good a time as any to add a bounding box. If you just created a dummy marker, your Create subpanel will have changed to Helpers. Change it back to Geometry (the circular icon at the top left of the Create subpanel) to see the Box button under Object Type. Create a standard mesh box placed at the origin. If you have to resize your box after creating and moving it into place, switch to the Modify subpanel and look under the Parameters roll-out for the box’s parameters. You don’t have to make this box enclose the player character, however. Instead, convert it to an Editable Mesh object and change the box’s parameters to fit. Right-click the bounding box and select Object Properties to open the Object Properties dialog. Click Display as Box, then click OK to exit that window. Name the bounding box bounds. Parent the bounding box to Bip01. You can do this in the Schematic view. Add Other Critical Markers
The default player Biped already has these markers, but if you’re creating a new character from scratch you must employ the following: ■
Start01—One of three must-have objects that is the parent of the main model mesh.
■
Base01—One of three must-have objects that is the parent of start01 and detail2.
■
Cam—The third-person camera object, or where the camera will be positioned when the player switches to third-person mode. This is often behind the player’s head.
■
Eye—The first-person camera object, or where the player’s viewpoint will be when starting in first-person. This is often in front of the player’s head.
■
Mount0—Typically positioned near the right hand of the player model, this marker tells the game where to spawn the player’s weapon; a weapon model, just so you know, would have a corresponding mountpoint marker.
Making Characters for Torque
Dummy objects can be simple box shapes, but they are hidden. The most important things about dummy objects are their names and positions. Here’s one way to set these up. Create a dummy node (go to Create > Helpers > Dummy and click and drag in a viewport to make a small box) named Unlink and place it where you want your Cam node. Duplicate this node and name the duplicate Cam. Cam is used for the third-person camera. Cam is then parented to Unlink, and Unlink is parented to Bip001. Duplicate Cam and call the duplicate Eye, which is for the first-person camera. Place this node and then parent it to the Bip001 Head bone. This will make the Eye node move as though attached to the head of the character. Duplicate Eye and call the duplicate Mount0, which is for weapon mounting. Place this node at the left hand and parent it to Bip001 L Hand, so that it appears to be stuck in the player character’s left hand. Option B: Create Your Own Embedded Animations
Every move a game character makes—whether it’s jumping high in the air, unleashing a combo of attack moves on an opponent, or just plain sallying about— is determined by an animated pose, which is usually a loop of framed animation about 10 to 30 frames long. Most 3D programs support frame animation, which means that there’s an obvious timeline at the top or bottom of the interface that allows you to scroll through frame after frame. You can set poses for key frames and save them. The program will fill in the gaps with smooth interpolation. Most programs also allow you to name animated sequences separately from one another. You can see the animated sequences in playback, and depending on your settings, most often you’ll see the animation run at 24 frames per second (your TV set runs at 30 frames per second). Most game engines, including Torque, have algorithms that look for animation sequences to render the character models appropriate to the player’s actions. So when a character is running, the game engine searches through the animations for a ‘‘run animation,’’ and that’s the part of animation that it plays. Torque has built-in support for embedded animations. Torque takes the DTS file and looks for DSQ files that correspond to the naming conventions listed
251
252
Chapter 7
■
This Isn’t the Runway: Modeling 101
below. Each naming convention is fairly self-explanatory, as long as you stick with it. The standard player model has many of these already built-in, so if you choose to rig using Option A, you don’t have to do any animating yourself. But when using Option B, you need to set up each of these animation sequences yourself and export them correctly. ■
root—Character is standing around, breathing, fidgeting, and idle.
■
walk—Character is walking forward.
■
run—Character is running forward.
■
jump—Character is jumping while running.
■
standjump—Character is jumping from a standing position.
■
fall—Character is falling off a vertical climb, such as a cliff or tall building.
■
land—Character lands safely on his feet and gets back up.
■
back—Character is stepping backward at a fast pace.
■
strafe—Character is running sideways.
■
sitting—Character is sitting in a chair or riding in a vehicle.
■
scoutroot—Character is riding a horse or motorbike.
■
death1 to death11—Character dies. You don’t have to make all 11, but the engine will randomly select one of them to play each time the character dies. Having more for the engine to choose from adds variety.
■
look—Character points to where he’s looking.
■
celwave—This plays when the player presses CTRL+W (Win) or CMD+W (Mac). It’s meant for the character to wave to other characters in online play.
■
celsalute—This plays when the player presses CTRL+S (Win) or CMD+S (Mac). It’s meant for the character to salute or taunt other characters in online play.
Making Characters for Torque
Export Gentry Jack to DTS Before you go through the export process, there are some important details that your work must conform to every time: ■
The character mesh must have triangles (be converted to an Editable Mesh).
■
The character is facing the back view.
■
The character is standing at 0 0 0.
■
There is a detail marker/dummy object called start01 at 0 0 0.
■
There is a detail marker/dummy object called base01 at 0 0 0.
■
There is a detail marker/dummy object called detail2 at 0 0 0.
■
The base01 marker is the parent of start01 and detail2.
■
The start01 marker is the parent of the main model mesh, and that mesh ends with a 2.
■
A simple box shape (often hidden), called bounds, envelops the character for collision-detection purposes.
■
The Skin modifier uses only those bones used in the animations (about 19 of 29).
■
Every vertex in the mesh has been assigned a bone.
■
All bones have at least one vertex assigned to them.
■
Bones are not named with numbers at the end, so they’re not confused with detail objects.
■
One config file resides in the folder you are exporting to.
■
The Max file resides in the folder you are exporting to.
If you’ve followed the project tutorial throughout the chapter and used the default player Biped, you shouldn’t have much of a problem. Remember to check the direction the character is facing. If the model’s not an Editable Mesh already, right-click and select Convert To > Convert to Editable Mesh right before you export.
253
254
Chapter 7
■
This Isn’t the Runway: Modeling 101
Once the markers are in place, the hierarchy is complete, and all the key files are present in the player folder (the Max file and any texture files), it is time to export the DTS shape for the character. Go to the Utilities subpanel in the Command panel, and in the Torque DTS Exporter Utility roll-out, click the Export: Whole Shape button. Export DSQ Files
If you’re not using the default player files but making an all-new player character, as in Option B, you’ll want to export the DSQ animation files for each cycle of the animation process. This is done separately from the DTS file. To export animations, you’ll want to delete your player mesh first (leaving the hierarchy of markers and Biped animations) and click the Export: Sequences button from the Torque DTS Exporter Utility roll-out. Save it as a DSQ file with the name of the animation cycle (see the section ‘‘Option B: Create Your Own Embedded Animations’’ earlier in this chapter), such as player_forward.dsq. The standard player Biped you use in Option A already has complete DSQ files in the Data Files > Chapter 7 > Player folder, so you won’t have to re-create them, just copy them over to your destination folder. Export Skinned Mesh
There are several designers who say that a critical step in creating a skinned mesh for DTS files requires using unMess DTS, a standalone converter program (for Windows only). A package containing unMessDTS is available on the book’s DVD in the Software folder, if you’d like to use it. Unzip the pack to your Max/Scripts directory. There’s also another file, a MaxScript file (.ms extension), written by Todd Degani, that allows you to run unMessDTS while inside the Max program. Copy and paste this file to your Max/Scripts directory, as well. To use unMessDTS, export your DTS file, then export it again as filename_mess .dts, where filename is whatever name you gave your original DTS file. Run the unMessDTS script in Max by going to MAXScript > Run Script and finding the correct script file. This will open a dialog box. Point it to the unMessDTS.exe application destination, point it to your original DTS file, and point it to your filename_mess.dts file before clicking unMess Shape.
Making Characters for Torque
When you’re done, unMessDTS cleanly asserts your skinned mesh in the DTS file. Then you’re ready to try out your 3D model in the Torque engine. Note A third-party program called Doit! came along in 2009. Written by Eric Barth, this utility is meant to speed up character model DTS exporting in all 3ds Max programs, from version 7 on. Doit!—which costs $29.95 for an indie developer license—allows you to make a mesh, select the compatible rig and node setup, rig mesh to bones, and tweak the dummy markers. Then you click Doit!’s LODME button, save the Max file to whatever directory you stored the standard player CFG file in, and export. Use UnMessDTS, and you’re ready to play. To find out more about Doit!, look online at www.ericrbarth.com.
Spotlight on Chronic Logic LLC Chronic Logic LLC is a video game developer and publisher based in Santa Cruz, California. They develop and distribute indie games. Chronic Logic was founded by Alex Austin and Ben Nichols in 2001, just after Austin’s Bridge Builder became popular. Later, Josiah Pisciotta joined the company. Nichols has since left Chronic Logic. I had a moment to talk to Josiah Pisciotta, who answered the following questions:
When did you first decide to use Torque to make a game, and what did you learn along the way? ‘‘I chose Torque 3D in 2004 as my studio’s game development platform for my current project. The key reasons were that it had a proven working demo, an abundance of community-made resources, a large community and robust support forums, it runs on older computer specs, and the price was right. I had been toying with the free Torque demo since 2002. I bought my first license in 2003. Official production began on my current game on November 6, 2005. Having such a full-featured game development platform taught me how all the various components fit together and work. It was easy to get a grasp of the data structure. One can learn quite a bit by reading the commented code.’’
Were there any software limitations that had to be overcome or any special features that helped you out with Torque? ‘‘Yes, there were limitations. I knew some things would not work right with how [ Torque] is set up to work. The scope of our design did include some fairly heavy engine customizations. None of the limitations came as a surprise to us. No canned game engine solution is 100% perfect.’’
For a designer just starting out, is there any advice you can give? ‘‘Yes: 1. Design. First develop a rough idea. Then go and research the available technologies before you flesh out your designs or invest capital. Know that some things will be possible and some will not. I kept my design somewhat flexible where I was not 100% sure that the available technology would work or not, and I usually develop three to four contingency plans to cover those situations. Fully understand your technical limits and fight hard to work within them.
255
256
Chapter 7
■
This Isn’t the Runway: Modeling 101
2. Pace. Second, be patient. Try to not rush things. Have deadlines, but don’t let those make your game’s quality and playability decisions. Take the time to read through your engine’s code and learn as much as you can. Bounce ideas off non-game developers, like friends, family, or gamers. If you plan on selling your game, you will want it to appeal to as wide an audience as possible. Identify your market, and do some research on it. What are their buying patterns? Likes? Dislikes? What game did they buy last and why? This information should not drive your game’s production, but it should be factored in. 3. Team. Third, find help. Build a solid core team. You probably won’t be able to make a game on your own. If you can, you probably shouldn’t. Two sets of eyes and opinions are better than one. Try and pair up with more specialized developers outside your specific field. Be a part of other game development projects. Serving on another developer’s project will provide a real-world example of their successes and failures. See how development problems escalate and how they are solved. This will also give you a rough understanding of scheduling and managing talent. Take some time to know a bit about what each member of a development team does. Try and gain as much information as possible so you can speak intelligently on various subjects, like programming, 3D/2D art, game design, audio, and production. 4. Develop. Fourth, understand what a good game developer does. Look at highly effective game developers and adopt similar traits. Look for industry models of success and try to learn from their examples or actions. You, after all, are developing a game. 5. Passion. Play as many PC/console games as you can get your hands on. Play games made with the D20 System. Play board and card games. Play games outside of your own personal interests. Demos are free and abundant. [Author note: The D20 System is a tabletop RPG created by Wizards of the Coast.] Those are the points and rules I try to adhere to. For this younger audience I would like to add a few critical points: Cater your education toward a game development track. If you are interested in programming, make sure you have the requirements met to follow a CS [computer science] degree. If your interest is art, take any game-related courses you can find, even 3D-application-specific courses and traditional media. Again, find a game project or game development studio and volunteer. Education is a huge part of being an effective game developer. Another large part is keeping up with the ever-changing technologies. Serving on a current project will let you apply what you have learned and give you a feel of how development technologies change. The analogy I use is my own personal experience. What I learned in school was more or less handson history of game development. Serving on a few game projects was more like being on the front lines, closer to the cutting edge. The best way to learn about cutting-edge game technologies is to be with the people inventing it.’’
What we can we expect to see next from Chronic Logic? ‘‘We are currently working on a patch as well as several retail publishing deals for our game Kingdom Elemental (see Figure 7.26). Our next game release will be our Torque-based game Microwarrior. We are also prototyping some smaller game ideas as side projects. We manage to stay very busy around here.’’
Making Characters for Torque
Figure 7.26 Chronic Logic LLC’s Kingdom Elemental game that they built using Torque.
How to Animate Objects Instead of Characters If you are just creating a single animated object, such as a flag waving in the wind or the spinning windmill you saw earlier in this chapter, you build the mesh, apply a material to it, skip the whole part about the skeleton, and then you animate the object for a single animation cycle. You also have to set it up so that its animation will loop. To do that, you make sure that the frame position it ends on is the exact same as the frame position it starts on. (You can copy and paste keyframes in Max to make this happen.) You name your mesh with a 2 on the end, such as health2 or weapon2. Then you set up three dummy objects in Max, one called start01, one called base01, and one called detail2 (all at 0 0 0), with start01 and detail2 as the children of base01, and start01 as the parent of the mesh. Lastly, you have to set up Sequence objects (Create > Helpers > General DTS Objects), right-click on a viewport to enter the Curve Editor, and locate
257
258
Chapter 7
■
This Isn’t the Runway: Modeling 101
the Sequence object’s Start and End tracks. This is so that when you export the file, Torque knows that the object is animated, as well as which frame to start on and which frame to end on.
Free Resources for Max Files If you plan to do a lot of 3D modeling for your games, there are a few sites you can find online that provide free 3D models in many file formats, including native Max files. These can benefit you by providing quick starts or templates for your character and prop models. The sites include the following: ■
Artist 3D—Free 3ds Max models, human models, 3D art, and 3D wallpaper, online at http://artist-3d.com.
■
3DM3—More than 350 free meshes, including cars, characters, weapons, office furniture, and more, online at www.3dm3.com.
■
TurboSquid—Lots of free 3D models are available at TurboSquid, online at www.turbosquid.com/3d.
Affordable Resources for Torque Besides Max files, you need as many DTS and COLLADA files as possible, right? If you aren’t confident in your art skills or don’t have the time to make them yourself, you can purchase packages for use with Torque from companies online. The two most impressive companies are these: ■
3DRT.com—Online at www.3drt.com.
■
Frogames—Online at //www.frogames.com.
There are samples from both companies found on the DVD that comes with this book.
What’s Next? In this chapter, you should’ve learned how to design believable and pleasing game characters, how to use 3ds Max to make Torque game characters, how to texture models, how to animate models using Biped skeletons, and how to export character models for use in Torque. Next you’ll look at designing the game interface.
chapter 8
Getting Gooey: Designing GUIs
Tip ‘‘The interface is one of the least understood yet most critical elements in the game. The interface is the connection between the player and the game world.’’ —Richard Wainess, M.S.Ed., Senior Lecturer, University of Southern California
Torque 3D has a complete what-you-see-is-what-you-get (WYSIWYG) editor for graphical user interface design, called the GUI Editor. The GUI Editor allows you to create, modify, and test your homemade GUI in-game with maximum resolution. 90% of GUI creation can be done in the GUI Editor, which means only 10% has to be done in code, making graphical user interfaces a cinch with Torque 3D.
Game Interface Before I talk about the GUI Editor, you should know what an interface is and what it does. A human-computer interface, or HCI, determines the ease with which the end user of a computer program (in this case, the player who picks up your game) gets around and does what they want in the program itself. In other words, the gamer interacts with the game through its interface. If you make the game controls too hard, your player will rebel. If it is difficult to move the character around or perform basic actions, then it is definitely not going to be a fun game, and a game that’s not fun is never going to be played. 259
260
Chapter 8
■
Getting Gooey: Designing GUIs
History of Game Interfaces Game interfaces have changed greatly over time. Back in the day of coin-op arcades, the visual and manual interfaces were never the same. Before a player put quarters into the machine, a screen would come up that displayed the game title and another screen would show how the game was played. The manual interface itself consisted of different combinations of button presses or joystick pulls. Centipede (see Figure 8.1) was one of the few arcade games that featured a trackball, which was more durable than a joystick. Other interfaces, often related to the arcade simulation games, mimicked real-life objects, such as rifles, steering wheels, and periscopes. These were some of the earliest input devices, apart from keyboards and mice. Nowadays input devices range from the consoles, which all feature similar toggles and buttons made to fit in a player’s two hands, to the Nintendo WiiMote or game mats used for dance and rhythm games to the music ‘‘instruments’’ used to play Guitar Hero or Rock Band.
Figure 8.1 Atari’s arcade game Centipede made use of a trackball instead of the familiar joystick at that time.
Game Interface
Almost all games are shipped with a manual or instruction guide for how to play the game, and include in-game instructions and reminders for how the game is played or what the objectives and options are. While much or most of what makes a great game so good is intuitive, it is vital to remember that the gameplay starts with the interface.
Give the Player Control Games thrive or die by their controls. Games in which you cannot find your way through their maze of menus, or cannot get the character to go where you want, or cannot see the bad guys that are shooting at you—these games end up forgotten about in the bargain bins. Games that are easy and fun to play, while still offering unique challenges, last a long time and get talked about for years to come. You want your game to be one of the latter. By interface, I am talking about a two-way street, a phone call, or a translator between two diplomats. Two individuals are communicating back and forth to reach a conclusion. A human-computer interface, alternatively mammalmachine interaction (isn’t that cute?), involves a human and a computer trying to reach a mutual conclusion, and the translator between the two is the interface. Think about it. When you start up a game on your Xbox or PlayStation, you are greeted by the preset menu options that typically let you start a new game, load a saved game, edit settings, or give you some other option. Once you have started the game, you can open other menus, control your onscreen character, and save your game. All of these are interfaces that have to be programmed by the game’s designers so that you can enjoy the game.
Input/Output Essentially, these interfaces break down into two tasks: ■
Input—You tell the computer what you want to do.
■
Output—The computer reacts based on its programming.
Input/Output, or I/O, is a concept that is really very easy to understand. While you are telling the programming what you want to do (such as load, save, or pick up ammo), the programming has to respond to what you tell it. Most of the time
261
262
Chapter 8
■
Getting Gooey: Designing GUIs
an interface uses the mouse and keyboard or, in the case of console games, the peripherals rest on the game controller.
Think Usability Tip ‘‘Interface design is an excellent proving ground for gameplay features. After you have an idea for a new feature (or an improvement upon an existing one), consider how the interface will work. If you can’t come up with a seamless interface, you should seriously consider abandoning or redesigning the feature.’’ —Kevin Saunders, Obsidian Entertainment
Besides considering how a game will react to the player’s choices, and taking into account emergent gameplay, you must also learn what truly makes a great interface, regardless of whether you’re designing a great game or not. Computer science professor Ben Schneiderman, who co-wrote with Catherine Plaisant the book Designing the User Interface: Strategies for Effective HumanComputer Interaction (published by Addison Wesley, 2004), has a list of eight principles that should be included behind every system interface you design: 1. Strive for Consistency—If you always keep a command button in one place, don’t have it drift anywhere else. If you’re designing a computer game, the nearly universal controls for character movement are going to be W, A, S, and D or the arrow keys. Don’t change them. 2. Enable Frequent Users to Make Up Their Own Shortcuts—Letting players learn hotkeys or develop their own hotkeys won’t make your game suffer. It will only help. 3. Offer Informative Feedback—This goes right back to the lesson on the Four Fs of Great Game Design: Fun, Fairness, Feedback, and Feasibility. 4. Design Dialogs to Yield Closure—When the player finishes saving her game, you ought to let her know it was saved successfully. 5. Offer Simple Error Handling—If there is an error, let the user know what kind.
Game Interface
6. Permit Easy Reversal of Actions—Games usually don’t have an Undo command, but if the player’s character dies, they should be able to go back to a checkpoint or a previously saved game. Make it easy on them if they mess up. 7. Reduce Short-Term Memory Load—People hate to wait. That’s a proven fact. Gamers have short attention spans, partly because they are playing a game to unwind and they don’t like waiting for things to load. Reducing asset load times in your games can sometimes be difficult, but try to keep your file sizes low and purge assets you aren’t using at the time so your engine runs smoothly. Torque 3D is really good about handling memory resources. The most important lesson of all when designing a user interface is that any element left open for interpretation will almost always return erroneous results. This is one of the reasons why a lot of games have similar kinds of controls and similar menus. You might occasionally see different descriptive words, such as using ‘‘Run Away’’ instead of ‘‘Quit Game,’’ but the two are very close and the reader will still know what you mean. If you ever make a game so complicated that players can’t jump right into it and start playing without first having to stop and read a walkthrough or manual, then just shoot your dreams down right now. You want to design a game that players can sit down and find themselves completely immersed in within just a few minutes. The key is designing a great game interface.
Predict Emergent Gameplay Before you get excited about programming complex game environments that adapt to the player, such as in games like Fable and Grand Theft Auto, there is an underlying principle you must understand called emergent gameplay. Emergent gameplay comes about not so much from what you set up or program into your game but what you don’t! Gamers play the game’s underlying program, not the game story, remember? Gamers who are really good will set up situational challenges for themselves in your game levels that you will never predict. Your job is to try to predict this type of play and offer an invisible guiding hand. For instance, the stealth game Thief: Deadly Shadows (see Figure 8.2) has you playing Garrett, a cat burglar in moonlit medieval settings. Your mission is
263
264
Chapter 8
■
Getting Gooey: Designing GUIs
Figure 8.2 In Eidos’ 2004 computer game, Thief: Deadly Shadows, you have a goal but multiple avenues to approach it.
spelled out for you in each of the levels. Your challenge is getting it done. The real fun comes in emergent gameplay, because you can make up how you draw near a problem as you play the game. One of the first missions has you breaking into a nobleman’s mansion to steal an opal. You can choose to quench the flame in a sculpture outside, which alerts a cook informant on the inside who will open a small door for you in the parapet. You could also sneak around to a side window and climb in there. You could also knock out the guards and walk right past their unconscious forms. Whatever you decide to do, the designers set up the scenario and let you have fun your own way! The mission never changes, but the way you achieve it is dependent on your actions.
GUIs for Games A graphical user interface, often abbreviated GUI and pronounced ‘‘gooey,’’ is the vehicle that allows for interacting with the game and employs graphical images and widgets in addition to text messages to represent vital information and options to the player. Most of the time, but not always, the obtainable actions the
Game Interface
player can take are performed through the manipulation of graphical elements or through keyboard commands. GUI design is an important adjunct to software. Its goal is to enhance the usability of a program. You don’t have to be a great artist to design perfect GUIs, but it never hurts. Widgets
GUIs include graphic elements called widgets that the user manipulates to interact with the program. The most common widgets used on computers today are windows, buttons, icons, menus, scroll bars, pointers, and pop-up windows. Heads-Up Display
Perhaps the most important GUI a design team must create is the heads-up display, or HUD, which shows the player at a glance the most vital information he must know from the game, such as how much health he has, how much ammo is left in the selected weapon, how many points have been or need to be scored, or whatever else your particular game might need. Health Bar
The health bar indicator is used in many games. This consists of a horizontal or vertical bar colored in full red or blue. If the player character is at full power, the bar will be full of color, but as power depletes, the color drains from right to left or up to down, like a thermometer, until it reaches zero, at which time the player character’s life is over. Now and then, the health bar’s color fluctuates to symbolize the percentage of bar left, starting out green (for healthy) and resulting in red (near death). Some games use health dials, which are a variant of the health bar, as you might see in games like Mario 64, or bubbles, like you see in Diablo and Dungeon Siege (Figure 8.3 shows an example). Player Score
A lot of games HUDs show the player score, or a numeric indicator that measures the player’s success in the game or in the current game level. A high score meter might keep track of past scores and gives players a standard by which to measure themselves. A similar tactic is the use of tributes in modern online games.
265
266
Chapter 8
■
Getting Gooey: Designing GUIs
Figure 8.3 In Blizzard’s Diablo game series, bubbles at the bottom of the screen fill to show player health levels.
Some games only show a player score at the end of beating a level, at which point the game might reveal whether the player not only attained a numeric score but also a grade. For example, in Devil May Cry, Advance Wars, and Bullet Witch, players discover at the end of each mission whether they received a traditional letter grade, such as an A, B, or C, or a ‘‘superior’’ grade designated by an S. Firepower
Games with violence in them more often than not have the player character finding and equipping themselves with melee or ranged weapons. Ranged weapons, including such varied metal weaponry as pistols, revolvers, shotguns, laser guns, and rocket launchers, require ammunition. HUDs will often showcase the weapon the player character is currently armed with, and if that weapon is one that takes ammunition, will show how much ammo is left in it. This adds the gameplay complexity of having to watch how many more shots you can take in a fight and having to search for more ammo to reload your weapon.
Game Interface
Melee weapons don’t take ammo, but games like Capcom’s Dead Rising have started implementing melee weapon health, where the melee weapons are destructible themselves and eventually break after so many uses. If the game supports a magical attack system, the offensive magic spells can be armed just like a weapon, and the magic ability, or mana quantity, can act as ammo to fuel the attack. Some magical spells can also be defensive in nature. Map or Radar
For players to get a larger view of their game world and find their way around in it, a map or radar is sometimes necessary. Either a map or radar can be displayed as a widget in the game HUD, often located at the bottom left or right of the screen. Radars show blips of goals, items, or enemies in the surrounding terrain, whereas maps show macro views of the game area and the cardinal direction the player character is currently heading. Inventory
The inventory screen is also an important game interface component. It helps players keep track of the items available to their player characters, especially in games involving the collection and manipulation of items, such as adventure games and role-playing games. The ability to manage the items in the inventory and keep track of what items are available to the player character greatly helps the player make certain decisions during the game. The inventory screen takes up quite a bit of screen real estate, so it is not a permanent fixture or widget within the HUD but accessed through a menu or manual interface. GUI Layout and Screen Real Estate
Most GUIs used for games look approximately the same. Part of the reason artists make them similar to each other is for familiarity, which adds to the GUI’s usability. So if you are unsure how to make your GUIs look or how your controls should act, check out other games in the same genre. The game GUI can be simple and straightforward in its layout, like the sheer blue interface of NCsoft’s City of Heroes, or it can be complex and representative of the game world’s artistic and cultural styles, like the corroded Celtic knot-work metal look of BioWare’s Baldur’s Gate 2, as shown in Figure 8.4.
267
268
Chapter 8
■
Getting Gooey: Designing GUIs
Figure 8.4 Baldur’s Gate 2, from BioWare, gives an artistic approach to a mediocre game interface.
Some games have a large HUD that covers up an eighth of the entire screen size, but most developers frown on this waste of screen real estate. In fact, the next generation of games is stretching for a nearly transparent interface, including almost invisible or nonexistent HUD panels. Did you know that high-definition television screens are changing the way console game interfaces are designed? HDTVs are the latest hardware, and now all cable television in America is expected to be HD-ready. The picture is digitally clearer than any television set before. The downside is that logos and other persistent static images can produce a permanent ‘‘ghost’’ image on HDTV screens. Persistent static images include HUDs and other widgets common in games. With this in mind, games being ported to consoles are designed with fluctuating, animated, or hidden interface elements. This desire to avoid burnt images on HDTV screens reinforces the industry push for transparent or nearly invisible GUIs, anyway. You don’t have to worry for now, though, because most gamers spend less time playing their games than it takes for an image to create a permanent ‘‘ghost’’ on the screen, thereby damaging it. But it is something to note.
The GUI Editor
Planning a Game Interface
When it comes to the interface, remember the immortal words of TV’s Judge Judy: ‘‘Keep it simple, stupid!’’ This is the KISS principle, and it applies to game interfaces best. A great game that makes it to the top of the charts and wags the tongues is when it is simple, neat, clean, and straightforward, when lots of different kinds of people can play it without getting lost and/or confused, and when it runs smoothly and still has room for upward mobility. When you catch yourself thinking of how to design an interface so that it’s cool, complex, cutting-edge, and flashy, put yourself in the player’s shoes for a moment and see if your interface idea will really help the gamer play the game without getting frustrated. The interface should always be cool to look at, but it must also be functional. In design, this is called ‘‘form and function.’’ Keep your design interface tidy. Hide any and all unnecessary tools or icons. Reduce the screen windows, inventory windows, and character sheets. Clean up the clutter because screen real estate is virtually a priceless commodity. Make your interface as transparent and intuitive as possible. The best interface is one that a player hardly notices, and it never pulls the player out of world immersion. As physicist Albert Einstein once said: ‘‘Make things as simple as possible, but no simpler.’’ Tip ‘‘All the components of an interface are equally important. It is like a symphony orchestra. If the performance is to be effective, all instruments must be in tune and all notes must be played correctly. If the interface is to be successful, all components must work together.’’ —Jan McWilliams, Director of Interactive Design Art Institute of California, Los Angeles
The GUI Editor As mentioned, the GUI Editor is part of the WYSIWYG editor system Torque 3D gives you to speed your game development. The GUI Editor’s major intent lies in you designing the interface for your game. Using the drag-and-drop creator, you can put together any interface that you want for your game. The GUI Editor provides you with many prefab controls and the ability to create new controls based on your own scripting.
269
270
Chapter 8
■
Getting Gooey: Designing GUIs
Before we start, I want to clear up some terminology used. First, a GUI is a graphical user interface, which of course you should know by now. In the GUI Editor, a GUI is a complete interface, one of several that can be used in a game. For instance, the main menu is a GUI. A control is any interactive element placed in a GUI to be used by the gamer. Controls are a part of the GUI Editor and can be added to an existing GUI, modified in a GUI, or created from scratch and added to a GUI. One example is the Play button in the main menu; the Play button is a control added to the main menu GUI.
Under the Hood of the GUI Editor You can run Torque 3D’s GUI Editor one of two ways. The easiest way, and the way you should be encouraged to start with, is to use the Torque Toolbox. In the Toolbox, select your project (Ravenscroft), then click the GUI Editor button. Your project will start to load, but before the game is launched, a dialog box will pop up that allows you to pick which GUI you want to edit. Once you select a GUI to start with, the editor will load. From there, you can edit your selected GUI, load a different GUI, or create a new GUI from scratch. Another way to run the GUI Editor is in-game. Windows users can press F10 (and OS X users can press Cmd+F10) to launch the GUI Editor any time while play-testing their game. GUI Editor Interface
From the Toolbox, go ahead and launch the GUI Editor for your project, Ravenscroft. In the GUI Selector dialog box (see Figure 8.5), choose MainMenuGui from the list of possible GUIs to edit. Click the Continue Using Demo button to bypass the demo screen. The editor starts with the GUI currently loaded, which in this case is the standard Torque main menu. The interface (see Figure 8.6) should be pretty familiar to you. It is similar to the World Editor: There is a window on the right with a tree list on top containing hierarchical information, and the GUI Inspector is on the bottom with data pertaining to any object selected. Take a moment to look at some of the items on the tree and click on them to see their properties in the Inspector.
The GUI Editor
Figure 8.5 The GUI Selector dialog.
The GUI Editor consists of five main sections: ■
Main Menu Bar—Located at the very top, this is where you will find various menu commands organized by type that control the functionality of the editor, such as creating and saving GUI files, selecting, toggle snapping, and so on.
■
Toolbar—Just beneath the main menu bar, the toolbar contains shortcuts to the GUI Selector, resolution adjuster, and common positioning commands like nudge, align, and more.
■
GUI Tree Panel—This panel, located at the top right, contains all the controls that make up your GUI. All the controls are kept in a sorted list. The most recent controls added will be at the bottom of the list. Each control has a unique ID and can be given a name, too.
■
GUI Inspector Panel—This panel, located bottom right, is populated with all the properties that make up the currently selected GUI control. Most of your value inputting will be done here.
271
272
Chapter 8 ■
■
Getting Gooey: Designing GUIs
GUI View—This is the main canvas, or what your GUI will appear like, and fills up most of the screen.
GUI Editor Toolbar
The toolbar, found just below the main menu, starts with three icon buttons that toggle the editors. These are always present. The first, which looks like a mountain with a sun coming over it, will take you back to the World Editor. The next launches the GUI Editor (when you’re not already there). And the third is the Play button, which exits the editors and launches your game. Next on the toolbar are three important editor settings. The first two appear as drop-down lists, and the last is a button toggle. These determine what you are editing and at what resolution. ■
New GUI—Displays a list of every single GUI available to edit, including new ones you create. You can jump to any GUI at any time from here, which makes it useful when editing multiple GUIs at once.
Figure 8.6 The GUI Editor.
The GUI Editor ■
GUI Resolution—This sets the screen size resolution. Your options include three of most oft-used screen resolutions for games: 640 480, 800 600, and 1024 768.
■
Control Palette Button—This button opens the Control Palette, which I’ll talk about shortly.
The next three icon buttons allow you to toggle the most commonly used and important settings for snapping. Snapping allows you to ‘‘snap’’ objects to an invisible grid, which helps keep objects more aligned on the screen. You can snap objects to their corner edge or by their center point. The next six icon buttons (mouse over them to read what they do) allow you to align controls on the screen. You can left align, center align, and right align. Plus, you can align to top, center horizontally, and align to bottom. This makes for a cleaner, neater screen. Being able to align the buttons in the center of the screen works in many ways. Note how the main menu GUI has four buttons that are centered in such a way. The next two icon buttons allow you to distribute controls across the screen, either horizontally or vertically. This creates an even spacing between the controls you have selected. The last two icon buttons move selected controls up or down in stacking order. The first button will move the selected control ahead in the layer, bringing it closer to view. The second button will move the control behind others, obscuring it from view. This way you can add depth your GUIs and have one control overlapping others. Control Palette
The Control Palette, featured in Figure 8.7, which can be opened by clicking the button to the right beside the GUI resolution drop-down list, contains all the controls you can add to your current GUI. You can click a control in the list or manually drag it to a position in the GUI view portion of your screen to add it to your scene. There are three tabs in the Control Palette, described as follows: ■
Common—The first tab, Common, shows you a list of the most commonly used controls.
273
274
Chapter 8
■
Getting Gooey: Designing GUIs
Figure 8.7 The Control Palette. ■
Categorized—The Categorized tab gives you a list of all the GUI controls based on functionality, such as 3D, Buttons, Containers, Game, Images, and more. These categories are pretty straightforward and are an excellent way to navigate to the control you are looking for. To see what a category contains, click one of the expanding arrows beside it.
■
All—There are quite a few hidden controls, which were mostly used to create the Torque 3D editors and are of no use to you. But if you want to see these hidden controls, too, you can go to the All tab.
Parent Controls
Note in Figure 8.6 that I have selected the Play button on the main menu. This is just one control that is a part of that GUI. However, you should take note of the large blue box outline surrounding multiple controls, not just the Play button. The large blue box outline shows the
The GUI Editor
Parent control. When a control is a Parent, it can contain multiple subcontrols. The Children controls now adhere to the same behaviors as the Parent control. For example, if I were to set the Parent control to be 30% transparent, the Children controls would become 30% transparent, too. And if I selected and moved the Parent control, the Children controls would be forced to move with it.
Edit the Ravenscroft GUI There are just a few things you can do right now to make Ravenscroft’s interface more customized and better with respect to your game design. Let’s start by adjusting the main menu to reflect the game style and edit the level load screen. Change the Main Menu Background
If you’ve wandered away from the GUI Editor, return there now. Be sure to choose the MainMenuGui from the list of available GUIs. This is the GUI exhibited in Figure 8.6 that has a title (Torque 3D) and several buttons, including Play and Exit. Click the Parent control, GuiChunkedBitmapCtrl, in the GUI Tree panel so that its properties fill the Inspector panel below it. Look for the bitmap property in the GuiChunkedBitmapCtrl properties in your Inspector panel, as shown in Figure 8.8. This controls the background image of your main menu, which is currently set to background.png. If you were to view background.png’s file properties, you’d find that it is a blank white image file set to 800 600 size, which is a decent size that is scalable. You also have the option of tiling background images. If you leave the Tile property unchecked, the image will be viewed stretched to fit; if you place a check next to the Tile property, the image will be tiled, or duplicated, horizontally and vertically across the GUI background. Using your 2D art image editing program, be it Photoshop, GIMP, Paint.net, or any other program you have installed, create a new 800 600 image. If you want to, you can make a simple quick image for now, something you can use temporarily, and then make a more complex, visually appealing image later on. That’s up to you. Also, it’s up to you what you want your background to look like. You need to add the title Ravenscroft on it somewhere, but otherwise, what your background image looks like is 100% up to you and your 2D art skills.
275
276
Chapter 8
■
Getting Gooey: Designing GUIs
Figure 8.8 Example of a main menu background image.
In the example I’m using, which you can see in Figure 8.8, I made a flat black background, used some brush techniques over that, and then placed a swoosh image. The topmost layer I added was the title text. The background image I made (named background.png) is also found on the companion DVD for this book, in the Data Files > Chapter 8 folder, if you’d like to use it instead. When you finish with your background image file, save it as background.png and overwrite the one currently in your Ravenscroft/Game/Art/Gui folder. Whether or not you left the GUI Editor open while you created a background image, when you return to the MainMenuGui, notice how the background has been automatically replaced with your revised image. Check the placement of your image and how your image looks in relation to the other controls. There’s one element here that could hamper your design. In the GUI Tree panel, click on GuiBitmapCtrl – MainMenuAppLogo, then press the Delete key to remove it. What you have erased was the Torque 3D title image at the upper right of the GUI.
The GUI Editor
It would reflect well on you to include the Torque 3D logo somewhere in your game startup, or share text that says something along the lines of, ‘‘Made with Torque 3D.’’ This not only pays tribute to the makers of Torque 3D, but also informs gamers how you made your game. Ever notice the contributor logos at the start up of your favorite games? The maker of the game engine or physics libraries used in the making of a game are often featured. This should be true, too, of games you make. This is suitable for our purposes. You could delete any of the other buttons, as you wish. The Play and Exit controls are vital to the functionality of your game, as is Options, which shows players how to adjust their screen resolution and audio, but Join is useful for setting up multiplayer online games only. For now, experiment with the arrangement of your buttons. You might want to align or distribute them differently on the screen in relation to your new background image. You can do so by selecting controls one at a time by clicking on them and dragging them around. Once a control is selected, you can use the arrow keys for gentle nudges. Hold the Shift key while pressing the arrow keys for bigger nudges, which allows for faster manipulation. Note that the main menu controls will only appear within the context of the Parent control, which is identified by the big blue box outline. You can select this Parent control independent of the rest by clicking on one of the segments of the blue outline somewhere. With it selected, you can click and drag any of its anchor points (the corner boxes) to resize the Parent control. Similarly, you can resize any of the other controls onscreen. Plus, when aligning them, notice that they have horizontal and vertical guides that will be invisible later but assist you with placement while the controls are being edited. Use the align or distribute icon buttons in the toolbar as needed. Remember, if you make a mistake, the fix is just a Ctrl+Z (Win) or Cmd+Z (Mac) keystroke away. When you have finished, compare your work to Figure 8.9. Save your edited MainMenuGui. Go to the main menu and select File > Save to File. Save your file to the default folder, Ravenscroft/game/art/gui to overwrite the original mainMenuGui.
277
278
Chapter 8
■
Getting Gooey: Designing GUIs
Figure 8.9 Example of an edited main menu GUI.
Tip Sometimes you’ll have some difficulties seeing the entire GUI Tree or Inspector panel in the GUI Editor. If this happens, and you find you can’t read all the gobbledygook, move your cursor over the bar separating your panels from the main window. Click and drag the bar to the left to expand the visibility of the GUI Tree and Inspector panel.
Edit Other Widgets
You can edit some other widgets simply by replacing their image files. For instance, look in your Ravenscroft/game/art/gui/weaponHud folder. Here are weapon HUD images that can be edited. The two most appetizing ones to edit are crossHair.png and swarmer.png. The former, of course, is the weapon’s crosshairs, and the latter is the small graphic in the corner of your in-game window that displays the weapon equipped. You can open either of these images in your 2D image editing software and make changes to them as you see fit. As long as you save a copy of them with ‘‘_old’’ at the end of the filename and then overwrite the existing with your new edited ones, you should be good to go (see Figure 8.10). Also go to the Ravenscroft/game/levels folder. Here are two image files you might also want to edit. Empty Room_preview.png and Empty Terrain_preview.png
The GUI Editor
Figure 8.10 Save a copy of your images before overwriting them, so that you always have a backup.
are the thumbnail images that come up during level load to give you a heads-up as to what each level contains. Since you’ve come so far in developing the Empty Terrain level, you ought to replace this thumbnail with a screenshot of the level or with artwork representative of that level. Add a Score Counter
You have learned how to edit menu elements, basically just widgets. You can also create and edit in-game interfaces, which can display the player’s ammo, life, health status, score, or other important information. You’re going to create a score counter for your game to show you how in-game GUIs work. Gentry Jack is going to run around in the game level and try to catch as many Skulls as possible, right? We need to set up a score counter that shows how many Skulls Jack has caught. Launch the GUI Editor from the Torque Toolbox and select to edit PlayGui, the default GUI seen when inside a game. Click the Show Gui Library Control Palette button to open the Control Palette. Select GuiTextCtrl from the Common list (see Figure 8.11). Make sure that your new control is selected in the GUI Tree list
279
280
Chapter 8
■
Getting Gooey: Designing GUIs
Figure 8.11 Pick GuiTextCtrl from the Control Palette list.
to the right so that its attributes show up in the Inspector panel at the bottom right. It might be a good idea, since you’ll be doing some scripting, to name this widget. In the empty text field next to the Name field, type ScoreCounter. Notice that I did not put any spaces or strange wildcard characters in this name. When you give a specific object a name so that the object can be controlled in TorqueScript, you should never put any spaces or wildcard characters in the name, or else you’ll probably hose the engine. So be careful what you type for its name. Also, it’s smart to write the name down so that you can refer to it later without having to backtrack to find out what it was called. Scroll down to GuiControl > Profile. Click the drop-down list beside GuiTextProfile to select GuiBigTextProfile. GuiBigTextProfile is a standard format used for big letters to show up onscreen.
The GUI Editor
Go to the General section, click text, and enter 10 in the text field and then press Enter. Your 10 should appear in the top left corner of the screen in big letters. The text might be more than what can display in the box. If that’s the case, expand the size of the box by hovering over the right edge of its container until you see your cursor turn into double arrows, then click-drag to widen the size of the container. Move this control wherever you want on the screen, as long as it’s not covering up or interfering with another onscreen control. Next, add a second GuiTextCtrl that says Treasure to Find: but has no name attached. Place it just above your ScoreCounter (see Figure 8.12). Treasure to Find will be a persistent HUD element, and the ScoreCounter will change dynamically within the game. You’ll see what I’m talking about in Chapter 10, ‘‘Should I Stay or Should I Goal?’’
Figure 8.12 Your score counter.
281
282
Chapter 8
■
Getting Gooey: Designing GUIs
When you’re satisfied with how the score counter looks, select File > Save to File and save your GUI as Ravenscroft/game/art/gui/playGui.gui. You’ll have to do some actual scripting to get the score counter to work, but otherwise you’re done here. Change the Mission Load Screen
Right now you still have a problem. The player will open your start screen, but if he clicks the Play button it will take him to a mission load screen, where he can choose the (really empty) Empty Room or your Empty Terrain mission. You want him to go to Empty Terrain, because it’s the level you’ve been working on. To remove this mission choice is fairly easy. Open main.cs in a text editor from the Ravenscroft\game folder. Scroll down a little ways until you see this code snippet: // Run the Torque Creator mod by default, it's needed for editors. $isDedicated ¼ false; $dirCount ¼ 2; $userDirs ¼ $defaultGame @ ";art;levels";
What this tells you is that the engine looks in your Ravenscroft/art/levels folder to find all available missions to run when you start this project. Any mission you save in this folder will become a mission choice in the Mission Choice window when the game starts. To remove the Empty Room choice, then, you simply have to delete its files from the Ravenscroft/game/levels folder. The files to find and delete include the following: ■
Empty Room.mis (the actual level itself)
■
Empty Room.mis.decals
■
Empty Room_preview.png (the thumbnail preview image)
After deleting these, play your game, and you’ll be satisfied to note that the mission choice has been reduced to Empty Terrain. Now, when you create new levels and add them to the Ravenscroft/Art/Levels folder, along with a preview image, they will appear in your Mission Choice screen along with Empty Terrain.
What’s Next?
What’s Next? After reading this chapter, you should know all about human-computer interfaces, including the rules of usability and how emergent gameplay is a part of game interfaces. You should also know how to use the GUI Editor to edit existing GUIs and create new controls or widgets. In the next chapter, you’ll look at sound design for games.
283
This page intentionally left blank
chapter 9
The Sound and the Fury Humans are an amazing bunch. We can perceive auditory signals coming from many different directions at once and singularly separate the sounds based on where they come from. Sound forms at least a full one-fifth of the way we perceive our environment, and we innately use sound as a means of survival. Being capable of telling when a noisy ambush predator like a cougar snuck up behind our ancestors helped them stay alive—and today we use sound to listen to the latest pop hits on our MP3 players. Sound makes everything come alive. It stamps the heartbeat for our culture and provides us with an aural experience. It can support the story of a game and shape the soundtrack. Try playing a video game with the TV or the computer speakers on mute. Watch a YouTube video without headphones or speakers, and you’ll realize just how disappointing the experience quickly becomes. In this chapter, you are going to look at how to use sound in games and how you can create sound for Torque. Plus, you’ll learn to edit sound using a popular free sound editing software package called Audacity.
Sound Used in TV and Film Electronic games follow the cinematic wake of the TV and movie industry, so game designers can learn a lot from the way those industries use sound. 285
286
Chapter 9
■
The Sound and the Fury
Sound can support a narrative, documentary, or commercial film or program, telling the story directly or indirectly and enhancing the overall experience.
A Short History Lesson of Sound The movie industry started seriously using sound in the 1920s, but the process was incredibly difficult back then. Because of limitations of the sound cameras, actors often had to be experienced theatrical performers and practically shout to be heard on the final recording. A good deal of silent film actors lost their jobs at this time because audiences discovered many of them had poor speaking voices or foreign accents. Today’s recording processes are a lot better, and most of the work goes straight to digital tracks. Actors can act naturally and underplay their roles if they wish and still be heard in the final edit. Unfortunately, directors are becoming more and more lackadaisical and put a lot of technical problems on the sound engineers. They are expected to make actors’ voices sound clear in postproduction, even if the directors can’t hear them on set. The people working on the production of a film or TV show think of sound every step of the way. Screenplay writers make suggestions for noises that may be heard and lines of dialogue to be spoken by paid actors. Location scouts consider noise conditions of prospective shooting sites. Though directors can frame a shot to effectively remove a sign or offensive place from being seen on camera, they have no control over random noises, such as airplanes flying overhead or construction workers off-camera. Sound delivery has also improved vastly over the years. Sound delivery started out mono, and only as recently as the 1970s went to stereo. Today’s modern audiences, including you, not only expect to hear their TV shows, movies, and games in stereo, they expect to be rocked by Dolby surround sound and amplified bass. The increased resolution of HDTV images requires a similarly improved high-definition sound track. A 5.1 high-fidelity surround-sound system, which literally surrounds you with the best sound, provides the most balanced aesthetic energy between picture and sound. The technology has advanced, and even the game industry must stop and think about sound critically during development.
Sound Fundamentals
Hyper-Real Sound You may not realize it, but most film and TV sound for your entertainment pleasure does not come from the original recorded sound. Sounds you hear in cinema are rarely accurate representations of real sounds. Instead, engineers construct the sound in post-production, utilizing many pieces of sound they mix together in sound editing software programs to create a seamless whole. These professionals often take separate pieces from sound effects libraries and custom recordings done in studios, what’s called Foley sound. Foley sound effects are sounds that synchronize on screen and require the expertise of a Foley artist to record properly. Foley artists record custom sound effects that emphasize sounds that should be heard in context. For instance, a Foley artist might shake a sheet of metal to record thunder or squash melons to represent a character getting squished by a falling anvil. Other sound effects are sounds that do not normally occur in nature, or are impossible to record in nature. These sounds are used to suggest futuristic technology in a science-fiction epic, such as Star Wars, or are used in a musical fashion to create an emotional mood within the piece, such as the Marilyn Manson recordings done for the first Resident Evil movie. When creating a game, every piece of sound has to be manipulated by the game programmer, and the piece of sound used can be hyper-real, placing emphasis that subtly influences the game’s players.
Sound Fundamentals The Greek mathematician Pythagoras not only delivered us a triangle but also discovered the octave and came up with numeric ratios connected to harmony. Galileo formed many of the scientific laws of sound. Since the 1600s, there have been numerous advances in the study of sound, some of them coming from such great individuals as Heinrich Hertz (where we get ‘‘Hertz’’ from) and Alexander Graham Bell (where we get ‘‘decibel’’ from). Many of these historic figures have helped shape how we talk about and discern sound and/or music. Sound comes in the shape of vibration waves. Some sound waves can actually travel at frequencies so high or so low that humans cannot hear them, but some animals can (such as a dog hearing a dog whistle).
287
288
Chapter 9
■
The Sound and the Fury
Here are some of the most basic laws of sound: ■
A sound wave moves pretty much in a straightforward fashion.
■
Pitch refers to how fast the sound wave vibrates, also known as frequency. Humans can discern sound frequencies by a 2:1 difference, so many of our music notes are on a scale of 2.
■
The term Hertz (Hz) comes from a unit of frequency equaling one vibration per second.
■
Intensity is how loud the sound comes across, also called amplitude or volume. Intensity can be measured by the decibel, or dB. The increasing intensity of a sound wave is known as gain.
■
Timbre is the waveform or accuracy of the sound frequency. Timbre is different for every instrument and every voice, and it reflects a change in quality that is not dependent on intensity or frequency.
Influencing Factors The influencing factors that control sound include space, time, situation, and outside events. As with many of the other elements of media aesthetics, these factors can overlap. Space
Location defines many sounds. Stereo sound makes it possible to hear sound relative to onscreen positioning. For instance, most of the player character’s dialogue will come from the front forward-facing speaker in 5.1 Dolby surround sound, but if you show a comrade yelling for the player to catch up and you show the comrade slightly off-screen over on the right, you best make sure the sound comes out of the right-side speakers, or else the player will be looking the wrong way or intrinsically know something’s not right. Sound perspective means that you must also match close-up video images with ‘‘near’’ sounds, and long shots with sounds that come from far away. Close sounds take the spotlight, often sharing more presence than the softer background noises. The same principle takes the Doppler effect (see Figure 9.1) from physics to media. As a loud sound source comes closer to the listener, the higher the sound
Sound Fundamentals
Figure 9.1 An illustration of the Doppler effect.
gains; the farther away the sound source moves from the listener, the softer the sound gets until it fades completely. Positioning themselves in a virtual world, 3D sounds take advantage of the Doppler effect. In most 3D game engines, this is handled for you if you use 3D sound (more on this later in the chapter). Time
Different times of the day and different climates are reflected in sound. If you are creating a summer glen, you will want to use noises like chirping birds, breezes blowing, or tree branches rustling. On the other hand, a scene that takes place at night might have owls hooting, crickets chirping, or coyotes barking in the distance. There are two special uses of sound that have to do with time. Predictive Sound and Leitmotiv
Predictive sound involves the placement of certain sounds before an event actually takes place. An example of a predictive sound would be letting the player of a game hear battle sounds coming from over a hill before showing him that there is a fight taking place or letting the player hear a rumbling noise right before an earthquake shakes the streets his character’s walking down. Leitmotiv (German for ‘‘leading motif ’’) is similar to Pavlov’s bell (if you have studied psychology and know who Pavlov is, you know what I mean). Some games play a short music piece every time a specific boss monster or enemy shows up, letting the player know that she has to prepare to fight. A lot of nextgeneration games use soft-key music in the background, and as soon as the player enters combat, tenser hard-edged music starts playing, which is another form of leitmotiv.
289
290
Chapter 9
■
The Sound and the Fury
Figure 9.2 PopCap Games made use of sound to assert a wave of oncoming zombies in their Plants vs. Zombies game.
Predictive and leitmotiv sounds can be used in conjunction with signal and prepare a gamer for an upcoming challenge. The combination of low moans, weird whistles, and the voice-over saying, ‘‘They’re coming!’’ in the popular PopCap Games’ Plants vs. Zombies prepares the game’s players for a wave of enemies. The industry shows such a dependency on leitmotivs now that their absence is actually felt by gamers. For example, many people who played the game Portal claimed that the game was made harder by the simple fact that enemies didn’t announce their presence by a singular noise before you encountered them. Silent enemies can appear deadlier than ones that announce their presence by moans, static noise, growling, or grunting. Situations and Outside Events
Sounds can describe a specific situation or (used cleverly) be effected by outside events that help put the listener into the scene.
Start Your Own Sound Studio
Here is one example: A lonely geezer leaves the front door of his wooden shack high in the snow-capped mountains to chop wood. He crunches through snow with every step, and occasionally the forest is disturbed by the cries of hawks; otherwise, the sound stays very much muted. Why, you might ask? Snow acts as a sort of natural sound dampener, absorbing noises. So the scene would be a hushed one.
Start Your Own Sound Studio There are some serious fundamentals to starting a home studio space that you must keep in mind. You will probably set up your recording studio around your computer desk, in your bedroom, or garage. The garage might be best, simply because of the sound isolation there. I will discuss the two most important aspects to remember when setting up your own sound studio—soundproofing and setup—and then you’ll look at what it takes to start recording.
Soundproof Your Studio Make sure that the room you use does not have serious leaks where sound can invade, such as door cracks and windows. You will want to keep outside noise from filtering in, and you want to stop short of being a nuisance to your parents and neighbors. Sound absorption and isolation will be your primary goals. Short of going out and buying expensive commercial eggshell panels to cover the walls and ceiling in your room or garage, you can drape wool blankets over the windows and door or add bookshelves filled with books to your walls. This will limit the amount of reflective sound (or echoing) while improving the sound quality when you record. You might also make sure that your parents, siblings, or pets know you are recording before you start so they won’t walk in and disturb you in the middle of a complicated recording session.
Get Some Software You will need an easy-to-use sound editing software program to do audio mixes with, and if the program you choose does not include a recording or microphone line-in system, you might have to use Microsoft’s built-in sound recorder or another inexpensive software program to initially record your audio.
291
292
Chapter 9
■
The Sound and the Fury
The following programs are the most widely used sound mixing packages available and their list prices (at the time of this writing): ■
Adobe Soundbooth—$199 (www.adobe.com/products/soundbooth)
■
Audacity—free (http://audacity.sourceforge.net)
■
Cakewalk’s SONAR (Studio Edition)—$199 (www.cakewalk.com)
■
Logic Studio (for Macs)—$499 (www.apple.com/logicstudio)
■
soniK (for Linux)—free (http://sonik.sourceforge.net)
■
Sound Forge Audio Studio—$54.95 (www.sonycreativesoftware.com/ soundforgesoftware)
■
WavePad Audio Editor—free (www.nch.com.au)
As you can see, you can go anywhere from free to $500 worth of audio editing power. On a side note, Aviary came out with a free audio editor called Myna. The unique trait about Myna is that it runs in your Web browser, so you don’t have to install or purchase anything! You can use Aviary’s Myna, if you like. Just go to http://aviary.com/tools/audio-editor and check it out. This chapter won’t show you how to use Myna, but Aviary provides you with documentation if you’d like to find out how it works.
Get a Mic Before using a sound recording program, you should check to make sure that your computer has a suitable sound card and peripheral speakers for playback. Besides having the right computer software and hardware, you must also have a microphone (see Figure 9.3). There are fundamentally two different types of microphones to choose from: dynamic and condenser microphones. Dynamic microphones use a wire coil over a magnet to catch sound waves, producing an electronic voltage in response to sound. These microphones reproduce sound pretty well, but their accuracy is based on voltage rather than the sound source.
Start Your Own Sound Studio
Figure 9.3 If you want to record sound, get a mic.
For killer vocal recording, you should consider a condenser microphone. Condenser microphones use an electronically charged stretched diaphragm over a thin plate, and fluctuations caused by sound waves passing over the diaphragm cause changes in the electronic current, producing output signals. Condenser microphones tend to be more accurate than dynamic microphones, particularly in mid and high frequencies. Unfortunately, they are more fragile and less likely to handle abuse. Practice will show you whether or not you have chosen the right sound editing setup for your needs. Practice with your microphone to see what its sound range is like and if you pick up any background noise. If your microphone is sensitive enough to pick up the fan motor on your computer, you might have to replace the fan motor on your computer or tone the mic’s sensitivity down a notch. Practice with recording techniques until you find the right setup that works for you.
Sound Recording If you plan on recording your own voice, you must stop and think about your voice, how you place the microphone, and how to mix digital audio files on the computer.
293
294
Chapter 9
■
The Sound and the Fury
Listen to Yourself
Evaluate how you sound on the mic. The human voice is a complex topic in and of itself. There are many tricks to make you sound better. The majority of these tricks to consider are as follows. Posture
Stand or sit up straight. Let your muscles in your body relax. Don’t let tension build up, or it will tighten your vocal cords. Don’t slump down in your chair or lean way over when talking. Remember to Breathe
Breathing is critical to enunciation. Unless you practice breathing correctly, you can develop poor habits that make your speech pattern erratic, soft, or breathless. You should take deep breaths in, letting them out slowly, to practice proper breathing. Don’t take up smoking or hollering your lungs out when you have a chest cold, because you can actually hurt your organs. Don’t Crack Up
If you talk so loud or so fast that your voice actually cracks, you are ‘‘cracking up,’’ and it won’t sound good. Breaks—or noticeable pauses or transitions in your speech—will maintain a more consistent sound. Knowing when to take breaks will increase your overall performance and, if you time them well, will give your listeners a more pleasurable experience. Say It, Don’t Spray It
Your unique tone, the speed with which you speak, how clearly you speak, and the interplay of your expression with the words you are reading—these are the most critical elements in making you an effective speaker. Part of your delivery comes from the words you are speaking, and part of your delivery comes from how you speak them. You have a unique vibe all your own. Strive to be yourself, but do so in a way that will allow others to understand your message. Digital Sound
It is important before you get started mixing and using digital audio files in Torque 3D to understand what digital sound files are called, what compression of these files is all about, and some of the most basic keywords in digital sound mixing.
Start Your Own Sound Studio
Sound File Formats
Computer-based sound editing generally involves one of three digital audio file formats: WAV files, MP3 files, and OGG files. WAV files are uncompressed, while MP3 and OGG files are compressed. WAV Files. WAV files are usually uncompressed audio files. This means that they can be quite large and sound pretty good. The quality of a WAV file is determined by how well it was originally recorded or converted. Generally, WAV files are fine, but they can take up quite a lot of room in memory, which is why many game designers have stopped using them. Compressed Files. Compression restricts the range of sound by attenuating signals exceeding a threshold. By attenuating louder signals, you limit the dynamic range of sound to existing signals. Imagine that the audio file is a piece of paper with music notes on it. Compressing it is literally wadding up the piece of paper into a tiny ball. To listen to the music in its compressed state, you have to use a device like an MP3 player to un-wad and smooth out the piece of paper. The most popular compressed audio file on the market right now (mostly due to the popularity of iPods and other MP3 players) is the MP3. MP3 Files. MP3 stands for Moving Pictures Expert Group, Audio Layer 3. It was started in the 1980s by the German Fraunhofer Institut. In 1997, the first commercially acceptable MP3 player was created, called the AMP MP3 Playback Engine, which was later cloned into the more popular Winamp software by college students Justin Frankel and Dmitry Boldyrev. Napster and its gangbuster follow-up MP3 file-sharing services blew the lid off the MP3 boom, making it the number-one most-recognized audio file on the Internet. Ogg Vorbis Files. For other systems, Ogg Vorbis is probably the format of choice on Linux systems and AIFF for Macintosh. OGG files use a different (and some say better) encoding process to compress the audio. If you’ve never heard of OGG files before, check out www.vorbis.com for more information. Which to Use?
Of course, these are a lot of options, aren’t they? So let’s simplify matters and use OGG files. Besides having a cool name, OGG files have the smoothest compression and are quickly becoming the standard in game design. Plus, OGG files are much easier to integrate in Torque 3D, making them an ideal audio type for your game designing pleasure.
295
296
Chapter 9
■
The Sound and the Fury
Using Sound Libraries What follows are online sound effects libraries, some economical and some totally free. Most offer sounds in WAV, MP3, or OGG file formats. ■
Acoustica—Online at www.acoustica.com/sounds.htm.
■
Freesound Project—Online at http://freesound.iua.upf.edu.
■
Media Tracks Free SFX—Online at www.media-tracks.com.
■
SFX Library—Online at http://sound-effects-library.com.
■
Stonewashed SFX—Online at www.stonewashed.net/sfx.html.
You might also want to take a look at the indie music scene and license music from unsigned artists. Many are starting to ally themselves with game developers to gain recognition for their art. Some online resources you might use include the following: ■
Artist Launch—Online at www.artistlaunch.com.
■
CD Baby—Online at www.cdbaby.com.
■
Indiespace—Online at www.indiespace.com.
■
License to Thrill—Online at http://licensetothrillmusic.com.
■
MP3.com—Online at www.mp3.com.
■
SoundClick—Online at www.soundclick.com.
Audacity A great open-source program (meaning it doesn’t cost you anything under the GNU General Public License) is Audacity. It’s the program suggested for you to use and is enclosed on the book’s DVD. Go ahead and install Audacity on your machine, if you haven’t already, and I’ll show you how to use it.
Record Audio in Audacity Let’s record some sound. Open up Audacity and click the Record button, as shown in Figure 9.4. The program is now recording from your microphone, so you better say something. You can see the progress and the waveforms of the sounds in the Audacity window as you speak.
Audacity
Figure 9.4 Recording with Audacity.
When you’re through talking, click the Stop button. Play back your recording by clicking the Play button. If you can’t hear anything coming out, but you see a waveform in the Audacity window, make sure you have the volume turned up on your computer and your speakers. If everything looks good, but you still can’t hear any sound, check the microphone level in the Mixer Control in Audacity, and you might raise it a notch. Other things that can go wrong include using a bad mic, having the mic unplugged or plugged into the wrong slot in your sound card, or the sound recording/playback volume defaulting to mute. Before you panic, make sure to check all these things.
Edit Audio in Audacity Now, if you didn’t start speaking into the mic right away, you will probably have a long period of ‘‘dead air’’ before the sound wave you made and another chunk of ‘‘dead air’’ after. This is typical, but it’s certainly not optimal for a sound you’re recording for a game. You have to edit your sound.
297
298
Chapter 9
■
The Sound and the Fury
Place your cursor at one side of the portion of the waveform you wish to get rid of and drag it across to the other side, highlighting the area you want eliminated. Then go to Edit > Delete. The selected portion will be removed from the waveform. Notice under the Edit menu that you also have the option to Cut and Paste, which will come in handy when you are mixing multiple sound tracks. Play back the audio to make sure you didn’t remove too much or not enough of the waveform. Eventually, you’ll have it finished. Add Effects
I suggest you highlight the entire waveform and experiment with the effects that ship with Audacity. Click on the Effect menu to play around with any of these effects, and you can play back the sound to hear how each effect changes the recording. When you find an effect you don’t like, you can select Edit > Undo to remove it. Following is a list of effects you can try: ■
Repeat Last Effect—Repeats the last effect command; shortcut is Ctrl+R.
■
Amplify—Increases or decreases the volume of your track.
■
Bass Boost—Amplifies the lower frequencies, leaving the other frequencies untouched.
■
Change Pitch—Changes the audio pitch without affecting the tempo.
■
Change Speed—Resamples and changes the speed, thereby changing the pitch.
■
Change Tempo—Changes the tempo (speed) of the audio without affecting the pitch.
■
Click Removal—Removes clicks, pops, and other artifact noises.
■
Compressor—Compresses the range of the audio so that the louder parts are quieter.
■
Echo—Repeats the audio again and again, softer each time, like an echo.
■
Equalization—Amplifies or diminishes specified frequencies using curves.
Audacity ■
Fade In/Out—Fades audio in or out.
■
FFT Filter—Applies a Fast Fourier Transform using a curve on a linear scale.
■
Invert—Flips the audio upside down.
■
Noise Removal—Removes constant background noise, such as the wind, fans, tape noise, or humming.
■
Normalize—Corrects for vertical (DC) offset of the signal.
■
Nyquist Prompt—Uses a programming language to massage the audio.
■
Phaser—Combines phase-shifted signals with the original.
■
Repeat—Repeats the audio a given number of times.
■
Reverse—This makes the audio run backward, which is really cool!
■
Wahwah—Uses a moving bandpass filter to create a wah-wah sound over the existing signal.
Export Audio from Audacity Lastly, you need to save the bit of dialogue or the sound effect as a file so you can use it in Torque. Go to File > Export > Export as Ogg Vorbis and name your file trialrun. Put your file somewhere convenient for the moment, such as your Desktop. Once your OGG file has been safely saved, browse to your Desktop or wherever you placed the file, and double-click (Win) or single-click (Mac) to open it in your operating system’s default media player. Listen to your audio as it currently exists. Note You have to find a special plug-in called a LAME MP3 encoder to export your Audacity recordings as compressed MP3 files. As this is not really necessary for the current game project, the MP3 encoder is not found on the book’s DVD; but you can go to http://audacity.sourceforge.net/help/faq?s= install&item=lame-mp3 to find Audacity’s instructions for downloading and installing it.
299
300
Chapter 9
■
The Sound and the Fury
Sounds in Torque 3D You can record, edit, and export sounds using Audacity, but once you have the digital audio files ready, you have to know the correct way to plug them into Torque to make them work in your game. I’ll show you how Torque handles sound, and then you’ll put your recorded sounds into your game to test them out.
Sound Support in Torque Torque 3D uses OpenAL for sound support, plus you can look online for further resources to use alternative libraries. Sound is one area that Torque makes look difficult at first, but it turns out to be much easier in execution. Sound support is handled by the following three devices: ■
AudioDescription (or AD) datablocks
■
AudioProfile (or AP) datablocks
■
Console functions
2D and 3D Sounds
Torque supports what are called 2D and 3D sounds. Torque separates these two classifications by whether or not the sounds have a source in the game world. Let’s take a closer look at this definition. 2D Sound
Two-dimensional sound has no auditory source in the game environment, which means there’s no object in your game world that pushes the sound. 2D sound gain is not attenuated by orientation, spatial placement, or position. The majority of 2D sounds that you hear in games include the following: ■
Start-up or intro music
■
Background (soundtrack) music
■
Menu interface beeps and clicks
■
Short-call noises (like cheering crowds or cries of dismay)
■
Universal environment sounds (such as roaring winds or crowd noises)
Sounds in Torque 3D
3D Sound
3D sounds have a defined position, place, and source somewhere in the game environment. They come from somewhere, and players can hear them getting louder the closer the players move toward them, then the sounds lose gain as players get farther away from them. 3D sounds make full use of the Doppler effect. Most of the 3D sounds you hear in games include the following: ■
The player character’s footfalls, grunts, and cries of pain
■
Moving vehicle noises
■
Weapons fire and explosions
■
Local environment sounds, such as a bubbling river, roaring waterfall, or a cloud of flies
AudioDescriptions (ADs)
Throughout the scripting for Torque, you can place certain fields of code that encapsulate sound-specific data to simplify programming. AudioDescription datablocks define how a sound is set up and how it plays. The AudioDescription datablock tells the computer whether the sound is meant to be 2D or 3D, and, if it is 3D, what perimeter it has. It also tells the computer if the sound is meant to loop, and if so how many times it loops. Lastly, the AudioDescription sets up the maximum gain, or how loud the sound can get, and what channel (Torque supports multiple sound channels) the sound should play on. The following is one example of an AudioDescription datablock: datablock AudioDescription ( YourGameNonLooping3DADDB ) { volume = 1.0; isLooping = false; is3D = true; ReferenceDistance = 2.0; MaxDistance = 25.0; type = $SimAudioType; };
301
302
Chapter 9
■
The Sound and the Fury
This AudioDescription datablock creates a uniquely named sound called YourGameNonLooping3DADDB , which is a non-looping 3D sound that plays at maximum volume between 0 and 2 world units and attenuates at a distance of nearly 25 world units from the 3D sound’s source position. The sound is also assigned to the same channel as $SimAudioType (Channel 2), so it will be affected by changes to that channel. AudioProfiles (APs)
The AudioProfile datablock defines the sound that will be played. The AP tells the computer what sound file will actually be used for the sound. It also answers the question of whether the sound file should be preloaded. Preloading sounds helps when certain sounds would take too long to load in real time. The AP links itself to one AudioDescription (AD). The following is an example of an AudioProfile datablock: datablock AudioProfile ( YourGameExplosionSound ) { filename = "~/data/GPGTBase/sound/GenericExplosionSound.ogg"; description = YourGameNonLooping3DADDB; };
Once again using the datablock keyword, this creates an instance of AudioProfile named YourGameExplosionSound to be used for a big fireball explosion noise. It is set to the file GenericExplosionSound.ogg and uses the non-looping 3D sound set in the previous example of an AudioDescription.
Engineering Sounds in Torque You’re going to look at creating static in-game sound effects, dialogue, and environmental sound effects. This will be designed to enhance the immersive believability of the Ravenscroft game environment. Edit In-Game SFX
The player character makes noise when it tromps around. Open the folder My Projects/Ravenscroft/game/art/sound. You will see the following audio files: ■
hvystep_mono_01.ogg (used for heavy footfalls)
■
lgtStep_mono_01.ogg (used for lighter footfalls)
Sounds in Torque 3D ■
metalstep_mono_01.ogg (used when walking on metallic surfaces)
■
snowstep_mono_01.ogg (used when stepping in snow)
■
waterstep_mono_01.ogg (used when wading into water)
It is ideal to record different footstep sounds for whenever the player is walking over metal, under water, through shallow wading pools, over snow, and more, giving the player a special aural experience for each, as shown in Figure 9.5. Open any of these OGG files and listen to them. You may have heard them in the test-run of your game already, but now you know where they come from. After listening, close the files. Now attempt to edit one of the sounds using Audacity. You can make your own Foley sound effect using your mic, or you can find another file to replace one of the existing ones.
Figure 9.5 You can record sounds for every type of terrain the player crosses, as Link shows you in Nintendo’s The Legend of Zelda: Twilight Princess.
303
304
Chapter 9
■
The Sound and the Fury
For instance, on the companion DVD in the Data Files > Chapter 9 folder, you will find an OGG file called step.ogg. This is a suitable replacement for lgtStep_mono_01.ogg. To replace lgtStep_mono_01.ogg, first rename it lgtStep_mono_01_old.ogg. This way you have a backup saved in case anything should happen or you do not like the replacement you make and want to return to the previous file. (In this case, you simply have to take the ‘‘_old’’ off and you have the original sound file at your disposal again.) Then take your new file, which in this case would be step.ogg, copy and paste it to the My Projects/Ravenscroft/game/art/sounds folder, and rename step.ogg as lgtStep_mono_01.ogg. Open the Torque Toolbox and go to your Ravenscroft project. Click Play Game to test-run through the Empty Terrain level. Listen for changes to your sound in the game. Use a Sound Emitter
Recording, editing, and replacing existing sounds are one way to create custom sounds for your game. But say that you want to have an environmental sound, such as the hooting of owls and creaking of crickets on a wind-swept hill or the roaring of waves and chirping of tropical birds. A completely dead-silent world is a dull and boring one. You need to liven the place up a bit. To do so, you’re going to place a 3D sound into your game environment. From the DVD, find and copy the file noise.ogg from Data Files > Chapter 9 to My Projects/Ravenscroft/game/art/sounds folder. If you want to along the way, you can open and listen to this OGG file. Basically, it contains a looping sound of pond frogs croaking. Now launch Ravenscroft’s Empty Terrain level in the World Editor. Move your camera over the small lake area you designed earlier. Go to the Scene Tree panel on the right. Navigate to Library > Level > Environment. Here, you will find Sound Emitter, which looks a little like a volume control icon (basically, a megaphone picture). Double-click on Sound Emitter to add one to your level, and a Create Object: SFXEmitter dialog box will pop up, like the one shown in Figure 9.6. Give your sound emitter a unique name. Call it pondsnd. You can choose from a pre-existing sound profile or load an audio file. This makes sound emitters very versatile because you can script a new sound profile
Sounds in Torque 3D
Figure 9.6 Creating a new sound emitter in the Create Object dialog box.
and load it here, or you can simply select a sound file on your computer to load. Click the field beside Audio File to browse to your Sounds folder, where you put the noise.ogg file. Select noise.ogg to be your audio file. The following are important properties to remember about sound emitters: ■
Loop Sound—This checkbox tells the engine whether to loop the sound over and over again or to just play through once. Leave it checked so that the sound will loop.
■
Stream Sound—This box refers to sound that is played directly from its root directory rather than condensed and run in the player. Go ahead and check this box.
■
Volume, Pitch—Volume controls how loud the total sound will be, while Pitch controls the gain, or how loud the sound is at maximum; usually, these will share the same value. Set each to 2.
305
306
Chapter 9
■
The Sound and the Fury
■
Fade In/Out—Fade In and Fade Out only work on flat 2D sounds, not 3D. If you have the Is 3D Sound box checked, then Doppler effects will immediately be applied to your sound source, which creates its own fade in/out. Fade In and Fade Out here refer to making sounds start or end softly, respectively.
■
Reference Distance—This is the value in Torque units of how close to the object the sound starts being heard. Set this to 25.
■
Max Distance—This value sets the Torque units distance from the object that the sound can still be heard, although it will be affected by fall-off if the Is 3D Sound box is checked. Set Max Distance to 100 for now.
Click Create New when you’re done. A Sound Emitter marker will be plunked down in the game level at the center of your screen, close to ground level (see Figure 9.7).
Figure 9.7 A 3D game sound is set by a sound emitter.
What’s Next?
Make sure your speakers or headphones are on because you should hear the sound whenever you move closer to the reddish transparent bubble. Note that at the center of this bubble is a gizmo just like when you edit any other object in Torque. You can move the sound emitter anywhere you want within your game level. You can also change the emitter’s base settings at any time through the Inspector panel on the bottom right of the World Editor interface. Save your level and return to the Torque Toolbox. Click Play Game and, when Empty Terrain loads, walk closer to the area where you remember placing the sound. With your speakers or headphones on and your volume up, you’ll hear some interesting environment noise. You can use this same method to create sound effects for different areas of your game levels. You can have seabirds squawking just off the shore, farm animals near the village homes, and anything else that your imagination can come up with.
What’s Next? After reading this chapter, you should know more about how sound is, and has been, used in TV, film, and games and what some of the audio jargon means. You should’ve set up your own home sound studio, installed the necessary sound editing software, and taken a stab at recording some audio. You also looked at editing in-game sound effects and placing sound emitters in your game levels. Next you’ll look at programming and adding custom scripting to your Torque game.
307
This page intentionally left blank
chapter 10
Should I Stay or Should I Goal? Programming happens to be a two-way street. You must convince the computer to do what you want it to, while the computer has to interpret your commands and spit out what it thinks you want. Programming languages are tough to learn, but scripting languages, such as TorqueScript, are easier. Scripting uses pre-existing engine elements to accomplish new tasks quickly and efficiently. You might wonder if it’s truly necessary to code with TorqueScript, since Torque was actually written in Cþþ and assembly language, but if you don’t know how to write in Cþþ from scratch, the scripting language will be easier. In this chapter, you’ll look at ironing out your game by scripting your mission. To do this, you must understand the mystic intricacies of TorqueScript. Note If you are discovering you have serious lag issues with your PC when running the Torque programs, here is a tip to fix it: In the World Editor, go to Edit > Game Options. In the Options dialog, set the screen resolution to 640 480 and turn off Post FX. This will dramatically improve playing performance.
309
310
Chapter 10
■
Should I Stay or Should I Goal?
Code for Torque Melv May is well known in the GarageGames community for his contributions to the Torque Demo and his FX improvements. The following are just a few of Melv May’s tips for early indie developers: ■
‘‘Prototype, Prototype, Prototype!’’—Do mock-ups, sketches, and preliminary game prototyping very early on. Don’t wait or struggle to make one little thing ‘‘perfect’’ because you’ll get way behind.
■
‘‘Game or Demo?’’—Script what you’re making and make sure you know what you’re making. Is it a full-fledged game or just a brief technical demonstration of what you can do?
■
‘‘Keep Alive’’—If you’re working with a game design team, make sure to keep everyone informed of what you are doing at all times, no matter how irrelevant you think it is. The worst thing that can happen is that you make a bunch of changes to the code, and then someone else says, ‘‘Nah, we didn’t want to do that.’’
■
‘‘Dark Period’’—Be prepared for disappointments and bleak periods during programming. Every designer wants to shoot himself in the foot or scrap the game and do something completely different once in a while. Be strong and carry on.
You don’t have to be a total computer geek to make a great game. Sure, programming can seem monstrous to you at first, especially if you never quite took a shine to your math or science classes in school, but it can also be very rewarding to see your game come alive onscreen for the first time.
TorqueScript TorqueScript (TS) should look familiar to you if you’ve ever done any programming before in the C/Cþþ languages. Most of the syntax is the same. A game script is composed of statements, object definitions, function declarations, and packages. TorqueScript is a proprietary language developed specifically for Torque technology. The language itself is derived from the scripting used for Tribes 2, which was the base technology Torque evolved from.
Code for Torque
Scripts for Torque are written and stored in files with CS extensions, which are compiled and executed by a binary compiled via the Cþþ engine (EXE for Windows or APP for OS X ). The CS file type stands for ‘‘C script,’’ meaning the language resembles C-style programming. Though there is a connection, TorqueScript is a much higher-level language than C scripting, but it is still much easier to learn than Cþþ. All of the Torque editors you’ve been using, including the World Editor, Material Editor, and GUI Editor, were themselves Cþþ components exposed and constructed using TorqueScript. More importantly, all your gameplay programming will be written in TorqueScript. The language allows you to rapidly prototype your game without having to be a code guru or perform lengthy game engine recompiling. If you want to change the name of an object, its mass, the player inventory, or anything else that can be edited in a game, just open the appropriate script file, make the change, and save the file. When you run your game, the changes you made will immediately take effect. Syntax
Like other languages, TorqueScript has certain syntax rules you need to follow. The language is very forgiving, easy to debug, and is not as strict of a language as Cþþ. The three most important rules obeyed in code are the following: ■
End a line with a semicolon (;).
■
Use a proper amount of white space.
■
Comment your code.
The engine will parse the code line by line, stopping whenever it reaches a semicolon. This is referred to as statement termination, common to other programming languages like Cþþ, JavaScript, and more. Take a look at the following code sample: %testVariable ¼ 3 %anotherVariable ¼ 4;
You can read it correctly, I’m sure, and think to yourself, ‘‘There are two lines there.’’ But your computer will say, ‘‘Au contraire!’’ It will read those lines as %testVariable ¼ 3%anotherVariable ¼ 4;
311
312
Chapter 10
■
Should I Stay or Should I Goal?
This is obviously not going to work. The only exception to this is when multiple lines of code are supposed to work together for a single function. Comments
Commenting is not required to run your game, but you should write comments throughout your code as often as possible if you want clean portable code. Whenever you write code, you should always try to add comments. Comments are a way for you to leave notes in your code; these notes are not compiled in your finished game. The compiler, in fact, skips right over these lines as if they’re not there, but you (and more importantly, anyone else who looks at your code) can read them. There are two types of comment syntax styles. The first, and most often used, one has double slashes (//). This is used for single line comments: // This comment will be ignored by the compiler
The second type of comment syntax is used for larger clumps of code, or when you need to leave a longer message. With this comment syntax, /* opens the comment and */ closes it, while anything you write in between will be ignored. /* This section has multiple lines None of these lines will be read by the compiler In fact, the compiler will ignore this text Amazing... */
Features
Here are just a few of the most prominent features of TorqueScript that you should memorize: ■
Case-sensitivity—Variables and functions don’t have to be proper case to work. For instance, %Aargh and %aargh would be read the same.
■
Ending Statements—Each and every statement must be concluded by a semicolon. This tells the script to close.
■
Ending Algorithms—A block that begins with an opening curly brace ({) must end with a closing brace (}) following the final statement.
Code for Torque ■
Inheritance—Torque allows you to expand on or override statements within the same script.
■
Variables—The percent (%) sign before a name signifies that it is a local variable (an invented placeholder currently used within one function). The dollar ($) sign signifies that it is a global variable (a permanent placeholder). You can use alphanumeric characters (A-Z, a-z, 0-9) and the underscore character (_), but you can’t start a variable name with a number.
■
Strings—Constants enclosed in quotation marks are quite often used for in-game messages.
■
Echo—The echo() command prints the value contained in a variable; for example, echo ("Hello World!"); will have the words Hello World! pop up on screen.
■
Booleans—Torque uses Boolean variables, which can have only two values, such as true or false.
■
Objects—Definitions of objects come as a collection of attributes and behaviors.
■
Datablocks—According to the Torque documentation, ‘‘Datablocks are special objects that are used to transmit static data from server to client,’’ and they are used for the creation of most objects, from spawning monsters to playing music in the background.
■
Functions—The basic algorithm you’ll see in TorqueScript is a function, which starts, naturally, with the word function. If you define a function and then later on define a function with the same name, you’ll be overriding the old function completely.
■
Packages—You can place more than one function into a package, which starts with the word package and can be activated with ActivatePackage() and deactivated with DeactivatePackage().
■
Classes—No, this doesn’t mean that you need to have class to create games with Torque! Classes hang the level hierarchy for your game elements, and the core classes include SimObject, SimDataBlock, SceneObject, and GameBase/GameBaseData.
313
314
Chapter 10
■
Should I Stay or Should I Goal?
Al-Go-Rhythm The best way to remember algorithm, because it’s kind of a strange word, is ‘‘al-go-rhythm.’’ An algorithm is a set of instructions, listed out step by step, to your computer. Your computer thinks in binary, or 1s and 0s (see Figure 10.1), and so you have to slow down and remember to ‘‘dumb down’’ your speech in order to communicate with your computer effectively. You don’t literally have to talk in 1s and 0s anymore (thank goodness!), but you do have to think logically, critically, and simply. Try to imagine telling a caveman how to start and operate an automobile—it has to be that simple! Most algorithms you’ll write in TorqueScript appear as functions. They follow, statement by statement, until you reach the end of a function, and each function builds off descriptions and other functions. Some algorithms are pretty straightforward, while some others branch or loop back around. Usually, you can tell if an algorithm is set to loop if there’s a return(); in it somewhere, and you can tell if an algorithm is branching if it has a conditional in it. Conditionals are if-then/else statements. They’re good for checking active variables. You check if a value is true, and if so you tell the machine to execute a function. If it’s not true, it does not execute the function. Here’s an example of a conditional statement in Torque: if (%val) {
Figure 10.1 The true matrix comes in binary (machine) code.
Code for Torque $firstPerson ¼ !$firstPerson; ServerConnection.setFirstPerson ($firstPerson); }
You could use if-then/else statements for lots of game-related items. For instance, you could check to see if the player’s health bar is nil, and if so, call a function where his character dies. You could check to see if the player is out of ammo, and if so play an ‘‘empty’’ sound byte instead of gunfire. You could check to see if the player has wandered within the field of vision of a monster, and if so have the monster pounce on the player. Perhaps the hardest thing for a new game designer to learn is programming, and most of it is learning to think like a machine. (The other part is just learning the syntax, as this is comparable to learning a second language.) Just remember, practice makes perfect.
Script Editors Personally, I and many other programmers merely use Notepad, BBEdit, or various other text editors to code or edit code in. Text editors do not have colored syntax editing or debug routines built in, however, so other programmers prefer the ease and use of syntax editors. Syntax editors were structured primarily around one type of code language, and have subroutines to read the script, color values and functions so that they are more legible to the user, and also have built-in debugging to make quality assurance faster. The most popular script editor utilized by Torque users is Torsion, which costs $39.95 and reads and writes TorqueScript like a pro. Torsion comes from Sickhead Games, which you can find online at www.sickheadgames.com. Torsion is available to you on the book’s companion DVD in the Software folder. Go ahead, if you want to try it out, and install it on your computer. Once you do, you will be able to access Torsion from within your Torque Toolbox. Simply click the Torsion auto-start button in your Toolbox, and the Torsion script editor will open.
Under the Hood of TorqueScript First I want you to understand what your code is doing every time you start up your game. Then I’ll show you how to add more fun stuff to it. After that, you can experiment and come up with all kinds of other game programs.
315
316
Chapter 10
■
Should I Stay or Should I Goal?
Edit Empty Terrain Details
You are probably sick and tired of opening Empty Terrain and seeing its name and description say the same thing over and over: ‘‘An empty terrain ready to be populated with Torque objects.’’ Well, let’s change that. Launch Torsion (or whatever script editor you use). To open Torsion, select File > Open > Project and navigate your way to Torque\Torque 3D 2009 Tools Demo 1.0.1\My Projects\Ravenscroft\game and then double-click Ravenscroft. torsion. Or, in the Torque Toolbox, select your Ravenscroft project and your Empty Terrain and then click the Torsion button. In Torsion, first-time users will see it load a cache file of all the resources used for the current game project, Ravenscroft. This may take a couple minutes, but it will save you time later on from having to search for it all. Once it finishes creating a project list, the list should appear for you on the left side of the Torsion window. Expand the levels folder to view its contents: Empty Terrain.mis, Empty Terrain.mis.decals, and so on. Double-click to open Empty Terrain.mis. This is the level you’ve been editing in the World Editor (see Figure 10.2). It can also be opened in a script editor. Tip If you are not using Torsion to edit files like MIS file types, you can still open them. In Windows, you can often right-click and choose Open With to find a program to open these files with. Or you can attempt to open the files, and if your machine doesn’t know what to do with them, it will allow you to search your computer for a program to open them with. You then select your editor (Notepad, BBEdit, or some other editor), and the file will open using that editor. Be sure to not select the option that this type file will always open with this program because you might change your mind or use a different program next time. This way, multi-use files, such as MIS file types, can be used in multiple programs, such as the World Editor and a script editor.
Scroll down until you find the new LevelInfo (theLevelInfo) section. In it is desc0, which is the base description of the level, and LevelName, which controls what name is given to the level: new LevelInfo(theLevelInfo) { nearClip ¼ "0.1"; visibleDistance ¼ "2000"; decalBias ¼ "0.0015"; fogColor ¼ "0.0313726 0.00392157 0.0941177 1"; fogDensity ¼ "0.001";
Code for Torque fogDensityOffset ¼ "10"; fogAtmosphereHeight ¼ "100"; canvasClearColor ¼ "10 10 6 255"; advancedLightmapSupport ¼ "0"; desc0 ¼ "An empty terrain ready to be populated with Torque objects."; LevelName ¼ "Empty Terrain"; };
Highlight all the text inside the quotation marks beside desc0, press Delete, and then type in this as a description: ‘‘A dark and stormy land where treasure lies in wait.’’ Be sure not to delete the quotation marks surrounding the text, which identifies the words contained within as part of a string. Change LevelName to ‘‘The Valley’’. When changing your level names for your missions, be sure to keep their names under 16 characters. I originally tried
Figure 10.2 Edit Empty Terrain.mis in Torsion or another script editor.
317
318
Chapter 10
■
Should I Stay or Should I Goal?
‘‘Ravenscroft Valley,’’ which would make sense, but the name was too long to fit within the text box of the level start GUI. Rather than change the font size or text box size of the GUI, it’s easier to remember to keep the name under 16 characters. This maintains consistency, too. Save your MIS file and close it. Then play your game to test out your changes. Add Score Items
So far your game opens up and simulates a client-server system. You can move your character around and explore the environment you’ve created. You can shoot your rocket launcher. That’s about it. Now you’re going to add more functionality to the game. Gentry Jack will run around and find treasure chests like Easter eggs. The treasure chests will serve the same purpose as the gold coins Mario picks up in the Nintendo games. This will require having a scoreboard HUD that players can see to know how close they are to achieving their objective and the treasure chest objects within the level for the player to pick up. Script the Items
Remember to type clearly and consistently. Watch out, because a typo can actually cause an error in your game or even hose your computer. When you type a code snippet like the ones I show you in this book, it is recommended that you stop and re-read what you’ve typed and compare it to what you were supposed to type so that you know you didn’t miss anything. Create a new text file (or script file in Torsion) in Ravenscroft/game/scripts/ server and name it score.cs. Open score.cs in Torsion or your chosen script editor. This script will contain playability for your score items. Type in the following, and then save your score.cs file: //————————————————————————————————————————————————————————————————————————— // This sets the score item's collision information //—————————————————————————————————————————————————————————————————————————
function ScoreItem::onCollision(%this, %obj, %col) { if (%col.client) %obj.delete();
Code for Torque messageClient(%col.client, 'MsgScoreItemUsed', '\c2Found Some Treasure!'); ScoreCounter.setValue(Chests.getCount()); serverPlay3D(ScoreUseSound, %obj.getTransform()); }
First, after the open braces that enclose the scripting for the entity collision, the script checks that the collision is the client (the gamer). Then it deletes the object, which in this case will be one of the treasure chests from the game level. This helps you, because otherwise the player could continue running into it and wouldn’t know why it was being ‘‘picked up.’’ After that is the messageClient, which spits out text to the game’s player. The text it tells the player is ‘‘Found Some Treasure!’’—which reinforces the fact the player has done something right (collected treasure) as well as removed ambivalence about the act. The next part is simple. In the next part, you will create a SimGroup when you manage your treasure chests in the World Editor. The SimGroup you create will be named (aptly) Chests. ScoreCounter.setValue(Chests.getCount());
This line refers back to the GUI control you created in the last chapter, the ScoreCounter, and sets its value to be the number of objects in the Chests SimGroup, which we haven’t created yet. Be sure to save your score.cs file. Next you have to execute score.cs from within the program so that the engine knows to see it. Open your Ravenscroft/game/scripts/server/scriptExec.cs file within Torsion or your chosen script editor. Directly under exec("./health.cs");
Add a new line and type in: exec("./score.cs");
Save and close scriptExec.cs. With the functionality out of the way, let’s create the datablock. Create a new text file in Ravenscroft/game/art/datablocks named scoreData.cs. Open scoreData.cs in Torsion or your chosen script editor. The scripts in this folder contain all the datablocks for objects loaded into your game. The datablocks contain
319
320
Chapter 10
■
Should I Stay or Should I Goal?
information about the objects in your game. They’re useful in networking because a datablock allows all the unchanging info about your objects to be sent across the network only once, whenever the client loads a new game. In your scoreData.cs file, type in the following: //————————————————————————————————————————————————————————————————————————— // This sets the ScoreItem datablock info. //————————————————————————————————————————————————————————————————————————— //————————————————————————————————————————————————————————————————————————— // Audio profiles //————————————————————————————————————————————————————————————————————————— datablock SFXProfile(ScoreUseSound) { filename ¼ "art/sound/got_money"; description ¼ AudioClose3d; preload ¼ true; }; //————————————————————————————————————————————————————————————————————————— datablock ItemData(ScoreItem) { // Mission editor category, this datablock will show up in the // specified category under the "shapes" root category. category ¼ "Score"; className ¼ "ScoreItem"; // Basic Item properties shapeFile ¼ "art/shapes/chest.dts"; mass ¼ 2; friction ¼ 1; elasticity ¼ 0.3; emap ¼ true; };
The first section of the code sets up a sound profile, which I talked about in Chapter 9, ‘‘The Sound and the Fury.’’ The script tells the engine to go out to the Ravenscroft/Game/Art/Sound folder, find the Ogg Vorbis file got_money.ogg, and load it into memory for use. This file does not exist in your Sound folder
Code for Torque
right now. You can find got_money.ogg in the Data Files > Chapter 10 folder on the companion DVD. Copy and paste it to your Sound folder. The second section of code sets up the actual datablock you will use for your score items. The category and className help the engine identify where this datablock belongs and where you can go to find it in the World Editor Scene Tree library. shapeFile tells the engine where to get the datablock’s associated shape (3D model) file. The rest of the values locked herein set the entity up for virtual physics. Save the scoreData.cs script file and close out of it. Next you have to execute scoreData.cs from within the program so that the engine knows to see it. Open your Ravenscroft/game/art/datablocks/datablockExec.cs file within Torsion or your chosen script editor. Scroll down. Directly beneath this line: exec("./health.cs");
Place this script on a new line: exec("./scoreData.cs");
Save your datablockExec.cs file and close it. Create the Items
Copy the chest.dts and chest.jpg files from the CD Data Files > Chapter 10 folder and paste them to the Ravenscroft/game/art/shapes folder. This is the 3D model that you’re going to use for treasure chests that the player will need to find. Open the World Editor (the Empty Terrain mission). In the Scene Tree panel, go to Library > Scripted > Score and double-click the Score folder to find ScoreItem; this is the datablock object you just created by the same name. Double-click to add one to the game level. In the Scene view, use the Move and Scale tools to resize and move your chest. Place your spinning treasure chest closer to the ground. Make the chest smaller than the player character so as to keep it in proportion. Compare your screen to Figure 10.3. Once you get one chest created, you will want to duplicate it. Go Edit > Copy and Edit > Paste to make a copy of the original chest. Optionally, you can use the shortcut keys: CtrlþC and CtrlþV (Windows) or CmdþC and CmdþV (Macintosh). For this starter level, try adding it nine more times for a total of
321
322
Chapter 10
■
Should I Stay or Should I Goal?
Figure 10.3 Add a ScoreItem object to your game level.
10 chests. Place them all around the Ravenscroft Valley that you built. You’re effectively hiding Easter eggs, so this should be a fun, not frivolous, activity. Of course, the more complex your game level, with the more buildings, twists, curves, and obstructions you have in it, the more fun it will be for the player to try and ferret out these treasure chests. When you’re done, go to the Scene Tree panel and select Library > Level > System to find the SimGroup object. Double-click it to add a new SimGroup to your level. Name it Chests. Return to the Scene Tree panel’s Scene tab. Scroll down the hierarchical list to find your Chests SimGroup. Right now, there’s nothing in it. The SimGroup is a container you can place other objects into to organize them and to treat them as a whole, including scripting behaviors for multiple objects at once. To add treasure chests to your Chests SimGroup, locate them in the list. They should be named Item with unique IDs for each, and more than likely they’ll have a treasure chest icon out beside them. Drag and drop each Item object in the
Code for Torque
list into the Chests SimGroup to make them a part of that SimGroup (see Figure 10.4). Save your level when you’re done. When you test-run your game, you should see that your Treasure to Find starts out at 10. With each treasure chest you find in the level, your Treasure to Find will drop by 1, until it finally reaches 0. Add Other Objects
You can add preprogrammed objects to further the playability and fun of your game. Following are a couple I would suggest. The Bouncing Boulder
The bouncing boulder, or as it’s known by its class name, RigidShape, can be found in the Scene Tree panel in Library > Scripted > RigidShape, and appears to be a large round moss-covered boulder (see Figure 10.5). A rigid shape, in game industry talk, is any virtual object that can be acted upon by physical forces just like a real object. The boulder acts like a light-weight Styrofoam prop that can be bounced and tossed all around the level. The boulder has a definite
Figure 10.4 Creating the Chests SimGroup.
323
324
Chapter 10
■
Should I Stay or Should I Goal?
Figure 10.5 The bouncing boulder (a.k.a. RigidShape).
physical weight, but it still shoots across the screen whenever the player fires at it with her rocket launcher from up close. The bouncing boulder reminds me of the oversized billiard balls in the Disney game The Haunted Mansion, based on the ride by the same name. Take a brief look at and compare the parameters of RigidShape as opposed to the ScoreItem you just created: datablock RigidShapeData( BouncingBoulder ) { category ¼ "RigidShape"; shapeFile ¼ "art/shapes/rocks/boulder.dts"; emap ¼ true; // Rigid Body mass ¼ 200; massCenter ¼ "0 0 0";
// Center of mass for rigid body
Code for Torque massBox ¼ "0 0 0";
// Size of box used for moment of inertia, // if zero it defaults to object bounding box drag ¼ 0.2; // Drag coefficient bodyFriction ¼ 0.2; bodyRestitution ¼ 0.1; minImpactSpeed ¼ 5; // Impacts over this invoke the script callback softImpactSpeed ¼ 5; // Play SoftImpact Sound hardImpactSpeed ¼ 15; // Play HardImpact Sound integration ¼ 4; // Physics integration: TickSec/Rate collisionTol ¼ 0.1; // Collision distance tolerance contactTol ¼ 0.1; // Contact velocity tolerance minRollSpeed ¼ 10; maxDrag ¼ 0.5; minDrag ¼ 0.01; triggerDustHeight ¼ 1; dustHeight ¼ 10; dragForce ¼ 0.05; vertFactor ¼ 0.05; normalForce ¼ 0.05; restorativeForce ¼ 0.05; rollForce ¼ 0.05; pitchForce ¼ 0.05; };
There are more parameters because the object has to do more than just sit there and look pretty. It must be able to skip, slide, and bounce in reaction to the surfaces it strikes. It also coughs up dust in its wake, which is why you see parameters for dustHeight mixed in. You can use the bouncing boulder to block off passes in your game world that the player must shoot the boulders out of her way to enter in order to find treasure chests. You can use the bouncing boulder as a puzzle piece, too. Given that a large river bisects the road and there isn’t a way across that doesn’t end with the player getting stuck, you could use the boulders as a makeshift bridge that the player has to knock into the water. The options are limited only by your imagination.
325
326
Chapter 10
■
Should I Stay or Should I Goal?
The Default Car
Located in the Scene Tree panel in Library > Scripted > Vehicles is the DefaultCar. This buggy, as it is called, looks just like a dune buggy (see Figure 10.6). It can be used without any alteration to the scripting and runs just like a Halo Warthog. Double-click it to add it to your game level, then save and test-run your level to see what I mean. In the game, walk up to the buggy, and you will automatically enter the driver’s seat. Use the same Walk and Look commands to steer the buggy. Press the spacebar to exit the vehicle. Press the Z key or Tab key to toggle different camera views. If you accidentally flip your vehicle over (as I have done many times) simply get out of the vehicle by pressing the spacebar and shoot your car until the rocket launcher’s blasts turn your buggy back over the right way. If you like the functionality of the dune buggy, you can add a fresh look to it by making changes to the Ravenscroft/game/art/shapes/buggy/buggy.dts file, which is the body chassis for the vehicle. The wheels are separate.
Figure 10.6 The default car.
Code for Torque
Health Packs and Ammo
If you shoot your rocket launcher at too close a range, you will cause damage to yourself. This happens, too, whenever you accidentally shoot at objects that are close by in your field of view. When your health reaches zero (0), your character will go through its death animation and then automatically respawn at the start of the level (wherever there’s a player spawn point). To avoid dying, however, you can add health packs throughout the level. Health packs can be found in the Scene Tree panel in Library > Scripted > Health. There are two base datablock objects for health: HealthKitPatch and HealthKitSmall. Typically, use HealthKitSmall when you’re adding health packs to your game level. HealthKitPatch is a full health object that is disbursed from your player corpse whenever your player character dies. Besides monitoring health, a player must also monitor ammo. It’s addictive to run around firing your rocket launcher all around the level, but the launcher takes ammunition, and this too frequently runs out. So it’s a good idea to pace the player resources by placing ammo around the game level. Rocket launcher ammo can be accessed from the Scene Tree panel in Library > Scripted > Ammo.
Other Things to Do There are several more things that you can do at this point. For starters, you can take full advantage of the suite of materials already composed for you in the Full template of the Torque 3D Demo, including weapons, ammo, health packs, AI, and more. You can start by editing or replacing the health HUD, the weapon HUD, and the health pack models. You can record your own sound effects for ambience and player actions and overwrite existing ones. You can also go to www.torquepowered.com and use the forums and questions section to find more code snippets and guides to add more usability to your game, like setting up characters to climb ladders, opening and shutting doors, particle effects you might not have thought of before, and much more. Ubiq Visuals (www.ubiqvisuals.com) offers a 3D action-adventure kit demo for making games with running, jumping, and platforms, similar to the Zelda and Prince of Persia games (see Figure 10.7). The demo of their 3D action-adventure kit is located on the companion DVD for this book in the Software folder, if you’d like to take a look at it or view the tutorials.
327
328
Chapter 10
■
Should I Stay or Should I Goal?
Figure 10.7 The 3D action-adventure kit from Ubiq Visuals can help you design jump-and-run platformer games.
Another tip to encourage you, if you’ve discovered you have a knack for programming, is to pick up Kenneth C. Finney’s book 3D Game Programming All in One, Third Edition (published by Cengage Learning, 2010). Written by a professional programmer who specializes in coding for Torque, this book should provide you with useful tips and tricks. WARNING: watch out for feature creep! It’s fine to add a few original features to your game, but the more you try to cram into one game design, the uglier the game will end up. Try to keep your overall design smooth and simple. Perfect a few features, and leave the rest out.
What’s Next? In this chapter, you should have learned what scripting is all about, including what an algorithm is and how to program games for Torque using the proprietary TorqueScript scripting language. You have added new objects with programmed behaviors into your game level and finalized the gameplay of Ravenscroft. Next you will look at what it takes to make multiplayer games, especially games played online by multiple people through an Internet connection.
chapter 11
Multiplayer Setup
MMO. It sounds like a health plan or insurance program. But MMO stands for massive multiplayer online game. The root of these online games came from MMORPGs, or massive multiplayer online role-playing games. MMORPGs, in turn, got started in the early days of the Internet as MUDs, or multi-user dungeons, which were text-based computer role-playing games based on the 1970s and 1980s Dungeons and Dragons games from TSR. Today, the hottest online games are still role-playing games because RPGs lend themselves so well to the well-trod genre trends of hack ‘n’ slash loot-gathering, although there are several action games, especially armed forces squad-oriented ones. Plus, most of the next-gen console games, like Call of Duty: Modern Warfare 2, have optional multiplayer campaigns built right in. Players who used to be stuck on their couches at home are now reaching out to insult other players via the Internet; and with broadband, DSL, and cable making hook-ups less expensive and more available, even more players are reaching out.
Designing the Next Big MMO Tip ‘‘Cost is the number-one issue of MMORPG development. This is where we are going to see the MMORPG market begin to bifurcate along two lines.’’ —Jack Emmert, Cryptic Studios
329
330
Chapter 11
■
Multiplayer Setup
The tip from Jack Emmert is from a recent article of his where he faces the upcoming crisis in MMO development. Too many publishers are afraid to go near multiplayer game proposals because they immediately compare them to World of WarCraft (see Figure 11.1). WOW did what few other games could do. Where EverQuest and Dark Age of Camelot had an audience subscription base of over 200,000 players, WOW had over one million and is still growing. It is (at the time of this writing) the top-grossing MMORPG in the industry, with lots of competitors but very few contenders. What most publishers don’t realize is that WOW was so great at the time because Blizzard reportedly sunk between 50 and 70 million dollars into the project to start with. Publishers may turn away game proposals that they worry won’t turn out the number of sales WOW did, but they’re not willing to handle the costs or admit that the investment proved the return. In the end, a lot of MMO developers are turning to indie development and new economic models that are more efficient for getting their games out there,
Figure 11.1 Blizzard Entertainment put a lot of cash in the pot to back their MMORPG, World of WarCraft—but it paid off.
Designing the Next Big MMO
even if 200,000 people don’t sign up for any of them. These are MMOs that don’t try to compete with WOW status. They strike out to hit their own niche markets. That’s exactly what you should do. I know too many people who want to build the next WOW. Unfortunately, it’s not that easy, and taking a smaller, less direct approach will earn you larger rewards in the future. Think of this: If you were going to start a multi-billion-dollar store like Wal-Mart, wouldn’t it make more sense to start as a nickel-and-dime store first, and then work your way up? Eventually, you might reach the status of Wal-Mart, but you certainly wouldn’t want to set your expectations so high at the beginning that you never make it to your goal. The same is true of making MMOs. Torque 3D offers the indie developer everything he could ask for in MMO creation and maintenance.
Torque Network First of all, Torque sets up a simulated server each time it starts a new game. The reason that it uses a simulated server even in a single player game is because networking is so integral to the architecture of Torque 3D. A network is simulated even when a game is going to be played solo or not on the Web. You may not have realized it, but even when you are building your game, your computer is simulating both a server and a client. You can even program login passwords and accounts, track player accounts, and ban people from your games. (These scripts are in the server folder, of course, if you feel like practicing with them.) Let’s talk about what a network is. A server is the place where all your game world data is stored, and a client is an individual visitor who plays inside that game world. Confused? Don’t be. Think of it this way: A bowler goes into a bowling alley where he rents some shoes, takes his ball, and starts bowling; when he gets done he turns in his shoes and leaves with his ball. The bowling alley is the server and the bowler is a client. There are essentially three connection schemes you can choose from when you’re setting up a multiplayer networked game; the type of connection scheme that you use is obviously based on the type of game you are running.
331
332
Chapter 11
■
Multiplayer Setup
■
Single Player on a Single Machine—A single instance of the executable opens on a single machine, and everything is run locally.
■
Active Client and Active Server on a Single Machine—The one machine acts as a listen server. The hosting player, which would be you, uses a local client and a local connection, and other players use client-only executables, running on separate machines and connecting remotely to the listen server. This is also known as hosting LAN (local-area network) parties.
■
Single Executable Running on a Dedicated Server—Your company hosts one or more sessions of the game on a machine you use as a dedicated server, and multiple client-only executables can connect to this server for multiplayer games.
Remote connections can be on a LAN or across the Internet; if you choose the Internet, a master server is required to host the game. The master server handles clients finding connections and ghost management. This is where that Play in Web button in the Torque Toolbox comes in handy. And remember that Host button that followed as a part of the interface? You can set your computer up as a master server merely by playing the game on the Web through a browser and choosing to host the game. A master server can be any machine that is connected to the Internet twenty-four hours a day, seven days a week, 365 days out of the year. Plus, depending on the number of clients your server can handle, your Internet connection speed would have to be superior to a normal connection. If you pay for Internet, chances are you have an Internet service provider, or ISP, who may not take too kindly to you exceeding your bandwidth limitations, or they may charge more. So conduct yourself openly and honestly if you decide to host a master server in your own home. Check with your parents and your ISP to see if it’s all right.
Ghost Manager The Torque network setup features a ghost manager, which does two things: It ‘‘ghosts’’ objects from one host to the next, and it allows for information from the original object to pass to its ghosts. When I say ghost, I’m talking about an algorithm that copies and pastes a simulated object from the server to each of the remote clients networked to it.
Designing the Next Big MMO
For example, imagine that you are playing a fantasy online game as a remote client. You round the top of the hill and see a tree standing there with a guardian under it. The tree and the guardian are not really on your end; they appear from the server and are ghosted to your machine so that you can see them. If the guard decides to attack you, the Torque ghost manager makes sure there is very little lag time and that you can see him attacking before he gets to your position. The ghost manager allows for updates so that ghosts remain persistent to the original object.
Take Your Game to the Next Level I’m not going to get into networking and setting up a dedicated server, but I am going to make some suggestions. First, you need to practice making solo player games on a single machine before launching into the setup necessary for a multiplayer game. Don’t just stick with Ravenscroft, the game you made in this book. Make lots of different games of different genres, and try out your own missions and scripts until you have your own unique game style and know Torque 3D in and out. Advertise yourself and your games online. Have your games available for download and get feedback from lots of different players. Take criticism well, as it is only a tool for growth and not to be taken too seriously. If you have bugs in your games or consistent negative criticism, make changes in the way you design games to fix these bugs or get around the faults that people find in your work. Build yourself up as an awesome game developer and let the world know it. Once you are sure you can make great games, you can address making multiplayer games. Pick your favorite game that you’ve made. What are the core goals in it, and what is the storyline? Are there ways you can tweak these elements to make the game open to more than one player? Would the game work on a LAN or online? How many players would you want to have access to the game? With concrete answers to these questions, you can build the foundation for your multiplayer game. The unfortunate part of making a multiplayer game is that you will probably have to invest in more hardware (see Figure 11.2), including a second machine or a dedicated server or cabling. This list can get quite expensive; therefore, it is not
333
334
Chapter 11
■
Multiplayer Setup
Figure 11.2 This HP MediaSmart server can be loaded with Microsoft Windows Home Server technology for a more affordable alternative.
recommended for beginners to leap in feet-first. Start small, and if things turn out well for you, take the steps to expand into the multiplayer market.
What’s Next? In this chapter you learned that big-time publishers often have big-time expectations of MMOs, but that indie publishing is a great way to get your MMO out there. You learned how Torque 3D has built-in client/server technology and is flexible enough to make quality MMOs with. You also know now, if you didn’t already, that MMO development can be quite costly, and thus you should start small and work up. In the next chapter you’ll look at iterative development, bug testing, and quality assurance in game development.
chapter 12
Put Your Game to the Test This is it. You’ve created your first game, and you’re probably adding the final touches. You have essentially reached the end of major production, but there is still so much more to do. First, you have to thoroughly test your game. Then, you have to advertise yourself and your game so that people know you exist. Once you establish a name for yourself (or preferably before), you can start making more games. In this chapter, I’ll guide you through the testing stage.
Game Testing The testing of games for bugs, or erroneous glitches, has been developed into a fine art over the years. There are two reasons for this. One reason is that bug fixing can be timeconsuming, and if it is simplified and made more efficient, then it can be over with more quickly. The other reason is that most companies can afford to hire multiple testers, called beta testers, and do research panels for quality assurance as well as testing for errors; with so many people brought in to work on a single project, it is in the company’s best interests to have a clear and concise plan of attack when it comes to defending their game from bugs.
335
336
Chapter 12
■
Put Your Game to the Test
Bug Reports An expedient method of bug testing is to use paper reports. When someone notices a bug that needs fixing, they write it down on paper. Beta testers have lots of paperwork to fill out, and bugs get categorized by their seriousness. The following list is a report of the separate classes of bugs: ■
A Class—These bugs are major huge and get top priority; such glitches can be the computer screen freezing on loading, player characters dying during spawning, or vast tracts of virtual terrain suddenly disappearing.
■
B Class—These bugs are still pretty major and should get some priority, but they are not so terrible that the tester cannot keep playing the game; such glitches include broken animation, erroneous messages, level leaks, bad guys not dying like they should, and more.
■
C Class—These bugs are not major at all and sometimes get left in a game when it ships if the developers are being pushed toward a deadline by the publisher or feel pressured to ‘‘leave it’’; such glitches can be NPCs not acting realistic, sound FX that are too loud, animation tics, and missing power-ups.
■
D Class—There’s usually not a real D Class for bugs. D Class is also called the ‘‘wish class’’ because these bugs are not glitches at all but what the tester sees as wrong in the game. Such problems can be choice of color palette, art style, voice direction, and storyline issues. Programmers may listen to criticism, but overall they don’t worry themselves with D Class bugs.
Testers then spell out, word for word, exactly what the supposed glitch is, where it can be found, and, if the tester is knowledgeable enough, what they think is the cause of the concern. This way, the development team can go back and track down the problem and attempt to fix it. Once the problem is assumed to be fixed, the team does not rest. A second testing will be done, and maybe even a third, until the fix has been verified and the bugs no longer exist.
Iterative Game Development Of course, before the beta comes out and even before beta testers are pulled in, the development team of a game also runs through the same testing procedure
Game Testing
on a regular basis to catch bugs before they even hatch; if you’ve followed the projects in this book, you’ve done the same—there have been many times I’ve told you to implement a new section to the game or to the code and then test-run your game to make sure it works. When you do, you might notice something that doesn’t look or act right, take steps to fix it, and move on. This is called iterative development, and it is important because it helps you to verify your assets as you build. Test as You Build
If you were to try to construct an entire game from scratch, with lines after lines of new code, GUIs and terrains galore, before ever testing it out as you build, you may get a long string of errors and not know what you did to mess the game up. However, if you test each asset as you add it, you’ll catch a mistake before you go on, and you can fix it immediately. If a feature doesn’t work after multiple tries, then for the sake of efficiency, discard it and continue without it. Have Others Test for You
In all earnestness, you should stick to iterative development and test all of your assets as you build your game. But once you are through, show your game to a friend or two and have them play through it to find the most obvious A and B Class bugs. If your game has multiple paths or multiple levels, you may have to get creative so that your testers can easily move from one area to the next and give the game a good thorough testing. This is when game developers usually design cheat codes. You might’ve thought that cheat codes were programmed into games to be Easter eggs for gamers to find later on, right? You couldn’t be further from the truth! Cheat codes are there so that the game’s builders and testers can easily navigate through the entire game to do testing of all the game’s assets. If a tester is looking for leaks in the levels, for instance, she is not going to be concerned about fighting enemies; so the God Mode is programmed into the game so that, with a key combination, the tester can make her character invincible while she wanders the levels looking for holes in the geometry. Game developers used to just leave these cheat codes in when the game shipped because it was accepted practice for players to eventually learn these cheats.
337
338
Chapter 12
■
Put Your Game to the Test
Today’s developers are much more shrewd and delete the codes before distribution of the games because they figure that cheats shorten the lifespan of their games—and they’re probably right. You can program your own cheat codes into your games using TorqueScript, if you like. However, just starting out you probably won’t be making 50th-level games that are so confusing you need cheats to get around them, so don’t sweat it.
Top Issues to Watch Out For Following is a short checklist of the most important bugs to look for in your game as you go; there may be others, as this is an abbreviated list at best, and you can be sure that your harshest critics will discover them. But don’t worry your head over anything that is not covered in this checklist. ■
Does the game load okay? Does it freeze or open to the wrong area?
■
Does the player’s character appear? Can the player immediately tell where he is and what he’s doing there? If he’s in third-person mode, who is he?
■
If the player is supposed to have a weapon, does the weapon appear where it’s supposed to? Test it. Does it fire and reload as it should?
■
If there are enemies, how close does the player have to get for them to react to the player? Is this reaction consistent and realistic? How much damage does the enemy do to the player? How much damage does the player do to the enemy? Is this consistent and realistic?
■
Is the game indoors or outdoors? Are there any noticeable leaks in the level? Can the player character walk out of an area into blank space, for instance? Can the player see the edges of the world and realize that this is not real? Is there anything to take the player out of her suspension of disbelief?
■
Can the player character go where the designers want him to go without insurmountable obstacles in his way? Is the player character prohibited from going where he’s supposed to, or is he ‘‘fenced in’’ correctly?
■
Are the proportions of areas correct? Are doors and windows on buildings typical for the size of the player character and non-player characters? Are steps short enough so that the player character and non-player characters can walk up them?
What’s Next? ■
Does the player know what she is supposed to do in the game? Are there any ways that the player can get lost or confused about her mission? Is the main goal obvious? Does the storyline (if there is one) follow this goal consistently?
■
Is the quality of the 3D modeling and 2D artwork up to par or the best that you can do? Are the art style, theme, and mood within the game consistent and well-coordinated? Is there anything that stands out as ‘‘not belonging’’?
■
Does the player move properly in run, strafe, jump, die, and root animations?
■
Is the scene properly lit so that enough detail can be seen without getting washed out?
■
Does every action have a proper sound, including footsteps and the sound of weapons firing?
■
Do the player spawning positions make sense given the strategy of the game?
■
Are the gameplay features easy to learn, understand, and use? Are there any features not consistent with the original game premise or the concept? Are there any features that feel like they don’t belong?
What’s Next? In this chapter, you learned about bug testing, what bug reports are, how iterative game development benefits asset implementation, and what to watch for in your own game-testing sessions. Before looking at publishing and advertising your game, the next chapter will review your prospects at making other games using Torque products and where you can go to get more education in game art or design.
339
This page intentionally left blank
chapter 13
Designing Other Games Throughout this book, the majority of the project has dealt with the Full template that ships with Torque 3D; and yeah, it makes for a really nice jump-off point for someone who wants to make a first-person or third-person action game. But you might’ve noticed I didn’t delve into the Empty Room, which also comes with the Full template, and I didn’t discuss making other genre games. In fact, Torque 3D is only the first step. There’s also Torque 2D (a.k.a TGB), which helps you make 2D sprite-based platform games, as well as the main GarageGames products that are based on it, such as iTorque (for iPhone), T for Wii, Torque 360, and Torque X. These allow you to make games for PC, Mac, Linux, iPhone, Wii, Xbox 360, and more. Coming soon, you’ll see PSP creation with Torque, too. Torque’s cross-platform versatility makes it the ideal game authoring software.
Games Made with Torque 3D Face it. You’ve already made one game with Torque 3D. You’ve played with the Torque editors, including the World Editor, Terrain Editor, GUI Editor, Road/ River Editor, and more. You’ve also gotten your feet wet with TorqueScript. You’ve made 3D models and DTS objects to go in your game using 3ds Max or another 3D modeling program. You’ve even recorded and edited sounds with Audacity and imported your sounds into Torque. You’ve done a lot. 341
342
Chapter 13
■
Designing Other Games
But just because you’ve made one game with Torque 3D doesn’t mean you should stop there. As several game gurus have pointed out in the past, typically your first three games (or more) will suck. It takes a while to get good at anything and that includes getting good at being a game designer. You should practice it if you want to get any better. Don’t make just one game with Torque 3D—make dozens! Get a feel for all the little editors and tool sets in your pipeline that have helped you to get this far. The easier game creation with this engine comes to you, the better you will get and the more you will truly express yourself in the game medium. You could make more first-person and third-person shooter games with the template. If you do so, choose a variety of fiction genres. Make a Western, a science-fiction game, a fantasy game, a modern thriller, or any combination in between. Experiment with plot and character and develop interesting and emotionally engaging stories. It might help you to re-read Freeman’s emotioneering principles. You have only scratched the surface of the library of elements and didn’t get around to exploring or implementing them all. The more triggers, scene objects, and events you add to your game level, the more can be done in it and more it will start to feel professional. Try them out, and you might be surprised what you can do. You could choose to take the vehicle component in Torque and design a racing game around it (shown in Figure 13.1). It’s not that much different from the scripts and files associated with a first/third-person shooter and just as easy to manipulate and make your own. You’ll have more complex concerns, of course, when it comes to modeling a moving vehicle, but the concerns won’t be so much different from the character carrying a firearm. You might also deign to add other characters to race against or simply make the race a timed challenge across even more unbelievably difficult terrain. It’s really up to you.
Games Made with Torque 2D You can go online and download a trial version of Torque 2D, also called the Torque Game Builder (TGB). 2D has a slightly different editor and set of rules than Torque 3D, but some of the design rules remain the same. (See the Animation Builder, which is useful for making 2D animated sequences, shown in Figure 13.2.)
Games Made with Torque 2D
Figure 13.1 You could make a racing game fairly easily in Torque 3D, such as this game, Rev, from Luma Arcade (www.lumaarcade.com).
Figure 13.2 A screenshot of the Torque 2D interface.
343
344
Chapter 13
■
Designing Other Games
You can create a clone of Super Mario Bros., Pac-Man, Space Invaders, or any other retro sprite-based game. Of course, you can also leave conventions behind and make a truly unique and entertaining game about anything your imagination can dream up. First, for those of you who don’t know what a sprite is, it’s an animated drawing that takes the place of characters, vehicles, and props in a flat or retro game. Sprites are drawn frame by frame and animated by cycling through their frames. Even the game Donkey Kong Country, which came out for the Super Nintendo, was still a sprite-based game, though the characters were modeled in 3D before being exported as flat images. See the sprite sheet in Figure 13.3. One of the prime resources for sprites on the Web is The Spriters Resource (www.spriters-resource.com). Be aware that all its content is copyrighted by the original creators, however, so you can’t make any money using any pre-generated sprites you pull off there unless you make arrangements with the copyright holder. You might be asking yourself, ‘‘Why make retro games? Aren’t they oldfashioned?’’ The answer is, ‘‘Not at all!’’ Retro games are seeing a huge comeback
Figure 13.3 A sprite sheet from Nintendo’s Donkey Kong Country.
Games Made for Consoles
right now. Part of the reason you see retro games gaining in popularity again is because 3D video games are hitting an ideal plateau, where details and realism are competing with efficient and entertaining gameplay. A lot of game designers are going with more graphic realism, and so gameplay has begun to suffer. Games don’t need to have terrific graphics to be fun, which is something we’ve all known since the first Zork game came out (see Figure 13.4). Thus some developers are going back to the 2D sprite-based games and focusing more intently on perfecting gameplay, making games more fun to play. If you choose to, you can join the crowd by making your own sprite-based games with Torque 2D. The scripting and the editors are more or less the same, with the exception that you are working on a flat canvas rather than a 360-degree virtual plane.
Games Made for Consoles The base programs, Torque 3D or Torque 2D, are meant to make games for the PC, Mac, or Linux. However, there are optional software packages GarageGames
Figure 13.4 The first Zork game came out in 1977 from Sierra Online.
345
346
Chapter 13
■
Designing Other Games
has released that you can purchase to make video games for the game console market. The two main ones are Microsoft’s Xbox 360 and Nintendo’s Wii. Torque X, Torque 360, and T for Wii help you take your games to the console market, which is a rare thing for such remarkable game engine software.
Game Creation for Xbox 360 As stated back in Chapter 2, ‘‘Torque 3D: Under the Hood,’’ Torque X was released at the same time as Microsoft XNA as an alternative for game designers to create Xbox LIVE Arcade games for the Xbox 360 (see the consoles in Figure 13.5). The only drawback, from the standpoint of finishing the lessons in this book, is that Torque X uses the C# programming language, which has some minor similarities to TorqueScript but is simply not the same. Yet if you want to develop your own Xbox 360 games, you won’t let that stop you. There are some basic tutorials and C# programming code snippets online that will help you. The same principles you’ve learned from this book will aid you in creating great games. Plus, GarageGames has recently released Torque 360, which, though founded on Torque X and the XNA framework, has more Torque power and is exclusively for the Xbox 360.
Figure 13.5 Microsoft Xbox 360 game consoles.
Games Made for Mobile Devices
You don’t even have to purchase an XNA Creators Club membership if all you want to do is create video games for your personal Xbox 360; you can use a cable connection to transfer your game to your console. But if you want to share your game online through the popular Microsoft Xbox LIVE Arcade, you must first have an XNA Creators Club membership (which at the time of this writing is less than $10 a month), and you must also create an Xbox LIVE Arcade account.
Game Creation for Wii Not an Xbox 360 console owner, or not a big fan of Microsoft? Never fear, because you can use T for Wii, GarageGames’ answer for the other popular game console. With T for Wii, you can make sprite-based games with a toolset comparable to, because it’s based on, Torque 2D. T for Wii allows you to generate games directly for the Nintendo Wii console (see Figure 13.6), including special control options for the Nunchuk and WiiMote. Plus, you can burn to disc or release your games on the WiiWare downloadable channel.
Games Made for Mobile Devices One of the most popular mobile devices at the time of this writing is the Apple iPhone (shown in Figure 13.7), which is a GSM cell phone that’s also an iPod
Figure 13.6 The Nintendo Wii game console.
347
348
Chapter 13
■
Designing Other Games
Figure 13.7 The Apple iPhone smartphone.
(music player), video camera, and mobile Internet device with e-mail and GPS maps built right in. It’s considered the top-of-the-line in multimedia-enabled smartphones and was designed by Apple Inc. (makers of the Macintosh computer) in 2007. Part of the media that can be played on an iPhone includes video games, a market that many designers are attempting to reach, partly because of the popularity of the iPhone and partly because there are so few working tools for iPhone game development or deployment. Well, GarageGames gives you the answer. iTorque is a game authoring package based on Torque 2D, or TGB, having all the sprite functionality for classic/retro game creation, but all the power to distribute games made with it directly to the iPhone. Plus, iTorque has multitouch and accelerometer input support and PowerVR Texture Compression, which makes all your game graphics as compressed and fast-loading as possible so more people can play your games.
Final Thoughts Your games can be about anything you want. You can make a game about a private detective solving crimes in the dark wharf town of a fantasy world, where orcs and goblins hold power as the local Mafia (see Figure 13.8). Or you can
Final Thoughts
Figure 13.8 Fantasy and detective fiction genre.
make a game about a vengeful cowboy who has to learn to use an alien blaster to defeat the outlaws that killed his family. Or you can make a game about a cute little witch girl who has to find all the ingredients to brew a love potion to make a warlock fall in love with her. The options are truly open-ended with the only limitations being the extent of your imagination and your practiced skill with the game engine. If you decide that there’s one area of game design you prefer, find some teammates who have preferences in the areas that you are weak in. Make great games together.
Get a Gaming Education: College for Designers If you decide that this is going to be your career goal, get through high school with good grades (especially in art, math, and science) and jump into a college that teaches game design or game art. Not every game company requires you to have a bachelor’s degree to start out working for them, but with the exponential
349
350
Chapter 13
■
Designing Other Games
growth in the field and more eager designers graduating with an educational background in it, this might change. There are several really good game schools, including the following, which you can find by searching at Google: 3D Training Institute Academy of Art University American Sentinel University Collins College
Sanford-Brown College—St. Charles Seneca College’s Animation Arts Centre
Daniel Webster College
The Academy of Game Entertainment Technology
DeVry University
The Art Institute
DigiPen Institute of Technology
The Florida Interactive Entertainment Academy
Digital Media Arts College Emagination Game Design Ex’pression College for Digital Arts Full Sail Real World Education Global Institute of Technology iD Tech Camps International Academy of Design and Technology ITT Technical Institute
The Game Institute The Guildhall at SMU The School of Communicating Arts University of Advancing Technology Vancouver Institute for Media Arts Westwood College of Technology Westwood Online College
Media Design School Pacific Audio Visual Institute Be sure to check with your prospective game design school. Some focus more on programming than on art, while others only study the art side and don’t teach programming. Some may only use Microsoft Windows PCs, while others may
What’s Next?
use Apple Macintosh computers. Find the school that fits you, not the other way around.
What’s Next? Now you should have proper motivation to spread your wings and try new things in game design. Regardless of whether you try other game authoring products or not or you attempt to get into a college with a really good game design program, you can use the Torque 3D application to make several games all your own—games you can share with friends or family or just for your own pleasure. But to really take your games to the next level, you’re going to need to have people play them. The next chapter will show you how to package and distribute your Torque games and how to advertise them.
351
This page intentionally left blank
chapter 14
Get the Word Out: Play This Game! Eventually you’re going to reach the end of your production cycle and want to advertise the homebrewed game you’ve made using Torque 3D. When you get to that point, you may know a few friends you want to tell, but to really get the most people possible playing your game, you’re going to have to be savvy. Or you might want to sell your game, which is a whole other animal. You might even want to take your game to a noted publisher and see if they’ll run with it (a dream that can sometimes become a reality). Whatever you want to do to get the world to notice you and your game, I’ll show you how in this chapter.
Developing a Proposal If you finished your game but feel you could do much better with a bigger budget or a whole team of developers, you should consider developing a game proposal and seeking out game publishers to back you. When working on your game proposal, which is similar to and often based on your game design document, keep in mind the difference between those materials intended for internal use and those you want a publisher to see. When writing game proposals, most companies do not include every detail. The most important details the publisher needs to understand are as follows: ■
You know what you are doing and have the skills to pull off the project you propose. 353
354
Chapter 14
■
Get the Word Out: Play This Game!
■
The game you propose looks good. Notice I said ‘‘looks.’’ You can talk a good game, but until you have a demo (especially a playable prototype) to show a publisher, they usually won’t give you the time of day.
■
Your proposed game has all the earmarks of a best-selling game.
■
You have set your company above all the rest by being fresh, innovative, and appealing. You have a clear identity and a great gimmick.
When you go before a publisher or design house, try to secure a face-to-face meeting with them to deliver and review your proposal. This way, you can elaborate on specific points that you think are important. You can also answer clarifying questions faster. Just remember to go in prepared, collected, and dressed nicely (see Figure 14.1). Your proposal can be on paper, but it is recommended you use visual media. You can use Microsoft PowerPoint to develop a slideshow presentation. You could set up a demo of the game right there or show them a pre-recorded demo of gameplay.
Figure 14.1 Remember, you’re representing game designers everywhere!
Tooting Your Own Horn
Remember, you’ll want the freedom to discuss and evolve your game description while also answering questions. In most cases, the publisher’s willingness to listen will be directly related to the energy you impart, so go in pumped and excited about your own game. In most cases, if you’re under the age of 18, a publisher will want to work with someone older as an intermediary, if they give you the time of day at all. Be forewarned that this is not an easy row to hoe; in fact, it’s much easier to selfpublish and self-promote your own games, which—as you saw in Chapter 1, ‘‘So You Want to Be a Game Designer?’’—is an easy plan to choose in this cyber age of garage games.
Tooting Your Own Horn Some guys and gals find it difficult to promote themselves. If you place yourself in this category, you’re not alone. Even the sensational singing legend Madonna was prone to self-doubt, and she has been recognized the world over as one of the best self-promoters. You might be plagued by insecure feelings and doubts, or you might be really self-confident but feel selfish or that you have to be humble. Don’t be! If you want people to notice you and play your game, you can’t be a fly on the wall. You have to be just as crazy, outlandish, and noticeable as possible. Now I’m not advocating that you dress like Marilyn Manson when you stroll down the streets of your hometown. And if you plan to visit with a publisher or conduct yourself in a business atmosphere, you better wear a dress or a tie. You’re expected to dress the part of the environment you’re entering—as the adage goes, ‘‘When in Rome, do as the Romans do.’’ If you’re hanging around a game design company where everyone’s wearing T-shirts and blue jeans, then you’d better wear a T-shirt and blue jeans. But if you’re going into a board room to negotiate contracts with your publisher, you’d best put on a dress or tie (whatever’s acceptable for your gender and zip code). What I am telling you to do is to stop being vague, colorless, wishy-washy, or the amazing invisible man or woman. People won’t notice you if you don’t want to be noticed, and that’s a shame because you deserve to be noticed. Now you might be saying, ‘‘But it’s my game that I want people to notice, not me.’’ That’s true. But if you are an unnoticeable person used to evading comment and keeping to yourself, then there’s a great possibility your game’s never going to get noticed.
355
356
Chapter 14
■
Get the Word Out: Play This Game!
Develop a Clear Identity or Gimmick A lot of companies talk about using a gimmick. A gimmick is a clear image that represents an idea. A gimmick helps to sell products. You’ve probably noticed gimmicks all around you, and some of them can be very transparent or clumsy, but most often a gimmick is purely an understandable image of an idea that takes too long to explain. Think about your game idea. Can you express it in a single, clear sentence? Can you express it in a single image or avatar? If not, you might have to develop a gimmick to sell your game. Taking time to write down your game (as discussed in Chapter 3, ‘‘Creating a Basic Game Outline’’) helps you to sharpen and clarify your game idea to yourself and to the team that you’ll be working with. If you skipped doing this or made the game first before taking the time to simplify your concept, then you need to work it out right now, before going any further. Once you’ve simplified your game idea, consider the following and find one thing that would serve as a possible gimmick: ■
Character—Do you have a cute, sexy, strong, or mysterious character that is different enough and exciting enough to serve as an icon for your game?
■
Place—Is the setting for your game adventurous, glorious, beautiful, or mysterious enough to serve as an icon for your game?
■
Weapon—Does your character wield an interesting, powerful, cool, or different sort of weapon that looks neat enough to serve as an icon for your game?
■
Enemy—Do you have a scary, awesome, powerful, or mysterious enemy that is enthralling enough to serve as an icon for your game?
■
Element—Is there some gameplay element so infusive that it’s found everywhere in your game and looks different and exciting enough to serve as an icon for your game?
Let me give you just a few examples of gimmicks other games have used, in case you’re still confused.
Publish on the Web ■
In Tomb Raider, the gimmick is Lara Croft, in Super Mario Bros., it’s Mario, in Donkey Kong Country it’s Donkey Kong, and in Zelda it’s the elf Link. All of these games have the main character as a gimmick.
■
In Prince of Persia, the gimmick is a combination of the main character (the Prince) and the place (the romanticized Ancient Persia). See Figure 14.2.
■
In the games Diablo and Rayman Raving Rabbids, the gimmicks are the enemies.
You have to find just the right look for yourself, the right gimmick for your game, and you want people to notice you and play your game. Because you’ve worked hard at creating a fun game that people will like, you will know you’re not offering them empty promises. You are only giving them excellent entertainment. Okay, but how do you get the world to notice you and your game? How do you clue folks in that you have something for them to play? One of the best ways in this beautiful cyber age is through the use of the Internet.
Publish on the Web These days, the easiest way to self-publish is to build a website and put your art on it, then get people to come to your website to see it, something that anybody can do for little or no cost. There’s no question that the Internet has profoundly
Figure 14.2 Ubisoft’s Prince of Persia game has a central character but also a unique setting, both shown here.
357
358
Chapter 14
■
Get the Word Out: Play This Game!
changed our society. These days, people from all over the world chat over the World Wide Web, instantaneously sharing information in ways humans never considered possible before the birth of the Web. In this day and age, ‘‘I found it online’’ has become a household refrain.
The World Wide Web The Internet is a global network of computers that enables people from around the world to share information. Many people use the terms interchangeably, but the Internet and the World Wide Web, often referred to as simply the Web, are not one and the same. The World Wide Web (WWW ) is a subset of the Internet that supports web pages, or specially formatted documents created using languages such as Hypertext Markup Language, or HTML. Hypertext allows you to click on words in a document that are linked to related words, graphics, and other elements in the same or in another document. Put another way, you might think of the Internet as the connection between various computers worldwide, and the World Wide Web as the content that resides on those computers that is transmitted via these connections. In order to maintain your presence online, you’ll of course need a computer, and you’ll need a connection to the Internet. That means you’ll need an Internet service provider, or ISP. These providers offer connections of various types, including the following: ■
Dial-up, using a telephone line and modem (generally horrifically slow).
■
Digital Subscriber Line (DSL), using a telephone line and a DSL modem.
■
Cable, available anywhere cable TV is offered.
■
Fixed wireless, using either satellite or microwave technologies.
■
Mobile wireless, using cell phone or wireless fidelity (WiFi) technologies.
Often your personal circumstances will dictate which option will work best for you. If you don’t have your own personal computer with access to the Internet, the next best choice is to use Internet connections provided for public access in places like libraries, colleges, and schools. Although certain restrictions may apply in such places, computers in these places are typically available for your
Publish on the Web
use. Even if you do have your own computer with Internet access, it’s nice to know these public computers exist. For example, you might use them to update your web pages if your home machine is out of commission.
Web Speak Just as terms like the Internet and the World Wide Web run together after a while, so do terms like web pages and websites. Take a look at the following distinctions: ■
Websites—A website is a location out on the Web. It is kind of like a neighborhood full of homes. For instance, www.msn.com is a website.
■
Web Pages—A website consists of two or more web pages. A web page is a single HTML document found on the Web, residing at a website. It is like one of the homes on a neighborhood block.
■
Home Pages—A home page is the first web page you see when you enter a website, and it is often referred to as the index page.
Web Browsers A web browser is a software program that is used to locate and display web pages. More than likely you’ve used web browsers without knowing what they were before, such as Internet Explorer, Mozilla Firefox, Safari, or Google Chrome. All these browsers can display graphics in addition to text. Additionally, they can display sound and video, although many require special plug-ins in order for these features to work correctly.
Hosting Servers It all seems very simple. You click, and a new page appears on your screen. But where do these pages live while they’re not being looked at? Where are web pages stored? Websites and their pages are stored on special computers called servers. A server is a computer that is hooked up to the Internet 24/7 and might have one or more websites stored on it at any given time. The number of sites and pages that can reside on a single server depends on the server’s memory capacity. When you enter a web page address in the Address bar of your browser, the server responds by sending a copy of that page to your browser.
359
360
Chapter 14
■
Get the Word Out: Play This Game!
To publish your website, you don’t need to set up your own personal server (although, if the spirit took you, you could). You can borrow someone else’s server to put your files on. This type of server is called a web host. There are countless choices in finding web hosts: some are free and others cost. Following is a list of free web host services: ■
110 MB—http://110mb.com
■
AtSpace—www.atspace.com
■
Byet Internet Services—www.byethost.com
■
Freehostia—www.freehostia.com/hosting.html
■
Webs—www.webs.com
■
Tripod—www.tripod.com
When choosing free hosting, go with a reputable web host. Some free hosting sites add bulky code to your page, which increases the loading time or speed at which your page displays. Others place advertisements on your page or even program code that can download scripts to your visitor’s computer, infecting them with spyware. Avoid these types of hosts if you can. Companies with dedicated servers cost you more, but as with everything in life, you get what you pay for. The top web hosts with dedicated servers you can pay for at the time of this writing are listed here: ■
BlueHost—http://bluehost.com
■
Dot5Hosting—www.dot5hosting.com
■
HostMonster—www.hostmonster.com
■
HostPapa—http://hostpapa.com
■
StartLogic—www.startlogic.com
Build Your Own Website Think of your website as a neighborhood. In that neighborhood, you’ll need to put stuff, such as houses, trees, and sidewalks. Just as a city planner would, you will want to have a clear concept of what kind of stuff you want to include in your site before you start building it.
Publish on the Web
I will give you a brief primer for web development. If you decide you really want to publish your games on the Web, however, there are whole books devoted to web design that you should really read. A few I’d suggest from Cengage Learning include the following: ■
Web Design for Teens, by Maneesh Sethi
■
Principles of Web Design, 4th Edition, by Joel Sklar
■
Web Design BASICS, by Todd Stubbs and Karl Barksdale
■
PHP for Teens, by Maneesh Sethi
Prep Your Text
Before you build your site or update it with new material, take the time to write all your text beforehand. Your best bet is to use a word-processing program like Microsoft Word. It enables you to check your spelling, and it even makes suggestions relating to grammar and usage. You can right-click words to view your options, including other spellings, word choices, and synonyms. This both simplifies the process of writing and double-checking your work and speeds it up. In addition, writing things out beforehand helps you ensure that you’re conveying the message you want to convey on your web page without being distracted by any coding or technical aspects that are sure to crop up later. Prep Your Images and Animations
Unlike images you prepare for print, which must have a resolution of 150 to 300 dots per inch (dpi), an image bound for the Web needs to have a resolution of 72 dpi with a file size equivalent to 200 kilobytes (KB) or less. In order to achieve this file size, you will likely need to compress your images. This reduces redundancy in image data, often without a noticeable loss in image quality. Compressing your images not only makes it more convenient for you to upload them to the Web, it also benefits your visitors because it enables your site to load more quickly, displaying your graphics almost as soon as the text appears. Use an art or photo editing software application, such as Adobe Photoshop, to compress your images. There are three image types widely supported on the World Wide Web: ■
JPEG—JPEG (pronounced jay-peg), short for Joint Photographic Experts Group, is among the most common image compression formats available.
361
362
Chapter 14
■
Get the Word Out: Play This Game!
■
GIF—The Graphics Interchange Format (GIF) is an eight-bit-per-pixel bitmap format that supports alpha transparencies. You can pronounce GIF with a hard or soft ‘‘G’’ sound.
■
PNG—Short for Portable Network Graphics, the PNG (pronounced ping) format is a bitmapped image system with 24-bit RGB colors and improvements over the GIF format. PNG is great for creating low-sized files with excellent quality.
The differences between these three image types are marginal. Put It All Together
Adobe Dreamweaver is the premiere website construction kit for professionals. It allows pros to work in either a WYSIWYG (what-you-see-is-what-you-get) or code environment—or in both simultaneously. Dreamweaver comes with several built-in site templates. All you need to do is add your content and create your custom logo. In addition, there are many free templates available online. Note that Dreamweaver can be fairly complicated, and as such, you will probably need to read a book that focuses on teaching you its inner workings, such as Sherry Bishop’s Adobe Dreamweaver CS5 Revealed (Cengage Learning, coming in 2010). Also, you can learn more about Dreamweaver and how to use it from Adobe’s site at www.adobe.com/products/dreamweaver. Another site creation tool is Microsoft Expression. Expression’s goal is to overtake Dreamweaver and overcome the limitations of its predecessor, FrontPage, with a more viable alternative. Expression is most compatible with Windows XP and Vista. You can learn more about Microsoft Expression at www.microsoft. com/expression. A third alternative, especially if you don’t have the budget required to own Dreamweaver or Expression, is Nvu (pronounced N-view), which is available online at www.nvu.com. Nvu is an open-source web authoring application for Windows, Mac, and Linux users. This free program provides a great WYSIWYG editing environment and built-in file transfer system to satisfy most designers’ needs. If you’ve always wanted to get your feet wet building websites, but don’t have much in the way of disposable income, consider Nvu. You are not required by any law to use a web authoring program like these at all. If you prefer, you can hand-code it using HTML. HTML is a simple markup
Publish on the Web
language that tells the browser how to display code on the page. It’s so simple, in fact, that anyone can learn to do it. There are numerous HTML tutorials online that can get you up to snuff with hand-coding in no time. To find them, search on Google for ‘‘HTML tutorial.’’ Note, too, that you don’t need special software to hand-code web pages in HTML. I usually use a text editor such as Notepad (Win) or BBEdit (Mac) to type my code and then save my file with the .HTML extension. When you open it later, it will launch in your default browser to preview. Cascading style sheets (CSS) is a computer language used to describe the presentation of structured documents that declares how a document written in a markup language, such as HTML or XHTML (Extensible Hypertext Markup Language), should look. CSS is used to identify colors, fonts, layout, and other notable aspects of web document staging. It is designed to facilitate the division of content and the presentation of that content so that you can actually swap out different looks without having to alter the content at all. CSS can thus be kept separate from the HTML or XHTML coding. Once you have your pages created, upload them to your hosting server by way of file transfer protocol (FTP) or other upload option. This is usually dependent on which host you go with. Whatever you do, don’t lose your FTP login or password information on any of the sites or servers you decide to use. If you lose this information, you might have problems retrieving access to your site. Write them down in a notebook so that you don’t lose them. Submit Your Site to Search Engines
Now that you have some cyber real estate and you’re confident in your overall design abilities, it’s time to open the doors wide and let gamers in. Your first step is to submit your site to search engines so that it can be indexed with them and people can find you. Pages are published to the World Wide Web by their domain owners or contributors, and just as easily, they can be changed or taken off the site. Thus a page may be there one week and gone the next. This makes the Web an evershifting environment. Humans can compile directories of web links that point to subjects of interest, but if these same people don’t check up on their links on a regular basis, they may quickly become dead ends. This is why we’ve
363
364
Chapter 14
■
Get the Word Out: Play This Game!
developed other methods for searching the Web for the content we want: search engines. A search engine is a program that searches the Web for specified keywords and phrases and returns a list of documents in which those keywords or phrases are found. Popular search engines include Google, MSN, Yahoo!, AOL, AltaVista, Dogpile, and Ask.com. A search engine is composed of three parts: a spider or crawler, which ‘‘crawls’’ through all the websites for keyword traces; an index of sites containing those keywords; and a search algorithm that makes it all happen. How the results are arranged and ranked varies by engine, although most try to put what they determine to be the most relevant and authentic results near the top of their list. What follows is a list of search engines to which you should consider submitting your site: ■
Bing—Visit www.bing.com/webmaster/SubmitSitePage.aspx to submit your URL.
■
Google—Visit www.google.com/addurl.html and follow the onscreen instructions.
■
Open Directory Project—A bunch of search engines use Dmoz.org for their search material, and you can submit to Dmoz.org, too. Go to www. dmoz.org/add.html and follow the onscreen instructions.
■
Yahoo!—Visit http://search.yahoo.com/info/submit.html and follow the onscreen instructions.
To learn more about search engine submission and the dos and don’ts, go to http://searchenginewatch.com/webmasters.
Use a Community Profile to Advertise Your Games Do you keep a blog or community profile, such as a MySpace or Facebook page? These are other reputable ways to get your games noticed. Most social networks over the Internet are open to the public and anyone can join, although each individual site has its own User Agreement, which may have specific rules or regulations joiners have to follow. Most of these networks are free to join, which is one of the reasons they’ve become so popular.
Publish on the Web
You don’t have to learn anything about HTML, and the blog or community service editors are nowhere near as complicated as Dreamweaver can appear. You don’t have to get a hosting server or domain name, which will save you money in the long run. The biggest downside is getting your content noticed by search engines in order to corral people to your work. Nonetheless, this is one viable way to start distributing your games online, and it doesn’t require you to pick up a programming language or pay for hosting services. I will briefly show you how to get started with MySpace and the Great Games Experiment, as those two communities can help you launch your games. Set Up a MySpace Account
With over 200,000 new accounts created each and every day and over 106 million users, MySpace is a large online community and a proven ground for sharing and experimentation. It could net you thousands of more players and friends. You are free to join as many online communities as you want and promote yourself and your games on any of them that allow it. If you’re some kind of Internet-savvy teenager, there’s a chance you already have a MySpace page and belong to most of the online communities. If this is the case, feel free to skip this section entirely. You can begin promoting yourself right away by placing on your site pages some images from your game, some Desktop goodies, and playing a short trailer. Then invite all your online friends to try your games out and spread the word through chat. If you’ve never considered a community account before and don’t even know what MySpace is, then you should read on. Go to www.myspace.com, and you should find yourself on a local MySpace site. Click the Sign Up button in the topright corner of the page and proceed to fill out the online form that appears. By default, your Profile page (mine is shown in Figure 14.3) will only publicly display your first name, age, and location, so don’t worry about your privacy at this time. You have to be 14 years or older to sign up for a MySpace account, however. MySpace has begun cracking down on underage account holders, so you might have to try Facebook or Friendster if you’re younger than 14. You need to have an active e-mail address or web mail account. Your MySpace password has to be at least six characters long and contain both letters and numbers. After you click on Sign Up at the end of filling out this form, you’ll be
365
366
Chapter 14
■
Get the Word Out: Play This Game!
Figure 14.3 My profile page at MySpace.com.
prompted to upload your first image, which will appear as your face on MySpace, unless you change it later. You can’t submit anything offensive or rude or the copyrighted work of others. In fact, as a game designer, you should use your personal photo, a company logo (if you have one), or some art from your game. You can only upload a JPG or GIF, and it must be smaller than 600 KB in file size. Next you’ll assign your MySpace URL or name (they’re the same thing). The URL, or uniform resource locator, is your profile’s address out there on the Web. Your URL at the start will begin (always) with http://www.myspace.com/ and will end in a ridiculous string of numbers. Click on the link and enter your desired moniker; it can be anything, as long as nobody else is using it, but keep in mind that it should be short and descriptive. You want people to associate you with the games that you build. For this, you’re going to have to make an online personality. Keep in mind the image you want to
Publish on the Web
portray and the gimmicks for your game that you’ve developed. To get started, click the Edit Profile option found in the list next to your image at the top of your Hello page. This opens the Profile Edit page. The page’s tab reveals the numerous sets of fields where you can add personal details. You want to balance searchability with privacy. In other words, you want people to find you, and you want them to know about the games you’ve made, but at the same time you don’t want them knowing too much about you because some people can’t be trusted. The most important field here is the one that says About Me. Tell the whole world who you are and what games you make, and you can write it however you like. You might want to pre-write this text copy in Microsoft Word first, spell-check it, or even run it by your friends or parents before you add it to your MySpace page. This will develop people’s first impression of you, so you want it to matter. Last but not least, under the Name tab, find Display Name and make sure your moniker here reflects who you are or what you do. You might want to blog, too. You could type entries online covering the development cycle you have going of upcoming games; this is known as keeping a development journal online. Or you could write updates of when a new game is coming out or post bug reports. Whatever you can think of to type for a blog, you can do it from your MySpace account. Enter your Blog Control Center and click on Customize Blog in the My Controls box. A page will come up with a long list of tabs and fields, each controlling different page elements and customizing the look of your blog. You can read more about the blog on www. myspaceblogr.com. To get started, log in to MySpace and click Blog on the MySpace navigation bar, then click Post New Blog within the My Controls panel on the left. Just like e-mail, blogs have two parts: a subject and a body. The subject is just like a headline, while the body’s where your real text should go. There’s a community in MySpace for games, although usually it’s for gamers looking for games. This is a great place to tap in and make friends. However, besides short Flash games and files with relatively short file sizes, you cannot upload your Torque games to MySpace. You’ll have to get your file hosted somewhere else, and then post a link to your game downloads in your blog or directly on your Profile page (and anywhere else you want to, as well).
367
368
Chapter 14
■
Get the Word Out: Play This Game!
The following are some places you can host your files: ■
4Shared.com (www.4shared.com)
■
WikiUpload (www.wikiupload.com)
Set Up a GGE Account
The Great Games Experiment, or GGE, hosted by the same folks at GarageGames, is an online community whose sole purpose is for gamers to find games and game developers to share their games and game design advice; so GGE (see Figure 14.4) is one community you can join to promote your games to the world. You can find it online at www.greatgamesexperiment.com. When you first load the homepage of GGE (as seen in Figure 14.4), you should see a link in the top-right corner that says Create Account. Click it to go to the
Figure 14.4 The Great Games Experiment.
What’s Next?
free account creation page, where you will give them a real email address to reach you at and an activation message will be automatically sent to the email address that you provided. The activation message can take up to 10 minutes to reach your email inbox. When you find it, follow the activation link to finish setting up your account. Under your account setup, you can choose to be a Gamer or a Developer; because you’re trying to get people to play your games, you should choose Developer. You will be given different options as a Developer, including Developer Skills that you rank from Novice to Advanced. Come up with a short description of your game creation company, an avatar that befits your game vision, and a Gamer Tag. The Gamer Tag is similar to a domain name, as it will help gamers find you on GGE. GGE also offers a specialized coding scheme for your text field inputs, called GGE code. You can view a short list of GGE code formatting by clicking the GGE code button above the input field under Describe Yourself. Once you have a GGE account created, you can use it to advertise your games, share trailers for it, have people download demos, and network with both gamers and other developers.
What’s Next? The sky’s the limit! You now have the beginnings of becoming a great game designer. You know what to do, but especially what not to do. You know how to put together a first-person or third-person video game using Torque 3D. You know how to let the world know you and that your games exist and how to find players for your games. The next step is up to you. Are you going to sit on the couch and play games? Or are you ready to take it to the next level and sit in front of your computer and make awesome games all your own? You have to make that decision. What’s it going to be?
369
This page intentionally left blank
INDEX Numerics 2D flat-line drawing, 167 2D image editor, 91 2D sound, 300 3D artwork, 166--167 edge/segment, 168 history of, 170--171 low-poly modeling, 168 polygon, 169 sound, 301 triangle/face, 169 vertex/point, 168 virtual 3D space, 168 3D Game Programming All In One, 2nd Edition (Finney), 328 3D model program, 91--92 3D Monster Maze, 170 3D Training Institute, 350 3DM3 website, 258 3DRT website, 169, 258 4FOGGD (Four Fs of Great Game Design) fairness, 36 feasibility, 37--38 feedback, 36--37 fun, 34--35 8-bit sprite image, 170 110 MB web host, 360
A A class bug, 336 Academy of Art University, 350 Ace of Aces, 52 Academy of Game Entertainment Technology, The, 350 Acoustica sound library, 296 action games, 38--39
Activisino, 2 Adams, Ernest (Andrew Rollings and Ernest Adams on Game Design), 71 addictive game play, 22 add-on tools, 62 Adobe Dreamweaver, 362 Photoshop, 91 Soundbooth, 292 Adobe Dreamweaver CS5 Revealed (Bishop), 362 ADs (AudioDescriptions), 301--302 Advance Wars, 266 adventure games, 40 Adventure Kit (TGB), 55 Age of Empires, 33 Age of Time, 52 AI (artificial intelligence), 223 Alchemist, 56 algorithm, 313--315 All tab (Control Palette), 274 ambient color, 140--141 American Sentinel University, 350 ammo, 327 amplify effect, 298 amplitude, 288 And Yet It Moves, 56 Andrew Rollings and Ernest Adams on Game Design (Rollings and Adams), 71 animated blood violence rating, 28 animatic storyboard, 11 animation back sequence, 252 celsalute sequence, 252 celwave sequence, 252 character, 226 death1 to death11 sequence, 252 embedded, 251--252 fall sequence, 252
371
372
Index framed, 251 jump sequence, 252 land sequence, 252 look sequence, 252 loop, 251 object, 257--258 root sequence, 252 run sequence, 251--252 scoutroot sequence, 252 sitting sequence, 252 standjump sequence, 252 strafe sequence, 252 walk sequence, 252 /.app file type, 93 appearance, character, 224--225 APs (AudioProfiles), 302 archetype, 218 ArchMage, 56 arms and legs, 240--241 Art Institute, The, 350 artificial intelligence (AI), 223 artificial life games, 42 artist roles and responsibilities, 3--4 salary, 4 Artist 3D website, 258 Artist Launch sound library, 296 artwork 3D, 166--167 gameplay and artistry debate, 166 importance of, 166--167 Asheron’s Call, 41 asset production, 79--80 Astro Bugz, 56 AstroRaider, 56 AtSpace web host, 360 Attack of the Creeps, 56 Attack of the Dust Bunnies, 56 attainable objectives, 71 Audacity program cost, 292 editing in, 297--299 effects, 298--299 exporting audio from, 299 recording in, 296--297 audience, 72 audio. See sound Audio tab (World Editor), 114 AudioDescriptions (ADs), 301--302 AudioProfiles (APs), 302 Austin, Alex, 255 Avatar, 167, 172 Avellone, Chris, 121
Aviary website, 91 Azimuth property, 140--141
B B class bug, 336 back animation sequence, 252 backdrop, 124 backfacing, 236 Baldur’s Gate 2, 267--268 Balloon Bliss, 56 Balls Away, 56 Barksdale, Karl (Web Design BASICS), 361 Base01 marker, 250 bass boost effect, 298 .bat file type, 92 Batman: Arkham Asylum, 47 BBEdit, 315 Be a King, 56 Beck, Thorolfur, 37 Bee Oh Bee, 56 Bejeweled, 32, 42 Bend Links tool, 247 beta testing, 11, 335 Bevel tool, 202, 236 Bikini Poker, 56 binary space partition (BSP), 166 Bing search engine, 364 BioShock, 32, 47 BioShock 2, 39, 47 Biped rig, 242--247 Bishop, Sherry (Adobe Dreamweaver CS5 Revealed), 362 Blank template, 107 blank terrain, 128--129, 132--133 Blender basic description of, 174 download, 91 installation, 174 website, 174 Blizzard Entertainment, 330 Blockland, 52 blood and gore violence rating, 28 Blood locks, 31 blood violence rating, 28 BlueHost web host, 360 board games, 15 Body Horizontal tool, 247 Body Rotation tool, 247 Body Vertical tool, 247 bones rig, 245 boolean variables, 313 Boot Wars, 56
Index Borderlands, 47 boredom, 35 bouncing boulder, 323--325 bounding box collision detection, 190--192, 195--196 for player character, 250 Box Macabre, 60 box modeling, 182--183 brainstorming, 13--14 brick texture, 157--159 Bridge Builder, 255 brightness, 143, 145 brush pressure, 134--135 red-to-green squares, 135 shape, 135 size, 134--135 softness, 134--135 toggling between, 134 Brutal Legend, 23 BSP (binary space partition), 166 Bubble Warrior, 56 Buccaneer, 52 bug testing, 336, 338--339 Buggle, 56 BuggOut, 56 built-in change, 34 Bulkley, Brad (Neversoft lead programmer), 6 Bullet Witch, 35, 266 Bumble Tales, 56 bump map, 188--189 button Clean-Up, 98 Continue Using Demo, 102 Edit Source, 98 Exit this Demo, 103 GUI Editor, 98 New Project, 106 Open Folder, 98 Package Project, 98 Play Game, 98--99 Play in Web, 98 shortcut, 97--98 Torsion, 98 Byet Internet Services web host, 360
C C class bug, 336 C# game engine, 59 C++ programing language, 311 C++ scripting language, 61 Cakewalk (SONAR), 292 calculated risk chance, 34
Call of Duty: Modern Warfare 2, 329 Cam marker, 250 Camera, 140 car, 326 card games, 42 Caribbean Hideaway, 56 Carroll, Tom, 6 Cartesian coordinate system, 118 cartoon violence rating, 28 cascading style sheet (CSS), 363 case-sensitivity, 312 casual games, 42 Categorized tab (Control Palette), 274 cathartic release, 23 .c/.cpp file type, 92 CD Baby sound library, 296 celsalute animation sequence, 252 celwave animation sequence, 252 Centipede, 260 Cerny, Mark, 38 CG (computer graphics), 172 challenge gates, 30--31 mazes, 31 monsters, 31 player interactivity, 30--32 puzzles, 32 quests, 31--32 traps, 31 Chamfer tool, 237--238 chance built-in, 34 calculated risk, 34 opponent error, 34 player error, 34 player interaction, 33--34 system error, 34 change pitch effect, 298 change speed effect, 298 change tempo effect, 298 character sheet, 219 Character Studio package, 244 characters AI (artificial intelligence), 223 animation, 226 appearance, 224--225 archetype, 218 arms and legs, 240--241 asset production, 80 back animation sequence, 252 Base01 marker, 250 Biped rig, 242--247 bones rig, 245 bounding box, 250
373
374
Index Cam marker, 250 celsalute animation sequence, 252 celwave animation sequence, 252 color scheme consistency, 225 costume, 225 cultural icons, 217 death1 to death11 animation sequence, 252 description, 223--225 detail marker, 249--250 ear, 235--236 embedded animation, 251--252 emotioneering, 220--221 enemies, 222--223 export, 253--254 Eye marker, 250 fall animation sequence, 252 first impressions of, 225 as gimmick, 356 habitual stances, 225 head model, 232--238 hero archetype, 218 heroic, 224 idiosyncrasy, 221 jump animation sequence, 252 land animation sequence, 252 legendary, 218 Leonardo Vitruvian Man model, 229--230 limbs model, 239--241 lips, 237--238 LOD (levels of detail), 248--249 look animation sequence, 252 materials, 241--242 memorable, 217, 219 model sheet, 224--225 Mount0 marker, 250 mouth, 238 nose, 238 NPCs (non-player characters), 222 old-school approach to creating, 220 personality, 218--221 player, 222 root animation sequence, 252 run animation sequence, 252 scoutroot animation sequence, 252 sitting animation sequence, 252 skeletal rig, 243--244 Skeletons Swarm model pack, 219 sketch, 224--225 Skin modifier, 247--248 standjump animation sequence, 252 Start01 marker, 250 strafe animation sequence, 252 template, 228--231
text description, 223 torso, 238--239 traits, 219 Traits Triangle (Freeman), 220--221 types, 221--223 Victorian era, 225 villain, 218--219 walk animation sequence, 252 XForm, 244 cheat code, 337 chess, 42 Chronic Logic LLC, 255--257 City of Heroes, 267 classes, 313 Clean-Up button, 98 Clear Terrain tool, 137 client, 331 climate, 80 clone, 196 clouds basic, 146 height, 149 layers, 146--147 texScale property, 147, 149 texture, 147, 149 CMS (construction-management simulations), 42 Codeweaver, 63, 92 COLLADA (Collaborative Design Activity), 92, 165--166 college, 349--350 Collins College, 350 collision detection bounding boxes, 190--192, 195--196 defined, 190 naming conventions, 196--197 color ambient, 140--141 consistent use of, 225 Sun object, 140--141 water, 150 .command file type, 92 command panel, Max Create subpanel, 178--179 description of, 177 Display subpanel, 180 Hierarchy subpanel, 180 Modify subpanel, 179 Motion subpanel, 180 Utility subpanel, 180 comments, 96--97, 106, 312 Common tab (Control Palette), 273 communication, player interaction, 18 community profile, 364--365, 367--369
Index competition player interactivity, 33 player motivation, 23 compression, 295 computer graphics (CG), 172 computer lag, 118 computer memory, 118 Conan, 217 concept creation, 8--9 concept finalization, 9--10 concept statement, 70--71 condenser microphone, 293 conditional statements, 314 conflict ‘‘life points,’’, 28 player interactivity, 27--30 in storytelling, 27 suspence-building, 27 tension, 28 violence, 28--30 Conker’s Bad Fur Day, 19 connection, network, 331--332 console game development, 58--59, 345--346 console.log file type, 92 construction-management simulations (CMS), 42 constructive space geometry (CSG), 166 content, project scope, 73 Continue Using Demo button, 102 control, GUI Editor, 270 Control Palette (GUI Editor), 273--274 Controls tab, 114 coordinate system, 118 cost employee, 79 equipment, 79 game creation, 2 GMK (Game Mechanics Kit), 63 overhead, 79 Plastic Tweaker, 62 talents and licensing, 79 Torque 3D, 54 Torsion, 62 Universal AI Starter Kit, 63 work breakdown, 79 costume, character, 225 .c/.cpp file type, 92 crate creation bounding box, 190--192 bump map, 188--189 measurements, 184--185 specular map, 189--190 texture, 186--188
Crawford, Chris, 27 Create subpanel, 178--179 Creating Game Art for 3D Engines (Strong), 175 creative expression, 24 creativity, 13 Croft, Laura, 347 Crunch Time, 56 .cs file type, 92 CSG (constructive space geometry), 166 CSS (cascading style sheet), 363 cultural icon characters, 217 curiosity, depth of immersion, 22 cut-scene, 10
D D class bug, 336 .dae (digital asset exchange) file extension, 165--166 Dance Revolution, 24 Daniel Webster College, 350 Dark Age of Camelot, 330 Dark Horizons, 52 Darth Vader, 217 database, 82 datablocks, 313 DCC (digital content creation) applications, 165 Dead Rising, 267 death1 to death11 animation sequence, 252 Decal Editor, 61 Def Jam, 24 Defend and Defeat: Kingdoms, 56 Defender Dib, 57 Deltoid, 57 Demo 2009 Tools Demo 1.01, 90 demo user screen, 99 demographics, audience, 72 Demos section (Torque Toolbox), 95 Density of Zorro, 59 depressed terrain, 137 description, character, 223--225 Desert Gunner, 52 design team, 2 designer. See game designer Designing the User Interface: Strategies for Effective Human-Computer Interaction, 262 detail marker, 249--250 Determinance, 74 Deus Ex: The Invisible War, 29 development software, 82 Devil May Cry, 266 DeVry University, 350
375
376
Index Diablo, 265--266, 347 dialogue trees, 42 DIF (Dynamix Interior File), 166 DigiPen Institute of Technology, 350 digital content creation (DCC) applications, 165 Digital Media Arts College, 350 digital sound, 294 Digital Subscriber Line (DSL), 358 Dimenxian, 52 DirectX SDK, 90--91 dirt, 155 Display subpanel, 180 display, technical specs, 82 .dll file type, 93 .dml file type, 93 Doctor Who, 217 Documentation tab, 95 Dolby surround sound, 286, 288--289 Donkey Kong Country, 344, 347 door, 202--204 Doppler effect, 288 Dot5Hosting web host, 360 dots per inch (dpi), 361 download 2D image editor, 91 3D modeling program, 91--92 Adobe Photoshop, 91 Blender, 91 Codeweaver, 92 COLLADA, 92 DirectX SDK, 90--91 DTS, 92 GIMP, 91 Max, 91 Maya, 91 MilkShape, 91 Phoenix, 91 Plastic Tweaker, 92 script editor, 92 Torison, 92 Torque 3D, 89--90 Universal AI Starter Kit, 92 dpi (dots per inch), 361 Dragon Hatchery, 57 Dreamlords, 53, 127 Dreamweaver (Adobe), 362 Drums Challenge, 57 DSL (Digital Subscriber Line), 358 .dso file type, 93 .dsq file type, 93 DTS (Dynamix Three Space) basic description of, 165 download, 92 Exporter Utility, 192--194, 197
exporting to, 214--215 models designed for, 173 widely used modeling packages for creating, 173--174 .dts file type, 93 Duke Nukem 3D, 171 dump file, 194 Dungeon Keeper, 24 Dungeon Siege, 265 Dungeons and Dragons, 19, 31, 41, 219, 329 Dynamic company, 45--46 dynamic microphone, 292 Dynamix Interior File (DIF), 166 Dynamix Three Space. See DTS
E ear, 235--236 Earthsiege, 45 echo command, 313 echo effect, 298 Ecko, Marc, 25--26 Edged Faces, 200 edge/segment, 168 Edit Source button, 98 editable poly versus editable mesh, 183 editing, in Audacity, 297--299 editor. See also World Editor 2D image editor, 91 Decal, 61 Material, 61 Particle, 61 River/Road, 61 Shape, 61 Terrain, 61 World Editor toolset, 60--61 Editor Settings preferences, 114 education, 349--350 effects, sound, 298--299 Electronic Arts, 2 Elevation property, 140--141 Emagination Game Design, 350 embed, 194--195 embedded animation, 251--252 emergent gameplay, 263--264 Emmert, Jack, 329--330 emotion, player interactivity, 24--27 emotioneering, 25 emotioneering (Freeman), 220 empathy, depth of immersion, 23 employee cost estimation, 79 empowerment, player interactivity, 21 Empty Terrain, 316--318 Enchanted Gardens, 57
Index ending algorithm, 312 ending statement, 312 end-users license agreement (EULA), 54 enemy characters, 222--223, 356 Entertainment Software Rating Board (ESRB), 28 environment, 21 equalization effect, 298 equipment cost estimation, 79 escapism, 23 ESRB (Entertainment Software Rating Board), 28 EULA (end-users license agreement), 54 Evans, Malcolm, 170 EverQuest, 41, 330 Examples section (Torque Toolbox), 96 .exe file type, 93 Exit this Demo button, 103 EXOR Studio, 14 expansion, 12 export character, 253--254 to DTS, 214--215 shape, 197 Exporter Utility, DTS, 192--194, 197 Ex’pression College for Digital Arts, 350 extended primitives, 178 exterior space, 126--127 Extrude tool, 200, 202 Eye marker, 250
F Fable, 263 face, 183 Fade In/Out, 306 fade in/out effect, 299 fairness, 36 fall animation sequence, 252 Fallen Empire: Legions, 53, 123 fantasy violence rating, 28 feasibility, 37--38 feature creep, 37, 328 feature set back of game box examples, 78 as critical to understanding overall game direction, 76 space pirate adventure game example, 76--77 verbal statement example, 77 writing the, 76--78 feedback, 36--37 FFT Filter effect, 299 field of view (FOV ), 172 fighting games, 40 file transfer protocol (FTP), 363
Finney, Kenneth C. (3D Game Programming All In One, 2nd Edition), 328 firepower, 266--267 first generation games, 170--171 first impression, character, 225 first-person shooters (FPS), 39, 70 Fix-It-Up: Kate’s Adventure, 57 flat terrain, 129--131, 137 Flatten tool, 137 Florida Interactive Entertainment Academy, The, 350 Flower Stand Tycoon, 57 fog, 150--151 Foley sound, 287 foliage replicator, 160--161 Fortune Tiles, 57 Four Fs of Great Game Design (4FOGGD) fairness, 36 feasibility, 37--38 feedback, 36--37 fun, 34--35 FOV (field of view), 172 FPS (first-person shooters), 39, 70 framed animation, 251 Frankenstein method, 14 Freehostia web host, 360 Freeman, David, 25--26, 220--221 Freesound Project sound library, 296 frequency, sound, 288 Frogames website, 258 Frohnmayer, Mark, 51 Front view, Max, 176 Frozen Synapse, 74 FTP (file transfer protocol), 363 Full Sail Real World Education, 350 Full template, 107 Fullerton, Tracy, 38, 43 fun, 35 functions, 313 Fundamentals of Project Management (Lewis), 71 funding, 2
G gable, 204--206 gain, 288 Game Career Guide (Game Developer magazine), 3--5 game design document. See GDD game designer artist as, 3--4 leaders as, 4 personality, 2 programmer as, 3
377
378
Index roles and responsibilities of, 3--5 salary, 4--5 sound engineer as, 4 writer as, 4 Game Developer magazine, 3--5 game engine, 46, 48 game idea, 13--14 Game Institute, The, 350 game interface. See interface game loop, 32--33 Game Mechanics Kit (GMK), 63 Game Options preferences, 113--114 game outline Myst example, 84 questions to ask yourself, 68--69 Ravenscroft example, 82--83 game world, 79--80 gameplay designing for WOW Factor, 15--17 emergent, 263--264 gameplay versus graphics, 16--17 player interaction, 16 randomization, 16 Gamer Tag, 369 GarageGames development of, 45--46 Dylan Romero, 163--164 gates as game challenge, 30--31 pop-up messages as, 19 GDD (game design document) asset production, 79--80 contents of, 68 feature set, 76--78 game overview concept statement, 70--71 objectives, drafting, 71 project scope establishment, 73 target audience, defining the, 72 interface design, 80--81 sound design, 81 technical specs, 81--82 work breakdown, 78--79 generic terrain, 129--131 genre, 73 geographic, audience, 72 Getting Up; Contents Under Pressure, 25--26 GGE (Great Games Experiment), 8, 368--369 ghost manager, 332--333 Gideon character model, 101 Gideon handle, 114--115 .gif file type, 93 GIF (Graphics Interchange Format), 362 Gift, Tim, 45
gimmick, 356--357 GIMP (GNU Image Manipulation Program), 91 gizmo, 116--118 Glassner, Andrew, 32 Global Institute of Technology, 350 /.glsl file type, 93 GMK (Game Mechanics Kit), 63 GNU Image Manipulation Program (GIMP), 91 Gold Fever, 57 Golden Fairway, 53 Google search engine, 364 GPS, 348 Grab Terrain tool, 137 Grand Theft Auto, 14, 263 graphical user interface. See GUI graphics designing for WOW Factor, 16--17 gameplay versus, 16--17 state-of-the-art, 17 technological advancement, 16 Graphics Interchange Format (GIF), 362 Graphics tab (World Editor), 113 grass, 155--156 Great Games Experiment (GGE), 8, 368--369 Gremlins Model Pack, 169 Grimm’s Hatchery, 57 GSM cell phone, 347 GUI Editor control, 270 Control Palette, 273--274 GUI Resolution setting, 273 GUI View, 272 Inspector Panel, 271 interface, 270--271 major intent of, 269 menu bar, 271 New GUI setting, 273 parent controls, 274--275 toolbar, 271--273 Tree Panel, 271 GUI Editor button, 98 GUI (graphical user interface) firepower, 266--267 health bar indicator, 265 HUD (heads-up display), 265 inventory screen, 267 layout, 267--268 map or radar, 267 planning a, 269 player score, 265--266 Ravenscroft, 275--282 screen real estate, 267--268 widgets, 265
Index Guildhall at SMU, The, 350 Guitar Hero, 260 Gygax, Gary, 41
H .h file type, 93 habitual stances, character, 225 Hackers of 2073, 57 Hahn, Duane Alan, 36 Half-Real: Video Games Between Real Rules and Fictional Worlds (Juul), 31 Halo, 17 handle, Gideon, 114--115 Hardingham, Ian, 74--76 Harry Potter, 47 HCI (human-computer interface), 259 head model, 232--238 heads-up display (HUD), 265 health bar indicator, 265 health packs, 327 height cloud, 149 terrain, 137 hero archetype, 218 heroic characters, 224 Hertz, Heinrich, 287 Hertz (Hz), 288 Hierarchy subpanel, 180 Hinterland, 53 .hlsl file type, 93 Holmes, Marc Taro, 126 home page, 359 HopeLab, 24--25 Hospital Havoc, 57 hosting server, 359--360 HostMonster web host, 360 HostPapa web host, 360 Howard, Todd, 34 HTML (Hypertext Markup Language), 358, 362--363 HUD (heads-up display), 265 Huizinga, Johan (Huizinga’s Magic Circule), 15 human-computer interface (HCI), 259 hyper-real sound, 287 Hypertext Markup Language (HTML), 358, 362--363 Hz (Hertz), 288
I id Software, 171 iD Tech Camps, 350 identification, depth of immersion, 22
idiosyncrasies, character, 221 IGC (Indie Games Conference), 51 images, 361--362 immersion addictive game play and, 22 curiosity layer of, 22 empathy layer, 23 identification layer of, 22 interactivity, 17 player interactivity, 21--23 suspension of disbelief, 22 sympathy layer of, 22 transportation layer, 23 Indiana Jones, 217 indie game movement, 6--8 Indie Games Conference (IGC), 51 indie musician, 6 Indiespace sound library, 296 indoor space, 126--127 inheritance, 313 Input/Output (I/O), 261--262 Insanely Twisted Shadow Planet, 57 Inspector panel GUI Editor, 271 World Editor, 112, 119--120 installation Blender, 174 DTS exporter, 193 PhysX, 90 Torque 3D, 89--90 intense violence rating, 28 intensity, sound, 288 interactivity adding conflict, 27--30 competition, 33--34 emotional game play, 24--25, 27 game challenges, 30--32 game loop, 33 getting players motivated, 23--24 giving players choices, 19--20 giving players control, 17 immersing the player, 21--23 immersion, 17 making environments reactive, 21 teaching players to play, 18--19 interface. See also GUI emergent gameplay prediction, 263--264 game design document, 80 GUI Editor, 270--271 HCI (human-computer interface), 259 history of, 260--261 I/O (Input/Output), 261--262 player control, 261 principles, 262--263
379
380
Index project scope establishment, 73 Terrain Editor, 133--137 interior space, 126--127 International Academy of Design and Technology, 350 Internet, 82 inventory screen, 267 Invert effect, 299 I/O (Input/Output), 261--262 Ion Storm studio director (Warren Spector), 20 iPhone, 55, 347--348 iPod, 348 iterative development, 336--338 iTorque 2D, 58 ITT Technical Institute, 350 it-then/else statement, 314--315
J JavaScript language, 311 JPEG format, 361 .jpg file type, 93 jump animation sequence, 252 Jung, Carl, 218 Juul, Jesper (Half-Real: Vido Games Between Real Rules and Fictional Worlds), 31
K Kart Kit (TGB), 56 KB (kilobyte), 361 Kingdom Elemental, 256--257 King’s Quest series, 31, 40
L lag, 172, 309 LAN, 332 land. See terrain land animation sequence, 252 landmarks, 123 Larva Mortus, 57 layers, 146--147 Layers toolbar, 177 layout, GUI, 267--268 leader, 4 Left 4 Dead, 14 left bracket ([), 157 Left view, Max, 176 Legend of Zelda, 225 legendary characters, 218 LEGO: Bricktopia, 57 leitmotiv sound, 289--290 Leonardo Vitruvian Man character model, 229--230
level design, 122, 140 level designer do’s and don’ts, 124--125 roles and responsibilities of, 122 level of detail (LOD), 172, 248--249 levels as artistic choice, 123 as backdrop, 124 defined, 121 examples of, 122 fencing the player, 124 landmarks, 123 setting the pace of game flow, 124 as setting the stage, 122 teasing the player with, 124 Lewis, James (Fundamentals of Project Management), 71 library, sound, 296 Library tab (World Editor), 111--112 License to Thrill sound library, 296 licensing, 54, 79 ‘‘life points,’’, 28 lightening, 163 lighting asset production, 80 next-generation games, 64 limbs model, 239--241 lips, 237--238 Lloyd, Justin, 54 location gimmick, 356 lock mechanism, 30 LOD (level of detail), 172, 248--249 Logic Studio, 292 logo, 99, 102 loop animation, 251--252 loop sound, 305 Lore, 53 Lower Height tool, 137 low-poly modeling, 168 Luma Arcade, 343
M Magecraft, 53 main game menu, 99 Manson, Marilyn, 287 map or radar, 267 Marble Blast, 53 Mario 64, 126, 265 marketing, 12 Mass Effect, 47 Mass Effect Galaxy, 57 massive multiplayer online (MMO) game, 329--331
Index massive multiplayer online role-playing games (MMORPGs), 329 master server, 332 Material Editor, 61 Material Selector, 156 materials, 186--188, 212, 214, 241--242 Max 30-day trial version, 174 basic description of, 173 box modeling, 182--183 command panel Create subpanel, 178--179 description of, 177 Display subpanel, 180 Hierarchy subpanel, 180 Modify subpanel, 179 Motion subpanel, 180 Utility subpanel, 180 download, 91 Front view, 176 Layers toolbar, 177 Left view, 176 main interface window, 175 menu bar, 177 moving objects in, 182 orthographic view, 176 Perspective view, 176 Reactor toolbar, 177 resources for, 258 rotating objects in, 182 scaling objects in, 182 Select and Move tool, 182 Select and Rotate tool, 182 Select and Scale tool, 182 Select by Name tool, 180--182 Select Object tool, 180 selecting objects in, 180--182 toolbars, 177 Top view, 176 transform tools, 182 units of measurement setting, 184 View Cube, 202 viewport navigation tools, 176 viewport rendering, 177 viewport size, 176 welcome screen, 175--176 max distance, 306 May, Melv, 310 Maya, 91, 173 McWilliams, Jan, 269 measurable objectives, 71 Media Design School, 350 Media Tracks Free SFX sound library, 296 medieval-type village
corner column, 208--209 door, 202--204 gable, 204--206 house creation, 199--200 materials, 212, 214 roof, 211--212 wall extension, 209--211 windows, 206--207 memorable characters, 217, 219 memory, 118 menu bar GUI Editor, 271 Max, 177 Torque Toolbox, 95 World Editor, 111 mesh defined, 169 editable poly versus editable mesh, 183 skinned, 254 metric system, 183--184 microphone, 292--293 Microsoft design team funding, 2 Microsoft Expression tool, 362 Microsoft Word, 361 Microwarrior, 256 mieScattering property, 145 mild violence rating, 28 MilkShape 3D, 91, 174 Miller, Rand, 82, 84 Miller, Robyn, 82 Minigolf Mania, 53 Minions of Mirth, 51, 53 .mis file type, 93 Miyamoto, Shigeru, 70 MMO (massive multiplayer online) game, 329--331 MMORPGs (massive multiplayer online role-playing games), 329 mobile device games, 347--348 Mode 7 Games, 74--76 model, 167 model sheet, 224--225 Modifier List, 214 Modify subpanel, 179 monster, 31 Moon object, 145--146 Motion subpanel, 180 motivation competition, 23 creative expression, 24 getting the players motivated, 23--24 social interaction, 24 Mount0 marker, 250 mountainous terrain, 131
381
382
Index mouth, 238 Move tool, 130, 198 moving objects, 118, 182, 198 MP3 file, 295 MP3.com sound library, 296 multiplayer setup, 329--331 multiple-choice conversation, 42 music. See also sound My Projects folder, 106 Myna audio editor, 292 MySapce account, 365--368 Myst description and setting of, 85 game outline example, 84 game proposal, 85--88 history and gameplay of, 86 Map B. Stoneship Age of Myst map, 87 Map C. Mechanical Age of Myst map, 88
N name, new project, 106 naming conventions, collision detection, 196--197 natural appearance terrain, 137 network client, 331 connection, 331--332 server, 331--332 technical specs, 82 Neversoft, 6 Neverwinter Nights, 41 New Project button, 106 new project creation comments, 106 editing project thumbnail, 109--110 project name, 106 quick links, 108--109 template, 107 next-generation games, 63--64 Nichols, Ben, 255 Ninja Rally, 57 Nintendo, 2, 260 Nintendo, 64, 171 Nintendogs, 42 noise removal effect, 299 non-player characters (NPCs), 42, 222--223 normalize effect, 299 nose, 238 Notepad, 92, 315 Notepad++, 92 NPCs (non-player characters), 42, 222--223 NURBS curves, 179 NVIDIA website, 90
Nvu application, 362 nyquist prompt effect, 299
O object animation, 257--258 manipulation, 116--118 TorqueScript, 313 Object Properties dialog box, 233 objectives, how to draft, 71 objects asset production, 80 moving, 118, 182, 198 rotation, 118--119, 182 scaling, 182 selecting, 180--182 .ogg file type, 93, 295 Omidyar, Pam, 24 Once Upon A Time, 53 online games, 42 Open Directory Project search engine, 364 Open Folder button, 98 opponent error chance, 34 Orbit tool, 202 Orbz, 53 orthographic view, 176 outdoor space. See terrain overhead cost estimation, 79 Overman, Rick, 45
P Pacific Audio Visual Institute, 350 Package Project button, 98 packages, TorqueScript, 313 Pac-Man, 344 Paint Noise tool, 137--138 Pan tool, 202 Pan View tool, 234 parent controls, 274--275 Particle Editor, 61 PCD Music Lounge, 53 Penny Arcade Adventures, 53, 123--124, 127 personality, character, 218--221 Perspective view, Max, 176 Phantasia, 57 phaser effect, 299 Philosopher’s Stone, 47 Phoenix, 91 Photoshop (Adobe), 91 PHP for Teens (Sethi), 361 PhysX installation, 90 next-generation games, 64
Index pipeline, 48 Pirates of the Caribbean, 13 Pisciotta, Josiah, 255--256 pitch, 288, 305 Pitfall, 31 Plaisant, Catherine, 262 planning. See also game outline Plants vs. Zombies, 290 Plastic Games, 62 Plastic Tweaker, 62, 92 platform project scope establishment, 73 technical specs, 82 platform jumpers, 39 Platformer Kit (TGB), 56 play, 15 Play Game button, 98--99 Play in Web area, 103, 105 Play in Web button, 98 Player Camera, 139 player characters, 222 player control, 261 player error chance, 34 player interaction cathartic release, 23 communication, 18 game start briefing, 19 gameplay mechanics, 16 giving players choices, 19--20 giving players control, 18 teaching players to play, 18--19 training level, 19 wish fulfillment, 23 player mode, 73 player score, 265--266 PlayStation, 171 .png file type, 93 PNG (Portable Network Graphics), 362 point of view (POV), 73 Pokemon, 225 poker games, 42 polygon defined, 169 editable poly versus editable mesh, 183 polygon selection mode, 200 pop-up message, 19 Portable Network Graphics (PNG), 362 Portal, 290 Postal 2, 29 post-production process expansion, 12 marketing, 12 testing and QA, 10--11 posture, sound recording, 294
POV (point of view), 73 PR (public relations), 10 Prairie Games, Inc., 51 precipitation, 162 predictive sound, 289--290 preferences Editor Settings, 114 Game Options, 113--114 pre-production process concept creation, 8--9 concept finalization, 9--10 preparation, 10 pressure, brush, 134--135 pretend reality, 15 Prince of Persia, 327, 347 Principles of Web Design, 4th Edition (Sklar), 361 PrisonTale 2, 225 producer, 4 production process, 10 programmer, 3 programming languages, 309, 311 Project Information area comments, 96--97 contents of, 95 Project Levels list, 97 shortcut buttons, 97--98 thumbnail image, 96 Project Levels list, 97 project scope establishment, 73 Projects tab, 95 proposal, 353--355 prototype, 9--10 Psychonauts, 23 public relations (PR), 10 publishing self, 347--348 Web publishing capabilities, 65 pureLIGHT, 64 puzzle, 32, 42 Puzzle Poker, 57 Pythagoras (Greek mathematician), 287
Q Quake, 7, 171 quality assurance (Q/A), 5, 10--11 quest, 31--32 quick links, 108--109 Quick Links bar, 95
R racing games, 39, 70 Rack’em Up Road Trip, 57
383
384
Index radar or map, 267 rain, 162 Raise Height tool, 137 raised terrain, 137 RAM, 118 Ramos, Tony, 51 randomization, 16 rapid iterative development, 60 Ravenscroft game outline example, 82--83 GUI main menu background, 275--277 mission load screen, 282 score counter, 279--282 widgets, 278--279 Raycatcher, 57 rayleighScattering property, 145 Rayman Raving Rabbids, 347 reactive environment, 21 Reactor toolbar, 177 realistic objectives, 71 reality giving players choices, 20 pretend, 15 real-time strategy (RTS) games, 42, 70 reasonability, 20 recording in Audacity, 296--297 voice, 293--295 Red Steel, 47 red-to-green squares, brush, 135 reference distance, 306 Reiss, Randel, 51 Re-Mission, 24--25 rendering capability, 63--64 rendering lag, 172 renumber, 194--195 repeat effect, 299 repeat last effect, 298 replicator foliage, 160--161 shape, 161--162 Resident Evil, 287 resolution, 114, 273 resources, 258 Restore Terrain tool, 137 Restoring Rhonda, 57 Rev, 53, 343 reverse effect, 299 right bracket (]), 157 ripples and waves, 151 River Editor tool, 151--153 River/Rode Editor, 61 Road Editor, 159--160
roads, 159--160 Rock Band, 24, 260 rocks, 155 Rokkit Ball, 53 Rollings, Andrew (Andrew Rollings and Ernest Adams on Game Design), 71 Romero, Dylan, 163--164 roof, 211--212 root animation sequence, 252 root directory, 96 rotation, 118--119, 182 RPGs (role-playing games) basic description of, 41--42 concept statement, 71 tabletop, 19 RTS (real-time strategy) games, 42, 70 run animation, 251--252
S Sachi’s Quest, 53 salary, 4--5 sale of video games, 1--2 Sample Slots (Slate Material Editor), 186 Sanford-Brown College-St. Charles, 350 Saunders, Kevin, 262 Saw, 31 scale, 80 Scale Point tool, 159 Scale tool, 119, 197 scaling objects, 182 Scatter Sky object brightness, 143, 145 mieScattering property, 145 Moon object, 145--146 rayleighScattering property, 145 Sun object, 145 ‘‘scattersky’’ system, 64 Scene tab (World Editor), 111 scene view, 111 Schneiderman, Ben, 262 school, 349--350 School of Communicating Arts, The, 350 scope establishment, 73 score, 265--266, 318--323 score counter, 279--282 scoutroot animation sequence, 252 screen real estate, 267--268 screen resolution, 114, 273 screenshot, 110 script editor, 92, 315 scrubbing, 227 SDK (software development kit), 50
Index search engine, 363--364 second generation games, 171 security, 82 See-Through option (Object Properties dialog box), 233 SEGA Genesis, 171 Select and Move tool, 182 Select and Rotate tool, 182 Select and Scale tool, 182 Select by Name tool, 180--182 Select Object tool, 180, 234 selection, object, 180--182 self-promotion community profiling, 364--369 gimmicks as, 356--357 proposal development, 353--355 through GGE, 368--369 through MySpace, 365--368 tooting your own horn, 355 web publishing, 357--358 website, 360--364 self-publishing, 347--350 Seneca College’s Animation Arts Centre, 350 serious game, 42 server, 82, 331--332, 359--360 Set Height tool, 137 Sethi, Maneesh PHP for Teens, 361 Web Design for Teens, 361 SFX Library, 296 shaders, 64 Shanhope, Philip Dormer, 217 shape brush, 135 door, 202 exporting, 197 moving, 198 renumber and embed, 194--195 size, 197 window, 207 Shape Editor, 61 shape replicator, 161--162 Shelled!, 53 Sherlock Holmes, 217 Shokrok Throwdown, 53 shortcut buttons, 97--98 Sickhead Games, 62 Silent Hill: Origins, 31 Silent Hill: The Room, 22 silver planes, 183 sims games, 71 Sinclair ZX81 home system, 170 site. See website sitting animation sequence, 252
size brush, 134--135 shape, 197 skeletal rig, 243--244 Skeletons Swarm model pack, 219 sketch, character, 224--225 Skin modifier, 247--248 skinned mesh, 254 Sklar, Joel (Principles of Web Design, 4th Edition), 361 Sky Box object, 142--143 Slate Material Editor, 186 Slye, Damon, 45 SMART methodology, 71 Smith, Tom (Disney Mobile Senior Producer), 18 Smooth þ Highlights, 200 smooth terrain, 137 Smooth tool, 137 social interaction, 24 softness, brush, 134--135 software development kit (SDK), 50 software, technical specs, 82 sonik, 292 Sony PlayStation, 171 sound. See also Audacity program 2D, 300 3D, 301 ADs (AudioDescriptions), 301--302 amplitude, 288 APs (AudioProfiles), 302 auditory signal, 285 compressed files, 295 digital, 294 Dolby surround sound, 286, 288--289 Doppler effect, 288 effects, 298--299 Fade In/Out, 306 Foley, 287 frequency, 288 fundamentals of, 287--288 gain, 288 game design document, 81 hyper-real, 287 influencing factors of, 288--291 intensity, 288 leitmotiv, 289--290 library, 296 loop, 305 max distance, 306 moving industry history of, 286 MP3 file, 295 ‘‘near,’’, 288 Ogg Vorbis file, 295 outside events as factors influencing, 290--291
385
386
Index pitch, 288, 305 pops and clicks, 298 predictive, 289--290 reference distance, 306 sound emitter, 304--307 space as influencing factor of, 288--289 stream, 305 timbre, 288 time as influencing factor of, 289 in TV and film, 285--286 vibration waves, 287 volume, 288, 305 WAV files, 295 sound engineer, 4 Sound Forge Audio Studio, 292 sound perspective, 288--289 sound studio microphone, 292--293 sound editing software programs, 291--292 sound recording, 293--295 soundproofing, 291 Soundbooth (Adobe), 292 SoundClick sound library, 296 Space Invaders, 344 specific objectives, 71 Spector, Warren, 20, 29 specular map, 189--190 splines, 179 SpongeBob SquarePants, 217 Spore, 24 sports games, 39--40 sprite, 344 Spriters Resource website, 344 standard primitives, 178 standjump animation sequence, 252 Star Wars, 287 Starsiege, 45 Start01 marker, 250 StartLogic web host, 360 statement termination, 311 state-of-the-art graphics, 17 static lighting, 63 stealth games, 40 stick-figure games, 17 Stonewashed SFX sound library, 296 story, as cause equaling effect, 17 storyboard, 10--11 strafe animation sequence, 252 strategy games, 42 stray vertices, 183 stream sound, 305 strings, 313 Strong, Brad (Creating Game Art for 3D Engines), 175
Stubbes, Todd (Web Design BASICS), 361 style, project scope establishment, 73 Sun object Azimuth property, 140--141 color and ambient color, 140--141 Elevation property, 140--141 Scatter Sky object, 145 Super Mario Bros., 38, 225, 344, 347 Super Nintendo, 171 surface, 169 Sushi Frenzi, 57 suspense-building conflict, 27 suspension of disbelief, 22 SVN (subversion), 96--97 sympathy, 22 syntax, 311--312 system error chance, 34
T T for Wii, 58 T junctions, 183 tabletop RPGs, 19 target audience, 72 task determination, 78 Taylor, Paul, 74--76 TBS (turn-based strategy) games, 42 technical specs, 81--82 technological advancement, 16 technology, project scope establishment, 73 template Blank, 107 character creation, 228--231 Full, 107 new project creation, 107 tempo, 298 tension, 28 .ter file type, 93 terrain blank, 128--129, 132--133 defined, 126 depressed, 137 dirt, 155 flat, 129--131 flattened, 137 generic, 129--131 grass, 155--156 height, 137 mountainous, 131 moving section up/down, 137 natural appearance, 137 raised, 137 removing, 137 replicator, 160--162
Index restoring, 137 roads, 159--160 rocks, 155 smooth, 137 textures, 157--159 weather effects, 162--163 Terrain Editor brush options, 134--135 clouds, 146--149 description of, 61 interface, 133--137 Paint Noise tool, 138 Scatter Sky object, 143--145 Sky Box object, 142--143 Sun object, 140--142 Tool Palette, 135--137 Terrain Painter, 155--156 TerrainBlock, 128--129 testing beta, 11, 335 bug reports, 336 having others test for you, 337--338 level design, 140 post-production process, 10--11 test as you build, 337 tester salary myth, 5 Tetris, 32, 42, 221 texScale property, 147, 149 text description, character creation, 223--224 texture brick, 157--159 cloud, 147, 149 crate creation example, 187--188 materials, 186 wood, 187--188 texture map, 186 TGB (Torque Game Builder) features, 55 games made with, 342--345 published games by, 56--58 TGE (Torque Game Engine), 45 theme, asset production, 80 therapy, player motivation, 24 Thief: Deadly Shadows, 29, 263--264 ThinkTanks, 53 third generation games, 171 third-person shooters, 39 thumbnail image, 96, 109--110 timbre, 288 time interval, project scope establishment, 73 time-limited objectives, 71 timeline estimation, work breakdown, 78--79 Toki Arcade Remix, 58 Tomb Raider, 347
Tool Palette Terrain Editor, 135--137 World Editor, 111 toolbar GUI Editor, 271--273 Max, 177 Toolbox Demos section, 95 description of, 61 Documentation tab, 95 Examples section, 96 key features, 94--95 menu bar, 95 New Project button, 106 Project Information area comments, 96--97 Play Game button, 99 Play in Web area, 103, 105 Project Levels list, 97 shortcut buttons, 97--98 thumbnail image, 96 Projects tab, 95 Quick Links bar, 95 tools bar, World Editor, 111--113 Top 10 Commercial Engines, 51 Top view, Max, 176 .torison file type, 93 Torque 2D features, 55 games made with, 342--345 published games by, 56--58 Torque 3D components, 60--64 cost, 54 Demo 2009 Tools Demo 1.01, 90 documentation site, 50 download, 89--90 features, 48--50 games made with, 51--53, 341--342 installation, 89--90 licensing, 54 logo, 99, 102 as most comprehensive game engine, 45 Torque 3D Professional, 54 Torque, 360, 58 Torque Game Builder (TGB) features, 55 published games by, 56--58 Torque Game Engine (TGE), 45 Torque Toolbox. See Toolbox Torque X, 59 TorqueScript add-on tools, 62--63 bouncing boulder, 323--325
387
388
Index commenting, 312 default car, 326 description of, 310 Empty Terrain details, 316--318 features of, 312--313 health packs and ammo, 327 score items, 318--323 script editor, 315 syntax, 311--312 Torsion basic description of, 62 button, 98 cost, 62 download, 92 torso model, 238--239 traditional card game, 15 training level, 19 traits, character, 219 Traits Triangle (Freeman), 220--221 Transform section (World Editor), 119 transform tools, Max, 182 translating objects, 118 transportation, depth of immersion, 23 trap, 31 travel, 80 Tree Panel (GUI Editor), 271 triangle/face, 169 Tribes, 45, 51 Tribes 2, 45, 51, 310 Trick Bal, 58 Tripod web host, 360 TubeTwist, 53 Tunnel, Jeff, 8, 45 TurboSquid website, 258 turn around, 224 turn-based strategy (TBS) games, 42 Turok, 47 Turtix, 58 TV sound, 285--286 Twintale Entertainment, 13 Twisted Jenius, 63
U Ubiq Visual, 327 .uft file type, 93 Ultimate Duck Hunting, 53 Uniform Scale tool, 235 units of measurement, 183--184 Universal AI Starter Kit basic description of, 63 cost, 63 download, 92 University of Advancing Technology, 350
Unreal, 7 Unreal Engine, 47 Unreal series, 47 Unwrap UVM Modifier, 214 Utility subpanel, 180
V Vampire: Bloodlines, 47 Vancouver Institute for Media Arts, 350 variables, 313 vehicle, 326 verbal statement, 77 vertex/point, 168 Victorian era characters, 225 View Cube, 202 viewport, Max, 176 villain characters, 218--219 violence animated blood rating, 28 blood and gore rating, 28 blood rating, 28 cartoon rating, 28 ESRB rating, 28 fantasy rating, 28 intense rating, 28 mild rating, 28 virtual 3D space, 168 virtual world. See also environment voice recording, 293--295 volume, sound, 288, 305
W wahwah effect, 299 Wainess, Richard, 259 walk animation sequence, 252 wall, 209--211 Wal-Mart, 331 water color, 150 fog, 150--151 river, 151--153 water block, 149--150 waves and ripples, 151 Water Plane tool, 153, 155 WAV file, 295 .wav file type, 93 WavePad Audio Editor, 292 waves and ripples, 151 weapons firepower, 266--267 as gimmick, 356 weather effects, 162--163
Index web browser, 359 Web Design BASICS (Stubbs and Barksdale), 361 Web Design For Teens (Sethi), 361 web host, 360 web page, 359 Web publishing capabilities, 65 Webs web host, 360 website 3DM3, 258 3DRT, 169, 258 Artist 3D, 258 Aviary, 91 Blender, 174 building your own, 360--364 defined, 359 Frogames, 258 Microsoft Expression site creation tool, 362 NVIDIA, 90 search engine, 363--364 Spriters Resource, 344 text choices, 361 TurboSquid, 258 WWW supported images, 361--362 XNA Game Studio, 60 weeds, 161 welcome screen, Max, 175--176 weld, 236 Westwood College of Technology, 350 Westwood Online College, 350 widgets, 265, 278--279 Wii, 55, 58, 347 WiiMote, 260 Wildlife Tycoon: Venture Africa, 53 Window/Crossing button, 209, 234 windows medieval-type village, 206--207 shape, 207 wireless technology, 358 wish fulfillment, 23 Wixon, Dennis, 33 Wolfenstein, 171 wood texture, 187--188 word-processing program, 361 work breakdown cost estimation, 79 task determination, 78 timeline estimation, 78--79 World Camera, 139 World Editor Audio tab, 114 blank terrain, 128--129, 132--133
button, 98 components, 61 Controls tab, 114 Editor Settings preferences, 114 flat terrain, 129--131 Game Options preferences, 113--114 Gideon handle, 114--115 Graphics tab, 113 Inspector panel, 112, 119--120 Library tab, 111--112 menu bar, 111 mountainous terrain, 131 object manipulation, with gizmos, 116--118 opening, 111, 128 rapid iterative development, 60 Scale tool, 119 Scene tab, 111 scene view, 111 TerrainBlock, 128--129 Tool Palette, 111 tools bar, 111--113 Transform section, 119 World of WarCraft, 14, 41, 330 WOW Factor, 14 writer, 4 WWW (World Wide Web), 358 WYSIWYG editor system, 269, 362
X Xbox, 360, 55, 346--347 Xbox LIVE Arcade, 58, 346 Xcode, 92 XForm, 244 XNA Creators Club, 59--60, 347 XNA Game Studio, 59--60
Y Yahoo! search engine, 364 Yard Sale Junkie, 58
Z Zelda, 327, 347 zero-sum, 33 Zombie Driver, 14 Zombieland, 221 Zoom tool, 202 Zork, 40, 345
389
This page intentionally left blank
License Agreement/Notice of Limited Warranty By opening the sealed disc container in this book, you agree to the following terms and conditions. If, upon reading the following license agreement and notice of limited warranty, you cannot agree to the terms and conditions set forth, return the unused book with unopened disc to the place where you purchased it for a refund.
License: The enclosed software is copyrighted by the copyright holder(s) indicated on the software disc. You are licensed to copy the software onto a single computer for use by a single user and to a backup disc. You may not reproduce, make copies, or distribute copies or rent or lease the software in whole or in part, except with written permission of the copyright holder(s). You may transfer the enclosed disc only together with this license, and only if you destroy all other copies of the software and the transferee agrees to the terms of the license. You may not decompile, reverse assemble, or reverse engineer the software.
Notice of Limited Warranty: The enclosed disc is warranted by Course Technology to be free of physical defects in materials and workmanship for a period of sixty (60) days from end user’s purchase of the book/ disc combination. During the sixty-day term of the limited warranty, Course Technology will provide a replacement disc upon the return of a defective disc.
Limited Liability: THE SOLE REMEDY FOR BREACH OF THIS LIMITED WARRANTY SHALL CONSIST ENTIRELY OF REPLACEMENT OF THE DEFECTIVE DISC. IN NO EVENT SHALL COURSE TECHNOLOGY OR THE AUTHOR BE LIABLE FOR ANY OTHER DAMAGES, INCLUDING LOSS OR CORRUPTION OF DATA, CHANGES IN THE FUNCTIONAL CHARACTERISTICS OF THE HARDWARE OR OPERATING SYSTEM, DELETERIOUS INTERACTION WITH OTHER SOFTWARE, OR ANY OTHER SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES THAT MAY ARISE, EVEN IF COURSE TECHNOLOGY AND/OR THE AUTHOR HAS PREVIOUSLY BEEN NOTIFIED THAT THE POSSIBILITY OF SUCH DAMAGES EXISTS.
Disclaimer of Warranties: COURSE TECHNOLOGY AND THE AUTHOR SPECIFICALLY DISCLAIM ANY AND ALL OTHER WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, SUITABILITY TO A PARTICULAR TASK OR PURPOSE, OR FREEDOM FROM ERRORS. SOME STATES DO NOT ALLOW FOR EXCLUSION OF IMPLIED WARRANTIES OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THESE LIMITATIONS MIGHT NOT APPLY TO YOU.
Other: This Agreement is governed by the laws of the State of Massachusetts without regard to choice of law principles. The United Convention of Contracts for the International Sale of Goods is specifically disclaimed. This Agreement constitutes the entire agreement between you and Course Technology regarding use of the software.