Site Logo


Sparen's Danmaku Design Studio - Guide A3 - The Ring, The Spread, and The Stack - Combinations with You

Part 1: Guide Introduction

In the previous guide, we covered angles, bullet graphics, and the concept of bullets that add aesthetic value to a pattern while not directly impacting how the pattern is played. In this guide we will dive deep into Bullet Groups and Subpatterns, and will cover three common Bullet Groups and some of the ways in which they can be used. These are Rings, Spreads, and Stacks, and while they may seem boring at first glance, they are important building blocks for more complex patterns that require significant time for mastery.

From here on out, a major goal will be to not only break down patterns into their component parts but also to provide numerous techniques and concepts that can be melded together or expanded upon in order to create new, original patterns as well as patterns that make effective use of the fundamentals. It is therefore of the utmost importance that you as the reader have at least some experience with a danmaku engine so that you can experiment and brainstorm.

Part 2: Groups and Subpatterns

In our Guide 0, we gave a brief introduction to Patterns, Subpatterns, and Groups. With the Pattern being the all-encompassing term for a complete danmaku animation over a specified period of time, we used the term Subpattern to refer to specific parts of the pattern. These were top-level Groups, where Groups were noted as being a fundamental component of a pattern right above individual Bullets themselves. This terminology can be a little confusing, but it will provide one way of thinking about the components of a danmaku pattern - that of patterns as being of a tree structure.

In this tree structure, which we must emphasize is only one possible way to conceptualize a danmaku pattern, the entire tree is the pattern, with the trunk forming the core. This trunk is fed by large branches - our Subpatterns. On their own, they are comprised of smaller parts, but together they form the Pattern, which is greater than the sum of its constituent parts. These Subpatterns are further comprised of different groups of bullets, spawned over time as well as in different parts of the playing field. Groups are comprised of smaller groups until we arrive at the smallest groups of all - the leaves of the tree. These are the individual bullets.

We can also think of this in the opposite direction. We'll start at the bottom of this hierarchy with Groups. Every Bullet in a Group shares many characteristics - a common relative spawner, similar graphics, angle, speed, etc. Not every bullet in a group must share all of these characteristics, but they typically share many things in common. In addition, Groups can be spacial or temporal in nature when forming larger Groups.

A single Bullet can be a Group. However, it is much more common to have a set of Bullets with most aspects in common rather than just a single bullet (though there are some ways in which single Bullets can add significant value to a Pattern). As an example, take a ring of bullets - typically, all members of the ring will have the same speed, graphic, etc, and will only differ in their angle. Alternatively, consider a stack of bullets. Here they have different speeds but otherwise have similar parameters.

These smaller groups can be grouped together into larger groups. For example, spawning six rings at the same time with positions relative to a fixed point. Here there are six rings, so we have a group containing six other groups. Alternatively, if five rings are spawned in quick succession with a break, those five rings can also be considered a larger Group. And when these groups are repeated over time, we end up with a Subpattern.

We will now discuss the foundational groups, starting with the Ring.

Part 3: Rings and their usage

Rings have a reputation for being incredibly simple and relatively boring. By definition, they are just Groups of bullets spawned at the same time relative to the same Spawner, with a common angle difference between them. Yet rings are capable of so much more than one might expect. We'll go into some crazier Subpatterns in later guides but for now check out AJS's Everlasting Purity script, where every pattern uses Rings for every Subpattern.

Now, the creative aspects of Ring usage, like with any component of a danmaku pattern, depend on usage of Controllers in an effective fashion as well as understanding how to balance the temporal and spacial density and positioning of the rings. Still, even without complex Controllers and simple behavior, rings can be incredibly powerful.

Let's first go over the fundamentals of a ring. Every ring starts with a 'seed' angle and a number of components. For the ring to feel like an actual ring, you typically need at least three bullets per ring - any less and there isn't enough to really call a ring. The seed angle can be random, aimed, or fixed - check back to Guide A2 for a refresher if you are unfamiliar. The structure of a ring dictates a common angle between the bullets, so if there are n bullets in the ring, the angle between them will be 360 degrees divided by n bullets. The more bullets are added, the smaller this difference becomes, gradually forming a circle as n goes to infinity.

In the following canvas, you can experiment with how many bullets are in a given ring. The default for this example is 3 and the range goes from 1 to 100.


Number of Bullets in Ring:

For the sake of terminology, we will refer to a ring with n bullets as an n-ring regardless of where it is spawned.

Now that we've covered the basic definition, we'll talk about some more ways you can spawn rings spatially. We will cover temporal changes in Guide A5 where we will discuss ring-based patterns such as spirals and BoWaP, so for now we will limit ourselves to spacial changes.

First, we'll demonstrate a Subpattern where there are two primary Groups, one per direction. There are two Spawners which are moving away from the center. Each Spawner plants a ring of Bullets at a set interval.



This example has four angle settings - Fixed (Default, Green), Random (Orange), Changing (Purple), and Aimed (Blue). These show some of the ways in which the firing angle can change over time. This example does changes symmetrically for the Changing mode, with a change of 1.5 degrees per ring. Note that this example has acceleration to clear the screen faster.

