Hello, I’m DankDinoDragon.
Today I’ll be teaching you how to approach making Boss Battles in your game for beginners. There are definitely better ways to do this but this method is easy to follow for beginners. Making a boss battle may seem daunting at first. But with this guide your boss script won’t be way too long.
So there are two types of boss fights, survival boss fights, and health bar fights.
So the script layouts for the boss fights are:
Survival Bosses:
-- Variables
-- Attack Functions
-- Loop containing those attacks that repeat a few times
for i = 1, 3, 1 do -- Repeats all attacks inside here 3 times
-- Attacks
end
-- Ending cutscene or if you want to, add a phase 2 starting cutscene or whatever you want and then do another loop that repeats some new and preferably challenging attacks
Health Bar Bosses:
These bosses are a bit more difficult to make in my opinion but are still not too hard.
-- Variables
-- Attack Functions
local function Attack()
end
-- Loop of all the attacks
while true do -- Repeats all the attacks
for i = 1, 3, 1 do -- This makes players survive 3 rounds of all your attacks
-- Put your attacks here.
end
-- Make boss vulnerable to take damage from players
wait(CertainVulnerabilityTime) -- Give players time to attack the boss.
If BossHealth <= Phase2HealthRequirement then
break -- You don't have to make a phase 2. You can just check if the bosses health is 0 then end the boss here or if it isn't then repeat these attacks and make them go on until the bosses health is 0
end
-- If the boss didn't lose enough health to start phase 2 or if you don't want phase 2 and they just didn't die yet then make the boss invincible again until the attacks end again.
end
-- Phase 2 attacks
while true do -- Repeats all the attacks
for i = 1, 3, 1 do -- This makes players survive 3 rounds of all your attacks
-- Put your attacks here.
end
-- Make boss vulnerable to take damage from players
wait(CertainVulnerabilityTime) -- Give players time to attack the boss.
If BossHealth <= 0 then -- Checks if boss is dead
break
end
-- If the boss didn't die then make the boss invincible again until the attacks end.
end
-- Ending Cutscene
After making a boss fight, you should feel proud of yourself. They are difficult to make in games but are very rewarding since good bosses can enhance gameplay experience a lot.
Results of me making a Survival Boss Battle
Video: https://youtu.be/TvGAvNiO660
Note: The boss was made in less than 2 hours (I wanted to jump on the halloween event trend but jumped very late so I didn’t have much time before halloween), I know it’s repetitive and dull though this is still pretty good according to ratings from around 50 people who played it.
Game: Wishing Well Boss - City Hangout - Roblox
(For the game you have to click 3 green pumpkins around the map. One is near the pool, one is at the park, one is behind the waterfall. There is also another boss fight in a portal behind the waterfall if you want an extra challenge.)
The boss isn’t good but shows the nice results you can achieve using this method.
It’s a repetitive boss fight but it’s challenging and the second phase introduces 2 new attacks along with a more powerful ground slam attack.
Elements of a good boss battle:
Good design in a boss battle is key. Make sure that the boss battle is challenging and has good replayability. I recommend having 2 phases in a survival boss fight and just 2 phases in a health bar boss fight. Attacks in a boss battle need to make the player think it’s their fault that they got hit by the attack and not the game. If a boss battle attack is too hard or impossible to dodge the players will call the boss unfair. Good bosses in my opinion use cutscenes. Cutscenes hype up the incoming boss battle and establish some context to the fight. Imagine a player walking through a mysterious portal just to be teleported to some random person that wants to kill you. But then, think about the same boss but with a cutscene to explain why that person wants to kill you. Music brings a boss to the next level. In the example I showed of a survival boss fight. Try listening to it with music and then without music. The music version is so much better in my opinion. Also add some ending cutscenes if the boss in your game is important enough such as a final boss or first boss or boss guarding something important.
Anyways, these are all my tips for making a boss fight. I hope this tutorial takes your games to the next level!
PS: Script example I’ve provided will make a boss fight that is kinda repetitive though it’s designed to be as easy and possible for beginners (I know I could use module scripts to shorten my script though this is for beginners). For me the boss I’ve provided isn’t good for anyone that isn’t a beginner since you can start making better and more complex boss systems. The script I’ve provided isn’t for copy and pasting since I don’t have access to roblox studio currently and can’t test the script. Also sorry about the clickbaity title.
Note for advanced devs: This tutorial wasn’t directed towards you since a lot of you look down upon techniques used here. The code is messy, the boss isn’t random enough, I didn’t use modules. This was for beginners but if you’re here too you can utilize the techniques I said above. Modules, storing functions in a table which is someting I do to make random attacks and something someone has talked about in a reply to this post. If your comment to this post is about any of these topics I’ve acknowledged that this is for beginners.
Credits:
omgcchheeesseee - Provided amazing feedback (I’m bad at handling criticism though I try my best to take it in a good way.)
kingerman88 - Suggested I add a note to advanced devs to talk about some techniques that they could use when making bosses + helped me realized I accidently captitalized my while true do loop (I made this at 10:00 PM at night but that’s no excuse for me to not have checked my code that I used as an example for you guys.).
Why I’m credible to make this post:
I’ve done commisions for multiple games and have a lot of experience scripting. I created a messy but easy to understand boss tutorial that utilizes only very basic things in lua that beginners would understand since so many people asked in comment sections of scripting youtube channels. Of course I’ve got a ton of learn and am by no means a pro scripter. Anyways this last section was just to adress some advanced devs who may be looking at this tutorial and see how messy my code is.
I hope anyone reading this has an amazing day!