Thursday, June 29, 2006

Torque... Game Builder?

So, I'm finally managing to upgrade from Torque 2D Alpha 2 to "Torque Game Builder", which is apparently the beta version of Torque 2D.

I haven't got to play with it much, but I'm already excited. They have packages!

Packages are when you can define code without executing it. The primary usefulness is making polymorphic functions. You can have a global function, then have another version of that function in a package. When you load the package, it overwrites the global function.

So what? Well, here's the kicker: when you unload the package, the global function comes back.

For a simple example, lets say you want your player to be "dizzy" for a while. Well, just load a package which overwrites the default control functions with something less reliable. Then, when the timer is up, unload them.

That's a pretty poor example, because it can be easily emulated by checking a "dizziness" variable and calling a different function. But, take my word for it, packages are a very powerful design feature.

Also, Game Builder has a snazzy interface that handles what appears to be the vast majority of the busywork. To me, that's secondary to the radically enhanced capabilities that packages give. So many of my algorithms are suddenly simplified!

If you have an early adopter T2D license, go download the new version.

No license? You can buy it. It's no longer hella-cheap, but it's still pretty cheap.

My vigor is renewed! Expect something fun soon!

1 comment:

Craig Perko said...

That's interesting, because I can't find any documentation for them ANYWHERE.

Kind of irritating. I would have been using them for a year, if they had been listed somewhere obvious.