Software Documentation


IntegrationLast updated: September 27, 2019

10 Timing of shots within a cake

If you know the duration of a cake, you can determine the average time between the shots within the cake with a few simple calculations. But that’s only the average time. If the cake has longer delays between the rows or a mixture of row firing speeds, then the calculations require more steps. This section walks through the procedure.

First, consider a cake like,

10 Shot 25s Red Peony Cake 2.5s PFT

Usually, cake descriptions don’t include the prefire time explicitly (e.g., 2.5s PFT), but we’ve included it in this description because the prefire of the last shot factors into the calculation of the timing. If the description doesn’t specify the prefire explicitly, then the prefire is a default value based on caliber.

Here’s how the prefire factors in: the duration of a cake is “first launch to last break” if the last effect in the cake is a shell, as it is in this example. So to calculate the average time between the shots of the cake, the formula is,
ShotSeparation = ( CakeDuration – LastShotLiftTimeIfShell ) / ( NumberOfShots – 1 )
Which in this example is,

ShotSeparation = ( 25 - 2.5 ) / ( 10 - 1 )
= 22.5 / 9
= 2.5 seconds between shots

In conclusion, the cake in this example has 10 shots, separated by 2.5 seconds.

A second example illustrates a cake that has non-uniform timing:

20 Shot 15.0s (a) Red Comet + (b) Aerial Popcorn Crackle Cake, 4 Rows, Rows 1,2,3 (aaaaa/STR/2.0), Row 4 (0.5/bbbbb/FNT)

Before calculating the shot timing, let’s review the description to identify what the specifications are, and what remains to be calculated. The cake has 20 shots, divided equally in four rows of five shots each. The first three rows are identical, firing a straight up sequence (“STR”) of effect “a”, the red comet, with a 2.0 second duration from the first to last shot within the row. The last row has a 0.5 second delay before the row, which is an all-at-once fan (“FNT”) of the “b” effect, the popcorn crackle shell. Assume for the sake of this example that the default lift time of the popcorn crackle shell is 2.5s.

The first step in calculating the shot timing is to calculate the time from first to last shot:

TimeFirstToLastShot = CakeDuration - LastShotLiftTimeIfShell
= 15 - 2.5
= 12.5

All of the interior delays thus have to add up to 12.5. What are the interior delays? The delay timings within each row are regular, but the delays between rows can vary, and the rows themselves can have different durations, depending on the specifications. Any unknown delays are assumed to be identical, treating unknown delays between rows and unknown delays between tubes within rows as all the same. In this example, the delays are,

FirstRowDuration + DelayBeforeSecondRow
+ SecondRowDuration + DelayBeforeThirdRow
+ ThirdRowDuration + DelayBeforeFourthRow
+ FourthRowDuration


2 + DelayBeforeSecondRow
+ 2 + DelayBeforeThirdRow
+ 2 + .5
+ 0

= 6.5 + 2 * DelayBeforeSecondAndThirdRow (the delays are the same)

Knowing that the total must equal 12.5, we can calculate,

12.5 = 6.5 + 2 * DelayBeforeSecondAndThirdRow
6 = 2 * DelayBeforeSecondAndThirdRow
3 = DelayBeforeSecondAndThirdRow

At this point, everything is known. The explicit 0.5 second delay before the last row adjusts the timing of the last row of the cake for dramatic effect. The popcorn crackle effect has an extra delay after the break before the crackling fully blossoms, so it might be a little surprising that 0.5s would be the proper delay between the firing of the last comet and the firing of the popcorn crackle shells, but if you see the simulation, you’ll agree. After all, it is what the cake looks like that matters!