Game Development Community

New to TGB Pro and have some newb questions

by Acy Forsythe · in Torque Game Builder · 02/22/2008 (9:00 am) · 1 replies

I just have some hopefully basic questions that can easily be answered. They are simply conceptual in nature, nothing technical.

Some of the tutorials use for instance player class objects, and define everything about the player in that "Class", other tutorials do the exact same thing with the exact same results, but use behaviors instead. My questions then are:

1. While I know there are always different ways to do something, is there any reason to use one over the other, is one newer and the other outdated? Can anyone give examples of why one should be used over the other in a specific circumstance?

2. Should both methods be used in conjunction with each other, and if so, are there any basic guidelines on which data should be defined in a class and which data should be defined in a behavior?

#1
02/22/2008 (9:14 am)
Behaviors are newer, they were introduced in version 1.5. Generally speaking, it's probably better to use behaviors when you can. Some object types don't support behaviors currently (e.g. t2dSceneWindow) so you can't use them everywhere, though.