Ambrosia Garden Archive
    • Clarifying burstcount and burstreload


      How does burstcount and burstreload work with regular reload? If burstcount and burstreload are used, is regular reload ignored?

    • Only if the Burst Count is 1.

    • To expand on Josh's answer, the game pauses for the reload between each shot as normal, unless the previous shot filled the BurstCount, in which case, it pauses for the BurstReload instead. To give an example, supposing the BurstCount is five, then the timing used would be

      1 (Reload) 2 (Reload) 3 (Reload) 4 (Reload) 5 (BurstReload)... 1 (Reload) etc

      As Josh pointed out, if the BurstCount is one, then every shot fills the BurstCount, so every shot is followed by the BurstReload.

    • Further clarification:

      When you have n copies one of a weapon (assuming it doesn't fire simultaneously) the effective reload becomes R = -1 + (Reload + 1) / n with a minimum of zero.

      With BurstCount, each copy of the weapon fires BurstCount time before BurstReload, so the pattern is,

      1 (R), 2 (R), ..., nBurstCount - 1 (R), nBurstCount (BurstReload)

      This means the total TIME between between BurstReloads (time firing) is 1 + (n - 1)*BurstCount * (1 + R)

      So if your weapon has reload 1 and you have one of them, it fires every other frame. If its BurstCount is five it fires five times, which takes 9 frames, before BurstReload.

      If you have two of them its effective reload becomes 0 so it fires every frame. It now must fire ten times (five each), which takes 10 frames, before BurstReload.

      If you have three of them its effective reload is STILL 0, but now it must fire fifteen times (five each), which takes 15 frames, before BurstReload.

      In general, if you don't have enough copies to bring R down to 0, it takes approximately the same time between BurstReloads because the rate of fire is increased. If R is brought to zero, each additional copy of the weapon increases the time between BurstReloads but NOT the rate of fire.

      Edit: Additionally, note that even if BurstReload is SHORTER than Reload, the delay after BurstCount shots will still be BurstReload. This means you can make every nth shot actually come out SOONER than normal.

      This post has been edited by Qaanol : 17 April 2008 - 09:11 PM

    • So then the proper code (in pseudocode) is:

      $R = -1 + (Reload + 1) / weapCount
      $frame = 0
      $burst = 0
      $reloadcount
      Loop while $frame <= frames_to_fire
      if($frame == 0){
      Fire_weap($frame)
      } else if($reloadcount = $R && $burst < burstcount) {
      Fire_weap($frame)
      $burst++
      $reloadcount = 0
      } else if ($burst >= burstcount)
      $reloadcount = $R - burstreload
      } else {
      $reloadcount++
      }

      That should work. I'm firing one weapon at a time, and recording on which frame it fires (which is why it is fed $frame)

      I'm also implementing firing angle soon. It will take an angle in degrees off the front of the ship (0-180) and using innacuracy and the possibility of negative speed for forward-firing weapons, and the turret angle for turrets, only include weapons that will hit (for + values of innacuracy, it will assume a best-case scenario where every shot is aimed properly.