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
Conferences
Free Learning
Arrow right icon
Torque 3D Game Development Cookbook
Torque 3D Game Development Cookbook

Torque 3D Game Development Cookbook: Over 80 practical recipes and hidden gems for getting the most out of the Torque 3D game engine

eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Torque 3D Game Development Cookbook

Chapter 2. Working with Your Editors

In this chapter we will cover the following topics:

  • Setting up fogging of the level

  • How to cover seams and texture changes using decals placed in the World Editor

  • Copying the transform of an object to another object in the World Editor

  • How to change the material of an object in the World Editor

  • Setting up a glow mask using the Material Editor

  • Using a convex shape as a zone

  • Setting zone-specific ambient lighting

  • Grouping adjacent zones together

Introduction


Torque 3D includes a lot of built-in tools to help us create and refine a game and all that goes into it. The World Editor window is the gateway to all of the various editors that are available, and may be accessed by pressing F11 during game play. The following table lists all of the different editors available from the World Editor:

Editor

Description

Object Editor

This helps you add and delete objects, and position, rotate, and scale them. It also allows you to modify the properties of an object.

Terrain Editor

You can raise and lower the terrain or create holes in the terrain.

Terrain Painter

This helps you to apply materials to the surface of the terrain.

Material Editor

This allows you to create and manipulate materials that are used by all 3D objects in the level.

Sketch Tool

You can create convex shapes to be used as placeholders, or as textured game objects themselves.

Datablock Editor

You can create and manipulate the static properties used...

Setting up fogging of the level


Using fog is a very common method of adding depth to a scene. Fog can help separate distant objects from those up-close, and can even be used to separate the hills from the valleys. Having fog in a scene also allows us to reduce the render distance to help increase a game's performance. In this recipe, we will set up fog parameters in a level.

Getting ready

Start up Torque 3D and launch a level of your game, then press F11 to open the World Editor. As we want to manipulate the scene objects, the Object Editor should be selected (F1 or by using the Editors menu). A level based on the Empty Terrain level of Full template could be used as a good example.

How to do it...

The following steps add fog to a level that did not have it applied originally:

  1. Select theLevelInfo class object in the Scene Tree window. By default it is named theLevelInfo class object.

  2. In the property inspector (the window named as Inspector), scroll until you locate the Fog section.

  3. Click on the...

How to cover seams and texture changes using decals placed in the World Editor


When placing 3D objects within a game level sometimes there is a hard, visible transition when two or more objects intersect with each other. An example would be a rock outcrop object and the terrain. We may want to soften this transition between objects for better visual appeal. In this recipe we will add decals to the level to help cover up these seams between objects.

Getting ready

Start up FPS Example in Torque 3D and launch the Deathball Desert level. Press Alt + C to switch to the third-person camera, and then press F11 to open the World Editor. As we want to manipulate the manually-placed decals, open the Decal Editor window by pressing F7, or using the Editors menu.

How to do it...

In the following steps we are going to place a decal to cover up a seam between a 3D shape and the terrain:

  1. Fly the camera to where we will place the decals. For our Deathball Desert example, we will fly to one of the many rock...

Copying the transform of an object to another in the World Editor window


When working with objects in the World Editor there are times when we want one object to have the same transform as another. This includes the world position of that object, its rotation, and its scale. For example, we may want to stack one crate on top of another. To facilitate this, we could give both crates the same transform and then move one crate on top of the other using the axis gizmo. To copy and paste the transform of an object we use the Transform Selection dialog.

Getting ready

Start up Torque 3D and launch a level of your game, then press F11 to open the World Editor. As we want to manipulate the scene objects, the Object Editor should be selected (F1 or by using the Editors menu). Make sure there are at least two objects in the level: the object that will be the source of the transform, and the destination object.

How to do it...

In the following steps we will copy the transform from one scene object and...

How to change the material of an object in the World Editor


When we add a 3D object to a level using the World Editor, it always has the same set of materials as defined by the artist (using the Material Editor window or through scripts). Sometimes we want to keep the same object geometry and just change the materials used. An example would be two soccer nets with distinct coloring while having the same shape. This process of changing the materials of an object in Torque 3D is called skinning. In this recipe, we will change the materials of an object to be different than the default materials by modifying the properties of an object using the World Editor window.

Getting ready

Before we can skin a 3D object, we need to prepare it and its materials or surfaces in a 3D modeling application. We will then have to set up the new skinned Material instances using a text editor, such as Torsion, to have their mapTo properties set correctly. Afterwards we can tweak the Material instances using the...

Setting up a glow mask using the Material Editor window


