This thread is about dancing firefly/butterfly formations. This is a very interesting phenomenon, which is used in several (advanced) BD caves.
The List
Here is a list of all unique dancing formations that have been discovered until now:
Code: Select all
Name FF BF Loop* Direction** Note
================================================================================================================================
FnF (Frank & Franka) 2 5 / 5 1 Left Mirrored pair with BnB.
BnB (Bob & Bobette) 2 5 / 5 1 Up Mirrored pair with FnF.
Fright-3 3 7 / 21 1 Right
Fright-4 4 8 / 32 2 Right Like Fright-3 with one extra firefly speeding up.
Fright-5 5 3 / 15 1 Right Like Fright-4 with one extra firefly speeding up.
Lifted F-vortex 2 1 5 / 5 1 Up
Lifted B-vortex 1 2 5 / 5 1 Up
Lifted Gear wheels 2 2 3 / 6 1 Up Speed-up combi of the previous two.
The 4 Elements 4 6 / 12 1 Down, 1 Left Fast pace, smoothly and in a regular pattern.
Crawling-F4 4 7 / 28 1 Down, 1 Left Slow/irregular pace. Mirrored pair with Crawling B4.
Crawling-B4 4 7 / 28 1 Up, 1 Right Slow/irregular pace. Mirrored pair with Crawling F4.
Glider-F5 5 9 / 54 1 Down, 2 Left Mirrored pair with B5.
Glider-B5 5 9 / 54 2 Up, 1 Right Mirrored pair with F5.
Cassiopeia 5 7 / 42 1 Up, 1 Right Unique moving pattern (without vortex).
Sinking-F5 5 8 / 48 1 Down Slow.
Sinking-F6 6 18 / 54 2 Down Very slow.
The 6 Elements 6 4 / 16 1 Down 1 Left Speed-up combi of The 4 Elements.
Swarm-B8 8 2 / 12 1 Up Extendable by any number of BF.
Swarm-F8 7 1 2 / 12 1 Left Extendable by any number of FF. Exists in some variants.
* #phases per short loop / long loop
** #positions per short loop

Here are some video links demonstrating these formations:
- Delta, Stop the attack: FnF and BnB.
- Flying quintet: Fright-5, 4 and 3.
- Racing flies 2: Crawling-F4, The 4 Elements.
- Butterfly teamwork: The 4 elements, Crawling-B4.
- Ultimate firefly teamwork: Fright-5, Sinking-F5, Crawling-F4, Fright-3 and FnF.
- Mixed teamwork: Lifted F-/B-vortex and Gear wheels.
- For other formations no video is available yet.
The following picture shows all dancing formations and their relations:

Goal of this thread
In this thread I will publish some short articles about the “research” I’m doing on these dancing formations. In each post I will do an in-depth analysis of one or more particular dancing formation(s) and answer natural questions like how it works, why it looks as it looks, and why it moves in the direction it goes.
This is interesting for several reasons. Uncovering the exact working gains insight into the BD mechanics. Understanding these mechanics helps, for instance, to find a way to “launch” a particular formation while playing a cave. Or perhaps it is possible to find all existing formations under certain conditions (e.g. “at most 3 flies”). By adding complexity, perhaps new formations will be discovered. This ultimately leads to new cave design ideas. And last but not least, it is fun to do (well, at least for me).
I hope you like these insights. Any reactions, additional information or questions are welcome, so feel free to chime in!
Definition & Scope
First some explanation on the terminology and research scope. A dancing fly formation is a group of fire/butterflies, within open space, without touching (open) borders, influencing each other’s movements, such that the whole group moves gradually into a certain direction.
Perhaps good to know what is not a dancing fly formation:
- A group of flies moving along a wall (video) (or more generally: a group of flies moving with help of any elements other than empty space and the flies themselves). These phenomena are also very interesting, but out-of-scope for this research.
- A group of flies spinning or “dancing” at the same location. Such group may involve flies influencing each other, but as long as they return to the same position after each cycle I won’t call it a dancing formation.
- A group of flies affected by open border side-effects. For example, we have discovered in Krissz’ BD engine, that when a FnF crosses the vertical open border it suddenly continues moving upwards. Such effects are funny, but really engine-specific and not common BD behaviour. Therefore I leave those out-of-scope.
In addition to the above, there are some dancing fly formations which satisfy the definition, but I will deliberately leave out of the list:
- A combined set of dancing fly formations. It is possible to place 2 or more dancing fly formations closely to each other, such that they move independently, while it visually looks as one dancing formation. Although such constructions look impressive, I exclude them from the above list, not only because the possibilities are unlimited, but also because I’m particularly interested in unique formations.
- An existing formation plus an additional fly “free riding” with the group. This means that the extra fly does not interact with other flies in the group, so the direction and speed of the group is the same with/without the extra fly. Strictly, such group is a dancing formation by itself, but in order to limit the official list I will leave it out.
Just for information, until now, the following formations, extended with free riders, have been found:
- The 4 elements + 1 firefly
- Lifted-F-vortex + 1 or more butterflies (the extra butterfly can lift up another extra butterfly, and so on. This is an unlimited set!)
- Fright-3, 4, 5 + 1 or 2 butterflies
- BnB + a related formation of 3 additional butterflies (name: BnBnB)
Some other terms
In the upcoming articles, I’d like to use the following related terms:
- Frame: shortest unit of time in BD. Within a frame elements exist on each position and during the cave scan, their position for the next frame are determined.
- Phase of a dancing fly formation: one frame within the formation.
- Short loop: set of phases until the flies are positioned equivalently to the original starting phase (but the group as a whole has shifted). Note that the flies may mutually have changed position, for example, firefly A takes over the position of firefly B, B that of C, and C that of A.
- Long loop: set of phases until all individual flies have returned to their original position within the dancing group. Sometimes the short loop and long loop are the same. Otherwise, the long loop consists of multiple short loops.
- Interaction: this means that flies within the group influence each other’s move. For example, a firefly moves forward because its way to the left (first choice) is blocked by another fly.
- Spinning fly: this is a fire/butterfly which is placed freely in space. So in each frame it will simply move to its favourite direction, and thus it will spin around in 4 frames. Note that fireflies are spinning counter-clockwise and butterflies are spinning clockwise.
- Vortex: 2 flies spinning within the same 2x2 square (video). Note that both flies are always placed opposite and do not interact. Both are freely spinning. (Thanks to Shredder for suggesting this term.)
- Mirrored pair: two dancing formations with swapped fireflies and butterflies and all phases are each other's mirror image through a diagonal line. Details in Episode 8.
- P-mirrored pair: partial mirrored pair; similar to mirrored pair but only some phases can be mirrored. Details in Episode 8.
- FF is my abbreviation for firefly.
- BF is my abbreviation for butterfly.
Which BD engines are considered?
All discussed dancing formations have been tested to work on the CLCK engine and Krissz’ BD engine (online BD remake). Both have an editor available which supports fire- and butterflies in all 4 initial directions, which is perfect for testing dancing flies. I expect that the tested formations are also working in other common engines (BD1, PLCK, Gdash, …) as long as the cave scanning methods are the same. (Again, except for open border differences, which I won’t consider.)
Which conditions determine the possible formations?
Now that the scope and terminology has been set, it is also good to know the mechanics in the common BD engines which determine which dancing formations are possible. In fact, there are two basic conditions which limit the possibilities:
1. Cave scan method. Caves are scanned line-by-line, from top to bottom, and from left to right.
2. Moving directions of the flies.
Firefly:
- First tries to move 1 position to its left.
- If this is not possible it will move 1 position forward.
- If this is also not possible, it will turn its direction to its right while staying at the same position.
Butterfly:
- First tries to move 1 position to its right.
- If this is not possible it will move 1 position forward.
- If this is also not possible, it will turn its direction to its left while staying at the same position.
In the next post we will examine one of the most basic dancing fly formations, the FnF!