Monday, November 26, 2007

Week, er, 21 -- More more TGB

Wow, I totally forgot to blog last week. Huh.

The last two weeks, I studied behaviors and tile maps, which both look like they'll be extremely useful. Behaviors let you conveniently attach a set of properties and callback handlers to any scene object. The main benefit seems to be the callbacks. The behavior namespace can implement lots of the normal scene object callbacks, so you can have a bunch of different handler functions all getting called, one for each behavior and one for the object itself. The upshot is kind of like multiple inheritance.

Tile maps are for creating levels that are built of lots of repeating grid squares (think Mario or any other older game). Just got started with them, but they already look very useful. You can assign various properties to each tile beyond just the image, which has interesting possibilities.

Anyhow, these last two weeks were good in that I felt that my TGB study was actually worth the delay. But it's high time to start putting the actual game together. Tile maps are the last main feature I wanted to study, so I'll study a few miscellaneous classes briefly and then get on with the main project.

Wednesday, November 14, 2007

Week 19 -- More Torque

Cruising along on learning TGB. I learned GUIs pretty well, and I think they'll probably be useful for the game. The highlight was learning a neat trick to show any scene objects as part of a GUI, which at first I didn't think you could do. You create a t2dSceneWindow in your GUI the size of whatever scene elements you want to display. Then you create a new scenegraph (or I suppose you could use part of your main level), arrange your elements, and set your mini-window's camera to cover what you want to show. This is the detailed tutorial where I found this.

I also covered some smaller things: mouse handling, mounting objects, timers, and paths. Everything's going well. Paths took some trial and error to figure out, as the included documentation says nothing about the path functions. Eventually I found a better reference on the TGB wiki.

Indeed, the biggest frustration for me has been that it's hard to find materials for learning TGB as a beginner. I've found a lot of good things by now, but it's often been just chance browsing on the forums or searching on the wiki. There are several different "reference" sections that all have varying information. I'm happy figuring things out through experimentation, but I wish it were easier to find basic information for getting started. Maybe that'll be my next GarageGames post.

Sunday, November 4, 2007

Week 18 (!) -- Torquey Torque

Regular posting resuming in 3 ... 2 ... 1 ....

And we're back. I've been getting a bit of work in learning my way around TGB better. Did some with changing levels and controlling the camera. I found that you can make several distinct areas in the same level file and set camera limits so the camera doesn't slide over to the next area. I'm not sure whether it's better to make one big level for all similar areas or to make a separate level file for each area.

A bit of study on object layering. Figured out how to set up the layer sorting so that it'll come out right for a three-quarters view (meaning that objects in front are drawn in front).

And am currently learning TGB GUIs and the GUI Builder. This part is going better than I expected from my initial experience. It seems pretty powerful and usable so far.

I'll probably skip some of my planned study topics and return to the main project sooner than planned to help out the schedule.