briceman2 wrote:NeoThermic wrote:...my testing of spawning DGs in Darwinia showed that 10k DGs can be on screen without too much performance loss. This was with an ATi 9600 Pro, so newer cards should do better...
The performance problem is *not* rendering that many DGs -- rendering what are essentially sprites is probably the least of the burdens caused by DGs.
Clearly my first few lines were outright ignored:
NeoThermic wrote:Least not forgetting that you can just as easily ignore the AI states of non-visible DGs (as long as the AI is stage based and one can jump into it at request) as well as not drawing them, so Multiwinia shouldn't have to draw and AI much.
I.E. if there's DGs on the map that are not your DGs, not engaged with yours and not visible on your screen, they can be ignored.
briceman2 wrote:When you have just one team on the map, you can run thousands, as you found. But as soon as they have enemies, or building ports to run to, or officers to follow, or turrets to run away from, then the ceiling becomes much much lower. The game seems mostly CPU bound (AI), not GPU bound (rendering).
That is strange. My rendering test was an officer in the middle of a large map calling DGs over to itself as they spawned. I never experienced such issues. I also tried a test where 10k red DGs were pitted against two converging teams of yellow and green DGs of 5k each.
Moving them was not a problem, the
main performance issue came from the second after a grenade impact; my theory being the game was sorting through the list of DGs and removing those who were dead, while adding to the sprite list the DG pieces to animate for their deaths.
Further still, in what looks like a huge lightsaber battle, two teams (red vs green)
pitted it out on the test terrain. When the greens started to lose, I
gathered them up for a proper attack. These caused no fps issues past drawing the souls, reds and greens.
briceman2 wrote:Plus there are weird cases where performance suddenly goes to single digit fps for no apparent reason. If you have several hundred DGs in a group and an enemy unit flies overhead (invaders, jellyfish, triffid eggs, flying ants, etc.) then the DGs will try to fire their lasers into the air. For some reason this is EXTREMELY resource intensive. As soon as the DGs stop firing up, and return to firing along the ground, fps returns to normal. I've seen drops of 50fps to 5fps with only a few hundred DGs.
Again, this is strange. I experienced reverse issues. taking 50k DGs on an island, I then spawned a squad and fired a grenade into the centre of the bunch. The FPS improved, since the whole group had found something that their AI was set to avoid. (this being the before
http://www.neothermic.com/darwinia/stre ... nshot2.png ) As soon as the nade went off, however, the performance dropped further than having 50k DGs idle. As above, removing the dead and replacing them with their bits consumed more time.
briceman2 wrote:You can also cause this problem by having an officer gather thousands of DGs into a tight group, or send them all to a single radar dish door. Suddenly the engine can no longer handle all the DGs that were running fine before you gathered them. Unfortunately the EntityGrid never gets smaller, so once you've hit the ceiling you're stuck with sucky performance until you leave the level. Disbanding the DG clusters, leaving and re-enering the level can often gain me +20fps since the EntityGrid will restart at a much lower density / size.
Again, I never had such issues. I'd assume, then, that these are bugs native to the Linux version?
Don't forget though, that rendering issues can cause more problems than AI issues. Defcon is a perfect example of that; the rendering order is suspect at best and causes a performance drain. Even though they are sprites.
NeoThermic