Finite State Machine - Boss Fight - Godot 4

  Рет қаралды 10,152

16BitDev

16BitDev

10 ай бұрын

Boss Fight using Finite State Machine in Godot 4
- Asset Used -
opengameart.org/content/lpc-m...
- Code -
Main Boss - pastebin.com/sMBS5efM
Finite State Machine - pastebin.com/m4ui2w96
State (Abstract) - pastebin.com/m9J2ALmq
Idle State - pastebin.com/7SrGJEhJ
Shoot State - pastebin.com/AdVKHqB3
Follow State - pastebin.com/yDAHGJBF
Dash State - pastebin.com/cibUGbUP
- Discord -
(feel free to ask me anything)
/ discord
- Music Used -
- S N U G x Nuver - Moonscapes
- Provided by Lofi Records
- Watch: • S N U G x Nuver - Moon...
- Download/Stream: fanlink.to/NightfallEp

Пікірлер: 43
@FeralGinger
@FeralGinger 5 ай бұрын
THE single clearest video on state machines so far - thank you.
@just_a_zombie6718
@just_a_zombie6718 Ай бұрын
REAL! i read the code and boom i learned how to make StateMachine. there should be a tutorial on the video title on his every finite statemachine video for more views
@Peter-wl5xm
@Peter-wl5xm 10 ай бұрын
Thank you so much for your tutorials. The parenthesis giving detail to what each block of code did really helped me. Thanks again.
@8_bit_gamer278
@8_bit_gamer278 10 ай бұрын
Thank you for giving these tutorials. You are really a big help right now. Thank you
@Soroosh.S83
@Soroosh.S83 7 ай бұрын
Your music choice for background is awesome
@MilkyGees
@MilkyGees 10 ай бұрын
omg this is super helpful, I am working on enemies for my game and I wanted to make a simple state machine. Thank you!
@user-tc5yk4zd5k
@user-tc5yk4zd5k 8 ай бұрын
Thank you very much!very helpful!
@lofinotion
@lofinotion 9 ай бұрын
for a beginner like me, it's so helpful, thank you so much
@wolfHKS
@wolfHKS 10 ай бұрын
oh wow new video , it good . Thank you !
@weregoat529
@weregoat529 3 ай бұрын
Great tutorial, a lot of the code has come in handy for me outside of FSM too :)
@handemonizer6547
@handemonizer6547 10 ай бұрын
This actually work for me. I type every script without copying the codes and it is actually working. I am really glad.
@truonghai9999
@truonghai9999 10 ай бұрын
thank you
@CurtisParhamFreeSkills
@CurtisParhamFreeSkills 2 ай бұрын
Thank you for your video. I'm trying to follow along. Any idea why my RayCast2D would be point above my player. Then when I get close it points away from the character? I'm new to Godot and game development in general, but not new to programming....but I obviously am doing something wrong
@CurtisParhamFreeSkills
@CurtisParhamFreeSkills 2 ай бұрын
I figured out something that worked I had to do this direction = (player.position - position).normalized() instead of direction = (player.position - global_position).normalized() not sure why it didn't work while following your code example.
@FeralGinger
@FeralGinger 5 ай бұрын
I tried added a func kill to this and my enemy kept following me around in the dash state (was pretty funny). I then tried to make a deathstate to change to but can't quite figure it out, what do you recommend would be the best method?
@BrunoFernandes_84
@BrunoFernandes_84 4 ай бұрын
hi, can u give a little help, after i follow the tutorial i set the boss to disapear on death, but it has a bit of delay because if i kill the boss in the moment he's dashing it plays the death animation and disapear in the middle of the dash. any ideas on how to fix it?=
@moonnight9474
@moonnight9474 10 ай бұрын
😍😍😍😍😍😍😍😍😍
@floraphonic
@floraphonic 10 ай бұрын
great video. let me know if you need any sound effects. would love to collaborate
@16bitdev
@16bitdev 10 ай бұрын
Sure! Join my discord, I will message you when I make a game in the future. Invite link is in the description.
@hanzelibardo2242
@hanzelibardo2242 7 ай бұрын
thanks for this tutorial, can you make a tutorial for switching weapons including their, sprite, damage and attack speed?
@hanzelibardo2242
@hanzelibardo2242 7 ай бұрын
Im all good with my request 😅, I'll just follow your tuts on bullet hell, thanks man, more power to you
@Peter-wl5xm
@Peter-wl5xm 9 ай бұрын
Hello! Was there a method for increasing the size of your bee without changing the scale? Mine is really really small. Thank you!
@16bitdev
@16bitdev 9 ай бұрын
go to project settings> window> set viewport size to 320x180, turn on advanced settings> set override to 1280x720, scroll down set stretch mode to canvas_items
@Peter-wl5xm
@Peter-wl5xm 9 ай бұрын
@@16bitdev 😭16bitdev 😭thank you! sorry if this was mentioned in an early video, I'll be sure to watch all your content.
@giancarloapango
@giancarloapango 10 ай бұрын
Hello, i have a question, Is there a way i can reuse the state machine, for example one enemy has. Attack, idle states AND another one has other states but the both use the same state machine code but of course other states codes?
@16bitdev
@16bitdev 10 ай бұрын
yes make a base enemy with attack and follow, then make an inherited scene with this and add more state in the inherited scene, with this you can make multiple variations of enemy
@dingusbrule5756
@dingusbrule5756 10 ай бұрын
​@@16bitdev
@bradexoff7584
@bradexoff7584 9 ай бұрын
I don't know how to make the State node connect with the StateMachineNode '-'
@16bitdev
@16bitdev 9 ай бұрын
add a node 2d to StateMachineNode, add a script to it, but make sure its inheriting the state by selecting state.gd from the drop down menu
@machkiboaiak1998
@machkiboaiak1998 9 ай бұрын
I think add two more states to the boss, perhaps spawning 2 minions and a special ability of some kind.
@16bitdev
@16bitdev 9 ай бұрын
That sounds cool! I will try to do it.
@GothicRK
@GothicRK 8 ай бұрын
In 8:48, why is it necessary to put owner.set_physics_process(true) AFTER already putting super.enter()?
@16bitdev
@16bitdev 8 ай бұрын
we are dealing with 2 physics process, one that controls transition in the state which is super.enter(), second is the owner's physics process that controls move_and_slide(), so we need both of them
@GothicRK
@GothicRK 8 ай бұрын
@@16bitdev oooooh I see now! Thank you so much for the explanation!
@greenstarsproductions5968
@greenstarsproductions5968 9 ай бұрын
Uh. When im doing var current_state: State. It says “could not find type “State” in the current scope”
@16bitdev
@16bitdev 9 ай бұрын
you have to make a class State first, or else it won't find it, make sure you have written "class_name State" in your state script, this will solve the issue
@greenstarsproductions5968
@greenstarsproductions5968 9 ай бұрын
@@16bitdev I did
@memumemu7539
@memumemu7539 3 ай бұрын
@mamuszgaming2509
@mamuszgaming2509 10 ай бұрын
I'm at 4:46 and when i started the testscene it crashed and said "invalid operands'Object' and 'Vector2' in operator '-'."
@16bitdev
@16bitdev 10 ай бұрын
Give me the script name and the line number where its throwing the error
@16bitdev
@16bitdev 10 ай бұрын
this error happens when you subtract object with vector2, they are 2 different types, I am guessing you did (player - global_position) in the boss script, instead of (player.position - global_position)
@teammerdoss6234
@teammerdoss6234 4 ай бұрын
I can't use "find_child". Is it because I used Godot3 😢
@16bitdev
@16bitdev 4 ай бұрын
i think in godot 3 its find_node
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 3,9 МЛН
Advance Enemy AI in Godot
8:17
Jackie Codes
Рет қаралды 20 М.
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 9 МЛН
Wait for the last one! 👀
00:28
Josh Horton
Рет қаралды 119 МЛН
Survival skills: A great idea with duct tape #survival #lifehacks #camping
00:27
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 10 МЛН
Harder Drive: Hard drives we didn't want or need
36:47
suckerpinch
Рет қаралды 1,6 МЛН
Starter state machines in Godot 4
10:58
The Shaggy Dev
Рет қаралды 39 М.
a Technical Dive into AFTERIMAGES
6:43
Mitchell Winn
Рет қаралды 1 М.
Adding Boss Fights to My Indie Game
7:09
Goodgis
Рет қаралды 115 М.
Designing a double boss battle | Even Heroes Die Devlog #11
10:57
I Made a Desktop Pet in Godot
16:02
RachelfTech
Рет қаралды 79 М.
Designing a good boss fight | Even Heroes Die Devlog #8
10:23
KevynTheJar
Рет қаралды 44 М.
4 Godot 4 Devs Make 4 Games in 44 Hours
25:19
DevLogLogan
Рет қаралды 478 М.
There’s a surprise balm in every snack!? #challenge #candy
0:10
We Wear Cute
Рет қаралды 41 МЛН
Respect 😱🔥 #shorts #respect #viral
0:31
MG RESPECT KING
Рет қаралды 34 МЛН
making a knife from an old file
0:58
Random Tools
Рет қаралды 12 МЛН