Game Development Community

Does schedule cause slowdown?

by Tim Saunders · in Torque Game Builder · 09/17/2006 (1:58 am) · 1 replies

Hello,

My game seems to slow down quite a lot when a lot of things are happening at once and I wondered if the fact that I am calling loads of schedule functions might be part of the problem.
I remember reading somewhere that using onUpdateScene might be more efficient, although I can't for the life of me find where it was and thought I may have dreamt the whole thing up.

Does anyone know whether it is worth changing all my schedule events to work on a overall game timer?

#1
09/17/2006 (2:57 pm)
Little background on what schedule actually does:

When you use a schedule, it creates a SimEvent that contains the command that you want scheduled, then places that event on the processing queue to be processed after a fixed number of ticks goes by (NOT a fixed duration, although all things being equal, it will be close).

If schedule seems to be slowing your performance down, then you may want to re-think your overall design, as the true symptom is an extremely large number of events going on in your game that probably should be refactored.