Turrets manned by the blind?
Moderator: Moderators for English X Forum
-
- Posts: 629
- Joined: Tue, 6. Mar 07, 17:48
Re: Turrets manned by the blind?
Its not just turrets... i saw a massive firefight in the distance... then i looked at my radar and i only saw a songle blip, xenon N, went in the fight and saw over 20 fighter chasing it and firing always missing, my weapon was also missing untill i was under 500m then i started scoring hits... it was incredible to see alll these bullets from over 20 fighter plus capital ship all missing a single small scout ship...
I do hope somebody work on thats because thats just plain.... well finish that sentence i know i dont have too.
I do hope somebody work on thats because thats just plain.... well finish that sentence i know i dont have too.
-
- Posts: 125
- Joined: Tue, 15. Dec 09, 15:44
Re: Turrets manned by the blind?
I guess Egosoft are just huge Gazz fans 

-
- Posts: 410
- Joined: Fri, 31. Mar 06, 20:07
Re: Turrets manned by the blind?
I would say "That's why we have GPUs" but it seems not everyone has a number of CUDA cores available to themGazz wrote: ↑Sun, 2. Dec 18, 02:25 Yes, I know this can be done "properly" but in a game that's very often not an option.
You look for ways to cut corners and get a "good enough" solution with 2D or 2.5D math or completely unrelated but faster functions.
You don't have to get it to work once. You have to get it working at a high frequency for hundreds of entities. Math is great and useful but not always the right answer.![]()

Streaming most nights 1800-0000ish at www.twitch.tv/chthonicone/
-
- Posts: 36
- Joined: Thu, 16. Mar 17, 01:38
Re: Turrets manned by the blind?
This is a known issue that ES is working on. In CohhCarnage's stream, Lino jumped in to explain. He said the targeting calculation is "expensive" meaning it takes up too much cpu time and can't be done any more frequently. He also said ES is working to improve this. I've found the specific timestamps for the stream and linked them below in case anyone wants to check this out or verify.
https://youtu.be/woVMZBJHKBQ?t=1470 (Example of this issue in combat)
https://youtu.be/woVMZBJHKBQ?t=1760 (Example showing turrets are accurate if target isn't moving and the calculation doesn't become out-of-date too soon)
https://youtu.be/zDtkvCphBHY?t=255 (Lino's responds on this issue in stream. continues at 6:14)
https://youtu.be/woVMZBJHKBQ?t=1470 (Example of this issue in combat)
https://youtu.be/woVMZBJHKBQ?t=1760 (Example showing turrets are accurate if target isn't moving and the calculation doesn't become out-of-date too soon)
https://youtu.be/zDtkvCphBHY?t=255 (Lino's responds on this issue in stream. continues at 6:14)
-
- Posts: 410
- Joined: Fri, 31. Mar 06, 20:07
Re: Turrets manned by the blind?
Just some optimization ideas here:
Sine and Cosine are expensive CPU functions if you want exact values. You don't have to use exact values though. If you store the values for Sine from 0 to 2 Pi in small enough increments in an array, you can just look up what the value should be, and for Cosine you just shift over.
Calculating distance can be expensive because of square roots, but in many case it's not the actual distance you need, but the relative distance, as in what is closer. In this case you can compare the square of the distances, which skips the square roots.
If you have other expensive calculations that you need solutions for, I can try to come up with something. Just remember memoization and approximation can be a solution.
Sine and Cosine are expensive CPU functions if you want exact values. You don't have to use exact values though. If you store the values for Sine from 0 to 2 Pi in small enough increments in an array, you can just look up what the value should be, and for Cosine you just shift over.
Calculating distance can be expensive because of square roots, but in many case it's not the actual distance you need, but the relative distance, as in what is closer. In this case you can compare the square of the distances, which skips the square roots.
If you have other expensive calculations that you need solutions for, I can try to come up with something. Just remember memoization and approximation can be a solution.
Streaming most nights 1800-0000ish at www.twitch.tv/chthonicone/
-
- Posts: 52
- Joined: Sat, 16. Nov 13, 07:48
Re: Turrets manned by the blind?
Improving just for the player ship? Wouldn't that be a massive unbalance or make your escorting frigate useless?rulerofallcheese wrote: ↑Sun, 2. Dec 18, 04:07 https://youtu.be/zDtkvCphBHY?t=255 (Lino's responds on this issue in stream. continues at 6:14)
-
- Posts: 100
- Joined: Tue, 3. Mar 15, 13:32
Re: Turrets manned by the blind?
Gazz, are you back to modding for X4?Gazz wrote: ↑Sun, 2. Dec 18, 01:21 It's not quite that simple.
Ships have the annoying habit of not flying in a straight line so all too often any calculation fails as soon as you begin it because the ship has already changed course again by the time the projectile could arrive.
Then there's the issue of what you do in hardcode, which parts you externalise and how fast all that is. It's complicated and that's just the rough design.![]()
If so, everybody get hype!!!
-
- Posts: 23
- Joined: Tue, 6. Jan 04, 17:06
Re: Turrets manned by the blind?
Is the game multi threaded? Could they stick that calc on another thread?
Sure I remember other x games running on a single core...
Sure I remember other x games running on a single core...
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
Re: Turrets manned by the blind?
LOL! No!
I haven't even installed the game. Going to look at it over the holidays but mostly I'm missing time for games.

