Torque/1.4/WhatsNew

From TDN

Contents

Introduction

Congratulations! You're a proud owner of Torque 1.4!

This fine product has many new features, including:

  • Unicode support.
  • Localization toolkit.
  • Crossplatform video playback support.
  • Upgraded editors.
  • A new getting started tutorial.
  • Multithreading support.
  • Console refactoring/cleanup.
  • Map2dif plus - significant map2dif upgrade.
  • Significant Mac platform improvements.
  • Over 200 other enhancements.

There's more information about them below, and of course, you get all the source, with comments.


REQUEST: Can we get some more information on those 200 other enhancements? A link to a bug/feature tracker would be great. --MAS (3/12/06)

Unicode Support

Torque supports UTF8 encoded Unicode data. Just select a font that has the characters you need in it (not all fonts have the full Unicode range), make sure your files are saved in UTF8 encoding... and you're done.

The API documentation is in core/unicode.h.


Q: How to save UTF8 encoding?

A: In order for text in script or gui files to display correctly, the file must be saved as UTF-8 with no BOM. If you include a BOM, Torque's script parser will get confused. Notepad automatically adds a BOM and is not suitable for editing UTF-8 scripts.

---Tom Bampton

[If using JEdit: Under the Utilities menu, in General settings select UTF-8 as theDefault character encoding and if you de-select "Auto-detect file encoding when possible", it should expose the BOM character from any improperly saved files so you can get rid of it permanently.] --- Jake T

Localization Toolkit

Tom Bampton has developed a nice suite for doing localization work. You can read about it at TorqueLocalization.

Video Support

Torque now supports playback of the Ogg Theora video codec, by Xiph.org, the fine people who brought us Ogg Vorbis, an excellent audio codec. All of the Ogg codecs are free for use, meaning you don't have to pay any license fees to use them in your game. Theora.org has information about how to encode videos to Theora format.

Video playback in a GUI may be accomplished by using the GuiTheoraCtrl - just call setFile on it, passing it the path of the video file, and it will play it. If you're interested in integrating the playback in other areas of the engine, look at the TheoraTexture class - it manages rendering Theora video to a GL texture, which can then be rendered or otherwise used.

Upgraded Editors

One of the enhancements to the editors is a new tree view that supports drag & drop as well as a nicer look. It's suitable for use as part of editors, or for controlling directly from script. GuiTreeViewCtrl is the control.

The GuiInspector has also been enhanced. Better support for custom fields has been added, and documentation can be viewed at Torque/Inspector.

Getting Started Tutorial

We have an excellent getting started tutorial now, courtesy of Spider. It comes with the 1.4 installer - just click on the PDF and you're on your way. This also comes with a tutorial.base mod you can use as a basis for your own games.

Multithreading Support

In addition to the existing platform-independent mutex, semaphore, and thread primitives Torque has provided since 1.0, a great deal of work has been done for 1.4 to make threaded development easier and safer. The profiler, memory manager, and some of the console have all been threadsafed, and it's now also possible to call into the console from external threads.

See Torque/1.4/MultiThread for more information.

Console Refactoring

The Torque scripting language and console infrastructure have been cleaned up and refactored. Many monolithic files have been broken up into smaller, more easily managed files. Parts of the compiler have been put in their own namespaces, and names have been cleaned up. Torque/ConsoleTypes has information on the new dynamic console type system and how to use it. A great deal of comments have been added, and code style standards are now better enforced.

The console grammar has also been updated, fixing some corner cases, and multiline comment support has been added. Try it out today. :)

There have also been significant upgrades to the script debugger, based on Tom Spilman's excellent enhanced debugger resource.

Map2Dif Plus

Matt Fairfax has done some nice work on map2dif plus, and it's available in 1.4. More robust than previous versions, and with a better feature set. Definitely a good idea to try it out, especially if you're having problems with map2dif original.