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
₹799 ₹3276.99
Paperback
₹4096.99
Subscription
Free Trial
Renews at ₹800p/m

What do you get with a Packt Subscription?

Free for first 7 days. ₹800 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
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 : 9781849693547
Vendor :
Garage Games
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. ₹800 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
₹800 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
₹4500 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 ₹400 each
Feature tick icon Exclusive print discounts
₹5000 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 ₹400 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 6,554.98
Torque 3D Game Development Cookbook
₹4096.99
Grome Terrain Modeling with Ogre3D, UDK, and Unity3D
₹2457.99
Total 6,554.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

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.