Game Development Community

ITickObject vs IAnimatedObject

by Scott Goodwin · in Torque X 2D · 02/02/2008 (10:17 am) · 2 replies

I'm not clear on the difference between ITickObject and IAnimatedObject. How do you decide which to use?

I think there are several factors involved. One is whether the tick rate is constant or variable. Another is whether the object needs to process Move.

Can someone shed some additional light on this?

#1
02/02/2008 (10:50 am)
Ticks happen at regular interval, and are for gameplay functionality things, and things that interact with the physics system.

Animation callbacks happen on scene renders, and are for graphical things that need to be in sync with that, like animations.

An animated sprite uses the animation callback to figure out what to display, and the tick callback to control its position in the scene.
#2
02/02/2008 (11:16 am)
@Dan

Ah, that makes sense. Thanks.