high missile count performance problem

Newbie Spellweaver
Joined
Apr 17, 2026
Messages
37
Reaction score
40
I have simply test case: 10 * 255 cold storm missiles.
They cause me to spend ~14ms per frame in scene tick and its children.
4ms of that is collision detection.
8ms of that is effect tick, pretty much only particle system (and particle) ticks.

Does anyone have any ideas how to improve it?

Following things i tried:
getting rid of "new" and managing static memory manually. (at most 1ms improvement, margin of error stuff)
changing m_vecParticle to an array (again at most ~1ms improvement)
moving some stuff out of the inner particle creation loop. (no change)

Nothing else seems obvious by itself, making me suspect bad memory access patterns leading to suboptimal cache use.

What i haven't tried yet is to get rid of the the object->bodycon->particlesystem->particle chain and do a breadth first list instead.
It doesn't seem obvious if that would help or not (it does for rendering but for ticks it shouldn't i feel).
Has anyone tried that yet?

I guess there is always the option of offthread or even multi threaded particle ticks but that is no fun at all.
 
I can give a theoric idea but kinda funky for this type of game


Making Server Calculate the Missile Speed and everything related, but only as a non-collision object, this way, the blob/sphere that represents missile's server-side position etc. can be ran on server with a spline like this that calculates its path every 0.1 path meanwhile tick moves it uhhhhhhhh i cannot trully describe it with words

Meanwhile Client only loading the missile's model+animation+effects making server not needing those useless things but only keep them as missile's info inside it

man, hard to describe with words but also this game is too old from my view and too inefficent to deal with this kind of system to make it worth it
 
Upvote 0
small update:
i went with the not so fun option.
moving the missiles characterinfo ticks into a seperate thread reduced it from 12-14ms down to 6-8ms.
the rest seems to be mostly collision code.
 
Upvote 0
Have you ever considered (ever) to switch server binaries to 64bit as well? Indeed it will use 14-15gb on just Field and NPC running, but the loading issues and speed, drop dramatically.

i did try 64bit server for a while but noticed to improvements at all.
however the 64bit port was a bit buggy and unstable so that probably didn't help either.
I have not tested the server under high connection count load yet, so maybe the difference would be more noticeable there.
 
Upvote 0
Back