|Date:||12/2/2003 6:57:39 PM|
|Subject:||RE: Dynamic thinking entities: A study in opti|
From what i understand about quake III, which is admitedly little, the game runs 1000 times per second and each entity in game has a think function and a think time. So every cycle the game runs through every entity and decides what has to "think" by looking at the think time which calls the think function.
What shadowspawn is saying is for things like proxies and goodyears the think function is called farily often (its what tells them they need to blow up). To do that they check to see if there is an entity within range and than some more checks to see if its something worth blowing up for. So every time the proxies "think" they have to look through all the whole array of ents every time. Hes sugessting that if there is no enemy that could possibly even be within range by the time it needs to think again why not just make the nextthink time farther in the futrue than normal. I seems like a good idea, especially if you have alot of enteties.
Something ive wondered about though, especially for a team based game like WF. Would it be possible to keep a list of indexes to the ents that are enemy players and have things like proxies/sentries/goodyears run on that instead of the whole ent list. Seems like a waste to run a check on a rocket or something like that.