Torque 3D makes it easy to make a material emissive (not affected by lighting) and glow using the Material Editor window. However, activating these Material class properties makes the entire material emissive and glow. In this recipe, we will learn how to mask out the glow region of a material to limit its effect.

Getting ready

This recipe requires some work to be done in the Paint program of your choice, as well as in Torque 3D. We will describe the Paint program steps in general terms as each application is different. However, most Paint programs that are in-depth enough for game development, support the same general operations.

In Torque 3D we will be using the Materials Editor window to modify the material properties of a 2D object.

How to do it...

In the following steps, we will create a new glow texture and apply it to an object:

  1. Start up your Paint program and load in the texture file we'll use as a base. This could be the texture...

Using a convex shape as a zone


In Torque 3D, zones are used to control which 3D objects will be rendered within a level, based on the current camera position and rotation. If the camera cannot see into a zone, such as through a connected Portal object (this acts like a window); or is not within the zone itself, the objects inside the zone are not rendered. This allows us to have far more objects within the level than could normally be rendered all at once due to performance concerns. Normally, a Zone object is box-shaped. In this recipe, we will learn how to create a new convex shape and use it as a Zone object.

Getting ready

Start up Torque 3D and launch a level of your game, then press F11 to open the World Editor. As we want to create and manipulate special convex objects, the Sketch Tool should be selected (F5 or by using the Editors menu).

How to do it...

In the following steps, we will create a ConvexShape object and turn it into a custom-shaped Zone object:

  1. We will start by creating...

Setting zone-specific ambient lighting


Zones are mainly used to determine which objects in a level should render and which shouldn't, based on the current camera position and rotation. In addition, Zone objects may also control the ambient lighting (the lighting that appears to come from all directions) for the region within the Zone. A good example of this is a cave system where the sun should not reach all the way in. In this recipe, we will look at how to set up custom ambient lighting for a Zone object that is different from the rest of the level.

Getting ready

Start up Torque 3D and launch a level of your game, then press F11 to open the World Editor. As we want to manipulate the scene objects, the Object Editor should be selected (F1 or by using the Editors menu). Make sure there is at least one Zone object already in the level.

How to do it...

In the following steps we will modify ambient lighting properties of a Zone object:

  1. Select the Zone object that will have the custom ambient lighting...

Grouping adjacent zones together


Normally we use a Portal object to join the Zone objects together. This acts as a window, or doorway between the zones. However, there are times when adding portals is counterproductive, and we just want to have a number of zones treated as one unit. An example of this is when using convex-shaped zone objects to fill up an oddly-shaped room, and we want the whole room to be treated as one big zone.

In this recipe, we will look at how to have two or more Zone objects considered a single zone, without the use of Portal objects.

Getting ready

Start up Torque 3D and launch a level of your game, then press F11 to open the World Editor. As we want to manipulate the scene objects, the Object Editor should be selected (F1 or by using the Editors menu). Make sure there are at least two zone objects already in the level, and that they are next to each other.

How to do it...

In the following steps, we will group a number of Zone objects together so that they are treated...

Left arrow icon Right arrow icon

Key benefits

  • Clear step-by-step instruction and practical examples to advance your understanding of Torque 3D and all of its sub-systems
  • Explore essential topics such as graphics, sound, networking and user input
  • Helpful tips and techniques to increase the potential of your Torque 3D games

Description

Torque 3D is a popular game engine that supports you in every step along the way to making your game a reality. Even with all of the power and tools that Torque 3D provides, finishing a high quality 3D game requires time and knowledge."Torque 3D Game Development Cookbook" is a practical guide that takes you through each of the major steps on the journey to creating your game, while learning a few tricks along the way.The recipes in this book start off with learning some of the finer points about TorqueScript. The book then moves on to each of Torque 3D's subsystems and ends with a variety of game play recipes.The various topics covered include activating level-specific game code and scheduling game events, dragging and dropping items between windows to work with an in-game inventory system, and covering the seams between objects with well placed decals. Some of the advanced topics include writing custom shaders and postFX, using zones to improve rendering performance, and enhancing your game's ambience through sound.Once you are done with Torque 3D Game Development Cookbook you'll be on your way to creating amazing 3D games and gain expert knowledge of Torque 3D.

Who is this book for?

The book is written for professional and indie game developers that have basic knowledge of TorqueScript, are acquainted with Torque 3D's built-in tools, and wish to take their skills to the next level. Having gone through the comprehensive Torque 3D 1.2 FPS game tutorial on the GarageGames website (or its equivalent) is assumed.