In the Fixed setting, we are effectively firing a static ring multiple times, just at a different location. Note how this creates 'lines' of a sort, except that the lines are offset by time as well as space. That's not a line a player can graze! This kind of technique can be put to good use, as seen in the clip from Subterranean Extra below where stage enemies enter the screen and stop moving. The opening is a little rough-looking since the bullets are not aligned, but the fact that the angles are fixed allows for the pattern to proceed at a high speed.

Random angles, in contrast, are not particularly wonderful at first. Even though the pattern formed above is symmetric, it is disorderly and particularly hard to dodge. However, that does not mean that this is a bad thing at all - they just don't work well for this particular example - something that is actually quite widely applicable when designing danmaku patterns. After all, a technique does not have to be useful for one kind of pattern in order to be useful for a different kind of pattern. The more techniques you know, the more flexibly you will be able to design patterns.

Next is the changing angle. Every ring, the angle of the ring changes by a fixed amount. This results in predictable ring patterns that form spirals of a sort. As mentioned prior, we will go into further detail with this technique in Guide A5.

Finally we have the aimed angle. One bullet per ring aims at the player, and due to the moving Spawner, the overall angle of the ring shifts by a different amount each time. For a clearer example of how this works, refer to the following, which has a larger bullet per 'ring' to denote the overall angle to the player. This example shows bullet trails, and uses a wide canvas to show the overall trajectories. Note that the player is stationary in this example - it's possible to track the player over time instead, but it is also possible to track the player once and use that angle for the duration of the pattern. Both of these techniques are useful in different types of patterns.


With this, we have provided one example of how rings can be fired at positions relative to a static point. We'll now give another example with the same four angle modes as before. This time, we will spawn from four static locations in the corner of the screen.



Note how adding the rings at different locations adds a form of symmetry. This results in a nicer looking Subpattern in general. As for specific notes on the modes, our angle for the Changing mode has been adjusted so that the angle does not divide nicely into 360 degrees. This way, the bullets don't run on the exact same path for a very long time, avoiding the creation of blind spots.

The Aimed mode would be more interesting if the player were moving, but that's an exercise for you, the scripter, to try out. Consider both use cases where each ring in sequence aims at the player as well as use cases where the first ring aims at the player but the rings after use that same angle instead of calculating a new one.

We'll conclude the ring section by discussing rings offset from the Spawner by a set radius. This is an incredibly popular and powerful technique, especially when combined with an interesting Controller. Advanced versions of this technique often manifest when discussing familiars and will be discussed later in greater detail (as well as in ph3 Tutorials Lesson 28). But for now, a basic definition.

Put simply, if our spawner is at (x, y), and we want to spawn bullets at a radius r away, we will spawn our bullets like so: (x + r*cos(360/n), y + r*sin(360/n)), where n is the number of bullets in the ring.

We can visualize this like so.



Distance from Center (px):

Above, in aimed mode, the angle is based off of the location of the Spawner at the center of the screen, as if there were a boss in the center. However, now that the bullets in the rings are no longer based at the spawner's location, it is possible to have them individually aim at the player from their new locations. In the following example, all of the bullets are aimed. Note that the player is now rotating. This is for aesthetic effect in order to showcase how aiming at a target from different locations can create unintended aesthetic effects. Don't see anything interesting with the defaults? Try adjusting the two radii to see what kinds of insights can be extracted from this example. Experiment with the player inside the spawn radius, for example. Spawn Radius of 192 and Player Radius of 128 is a good preset, especially with the changing angle.



Spawn Distance from Center (px):

Player Distance from Center (px):

Observe how the player consistently moves and how the pattern has a delay before reaching the player's position. There are many techniques we will cover in the future that make use of this delay. And hopefully, you have come to learn that there are all kinds of techniques that you can employ with simple rings. Take the tools you have learned and apply them to build even more interesting patterns!

Part 4: Bullet Spreads and Walls

In this section, we will cover spreads and walls, two very important formations of bullets.

Sometimes, you don't need a ring. Perhaps you just want several bullets in an arc. Just like rings, there is a common angle between them. If you want n of these bullets in an arc, we can call this an n-way spread.

Similar to the ring example earlier, experiment with the total angle and number of bullets in the following interactive example.


Number of Bullets in Spread:

Arc Angle (Total):

Similar to with rings, the more bullets, the denser. However, decreasing the arc in which the bullets spawn also increases density. And when the density grows too high, the n-way stack becomes a wall. The typical definition of a wall is any Group or formation of bullets where a player cannot move through the constituent bullets. In terms of danmaku dodging, this introduces the concepts of micrododging and macrododging. In the former, there is a dense cloud of bullets where the player navigates carefully between bullets. In the latter, there are large formations of bullets where the player cannot move straight through and so the player moves around the objects. A good combination of the two can create dynamic danmaku patterns such as those of Utsuho's spellcards in Subterranean Animism, which combine large suns with waves of smaller bullets.