And what everyone else said. There are some optimisations you can use for calculations like that because absolute precision is neither useful nor desirable.
All of that must be done at the code level, though.
And casually adding multithreading is not a thing if the software is not specifically written for that. Technically it's a suitable application for it because individual turrets are largely independent entities but most games have a strong reliance on sequential events so the engineering effort may be massive.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
-
- Posts: 1
- Joined: Sun, 2. Dec 18, 23:44
Re: Turrets manned by the blind?
Three Hurrays for Gerbils who have been promoted from Navigations to Turrets.
-
- Posts: 100
- Joined: Tue, 3. Mar 15, 13:32
Re: Turrets manned by the blind?
WE NEED YOU!!Gazz wrote: ↑Sun, 2. Dec 18, 22:18LOL! No!
I haven't even installed the game. Going to look at it over the holidays but mostly I'm missing time for games.
And what everyone else said. There are some optimisations you can use for calculations like that because absolute precision is neither useful nor desirable.
All of that must be done at the code level, though.
And casually adding multithreading is not a thing if the software is not specifically written for that. Technically it's a suitable application for it because individual turrets are largely independent entities but most games have a strong reliance on sequential events so the engineering effort may be massive.
I'm sure I speak for a lot of people when I say your mods were MANDATORY for my X3 games.
-
- Posts: 53
- Joined: Thu, 15. Dec 11, 15:46
Re: Turrets manned by the blind?
It's very surprising to me that the targeting calculations are expensive.
Yes you can do complicated things to account for predicted movement patterns and the like, but linear prediction (basically seek behaviour) should be enough. I'm honestly really curious why is doesn't work here.
Use the projectile and enemy velocity to calculate where the enemy and the projectile will collide, calculate the quaternion to rotate to it and clamp to turret constraints, lerp from current heading to target heading.
On face value it looks like it'd be a perfect fit for a massively multi-threaded task system (I bet they've done what everybody else has done and implemented the Naughty Dog fibre system), what gives?
Yes you can do complicated things to account for predicted movement patterns and the like, but linear prediction (basically seek behaviour) should be enough. I'm honestly really curious why is doesn't work here.
Use the projectile and enemy velocity to calculate where the enemy and the projectile will collide, calculate the quaternion to rotate to it and clamp to turret constraints, lerp from current heading to target heading.
On face value it looks like it'd be a perfect fit for a massively multi-threaded task system (I bet they've done what everybody else has done and implemented the Naughty Dog fibre system), what gives?
Last edited by cfehunter on Mon, 3. Dec 18, 18:47, edited 1 time in total.
-
- Posts: 62
- Joined: Thu, 29. Nov 18, 18:40
Re: Turrets manned by the blind?
So, I've mentioned this in a few other threads, but if targetting is the issue, why not use flak turrets? I remember way back in X3R, flak turrets worked great on my Split Python. They would literally decimate CLOUDS of M's N's L's etc. in Xenon sectors.
They were basically just powerful, short range shotguns. Until the turret mods from Gazz came around, flak was the only effective choice for turrets... I know that isn't a great choice for forward looking turrets--not sure how common that is in X4 yet, but it would be better than what we have now for side turrets.
They were basically just powerful, short range shotguns. Until the turret mods from Gazz came around, flak was the only effective choice for turrets... I know that isn't a great choice for forward looking turrets--not sure how common that is in X4 yet, but it would be better than what we have now for side turrets.