HotSake wrote:Roger L.S. Griffiths wrote:...
Just want to be sure I understand: you're saying that the beam is only actually firing for about half the time there is a visible beam on-screen. During the remaining interval, while the player is holding down the mouse button, the beam is neither draining energy nor doing damage, and the visible graphic is purely cosmetic. Energy recharges during this interval, and the beam fires again before the beam effect fades from view, creating the illusion that it never stopped firing.
Is that right?
edit: Sorry, this is getting into the ES implementation topic. Let me know if I should delete this and x-post it there.
I think I explained it in my mechanics thread, but several people have raised the issue here so we may as well address it here.
Let us say the bullet damage is 1000 with a bullet life of 0.5s and a refire interval of 1.0s. In the AI hands, the beam will pulse for 0.5s and rest for 0.5s applying damage at a rate of 2000 per second for the duration of the pulse (overall damage per second is 1000 per second though). The player on the other hand will do a continuous 1000 damage per second over the duration of the beam firing.
Due to the fact that hardcoded beams are "damage/drain per second type weapond" if the energy cost for the bullet is say 100 the energy demand is not the full 100 but 100/s (continuous energy drain over time). With the bullet life at 0.5s, the beam will persist and continue to do damage for 0.5s after ship energy has been exhausted for that 0.5s. In this case the actual required energy demand for apparent continuous firing is slightly less than 100/s but in practical terms a single beam will still need 100/s but due to the 0.5s after bullet life it is possible to appear to be able to fire two beams continously for less than the combined draw of 200/s (150/s would be needed in that case if I am not mistaken).
This is where my original comment about matching bullet life to refire interval comes from, if they are the same then the performance between AI and Player should be the same. If the bullet life is shorter than the refire rate then the damage will be dealt quicker to a target by the AI than it is by the player. If the bullet life is longer than the refire interval then the maths gets more complicated, but essentially when the AI fires multiple beams can appear to exist from the same weapon on potentially different vectors at the same time.
For example, let us take the 1000 per bullet with a 2s life and a 1s refire interval. The AI will deal 500/s to any given target but due to upto 2 bullets persisting at any given time the mean effective rate of damage is still 1000/s. However, in Player hands the beam will deal 1000/s regardless of the bullet life and will have a post firing persistance equal to the bullet life. So in this case the post firing persistance is 2s meaning that the ship can be short of the beam's energy demand for 2s but providing there is sufficient energy for the beam to pulse again in the 2s period it will give the appearance of continuous fire (theoretical energy mean energy demand of 50/s for one beam).
If the bullet life is kept short, and the refire rate reciprically high (e.g. 0.1s bullet life and 600rpm refire rate) then the after bullet persistance will be less prenounced and the beam will visually stop firing when energy demand is not met. If the bullet life is longer and the refire rate reciprically lower (e.g. 5s bullet life and 20rpm refire rate) then the bullet persistance will be more pronounced and actual energy demand in low energy cases will be lower than expected for the player. With the bullet life and refire rate matched appropriately, the AI turrets will perform the same as the player overall.
The main differences in beam balance being that:-
- the AI turret logic is restricted by the refire rate with respect to the number of targets that can be engaged where as the player is not.
- longer bullet lifes will mean that the player can use the post-firing persistance to their advantage to increase overall damage per second by rapid pressing of the fire key/button (not too different from charging of projectile weapons)
Lenna (aka
[SRK] The_Rabbit)
"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55
"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb
"When eating an elephant take one bite at a time" -
Creighton Abrams