Specialisation

Bullet Hell Pattern Generator

For my specialisation, I chose to create a Bullet Hell Pattern Generator in style with a traditional 2D Shoot ’em up. My personal goal with this project was to gain a better understanding regarding the structure and usage of a primary gameplay feature that appears in some of my favourite games, while the goal for the project itself was to recreate some of the bullet patterns that appear in Team Shanghai Alice’s Touhou Project series.

Week 1 – Pre-prod
Research & Setting the Groundwork

I knew what I wanted to do, but how would I go about it? I decided that my first course of action should be looking up how it was done in some of the games I play, but as it turns out, this was not just something readily available. This meant I had to get a little creative; I decided that my best option was to decompile one of the Shoot ’em Ups that I usually play, and decided upon Team Shanghai Alice’s Touhou Fuujinroku ~ Mountain of Faith, a simple enough game with relatively simple bullet patterns, which i felt was a nice place to start. Luckily for me, Touhou games are moddable, and as such the tools needed to decompile them are readily available. After decompiling the game and grabbing the files I needed, I dove in and started taking a closer look at the files, and came to realize it made use of a custom scripting language, which happened to be fully unlabeled, fantastic!

After luckily finding a half-complete documentation page and with some additional trial and error I managed to narrow down the basic components of the system, and was now ready to setup a development environment to work in. I decided early on that I wanted to make use of Ocornut’s Dear ImGui, and was further proven correct in my decision as this would allow me to see Bullet Pattern changes instantaneously and visually, which is something the Scripting Language I researched couldn’t do. At the end of the week, I had my development environment set up, and was now ready to work.

Week 2 – Alpha
Basic Implementation

With the initial struggle out of the way, I began with implementing the basics; a bullet. I created a simple bullet that consisted of a sprite, a direction and a speed, this bullet would then be spawned in copious amounts by a bullet generator. The bullet generator itself was essentially just a bunch of variables packed together inside an ImGui window. When I was researching Touhou Fuujinroku ~ Mountain of Faith‘s scripting language I found that it primarily used 5 different types of shooting modes, but all of them were based on one of two shoot modes. I decided to cut it down to the essentials; a fan mode and a circle mode, while still having the original shooting modes as sub options for the two major ones. The main difference between the two major modes has to do with how they handle bullet spacing, the fan mode puts bullets next to each other with a user customizable distance between each bullet, while the circle mode tries to evenly space all the bullets.

When the foundation was laid down I quickly began implementing more features to the bullet generator, bullets got a lot more options; speed caps, acceleration and delays, I even introduced random angles and speeds as selectable options. In addition, I also added lasers as an alternative to standard bullets, progress was flowing great and I could easily recreate numerous enemy patterns from the Touhou Project series, things were looking good!

Showcase of simple patterns inspired by basic Touhou Project enemy patterns.

Week 3 & 4 – Beta
Refinement

After implementing all of the basic functionalities during the first two weeks, I was pretty much done, I had gained a better understanding of how systems like these work and I could recreate numerous patterns. However, I wanted to go higher, I wanted to recreate more than the simple enemy patterns, I wanted to recreate boss patterns in all their colourful glory. And that is what I did! To me, one of the most important things to sell a bullet hell pattern is its appearance, so I began with improving the visual aspect of the project. I added numerous different bullet types, alongside multiple colours for both bullets and lasers, I also implemented angular velocity for bullets, to really sell the feel of certain patterns.

Aside from the visual components, I also implemented support for sustained patterns, this includes looping patterns, multiple generators at the same time, and independent pattern rotation. Bullets were also made to be allowed to independently handle their own rotation, allowing for even greater pattern customizability.

Recreation of the iconic Recollection ~ Border of Wave and Particle pattern from Touhou Chireiden ~ Subterranean Animism.

Conclusion
Final Thoughs & Reflections

In the end, I did manage to reach the goals i set out for myself, I gained an understanding of different bullet pattern generator’s structures and usages, and I also managed to recreate several Touhou Project patterns, as well as create multiple of my own. I found this a very fun project to work on, being able to visually see implementations really motivated me to keep on working, even during sickness. Finding a fondness for creating different spiral formations was not in the cards though.

Original Pattern, showcasing a spiral that transforms into a flower pattern.
Original Pattern Star Storm, showcases most of the different features the Pattern Generator features, including different bullet types and colours, independent bullet directions, angular velocity, multiple looping generators and different aim modes.