So what can we do with spreads? As before, we can use a variety of angles to fire them. However, the most important when designing danmaku for gameplay comes down to two fundamental types of spreads and the aimed angle.

By this, I am referring to streaming. Streaming is possible with consecutively fired aimed rings as well as strings of aimed bullets (as well as stacks, which we will cover next). However, with spreads, there are two different types - spreads with even numbers of bullets and those with odd numbers of bullets.

The key difference is that with odd numbers of bullets, the player is trapped and must carefully navigate while with even numbers, the bullets in the spread all avoid the player.

In the opening of Mountain of Faith Stage 5 on Lunatic with the Ultra patch, the entire opening pattern avoids the player. Of course this is an Ultra patch so it's not as good of an example for how this technique can be applied practically - good practical examples come from Youmu. After aimed n-stacks of blue bullets, she fires a 2-way n-stack that constrains the player and requires them to work within the part of the screen that they are in at the time of firing. We'll talk more about stacks and their combinations with spreads in the next section.

The key to using an even n-way spread is that it provides a set angle range in which the player is trapped without actually hitting the player. This forces the player to focus on the range inside and whatever danmaku is utilized to take advantage of that focus on one part of the screen. Note that there is nothing explicitly preventing this from being done with rings, but it is most commonly applied with spreads.

In addition to these techniques, there are also some other properties of n-way spreads that may prove useful in pattern design. We've already noted how the area inside the spread limits player movement and can encourage more focused dodging as well as how walls can force macrododging. However, the fact that a spread typically has a narrow range of impact on the screen also means that they pair well with other subpatterns that can make use of the rest of the space. Give it a try!

On their own, n-way spreads don't do much more in isolation. However, we will now discuss stacks, where n-way spreads truly shine.

Part 5: Stacks and their usage

The concept of a stack is simple. Instead of firing a single bullet with a given angle and a single speed, you fire multiple bullets with that same angle at the same time. The catch is that each has a different speed - typically a speed offset between the bullets in the stack.

We will define an n-stack as being a Group of Bullets with the same angle, Spawner and spawn point, and Controller where the bullets have speeds evenly spread out between a minimum velocity and a maximum velocity. Try out the example below. Note that the angles are adjusted to better show each stack.


Number of Bullets in Stack:

Minimum Speed:

Maximum Speed:

Try setting the bullet count to be very high. What do you notice? How about having a large difference between the two speeds? A small difference?

Long walls perfect for streaming and lines of bullets allowing for micrododging are both possible with stacks. But of course, the real power comes when combining the fundamental groups together into larger groups.

We will first consider stacks of rings, and then stacks of spreads. We will close by combining everything we've covered in this guide.

Stacks of rings. Inherently they don't sound too interesting. After all, you can just fire rings at a constant rate and get something similar. However, there are advantages - first, each stack of rings functions as a very visible group and is often a subpattern due to its impact within a pattern. Second, the component rings grow farther apart over time since the speed changes due to stack properties. And third, the rings are all fired at the same time, and therefore have the same angle.

Observe the following two examples. We are only providing Changing and Aimed angles for these but they should serve to demonstrate the differences between constant rings and infrequent stacks of rings.



There are a few things to note that we have not yet mentioned. First, with regards to speeds. When using stacks of rings, it is possible for the faster bullets of a later Group to pass slower bullets of an earlier Group, resulting in pattern overlap and higher complexity. When done thoughtfully, this becomes an incredibly powerful technique that adds difficulty in different ways depending on how it is implemented as well as a juxtoposition of multiple potential types of bullets if different colors or shapes (or even gradients) are utilized for the bursts of bullets. Experiment and extract the full potential of this technique!

Second, you may notice that in these examples, stacks of rings grant steadily changing angles more depth due to both graphical overlay and visible pattern adjustment. Of course this is also visible with regular rings, but the temporal and spacial adjustment is different - the stacks are clearer at first but the visible angle decays over time. This provides an orderly and symmetric pattern despite the decayed angle, which can result in a more dynamic pattern.

And in addition to these, in our examples, the player is moving. As mentioned prior, you can use aimed angles to force a player to stream bullets. In the case of the stacks, the timing adds more complexity to this and provides a different set of opportunities for the player to switch directions as well as the potential for temporary walls perpendicular to the typical horizontal direction of movement.

As for stacks of spreads, they provide a number of use cases - for example, aimed bursts that are quite visible to the player despite high speeds.


Stacks of spreads provide a constraining functionality just like their component spreads, but the stack nature provides openings between the stacks farther from the spawn point, allowing the player to 'escape' the confinement before the next spread stack approaches.

And of course, unlike a ring stack, spread stacks have clear boundaries where they are applicable and where they are not, especially with low n-way spread stacks. Take advantage of this and you will be able to create patterns where the different components work together.

To close this guide, we will display a pattern comprising of only these basic building blocks. No acceleration or angular velocity or player - just a danmaku pattern.


And with that, we conclude this guide. Remember that everything starts from the fundamentals, and that by experimenting with and adapting upon the techniques you have learned, you can create more beautiful and intriguing danmaku patterns.

Sources and External Resources