Gun Turret shooting speed.

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
User avatar
oLaudix
Filter Inserter
Filter Inserter
Posts: 285
Joined: Sun Jun 14, 2015 3:24 pm
Contact:

Gun Turret shooting speed.

Post by oLaudix »

When fully upgraded Gun Turret's shooting speed shows: 10+16/s. So in theory it should use about 2.5 clip per second. I got curious because that gives much higher dps than laser tower and was very disappointed when i saw this: https://gfycat.com/SomeFinishedDuckbillcat. Granted it was recorded with 30 ups but still souldn't it shoot faster?
Image
cartmen180
Filter Inserter
Filter Inserter
Posts: 358
Joined: Fri Jul 25, 2014 2:53 pm
Contact:

Re: Gun Turret shooting speed.

Post by cartmen180 »

gun turrets are op and dispense their ammo a lot faster than on that gif. I don't see the use of laserturrets. I need that powar elsewhere!!
Check out my mods
User avatar
oLaudix
Filter Inserter
Filter Inserter
Posts: 285
Joined: Sun Jun 14, 2015 3:24 pm
Contact:

Re: Gun Turret shooting speed.

Post by oLaudix »

cartmen180 wrote:gun turrets are op and dispense their ammo a lot faster than on that gif. I don't see the use of laserturrets. I need that powar elsewhere!!
Turret was shooting at half of its normal speed since i only have 30 udp in that save. But still twice as that is not fast :/
Image
bobucles
Smart Inserter
Smart Inserter
Posts: 1708
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: Gun Turret shooting speed.

Post by bobucles »

Gun turrets have some lag when switching between targets, since they use simulated swivel turrets.

Make sure it's fully unloading on a big'n before recording.
User avatar
oLaudix
Filter Inserter
Filter Inserter
Posts: 285
Joined: Sun Jun 14, 2015 3:24 pm
Contact:

Re: Gun Turret shooting speed.

Post by oLaudix »

bobucles wrote:Gun turrets have some lag when switching between targets, since they use simulated swivel turrets.

Make sure it's fully unloading on a big'n before recording.
It was. Target switch occured only once during this short clip.
Image
bobucles
Smart Inserter
Smart Inserter
Posts: 1708
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: Gun Turret shooting speed.

Post by bobucles »

It is common in games for fast weapons to suffer from an "integer rounding" glitch. What I mean is that the game counts each frame until a weapon is ready to attack, and then the counter is reset, eliminating the overflow. What you get are weapons that "round down" their attack speed to instead attack every X number of frames, and weapon speeds in between these values have no effect. Dealing with attack speed "breakpoints" was a major deal in the sprite based Diablo II game. Here's a little article on it:
http://diablo2.diablowiki.net/Breakpoints

I don't know how factorio tracks weapon attacks. But if a weapon attack occurs every X integer number of frames, you will get major issues with weapons that attack more than 10/sec, and weapons that fire faster than the frame rate will absolutely cap at 1/frame. The breakpoints would be as follows, given 60 game ticks per second:

Code: Select all

Att/s. frames
10     6
12     5
15     4
20     3
30     2
60     1
If there is a breakpoint issue, the fully upgraded 10+16 weapon would be frame capped to attack 20 times a second. But you clearly don't shoot at that rate. You claim the simulation is running at half, and the fire rate is closer to 5/sec. Doubling the measurement suggests the weapon is firing at about 10/sec. It is more likely that your attack speed isn't being properly augmented by the research at all.

It is also possible that the turret is losing attack frames to track a moving enemy target. You still suffer from a breakpoint issue here, where after every attack you lose some number of frames to re establish a lock on the enemy. In this case the loss of attack speed would be more unpredictable and depend on how well the turret can aim. Wasn't the turret code changed recently?

It would be nice to have a dev tool to step the simulation one tick at a time. It would have some nice niche uses for getting exact measurements on stuff.
User avatar
oLaudix
Filter Inserter
Filter Inserter
Posts: 285
Joined: Sun Jun 14, 2015 3:24 pm
Contact:

Re: Gun Turret shooting speed.

Post by oLaudix »

bobucles wrote:It is common in games [...] for getting exact measurements on stuff.
I see. So it might be similar issue as modded Assembling Machines. 2 bad, since I wanted to replace my laser turrets with gun turrets.
Image
Post Reply

Return to “Gameplay Help”