What you will learn

  • Game data manipulation and event scheduling using TorqueScript
  • Work with and display Torque 3D s built-in metrics to expose your game s performance characteristics
  • Improve your game s frame rate through proper zone and portal set up
  • Learn hidden TorqueScript secrets to ease game development
  • Set up standard RPG mouse controls and object manipulation
  • Learn to create a drag-and-drop inventory front end
  • Go beyond the standard FPS weapon set-up to make each weapon unique
  • Refine the look of your game using various object animation capabilities and damage states
  • Work with multiplayer servers and pass game specific data to and from the client
  • Have your game communicate with various third party online services

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jan 25, 2013
Length: 380 pages
Edition : 1st
Language : English
ISBN-13 : 9781849693554
Vendor :
Garage Games
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jan 25, 2013
Length: 380 pages
Edition : 1st
Language : English
ISBN-13 : 9781849693554
Vendor :
Garage Games
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 66.98
Torque 3D Game Development Cookbook
€41.99
Grome Terrain Modeling with Ogre3D, UDK, and Unity3D
€24.99
Total 66.98 Stars icon
Banner background image

Table of Contents

10 Chapters
TorqueScript: The Only Script You Need to Know Chevron down icon Chevron up icon
Working with Your Editors Chevron down icon Chevron up icon
Graphical User Interface Chevron down icon Chevron up icon
Camera and Mouse Controls Chevron down icon Chevron up icon
Your Graphics Evolved Chevron down icon Chevron up icon
Make That Sound Happen Chevron down icon Chevron up icon
Game Objects Chevron down icon Chevron up icon
Multiplayer Servers Chevron down icon Chevron up icon
Importance of Networking Chevron down icon Chevron up icon
Miscellaneous Gameplay Features Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7
(10 Ratings)
5 star 80%
4 star 10%
3 star 10%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Davon Sep 12, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
this was a great help in programming beyond the basics of torque.It provided just enough advice and was very readable
Amazon Verified review Amazon
Ahmad Apr 16, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
A perfect book for the people who want to learn the intermediate & advance level of Torque game engine base on step by step explanation & screenshots. Great work by the Author
Amazon Verified review Amazon
Netwyrm Feb 26, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is the first and only book of which I am aware written for the modern Torque engine. Wyand's volume not only addresses that lack, but addresses it most adequately, with clear and consistent examples and full explanations. Not a book on engine theory, it is filled with examples of script which answer most common questions involved in setting up the requirements for basic gameplay in the engine. I would that it had been available when I started scripting for Torque -- it would have cut literally years out of the learning curve.
Amazon Verified review Amazon
drastik Apr 27, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I found this to be perfect for my current level of understanding in Torque. I like that it doesn't begin with how to download & install the SDK, setting up an IDE, and so forth. It jumps right into what someone in my position is looking for: de-mystifying the code with great explanation and examples.I was very excited that it went into detail about inventory & client<->server communication. That had always been a cloudy subject between game engines that I have coded for. I definitely feel that with what I've read already, and having this book by my side, I can jump back into development with a greater understanding and accomplish more than I was able with google & documentation :)The book on Packt: [...]
Amazon Verified review Amazon
Konrad Kiss Feb 21, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
David Wyand's Torque 3D Game Development Cookbook is aimed at developers who are already familiar with the Torque 3D engine but who want to improve their level of knowledge or who look for quick and concise solutions to specific problems - carefully hand-picked problems that are likely to surface during the development of any game. This prerequisite and the game developer terminology used throughout the book make it one of the very few intermediate to advanced level guides that are available today.I was a technical reviewer for this book - this made me one of the book's earliest critics. Being a game developer and having worked with this particular engine for many years, my personal wish was to help create a book that goes beyond the widely accessible pieces of information in terms of content and tries to dig deeper. David Wyand's book meets and exceeds this expectation.It is not for absolute beginners - at least not without minimal preparation. It often assumes knowledge of terms and engine features for specific recipes. Such an example would be shaders and CustomMaterial. The book explains how you can make good use of CustomMaterials, but it assumes you have an idea about what a shader is - which I find fair. It doesn't waste your time explaining what a shader is - this information is available through a number of sources online - but it will tell you how you can hook up your custom shader to create unique materials.The great thing about a cookbook is that requirements change recipe by recipe. So even if you are a beginner, you will find solutions to problems that you are likely to face on day one. Other recipes are tailored at problems that you meet several weeks or months into your development cycle, and by then it rightfully assumes a background knowledge of a number of things that you were likely to meet during that time.If you are serious about working with Torque 3D, this book will definitely make your life easier. However, if you are just starting out, be sure to first go through the Torque 3D tutorials that you find in the engine docs. Those will give you the basics, while Torque 3D Game Development Cookbook will be your go-to source for tips once you begin writing script code.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

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

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

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

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

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

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

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

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

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

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

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

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

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

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