I’m sure I’ve seen this somewhere but can’t remember where and it might have been in C# anyway.
I have a bunch of game-objects that get looped through each being updated. Is it possible to break an update method if its taking to long?
For instance if a programmer adds a bunch of code that takes to longer to do during 1 update cycle can I terminate its update (while updating) so that the frame-rate of the game remains constant?
I’d guess this might have todo with threading but I’m not sure.
Thanks,
Phil.
If you control the interface of the update, you could pass it the permitted time, and have the game object terminate itself. Kind of like cooperative multithreading.
This could be your best bet if you have very many objects, since you cut the overhead of real threads.