I've pasted the entry I wrote here, but I may not do so for future entries - converting the wiki-style formatting tags to html tags is a pain.
2007 - 05 - 29, 2:56pm (GMT)
Working with TGB
This weekend I started work on a small game using Torque Game Builder. The game is a simple 2-D side-scrolling skateboard game. You control a skateboarder and do tricks over gaps, down stairs, etc. Below are the observations I made while making this game.
Getting Started - Documentation
The first thing I had to do is re-familiarize myself with TGB and Torque Script. I started by logging on to the Torque Developer Network (TDN). The TDN is a wiki-based documentation system for all of the Garage Games game development products. There they have various tutorials on completing common tasks for common game types.
I started out by following a tutorial for getting a platformer game avatar running around on a tile map. The tutorial was easy to follow, but it included some seemingly strange code to get around some of the quirky aspects of TGB.
For instance, the collision code was a little strange. Instead of using an 'onCollision' type of callback to respond to collisions with the environment, they instead manually tested for projected collisions every frame over a small time interval.
This was apparently because the physics/intersection code in TGB often results in objects teleporting to the wrong side of a collided object. This problem is probably magnified when you have very large objects relative to the tiles in your tile map.
After completing that and a few other tutorials, I moved on to some actual coding. This involved using a documentation manual that comes with TGB. The documentation here was decent, but the page (it is basically a giant HTML page) wouldn't load correctly in Firefox or Opera, leading me to use Internet Explorer 7, which was kind of a pain in the neck (remembering to open with a browser other than my default).
Looking for documentation on more uncommon tasks in TGB wasn't all that easy. Granted, I eventually found answers to all of my questions, but it was time consuming. Searching for help with Torque Script often brings up a lot of unrelated junk, or stuff specific to the Torque Game Engine, and not TGB.
Working with the TGB Application
TGB comes with an application that acts like a 2-D game maker. In this application you can edit sprites, particle systems, static images, etc. You basically drag and drop these object templates you've created onto the game field. Here they can be scaled, rotated, and otherwise manipulated. Overall, the application is pretty nice, but it can be a pain to work with.
Selecting objects is a chore sometimes. You're bound to have lots of overlapping objects on a 2-D game field, and selecting overlapping objects in TGB isn't always easy. Selection generally works such that when you repeatedly click on a spot, it will cycle through all of the objects that overlap that point. This would be fine if it always worked, but it doesn't. This results in having to move objects out of the way so you can get to the one you want, which I imagine wouldn't always be a very easy thing to do.
Another strange thing, and one that I think is common to a lot of game making programs, is having to always work with instances of objects. In order to edit an object's collision polygon, size, or rotation, you have to create an instance of of the object and work on that instance. In other words, it doesn't let you easily define all that stuff for all instances of the object type (I realize my use of the word 'object' here is confusing). This results in strange design workarounds when you are trying to define an object that you will create many instances of during the game (and not in the editor).
In my skateboard game, for instance, I had to create the skater's ragdoll and gibs (yes, he explodes) in the editor, somewhere off of the playing field. Then, in the game, when the skater falls, I have to clone these objects and place them where they should go, or just move the off-screen objects over to the player's position.
Another gripe I have with the editor is its lack of script support. In the editor, you can edit an object's class type, its name, and add dynamic variables to its class, but that's it. You can not edit your script files in the editor. This is especially annoying because TGB does not come with its own Torque Script editor. You have to use a text editor or find a Torque Script editor some where else. All of the free ones I've tried have been less than desirable, and even the ones with a price tag aren't so great. Right now I'm still using a trial of Torsion, the editor I've found to be the best for my usage.
Building your game for deployment is very easy. The TGB application has a built in 'build' tool that compiles a version of your game that can be distributed by itself. You don't seem to get much control over your final directory structure or packaging, but that doesn't bother me.
Working With Vista
The most painful part of TGB was its non-compliance with Vista. It requires that you save your game projects under its installation directory, and as we all know, saving files under Program Files in Vista is a no-no. Also, TGB was unable to find the 'compatibility files' that Vista creates when you save files somewhere under Program Files. Thus, none of my artwork was ever visible to TGB.
In the end I had to install TGB in my Users/blah/Documents to get a reasonable work environment.
Also, I was unable to run my deployed game unless I ran it as an administrator. This does not boast well for TGB in terms of giving your game to end users running Vista.
What I Accomplished
In the three days I worked on the project, I accomplished the following:
What I Did Not Accomplish
The following are things I tried to do but could not finish:
Conclusions - The Proof is in the Pudding
I totally nailed my target in terms of features and game play. In three days I got the basics for a game layed out, in play-able form. I am very pleased with my level of production and I'm confident that I'll be able to get something up and running for the contest. I think I got a lot more done than I would have if I were using my XNA or C++ code base. So far I think I can recommend TGB for this use.
Screenshots of my Game
(sorry for the cursor hovering over the scene. I should have disabled that.)