Torque Game Engine DocumentationVersion 1.3.x |
It's been a long chapter, but you made it through. It is doubtful that anyone could fully absorb all of the information presented in this chapter after just one reading though. As you work with Torque and encounter problems, use this chapter as a resource, re-visiting sections you need to brush up on.
To recap, and as a reference, here's what we covered:
First, we talked about what game engine scripting languages are and why they're useful. We talked about the features a good scripting language should have, and discovered that TorqueScript has all of them.
With the introductory analysis out of the way, we dug into the meat of TorqueScript, studying each of the features of the language in detail. We talked about TorqueScript's variables at length-- studying variable naming and scoping, and the numeric, string, boolean, array, and vector data-types.
Continuing with the detailed overview of the language, we looked at TorqueScript's operators, control statements, and functions.
We then covered how to use objects in TorqueScript, looking at their handles and names, fields and commands, dynamic fields, and console methods.
Next we, quickly introduced packages, namespaces, and datablocks. We covered these sections briefly at first, needing to understand more about the interaction between the engine and the script console before we could go into further detail.
After a detailed look at the Engine-Console interface mechanisms in Torque, we came back to datablocks, objects, and namespaces. For datablocks in particular, we found out how datablocks and objects are related to eachother, and found out how to declare datablocks. Studying namespaces, we learned that they can be tricky, but discovered object namespace hierarchies, learned how to create simple datablock namespaces, and then became datablock namespace masters.
Hopefully this chapter has been useful. Obviously, we were unable to go into great depth on each and every aspect of TorqueScript, but you should walk away with a very good feel for how the language works, and be able to come back and re-visit this guide for additional information when you need it. For even more detailed info, check out all of the great TorqueScript tutorials, and resources on the website. Also, don't forget about the forums, and the amazing GarageGames community.
A final note: this chapter was written by Ed Maurina, an outstanding member of the community, with editing and adaptation by the GarageGames staff. A preview of Ed Maurina's awesome, forthcoming Essential Guide to the Torque Game Engine (EGTGE) is available for free on our website. Look for the full version of EGTGE to be released in the near future. You should be very excited about EGTGE, it's looking absolutely stellar, and we can't wait for its release!