Game Development Community

Ghosts Active" discrepancy?

by Adios, Man! · in Torque Game Engine · 12/05/2005 (3:41 pm) · 4 replies

If you run the starter.fps on a regular 1.4 install you will notice that the game starts with the netgraph reporting that there are around 18 ghosts active. If you use onCyclePauseEnd to load the "next level", the ghosts active count goes up to above 36. Whenever you load subsequent levels, the ghosts active count continues to rise by 20 or so.

Now, for the game that we are working on, our first level starts with 67 ghosts active. The next several levels are exactly the same, and the ghosts active count increases by exactly 67 every time. After playing the game for half an hour, the ghosts active count can get as high as 1000.

We've noticed, too, that the game gets slower as time goes by. If we disconnect the server and start again (without quitting the program) our ghosts active count goes back down to 67, and the game runs as fast as usual. Is it possible that a high ghosts active count would make the game slower?

I know that there are several instances where the game will loop through all of the ghosted objects (such as the radar), so it is possible that the performance would decrease as the number of objects went up. At the same time; even if the game is really keeping track of 1000 ghosts, we know for a fact that only 67 are really there.

Has anyone looked into this issue. Is there a way of "purging" unnecessary ghosts?

#1
12/05/2005 (4:25 pm)
Are you adding them to the MissionCleanup set and then clearing that set?
#2
12/05/2005 (5:16 pm)
Yes. Any objects that are added to the MissionCleanup group are being deleted between rounds. It's basically the same code that is used in between levels in the starter.fps.
#3
12/05/2005 (5:27 pm)
And are you adding the ghosts you are creating to the group?
#4
12/06/2005 (3:45 pm)
Yes. Everything gets added to the MissionCleanup group. We aren't doing anything that the torque demo code doesn't do.