Torque 3D Game Development Cookbook

Over 80 practical recipes and hidden gems for getting the most out of the Torque 3D game engine
Preview in Mapt

Torque 3D Game Development Cookbook

David Wyand

Over 80 practical recipes and hidden gems for getting the most out of the Torque 3D game engine
Mapt Subscription
FREE
$29.99/m after trial
eBook
$21.00
RRP $29.99
Save 29%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$21.00
$49.99
$29.99p/m after trial
RRP $29.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Torque 3D Game Development Cookbook Book Cover
Torque 3D Game Development Cookbook
$ 29.99
$ 21.00
Panda3D 1.7 Game Developer's Cookbook Book Cover
Panda3D 1.7 Game Developer's Cookbook
$ 26.99
$ 18.90
Buy 2 for $35.00
Save $21.98
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781849693547
Paperback380 pages

Book 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.

Table of Contents

Chapter 1: TorqueScript: The Only Script You Need to Know
Introduction
Accessing delimited fields within a string
Iterating on words in a string list
Retrieving components of a variable using accessors
Iterating on objects in a SimSet or SimGroup collection
Getting a random object from a SimSet or SimGroup collection
Finding an object in a SimSet or SimGroup collection using its internal name
Executing a method on a SimSet or SimGroup collection
Creating a new SimObject instance
Creating a new internal name only SimObject instance
Creating a new Datablock object
Creating a new singleton
Extending a SimObject instance using the class property
Using a variable to access methods or properties of a SimObject instance
Using call() to call a variable method on a SimObject instance with arguments
Using call() to call a variable function with arguments
Using script arrays as dictionaries
Using ArrayObject and custom script sorting callbacks
Scheduling SimObject methods
Scheduling functions
Activating and deactivating a package
Chapter 2: Working with Your Editors
Introduction
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 in the World Editor window
How to change the material of an object in the World Editor
Setting up a glow mask using the Material Editor window
Using a convex shape as a zone
Setting zone-specific ambient lighting
Grouping adjacent zones together
Chapter 3: Graphical User Interface
Introduction
Creating a password text edit box
Using pushDialog() and popDialog() and setting up the UI file to work with them
Displaying metrics (such as FPS) from the console
Displaying a list of all game objects
Displaying a level at the main menu
Dragging and dropping between two windows
Chapter 4: Camera and Mouse Controls
Introduction
Locking and hiding the mouse while the right mouse button is down
Clicking on an object in the scene (client-side)
Clicking on an object in the scene (server-side)
Picking up an item in the scene while the mouse is locked and hidden
Changing the camera's view and control mode
Giving the camera smooth movement
Having the camera follow a path
Chapter 5: Your Graphics Evolved
Introduction
Using the built-in video recording
Changing the material of a ShapeBase object using script
Building a custom material
Building a custom material using advanced lighting
Building a postFX
Chapter 6: Make That Sound Happen
Introduction
Playing a quick 2D or 3D sound on all clients
Using SFXEmitter to create networked sound effects
Playing a sound on a ShapeBase object
Playing music while a level is loading
How to have a background sound for a level
How to have music change according to the mood
Triggering an event during sound playback
Chapter 7: Game Objects
Introduction
Playing an animation sequence on a TSStatic class
Playing an animation sequence on a ShapeBase class
How to make it rain using a Precipitation object
Using the Lightning object to automatically create a thunderstorm
Using the TimeOfDay object to generate events
Chapter 8: Multiplayer Servers
Introduction
How to start a dedicated server
What ports are needed to be open or forwarded for a multiplayer server
Passing arbitrary parameters from the client to the server
How to become an admin on a server
Kicking and banning people from the server
Stopping a server from restarting when the last player leaves
Accessing the server connection from the client
How to access all client connections from the server
Broadcasting a message to all clients and having it displayed in the center of the screen
Chapter 9: Importance of Networking
Introduction
Sending a network event from the client to the server
Sending a network event from the server to the client
Connecting as a TCP client
Setting up a TCP server
Connecting as an HTTP client
Using an RSS feed for game news, message of the day, or other client messages
How to activate, deactivate, and use Telnet for console access
Chapter 10: Miscellaneous Gameplay Features
Introduction
How to have a sprinting player use up energy
Enabling and disabling air control
How to jump jet
Adjusting the fire spread of a weapon
Changing the number of shots fired from a weapon
Making a weapon use energy rather than ammo
Finding objects in range
Using the message producer/consumer system

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

Authors

Table of Contents

