Help making a Danmaku/Bullet Hell pattern

hi, so im trying to make a touhou inspired bullet hell. danmaku/shmup games main premise is to defeat enemies while trying to dodge a barrage of bullets (hence the name bullet hell).
i wanted to make these bullet hell pattern but i have no experience on making them, ive been searching for a similar question in the devforum but to no avail.

since you’re gonna dodge ALOT of bullets people would recommend pooling the bullets using partcache or fastcast, and i still had no idea how to pool or even made the bullets move
and most of the questions from both of these modules are guns models which i dont want to make the bullet to shoot out after a click

so in short, i want to make a bullet pattern something simple as this

1 Like

I’m not entirely sure about the curve and the acceleration, I just made right now cause it looked amazing, I might continue it.

local TweenService = game:GetService("TweenService")
local Debris = game:GetService("Debris")

local BulletAcceleration = 0 -- Not in use
local BulletSpeed = 4
local BulletCurve = 0 -- Not in use
local FireRate = 4

local Origin = script.Parent
local _Downtime = false

local function CreateBullet(LookVector: Vector3)
	local BodyVelocity = Instance.new("BodyVelocity")
	local Bullet = Instance.new("Part")
	
	BodyVelocity.Parent = Bullet
	BodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
	BodyVelocity.Velocity = LookVector * (BulletSpeed * 10)
	
	Bullet.Size = Vector3.new(0.5, 0.5, 2.5)
	Bullet.Material = Enum.Material.Neon
	Bullet.BrickColor = BrickColor.Red()
	Bullet.CFrame = CFrame.new(Origin.Position, LookVector + Origin.Position)
	Bullet.Parent = workspace
	Bullet.CanCollide = false
	Debris:AddItem(Bullet, 10)
	
	return Bullet
end

local function Fire()
	coroutine.wrap(CreateBullet)(Origin.CFrame.LookVector)
	coroutine.wrap(CreateBullet)(-Origin.CFrame.LookVector)
end

local function WaitForTween(Tween: Tween)
	if Tween.PlaybackState == Enum.PlaybackState.Playing then
		Tween.Completed:Wait()
	end
end

local function Rotate(Radians)
	local Tween = TweenService:Create(Origin, TweenInfo.new(0), {
		CFrame = CFrame.new(Origin.Position) * CFrame.Angles(0, Radians, 0)
	})
	
	Tween:Play()
	WaitForTween(Tween)
end

while true do
	for Degrees = 1, 360, 4 do
		task.spawn(function()
			if not _Downtime then
				_Downtime = true
				Fire()
				
				task.wait(FireRate / 50)
				_Downtime = false
			end
		end)
		
		Rotate(math.rad(Degrees))
	end
end

4 Likes