Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Torque 3D Game Development Cookbook

You're reading from   Torque 3D Game Development Cookbook Over 80 practical recipes and hidden gems for getting the most out of the Torque 3D game engine

Arrow left icon
Product type Paperback
Published in Jan 2013
Publisher Packt
ISBN-13 9781849693547
Length 380 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
DAVID WYAND DAVID WYAND
Author Profile Icon DAVID WYAND
DAVID WYAND
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Torque 3D Game Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. TorqueScript: The Only Script You Need to Know 2. Working with Your Editors FREE CHAPTER 3. Graphical User Interface 4. Camera and Mouse Controls 5. Your Graphics Evolved 6. Make That Sound Happen 7. Game Objects 8. Multiplayer Servers 9. Importance of Networking 10. Miscellaneous Gameplay Features Index

Preface

Torque 3D is a low cost, fully featured game engine that provides a time-tested foundation in multiplayer networking and a next generation graphics engine. This game engine provides the TorqueScript scripting language to allow users to start building their games, and also full source code to the engine when users are serious about making the game engine their own. Torque 3D comes with a suite of tools that allows the user to craft their game worlds, and supports industry standard file formats for graphics and sound. Torque 3D also supports using Physics third-party libraries, such as PhysX and Bullet, and the FMOD sound library when the user wants to take advantage of what these libraries have to offer.

Out-of-the-box Torque 3D allows the user to create a wide variety of games without needing to look to other sources to fill in the gaps, other than the usual graphics and sound editing tools, of course. This plus access to source code is the reason, a number of educational institutions are using Torque 3D in their courses.

Torque 3D Game Engine Cookbook is a practical reference guide to the latest version of the Torque 3D game engine, and takes the reader beyond the basics provided by the GarageGames FPS Tutorial. Each chapter covers a common topic of game development, and exposes the reader to some less understood and hidden gems that developers may not come across through other material. By the end of the book, readers should come away with a better understanding of the internals of the Torque 3D game engine, and be inspired to try new things that they may not have thought of before.

What this book covers

Chapter 1, TorqueScript: The Only Script You Need to Know, covers the scripting language of Torque 3D. TorqueScript is used to define game objects and to create the rules of play. This chapter teaches some important— and often lesser known – TorqueScript concepts and shortcuts.

Chapter 2 , Working with Your Editors, looks at using the various editors that are part of Torque 3D that are used to build your game. Many of these recipes will help you work faster, or help add that extra bit of polish and performance to your game.

Chapter 3, Graphical User Interface, discusses some important graphical user interface concepts that often come up while working on a game, but whose information can be hard to come by. The recipes in this chapter make use of Torque 3D’s built-in GUI editor to arrange controls, as well as TorqueScript to define how the controls operate.

Chapter 4, Camera and Mouse Controls, explores the various camera types available in Torque 3D, and their control by the user and the game. Beyond controlling the in-game camera, this chapter also covers using the mouse to manipulate objects within a game.

Chapter 5, Your Graphics Evolved, introduces Torque 3D’s graphics pipeline through the creation of custom-coded materials and postFx. This includes taking advantage of Torque 3D’s advanced lighting model. This chapter also covers using the built-in video recording features of Torque 3D.

Chapter 6, Make That Sound Happen, is where we discover the various methods of playing sound effects in Torque 3D and when to use them. This chapter also touches on how to modify a game’s music or other sound according to the current gameplay mood.

Chapter 7, Game Objects, takes us into the details of some of the objects that make up a game’s atmosphere. This includes background animation, precipitation, lightning, and triggering events throughout an in-game day.

Chapter 8, Multiplayer Servers, shows us how to start up and allow others to connect to our game, as well as how to administer it. In addition, we discover how to access the player’s connections on a client or server, and how to broadcast a message to all connected players.

Chapter 9, Importance of Networking, provides several examples of connecting Torque 3D to various external network services, and how to make Torque 3D respond to network requests. This chapter also covers how to send event messages between a game’s clients and server.

Chapter 10, Miscellaneous Gameplay Features, looks at the various parts of Torque 3D that help you expand on the gameplay rules that are already available, as well as how to build your own. This includes modifying how player and weapon objects function, finding any objects within a given range, and making use of Torque 3D’s message producer/consumer system.

What you need for this book

Torque 3D Game Development Cookbook is useful for the majority of Torque 3D developers. Each chapter covers a common topic of game development, starting with TorqueScript, the scripting language of Torque 3D used to define game objects and build gameplay rules. It is expected that the reader has completed the FPS Tutorial available on the GarageGames site (www.garagegames.com/products/torque-3d) or the equivalent. A basic understanding of TorqueScript and using Torque 3D’s built-in editors is required.

Torque 3D is now an open source product under the MIT license, and is available for free to everyone. Links to the latest version and other useful information is available from the Torque 3D product page on the GarageGames site at www.garagegames.com/products/torque-3d. The source code and example templates are also available directly from the GitHub repository at www.github.com/GarageGames/Torque3D. In order to compile the game engine from the source code you will need to have access to Visual Studio. You may also download a precompiled package by following the instructions on the Torque 3D GitHub repository.

Any text editor may be used to create and edit TorqueScript files. Torsion, a commercial TorqueScript editor, may be used as an alternative. It is available for purchase from the GarageGames web store.

Who this book is for

Torque 3D Game Development Cookbook is aimed at developers that are interested is working with the latest version of the Torque 3D game engine. This book will be helpful for developers that have already gone through the FPS Tutorial on the GarageGames site and are looking for more information on getting the most out of Torque 3D.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: Change its noCursor property from a value of 1 to a value of 0.

A block of code is set as follows:

%val1 = “1 2 3”;
%val2 = setWord( %val1, 5, “4”);
echo( getWordCount( %val2 ) ); 

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

// Load up the Game GUIs
   exec(“art/gui/defaultGameProfiles.cs”);
   exec(“art/gui/PlayGui.gui”);
   exec(“art/gui/ChatHud.gui”);
   exec(“art/gui/playerList.gui”);
   exec(“art/gui/hudlessGui.gui”);
   exec(“art/gui/controlsHelpDlg.gui”);
   exec(“art/gui/mainmenulevel.gui”);
   exec(“art/gui/mainmenulevelsplash.gui”); 

Any command-line input or output is written as follows:

operateOnFields1();

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: “ Drag-and-drop the GuiTextEditCtrl control on to Canvas of the editor to the left-hand side.”.

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the color images of this book

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

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under theErrata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image