Chapter 1: TorqueScript: The Only Script You Need to Know
Introduction
Accessing delimited fields within a string
Iterating on words in a string list
Retrieving components of a variable using accessors
Iterating on objects in a SimSet or SimGroup collection
Getting a random object from a SimSet or SimGroup collection
Finding an object in a SimSet or SimGroup collection using its internal name
Executing a method on a SimSet or SimGroup collection
Creating a new SimObject instance
Creating a new internal name only SimObject instance
Creating a new Datablock object
Creating a new singleton
Extending a SimObject instance using the class property
Using a variable to access methods or properties of a SimObject instance
Using call() to call a variable method on a SimObject instance with arguments
Using call() to call a variable function with arguments
Using script arrays as dictionaries
Using ArrayObject and custom script sorting callbacks
Scheduling SimObject methods
Scheduling functions
Activating and deactivating a package
Chapter 2: Working with Your Editors
Introduction
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 in the World Editor window
How to change the material of an object in the World Editor
Setting up a glow mask using the Material Editor window
Using a convex shape as a zone
Setting zone-specific ambient lighting
Grouping adjacent zones together
Chapter 3: Graphical User Interface
Introduction
Creating a password text edit box
Using pushDialog() and popDialog() and setting up the UI file to work with them
Displaying metrics (such as FPS) from the console
Displaying a list of all game objects
Displaying a level at the main menu
Dragging and dropping between two windows
Chapter 4: Camera and Mouse Controls
Introduction
Locking and hiding the mouse while the right mouse button is down
Clicking on an object in the scene (client-side)
Clicking on an object in the scene (server-side)
Picking up an item in the scene while the mouse is locked and hidden
Changing the camera's view and control mode
Giving the camera smooth movement
Having the camera follow a path
Chapter 5: Your Graphics Evolved
Introduction
Using the built-in video recording
Changing the material of a ShapeBase object using script
Building a custom material
Building a custom material using advanced lighting
Building a postFX
Chapter 6: Make That Sound Happen
Introduction
Playing a quick 2D or 3D sound on all clients
Using SFXEmitter to create networked sound effects
Playing a sound on a ShapeBase object
Playing music while a level is loading
How to have a background sound for a level
How to have music change according to the mood
Triggering an event during sound playback
Chapter 7: Game Objects
Introduction
Playing an animation sequence on a TSStatic class
Playing an animation sequence on a ShapeBase class
How to make it rain using a Precipitation object
Using the Lightning object to automatically create a thunderstorm
Using the TimeOfDay object to generate events
Chapter 8: Multiplayer Servers
Introduction
How to start a dedicated server
What ports are needed to be open or forwarded for a multiplayer server
Passing arbitrary parameters from the client to the server
How to become an admin on a server
Kicking and banning people from the server
Stopping a server from restarting when the last player leaves
Accessing the server connection from the client
How to access all client connections from the server
Broadcasting a message to all clients and having it displayed in the center of the screen
Chapter 9: Importance of Networking
Introduction
Sending a network event from the client to the server
Sending a network event from the server to the client
Connecting as a TCP client
Setting up a TCP server
Connecting as an HTTP client
Using an RSS feed for game news, message of the day, or other client messages
How to activate, deactivate, and use Telnet for console access
Chapter 10: Miscellaneous Gameplay Features
Introduction
How to have a sprinting player use up energy
Enabling and disabling air control
How to jump jet
Adjusting the fire spread of a weapon
Changing the number of shots fired from a weapon
Making a weapon use energy rather than ammo
Finding objects in range
Using the message producer/consumer system

Book Details

ISBN 139781849693547
Paperback380 pages
Read More

Read More Reviews

Recommended for You

Unity Character Animation with Mecanim Book Cover
Unity Character Animation with Mecanim
$ 39.99
$ 28.00
Unity 4.x Cookbook Book Cover
Unity 4.x Cookbook
$ 29.99
$ 21.00
Unity Shaders and Effects Cookbook Book Cover
Unity Shaders and Effects Cookbook
$ 29.99
$ 6.00
Unity 4.x Game AI Programming Book Cover
Unity 4.x Game AI Programming
$ 26.99
$ 18.90
Learning C# by Developing Games with Unity 3D Beginner's Guide Book Cover
Learning C# by Developing Games with Unity 3D Beginner's Guide
$ 29.99
$ 21.00
Unity 4.x Game Development by Example: Beginner's Guide Book Cover
Unity 4.x Game Development by Example: Beginner's Guide
$ 26.99
$ 18.90