Questions about performance: tactical missiles
-
Seems like a pretty clear cut thing. Wasted engine calls and computations should be removed. Even if it changes the balance a little bit, I'm sure it can be tweaked to be as close to normal as possible and then we can simply get used to the new change. A lot of games, at least with navy like Setons end up with a ton of tac missiles. I wouldn't be surprised if it hits performance quite a bit.
-
I'll do a proper investigation into the hit on the sim later today.
-
Could you post a comparison screenshot of the difference in missile arc?
-
@blackheart I'll make sure to add that in too. The screenshots that I'll provide will be just a draft - it will require some tinkering in the long haul.
-
Initial investigations with intended changes show a difference of 0.5ms - 1.0ms for 25 UEF cruisers firing. I have a fast processor, so this is easily 1ms - 2ms for a laptop. It is not significant, but a quick water drip reduction in a large bucket called the sim.
Low arc
Low-medium arc
Medium-high arc
high arcDisclaimers:
- They're both shooting at the same location.
- The UEF cruiser has been adjusted.
-
As a note a lower arc for missile make them more vulnerable to TMD’s
-
Yep - that is why this is a balance thing too.
-
0.5ms - 1.0ms for 25 UEF cruisers
What does that mean though? Is that 1ms over a 30min game or is that 1ms per tick? Per second?
-
That is per tick - apologies
To clarify further: there is 100 ms / tick to run the game at +0.
-
It would be pretty cool if cruisers could pick low or high arcs for missiles. Low arc: Missile flies up for a second then turns straight to target. High arc: Missile calculates turn rate on launch needed to follow semicircular trajectory.
-
That is for the balance team to decide - I'm just here to make things faster .
-
So if I understood you correctly we gain about a 1% speed improvement (1ms/100ms) in reasonable sized mid to lategame navy fights/sieges.
It's not huuge, but considering those are the situations where speed improvements matter the most it certainly is significant.
I'd say thats very much an improvement worth implementing.
Small balance note: Besides the TMDs there are also some maps that might be effected by different TML arcs. Previous save spots might be become hittable if the arc changes enough.
E.g. many spots on the setons islands are quite sensitive to the exact missile height and flight path -
I would disagree. 1% sounds pretty weak to me. Remember this means if you can make the computation completely instantaneous you will gain 1% performance. So in reality you will probably be able to gain somewhere around 0.5%. Surely there are higher priority performance issues?
-
@Askaholic It is a bucket of water - every drop counts. If we find 10 of these type of performance gains (ambient sound is another) then we have 5ms - 10ms additional time in a tick. I'm probably not going to take on this issue myself as it is not that hard to do. But it would be a nice beginners issue for someone who has not touched the code yet, is not able to analyze the code himself yet but does want to contribute.
-
@cheeseberry said in Questions about performance: tactical missiles:
So if I understood you correctly we gain about a 1% speed improvement (1ms/100ms) in reasonable sized mid to lategame navy fights/sieges.
It's a 1% speed improvement if your computer is just barely able to process all of the information (it takes 100ms to process the next tick's info)
If your computer is fast enough to process everything in 90ms, it's a 0% improvement
If there's an air fight and it takes 400ms to process all the info, this wouldn't give 1% performance improvement. Saving 1 ms would be 0.25% improvement.
Since it's normal for seton's to slow to -1 or even -2 if weak PCs are involved, even outside of air fights, saving 1ms per tick would end up saving 1 second every 1000 ticks (100 seconds) so ROUGHLY it could save 1 second every 2 minutes. If my math is right, for a 30-minute game, it would save about 15 seconds, or for a 60-minute game it could save less than 1 minute of real time. But that's assuming you constantly have 25 cruisers out. So really it would only save about 30 seconds of real time 1 out of every 10 games.
Not a bad thing, but definitely not worth "breaking" the balance. (Of course it remains to be seen whether such a change would even be a bad thing for the balance.)
Small balance note: Besides the TMDs there are also some maps that might be effected by different TML arcs. Previous save spots might be become hittable if the arc changes enough.
E.g. many spots on the setons islands are quite sensitive to the exact missile height and flight pathGood point. Unironically: we need to make sure this wouldn't break Astro Craters.
It's not MY map, but it's a very important map to the community just based on the amount it gets played.
I think also those people (craters folk) don't keep up with the balance patches so they will be surprised when they make cruisers and it just doesn't work.
-
@askaholic said in Questions about performance: tactical missiles:
I would disagree. 1% sounds pretty weak to me. Remember this means if you can make the computation completely instantaneous you will gain 1% performance. So in reality you will probably be able to gain somewhere around 0.5%. Surely there are higher priority performance issues?
Certainly cant be picky with performance gains, like @Jip said every bucket of water counts towards better performance, plus like Jip & Sprouto said it's not one big change that fixes performances its hundreds of changes like THIS, that fix the performance.
-
Yes but hundreds of changes that each break a little part of the game (like the ability of cruisers to shoot over the mountains in Astro Craters) would add up to a lot of damage to the quality of the game.
-
As long as it doesn't impact balance too much - haven't heard anyone in this thread have anything solid on what practical balance impacts it will have as opposed to kind of vague possibilities, then I think we should do it. I don't like the idea that we should ignore it just because it's a small improvement especially since @Jip is saying it's an easy change. A good number of small improvements leads to a much bigger and more noticeable overall improvement. Granted if this wasn't an easy change then it might not be worth it over more impactful changes, it sounds like the only complexity is that it might impact balance.
-
Yes but hundreds of changes that each break a little part of the game (like the ability of cruisers to shoot over the mountains in Astro Craters) would add up to a lot of damage to the quality of the game.
The whole point is that I'm not breaking the balance - it just needs to be re-balanced with new parameters. As I mentioned when I made the images, they're a draft. Just an initial test to see if it is possible. Give someone another hour or two and they'll be roughly identical.
-
The thing about performance optimization is it’s extremely weird, counter intuitive, and will almost certainly be a disaster if you don’t collect adequate profiling data at every step of the way. One optimization can easily gain you more performance than hundreds of other ones combined if you prioritize correctly. If you just start optimizing stuff arbitrarily because a tingling sensation in your tummy tells you it’s a good idea then you’re probably gonna end up wasting a lot of time and see no benefit (but you might end up breaking the game in the process). IMO what you want to do is gather a bunch of metrics on different possible optimizations and then decide which ones to go with (I think this is what Jip is doing in his main thread). So really, we should look at this change in the context of all the other proposed changes, and my guess is we’ll probably find a lot of other stuff that is more beneficial and less dangerous.