[Behavior] Danmaku Suite: The Ultimate Bullet Hell Engine for Construct 2 (Spawner, Homing, Wave & Explode)
Hello everyone! I’m Necronomicrón, and today I want to share a project that I’ve been developing and refining with a lot of sweat, coffee, and lines of code.
If you’ve ever tried to create a true Danmaku (Bullet Hell) game in Construct 2, you know the struggle. The screen fills with hundreds or thousands of bullets, and standard behaviors start to choke. You try to use multiple spawners, but then picking issues arise: actions applied to one spawner affect bullets from another, logic gets crossed, and suddenly, what should be a beautiful, hypnotic geometric pattern turns into a chaotic, performance-heavy mess.
I love the Danmaku genre. From the classic Touhou Project to DoDonPachi, the beauty of these games lies in their intricate bullet patterns and precise mechanics. I wanted to bring that exact feeling to Construct 2, but making it fast, resource-friendly, and incredibly easy to use.
After struggling with picking logic, memory management, and performance drops when stacking standard behaviors, I decided to build a custom solution from the ground up.
I present to you the Danmaku Suite, a set of custom behaviors designed specifically to handle massive bullet generation and complex movements flawlessly.
What is the Danmaku Suite?
It’s a collection of behaviors designed to work together perfectly. The core philosophy is Independence and Performance. Each spawner knows exactly which bullets it created, and passes that information to the movement behaviors through a robust picking lock system (SOL isolation).
By replacing multiple standard behaviors (like native Bullet, Sine, and Turret) with these specialized ones, you save massive amounts of CPU cycles.
The Components:
1. Danmaku Spawner
The heart of the system. This isn't just a shooter; it's a pattern generator.
The Magic: It natively handles C2's Selected Object List (SOL). When it fires, it only selects the newly created bullets, passing them securely to the next action.
Features: Spread angles, bullet count, starting offset, and a built-in "Mirror Effect" to duplicate patterns symmetrically without extra events.
Dynamic Control: You can shoot using predefined properties or configure complex patterns on the fly via actions, respecting Image Points perfectly.
2. Danmaku Bullet
The definitive replacement for the native Bullet behavior. It’s an all-in-one movement engine.
The Magic: It rests until activated by an action. It uses a "Configuration Lock," meaning once a Spawner gives it orders, no other spawner on the screen can interfere with it.
Features in ONE behavior:
Initial Speed, Max Speed, Acceleration, and Deceleration (based on Time or Distance).
Cyclic Pauses: Bullets that stop mid-air, wait, and resume (perfect for complex patterns).
Advanced Homing: Set a target, a search radius, and turn speed. It only tracks if a target is in range.
Base Turn: For spiral shots.
Screen Bouncing: Native layout edge bouncing.
Recoil/Snap Turns: E.g., bullets that instantly turn 180 degrees every 2 seconds.
3. Danmaku Explode
For bullets that act as seeds or fragmentation grenades.
The Magic: Independent triggering. It waits for a specific distance or time alive, then "explodes" into a new pattern of child bullets.
Features: Inherits the same robust locking system. You define the distance/time, the child object, the amount, and the spread.
4. Danmaku Wave (Coming Soon / Bonus)
A movement modifier that adds a sine wave displacement to the bullet's trajectory without altering its forward momentum angle.
Why use this over standard C2 behaviors?
Zero "Cross-Contamination": You can have 10 spawners shooting 10 different patterns using the same bullet sprite, and they will never share incorrect speeds or angles. The picking is handled natively inside the JS.
Massive Resource Savings: Instead of having "Bullet + Sine + Custom Homing Logic" on 500 sprites, you have one highly optimized JS loop handling it all.
Ease of Use: Panel properties are minimal. Everything is designed to be chained in actions:
Action: DanmakuSpawner -> Shoot Dynamic Pattern
Action: DanmakuBullet (below it) -> Configure Movement
Done. The pattern is locked and isolated.
Download
I'm sharing these .ZIP files with the community because I believe Construct 2 is still a fantastic engine for 2D games, and we need better tools to create true arcade experiences.
https://www.mediafire.com/file/5rq6y4dtxzzs2yg/NECRONOMICRON_behaviors.zip/file
I hope this helps you build the bullet hell of your dreams. Let me know what you think, and please share any games or tests you create using these behaviors!
Happy coding!
- Necronomicrón
Edited:
A demo has been added with a few things you can do. Just press 1, 2, or 3 to change the shot type. I didn't make it more elaborate due to time constraints. :D
DEMO: https://danmakudemo.netlify.app/
FILE: https://www.mediafire.com/file/a2fqv0bcah779e5/DANMAKU_DEMO.capx/file
EDIT 2:
DONE...
Now that I have more time, I've updated the demo and the file. It's more polished and organized. I had a small problem with the touch behavior, but I've fixed it. If you need the plugin in English, let me know; I only packaged it in Spanish.
I created a small multi-device menu (PC or mobile) to test the demo and the bullet behavior. I did this to avoid having to write so much code for the bullet trajectories. I hope you enjoy it. I just ask for feedback from those who use it, and if there are any other options that can be used and how they work. You are the testers.