Game Development Community

Using iTickable vs overriding integrateObject

by Cooper Sellers · in Torque Game Builder · 03/09/2006 (5:31 pm) · 2 replies

Anyone have any insight on using iTickable vs simply overriding integrateObject? I have done it both ways but am unsure if there are any gotchas I am potentially flirting with here. I am currently using iTickable just because it seems that is what the object was designed for, but perhaps it is just as easy and safe to override integrateObject?

#1
03/09/2006 (11:36 pm)
ITickable wasn't actually designed with TGB in mind--it was to provide TGE the capability of ticking things like GUI objects, or other lightweight objects that didn't need to inherit from a pretty "fat" class (GameBase) where the ticking functionality is implemented. For reference, the TGE primary object hierarchy is about 6-8 objects deep to get to the "most useful" classes, whereas TGB has a 3 to 4 level depth (depending on the object being used).

For TGB, I'd certainly stick with integrateObject, since it's part of the core TGB physics and simulation processing...you would basically wind up re-implementing what integrateObject does within your iTickable implementation for just about anything you would want to do.
#2
03/10/2006 (8:39 am)
Thanks for that bit of clarification. For what I'm currently doing, it works fine either way I go, but I'll defer to single inheritance and a simple override.