Game Development Community

Game Loop ????

by Mike Wigand · in Torque Game Engine · 02/05/2002 (1:23 pm) · 3 replies

Im trying to find where I would place some code that would execute every game cycle. Would this be in the scripts or in the engine?

Thanks,
Mike

#1
02/05/2002 (1:55 pm)
It would be in the engine. I believe that the location you are looking for is, unfortunately, located in each platform directory. Basically you'd have to add your code to each platform 'loop'.

Ryan J. Parker
rjp@lomag.net
#2
02/05/2002 (3:02 pm)
Are you sure? I'm not very experienced with the torque codebase but it seems to me that's in "game/main.cc", in the main() function. (The render itself being done in the processTimeEvent() indirectly called by main() through TimeManager::process()).
#3
02/06/2002 (12:51 pm)
Putting your function in processTimeEvent has the added value of being journalable, much nicer for debugging.