Nerd For Tech
Published in

Nerd For Tech

Making A Custom Bullet Hell-style Attack System (Part 1)

I want to upgrade the shooting mechanic for both players and enemies, so I’ll be making a “Bullet Hell”-style system today. This will be a multi-part post.

Today’s Objective: Upgrade the shooting mechanic by creating a basic Bullet Hell-style shooting script.

Create a new script:

Create the variables used for attacks

Now create an empty Update() and SpawnProjectiles() function.

Leave this script for now, and create another new script called “ProjectileAttackTemplate”.

Make it a struct instead of a class.

The purpose of this template struct is to allow predefining of attack types for easy access. i.e. You can create a ProjectAttackTemplate variable set up for a single shot forwards, then call the shoot function and pass that variable in. The same for a 20-shot radial attack.

Now back to the first script again, in Update():

In Update(), create a way to activate the attack

And in SpawnProjectiles(), first I create some local variables:

Then make a For Loop to spawn each projectile:

Calculate the position, rotation, direction and velocity, then spawn the projectile

The result:

Shooting 40 lasers at once!

Tomorrow in Part 2, I’ll be continuing this development to improve it and make some shot patterns and templates. Look forward to it, and remember to check it out!




NFT is an Educational Media House. Our mission is to bring the invaluable knowledge and experiences of experts from all over the world to the novice. To know more about us, visit

Recommended from Medium

I am torn yet resolved.

Things to keep in mind while building a WordPress website (For Beginners):


How to create a WordPress Website

Part 1: Eliminating Waste from Agile and Waterfall Delivery to Improve Business Performance

Storytelling Will Never Be Old!

Tailwind Weekly #16: Tailwind UI is hiring + we have a twitter now!


How to change currency in Walter’s Currency Converter?

Complex Testing Solutions

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vincent Taylor

Vincent Taylor

Unity game developer / C# Programmer / Gamer. Australian (Tasmanian) indie games developer for 10+ years. Currently looking for games industry employment.

More from Medium

Creating MineField In Unity (Part 1)

Journal 143 — Unity Project Development, 2.5D Shooter

2D Mobile: IDamageable Interface

2.5D Platformer — Improving the Ledge Grab #10