Godot 4.5 Beginner Tutorial: Game Over, Upgrades & Combat Polish (Part 5)
872 segments
Right now, our game is broken. We level
up and the game freezes forever. Today,
we're going to fix that. We're going to
build the upgrade system, give our
player a health bar, and finally let the
enemies fight back. Welcome back. We're
at the final step. In the last video, we
left our hero frozen in time on the
level up screen. Now, in this video,
we're going to add buttons and give
those buttons functionality so you can
choose your power. Then we're going to
raise the stakes by adding a health bar,
invincibility frames, and a game over
screen.
First, let's get the game moving again.
We need to add buttons to our level up
panel so we can choose a reward and
unpause the tree. Now, back in our game,
before we do anything, go to our scripts
and our UI script. We're going to add
something, a function called resume game
function. Resume game underneath our
level up function here. And what we're
going to do here is we're going to take
our level up panel. So once again, this
has to match. So this should populate
automatically as soon as you get that
money symbol. Level up panel. And then
we're going to set the visibility
to false. Visible. Visibility. There.
Visible equals false. Well, helps if I
spell it right. Ble. There we go. False.
Great. So when we resume game, we want
to hide the level up window. And then
well, we want to unpause the game. get
tree and pause needs to equal false.
Now, this is crucial because this
unfreezes the game after we've selected
which power up we want. Unfreezes the
game. Perfect. Go and save that. I'm
back in our main game here in our 2D
section so we can see what's happening.
We're going to unhide our level up
panel. Perfect. And in this panel, we're
going to actually rightclick, add child
node to our main panel node. We're going
to look for something called a vbox.
Vbox container. There we go. And then
we're actually going to drag our label
into our VBox like this. And our VBox
container, we want it to be anchored at
a full wctck. So it takes up the whole
level up panel. Great. Now in this Vbox,
we're going to right click and add three
buttons. So button, enter,
we have one button. We're going to
duplicate it twice. Once, twice. Just
hold down control D. Great. Now we take
one button and button three. We're going
to highlight all three of them. Now in
our anchor here, our size settings,
we're going to expand the vertical
alignment on all three of them. Now they
take up our whole spots or rate. Now
this first button, well, we're going to
call this the heal button.
And we're going to set the text to heal
plus 20. Perfect.
And this button too, well, we're going
to call that the speed button.
Great. And the text in there, it's just
going to be speed plus 50. And the third
one, we're going to call that our damage
button.
All right. And the text in there is just
for now be ammo plus one.
Great. Now we have that. Now we can hide
our level up panel again. We don't want
to see it unless we level up. We're
going to open up our script and our UI
script here. And then we're going to
click on our heal button first off. And
we're going to go into the right by
inspector. going to go to the node
section.
All right. And then with our heel button
selected and double click on the pressed
signal and not in the UI, we want it in
the I mean not in the player. We want it
in the UI on the heel button. Pressed.
Connect. That should populate. I want to
do that for the next two buttons as
well. Speed button pressed. Double click
in the UI. Connect. Populate. Damage.
Double click in the UI connect.
Now we have all three connected. All
right. Now the first thing we're going
to do our heel button pressed here. I'll
expand this out. Make it bigger. Now
we're going to
one pressed the heel button. We want to
call a health update. We're going to
write this function in a second. So
we're going to trigger the health update
and it's going to be a function called
heal. I'm going to send in how much we
want to heal for, which is going to be
20. Once going to write this function in
a second. Now, after we heal, well, we
want to resume the game. Resume game.
Just like that. Perfect. And save that.
Now, we're going to do the speed button
here. Replace this placeholder. Now,
we're going to up the player speed. So,
we're just going to do player speed.
Access the speed variable in the player.
And we're just going to up it by 50.
That works for now. And then after that,
of course, we want to resume our game.
All right, go and save that. Now, this
ammo one's going to be a little more
tricky. So, when we want to up our ammo,
we're have to update a couple functions
here. But what we want to do is we want
to add one to the projectile count.
Projectile count. But we want to stop if
we hit three. We don't want too many.
Gets a little crazy. So what we're going
to do is access the player.p projectile
count
and we're going to equal that to a
minimum.
So min what this going to do
control-click on that just returns a
minimum of the given numeric values. So
say we have a list of all these numbers
and return the lowest one. Back in our
UI script there, our minimum is going to
be the player projectile
count
plus one, but we don't want it greater
than three.
Oh, this needs to be a period. There we
go. And we're going to add this
projectile count into our player after
we finish this function because we need
to resume the game. Perfect. So, after
we add a projectile, add one plus one,
but no greater than three to our player
projectile count, then we can resume the
game.
Great. And now, back in our player
script here, click there or scroll up to
the top.
And there are signals here. We're going
to add a signal called health changed.
And what this is going to have with
parameter is the current health.
When the health changes, we're going to
set the current health to that. Right?
Now, we need to write the heal function.
Scroll down to the bottom after our
level up stuff is function heal. And for
what? For the amount we send it into.
So, the health we're going to plus
equals the amount that we send in
type. There we go.
And then after that we want to check the
cap. So if our health cap is which is
100 right now is greater than our health
goes over 100. Well we want to set the
health to 100 which is going to cap our
health at max. There we go.
And then we want to emit that signal
that our health has changed. So the
health changed signal we want to admit.
We want to emit what we want to emit the
health our health is currently. to our
card health. And what this is, this
triggers the UI update. Triggers the UI
update.
Perfect. All right. Now, we need to
handle the projectile count. So, we go
up to the top. We're going to add that
variable in our exports. So, at export
variable projectile count,
and we're going to set that first to
one. So, that just starts the uh
projectiles at one, which is start with
one projectile.
what that means. Perfect.
And then we need to update our holster
here. So go to our holster. Save that.
Holster GDScript and our timer timeout
function. We need to rewrite a couple
things. We need to add a loop. So at the
beginning here, we'll enter down. So
we're going to loop through our
projectile counts.
Our projectile count. One, two, or
three. Great. And that we do that by
saying for i in range of player
projectile count.
There we go. So in the range of our
current projectile count, we're going to
go into the body here.
And then we're going to take all this
info here. Let's highlight
all this underneath the loop. We need to
indent it so it gets inside the loop.
Just like that.
Then we need to define our player too as
well. And we can do that easily by
saying
on ready
var
player since our holster is a child of
the player simply we just have to say
equals get parent.
There we go. And that's going to be our
player. Save.
Now we have that settled. The only thing
we have to do here is after we fire,
well, we want to have a little delay if
we have any shots left. So, delay for
extra shots.
But we also want to wait, we're going to
wait 0.1 seconds before the shot, but
only if we have shots left. And we do
that by simply saying if I, which is
where we're at in the loop. So that's
where the I comes from here. So this
current index of the player projectile
count, projectile count
minus one. So we know we're still in
the count and not out of bounds. So we
want to say that.
And if that's true, if that I is less
than that, well, we're going to do a
thing called await and get tree and
create timer.
the timer. We want to wait for 0.1
seconds. And we're gonna time out. So
that creates a timer that waits for 0.1
if there's an extra shot. And then to go
back through the loop and shoot again at
a new enemy if the other one's dead. Now
that the game can resume, let's make the
player mortal. We need to track health
and tell the UI when it changes. So
first going to open up the player GD
script.
Save the ones we have. We're going to
add a signal up at the top here. Call
signal health depleted.
So that way we know when our health
depletes. And scroll down the bottom.
We're going to add the take damage
function. Enter down a couple times.
Function take damage.
Great. Now we're going to add some I
frames in a second, but first we'll do
the health. So, the health minus equals
10
minus 10 health when we get it. For now,
we'll we'll update per enemy if you want
to do that in the polish section. For
now, we'll just do hard code health
changed. We're going to emit that the
health has changed. So, that'll be able
to update our UI. So, this just tells
the UI to update.
All right. And then after that we need
to see if the health is zero. So if the
health is less than or equal to zero
well a health deplete emit again so it
can change the change the UI. We also
need to
need to fix this expression less than or
equal to zero. And now our health has
been depleted all the way. So then we're
going to disable the collision first.
disable our collision
so the enemies stop pushing the corpse.
Right. So then we need to get with the
money symbol our collision shape 2D. As
long as it's named the default, you'll
be able to access it like that. If not,
just set it to the one you change it to.
And we're do a thing called set
deferred.
Okay? And that's going to just like call
deferred. Set deferred is also going to
wait till the end of the frame. So set
deferred to disabled.
True.
Perfect. All right. Now, optionally, you
can hide the player. And so, it's more
like they don't exist anymore. So,
optional is going to be hide the player.
You don't have to do this, but if you
don't have a death animation, then this
suffices. So, we just hide. Easy enough.
Now, printing health to the console is
boring. Let's add a red health bar so we
can see our impending doom. So, back in
here, we're going to go to our going to
reduce this size here. Make sure I save
those scripts and our main game. I'm
going to select this UI here. Go to 2D
so you see what's happening. And UI
canvas here. I'm going to right click,
add a child node. I'm going to add
another progress bar right here. Just
create. I'm going to change the name on
this one to health bar.
Perfect. And for the style for this one,
we're going to set the sizing
uh sizing to the anchor anchor. We're
going to anchor our health bar. Make
sure it's health bar selected. Anchor to
bottom wide. There we go. And for this
one, the health bar, we're going to set
the
percent the value here. We're going to
set it to 100. So, we start off as a
full bar.
There we go. So, it's all nice and
filled up. And then we want to change
the color a little bit. So, let's go
down to theme overrides. Then we'll
change our fonts. Our colors. There we
go. Our font colors. Not our fonts.
Our styles. My apologies. Styles. You
want to go to the fill. Right click on
there. A new style box. Flat. Then click
in there. Open it up. And then our BG
color. We want to change that to red. So
I go to linear here. I can just pump red
all the way up and all the other colors
all the way down. I have a nice red
health bar. Perfect.
Great. Now we have that. I can save
that. I go back to our scripts. Go to
our UI script. I'll make this bigger.
Before we make it bigger, I want to add
the health bar.
Oh no, we're going to do that way. Yeah,
I'll make it bigger. I go to the ready
function here in the UI script. In our
ready one, we're going to
Oh, before we connect that, well, let's
scroll down to the bottom. We're going
to add a new function. It's going to be
called
so we can update the health bar.
Function on player
health changed. There we go. Be new
health. So, our new health is what we
want to change the player health bar.
So we get that by since we renamed it
health bar money symbol and health bar
should pop up. So we get select that and
we're going to change the value to start
with 100. No to new health. There we go.
New health is going to be our new value
when the player health changes. Perfect.
Now back in the ready function. That's
where we're going to set the initial bar
value to 100.
So, initialize bar. I'm going to do the
money symbol again, health bar value.
This is where we'll set it to 100. So,
now that's when we start the game, it'll
be 100. Then when we change the health
in
the onchange player health function,
which we're going to connect here. So,
after our other signals, player.health
changed. So when the health changed, so
in our player script, our signal at the
top here health changed, we're going to
connect that to our UI. So player health
changed. And then we're going to connect
that to our on player health changed
function, which we do not need the
parenthesis for. Perfect. Going to save
that.
Now we need some I frames, invincibility
frames. It's a moment of invincibility
after getting hit. So, we don't die in
60 frames, which is a snap of a fingers.
So, let's get that implemented.
Back in our player scene here, right
there, we go to our 2D section, make
this smaller. We see our hierarchy. So,
we're going to add a timer child to the
player.
Add child node timer. And we're going to
call this timer the damage timer.
Perfect. I'm going set the wait time to
half a second. It's not bad for a
invincibility. And one shot is true so
it doesn't keep cycling. All right. Now,
back in our scripts, our player script,
we'll make this bigger.
Now, back down in our take damage script
here in our filter methods. You can
click there.
The first thing we want to do before we
take damage, well, we want to see if the
timer is running. So check if timer is
running if I invincibility vint or call
damage timer is running. So if the money
symbol damage timer
time left is greater than zero well
return that means we are invincible.
Invincible
I spell that right? No good enough. So
the second thing we want to do is well
then we want to take damage after that
and then after we take damage well now
we want to start the timer. We go back
up and then money symbol damage timer
and we want to start it again if it has
started already. So start and then it's
nice to be able to see when we got hit.
So we're going to add some feedback.
Start here. do the start I frames here.
Then after that, let's get some visual
feedback.
It's always good to have we do that by
calling modulate. So this modulate is
going to access the sprite itself. So we
go back to make this smaller to our
sprite 2D. What it's going to do, it's
going to access this visibility section
and our modulate. So, this is going to
change the color of our sprite or the
alpha. And then we can change it to a
right, a red, or a white flash.
We're just going to do a transparent
flash. We'll make this bigger. So, we're
going to access the alpha. So, modulate
alpha, which is a we're going to equal
that to 0.5. So, when we get hit, it's
going to lower our alpha by half. And
then this is just check if we're dead.
Check if we have health. Check if we
have our player has health left.
So now we're still only at half
transparency. We want that to go back to
full transparency. We need to make this
smaller. And we're going to take this
damage timer. We're go into its node and
we're going to go into its timeout
function. And we're going to connect
that to our player script. Double click
it to timeout. Double click connect. Now
we have this populated here. And then
simply when this is done
timing, well, we're going to turn our
modulate alpha back to one. That way
we're not transparent anymore. Then Crl
S to save.
Now we enable enemies. But first, a
quick physics fix. In top-own games, we
don't want enemies to act like solid
walls that block our movement. We want
them to glide over us.
Now, we have a sticky problem we need to
get rid of. Go to our main game here and
run it. In the current scene, you see
when we get surrounded by enemies, what
we have here is a way Well, I guess I
got to stop killing them all so fast.
Here, let's take down the projectile. go
to my player scene in my holster.
Open that up in my timer for my
shooting. I'm going to put this just at
10 seconds for now because I want to
show you something.
And then we'll go back to our main game
after we save that. Run the current
scene.
And with a bunch of enemies, we'll start
walking with the enemies. You can see
how these enemies kind of stick to us
like this.
We don't want that. We want to make sure
we can walk through these guys without
them sticking to us. We're going to open
our enemy scene here. Go to our 2D.
We're going to select our main enemy
node here. The root node in our
inspector. Make this a little wider. We
want to find a motion mode here is what
we're looking for. We want to set this
motion mode to floating. And why do we
want to do that? Well, if you hover over
motion mode, the grounded applies
notions of walls, ceilings, and floors,
which is fine for if you have those, but
we don't. Not right now. We have the
floating when there's no notion of a
floor or a ceiling. All collisions
reported as on the wall. Now, this mode
is suitable for top down games like it
says right there.
What we also want to do is remove the in
the mask of the collision section, we
want to remove the player mask or
uncheck it. Now, this is going to stop
physical collision but keeps them moving
without us sticking to them.
Now, before we forget, I'm going to go
to the player scene and the player root
node. I'm also going to change the
motion mode to floating. Go and save
that. Then I'm go back to the enemy
scene. We're going to add a damage
hitbox. So on the root node, we're going
to right click, add child node, area 2D.
Enter. I'm going to rename this to
hitbox
small B. Then to this we're going to add
a collision shape 2D. Enter. And then
for this we need a in the shape in the
inspector we're going to use a circle.
We're going to make this centered here.
Make it slightly bigger than the body.
Now, this is going to allow us to damage
the player. So, we need to actually go
to the hit box and the collision, and we
make sure we are on the player layer or
the enemy, but only the mask for the
player. That's all this needs to do.
Right. Now, we have that, we can go and
save it. Go to scripts, open up our
enemy GD script. We'll make this bigger,
get rid of this output,
and we go into our physics process
method. And after our movement code, we
go under our move and slide. What we
want to do is add some attack logic.
So, first we need the target. So, for
the target or targets, we're going to
get our hitbox with our money symbol.
Hitbox. And then we're going to get
overlapping bodies.
So if our player is in our hitbox that
we just made, then we're going to save
that into the targets and make sure it's
the player first of all. So for all the
targets
in for target in targets
we're going to loop through that and say
if the target
name equals equals
well player
because we named it player
well we are going to take damage. So
targetake
damage.
So, actually there's a better way to do
this because this player string here,
let's say that I minimize this in our
player scene here. If you rename this
player to anything else, this string
will not work. Let's use a more robust
way here. We're going to use a class
name. Let's go into our player script,
player GDScript. Make this bigger. We're
going to scroll up to the top here. and
how we can make this a type.
We're going to go above our extends and
what we're going to do is call it a
class name
player. So now we know that this script,
whatever it's attached to, is a player.
So now minimize this. Doesn't matter
what you name this, we're going to be
able to access it because it's a player.
Because in our code, make this bigger
again. I'm going go to my enemy GD
script again. Now, instead of using a
string, what we can do now, instead of
accessing the name, we can say if target
is
player. Now, you see how it pops up
right there, and that's our player we're
looking for. So, if that's true, then
we're going to say target has a take
damage function, and we can use it. It's
safer. It autocompletes.
is considered more robust. So, we'll
stick to that way. But now, you know,
both ways, whichever way you want to do
it. Finally, the end game. Now, when the
health hits zero, we show the restart
screen.
Now, back in our main game here, I'm
going to switch this to smaller.
And in our UI here, what we're going to
do is a right click, add child node, a
panel,
just a normal one here. Create. We're
going to rename this to game over panel.
Great. Now, I'm going to go back to my
2D screen here. See what's happening.
And for this game over panel, I want the
anchor to be full wctck. So, it takes up
the whole screen. Just like that.
And in this game over panel, I'm going
to rightclick, add child node, a label.
And in the label, I'm just going to have
it say game over.
What we're going to do here for the
anchor, I'm gonna make it uh top center
and or top wide. There we go. Then I'm
going to actually horizontal alignment
the text to center. Great. I'm going
scroll down to make it a little more
legible. Our theme overrides our font
sizes. I'm just going to make this oh
60.
Now, let's go
100. There we go. And lastly, what we
need is a button. So, our game over
panel selected, add child node, a
button.
And this is going to be called the
restart
button.
And simply it's going to say
restart.
All right. We also want to go to the
anchor and center it. Just like that.
Now we have a button in the center and a
game over up top. And we need to hide
it. We want to see it all the time only
when we die. All right. Now we have
that. We can save it. And we need to go
to our UI script. We can click on here
to go directly to it. And I'll make this
bigger. Now I made a new function. We
need a new function here. I'll scroll
down to the bottom. going to write a
function here called on game over.
Now when we have a game over, we'll use
the money symbol and we'll access our
game over panel. And what we want to do
is well, we want to be able to see it.
So visible. We want to make that true.
And we also well, we want to pause the
game. So we're going to get tree. So we
make paused true.
Great. Now, we need to be able to access
this function. We need to connect it to
our players here.
We need to connect it to our players
health depleted signal, which means
we're dead. So, back in the UI GDScript,
we're going to go to the ready function,
use the filter methods here, and once
again, in our player connections here,
we're going to do player
health depleted.
We're going to connect to that signal
with our on game over that we just wrote
without the parenthesis
but with the one on the end. Okay. And
go and save that.
Lastly, we need to connect our restart
button. So, we'll make this smaller. Go
to our restart button. Then the node and
we need the pressed. Double click on
that. And we want to connect it to the
UI, not the player. Connect.
I'll make this bigger. Scroll down. We
can see it's connected now. So when we
press the restart button. Well, for now,
we just want to restart the level. So we
need to get the tree. And we need to
make paused equal false. So we don't
unpause. Well, we won't be able to play
after that. We need to get the tree. And
we just want to simply call reload
current scene for now.
When you polish it up, you can add a
game over screen or go back to the main
menu. But for now, we're just going to
reload this scene and play again. All
right, go ahead and save that.
Now, for the final polish, hit flashes.
We want instant feedback when we shoot
something.
All right, now back in our enemy GD
script, we want to access the take
damage function here. Before we spawn
anything, well, we're going to add some
feedback so we know we got hit.
So visual feedback is going to be the
first thing we do. Visual feedback and
we're going to use the modulate setting.
Now modulate setting in GDO4 create a
glow effect actually. So it's pretty
cool. It's like an HDR without accessing
any shaders or any of that. So we use
our money symbol and access our sprite
2D. Now we need to add the modulate
right there. Now, if you're curious
where this is, if you actually I'll make
this smaller. We go to our enemy scene
and our sprite 2D here and go to our
inspector. What we're accessing here is
the visibility
modulate. Now, once we get this, we can
change this however we want. All right.
Now that we know where we're going, make
this bigger. Sprite 2D modulate. We're
going to modulate it to kind of a a
flash white kind of effect. So, we're
going to change the color of the sprite
to 10 10 10.
And you can see it actually gives you a
preview of the color there. Now, the
next thing we need to do is something
called a tween. So, we need to create
a tween to fade back to normal color
after we've flashed to the white.
So tween's pretty cool. The only way the
way you can create one now in GDAU 5 or
GDO 4.5 is just create tween. Super
easy.
Now that we've created that tween, we
can access its properties by saying
tween. We go tween property
right there. And in the property, we can
edit our sprite back to normal by just
saying our sprite 2D again. And then
we're going to access the modulate.
And then in the modulate, we're going to
just turn the color back to how the
default is with 111. That's default. And
then we want to say how long we want to
take to get there. Well, really quick,
0.1. So it's like a flash. Now, before
we spawn the gem or get rid of our
enemy, we want to wait for this to be
finished. So you want to wait for the
tween for the tween to finish.
And then how do we do that? Well, it's
an await function. So we used the wait
and then tween.fin finished. Super
straightforward.
So once this flash is finished, well now
we just want to drop the loot. So we
spawn the gem and then we die or the
enemy does. Perfect.
With all that, go and minimize this and
go back to our main game scene, our 2D.
Let's go and give it a final test here.
The moment of truth and run current
scene. And we're going to run around.
Oh, we forgot to set our projectile back
to
actual shooting.
So, our player back to our holster
timer. We're going to go back to We'll
do zero. We're going to actually make it
a little longer. Make it a little
tougher. Do 0.6. I'm going go and save
that. All right. Now, I'm going to go
back to the main game.
run current scene and let's see how we
get along here.
Let's try to get surrounded by some
enemies.
See how they're flashing white. That's
cool. Look there. Now see if we can take
some damage. Oh, we take some damage.
Then we turn our eye frames. We turn
transparent a little bit there. Oh, now
we have a level up. So now we could test
the heal. So we're at 30. We should go
to 50. Yep. To 50. Perfect.
Try to level up again.
Collect a couple more. All right. Now,
let's check the ammo. We should have two
bullets after this. Oh, we have a error.
Oh, look at this non-existent function
create time. We know create time does
not exist. You want to know why? Because
it's called create timer. Whoops. All
right. A little misspelling can really
screw up your whole game. Let's try this
again. Run current scene.
Now, let's get some
enemies down. First thing we'll do this
time is update the
weapon.
Let's get these guys.
All right, there we go. Ammo. All right.
Yep. One, two, one, two. One, two.
Perfect. Now, let's test it all the way
to max. Let's do three.
Then add and one, two, three. One, two,
three. One, two, three. One, two, three.
Perfect. Now we want to test the cap.
Make sure if we hit plus ammo after
three, it doesn't crash our game.
All right. Ammo one. One, two, three.
One, two, three. Perfect. Stuck at
three. So that's something you can add
in a polish and what you want to have
happen after that or have a completely
different upgrade. Great. Now, let's try
the speed to give it a final test. We
tested the health. That works. Now, our
speed, a little hard to see, but we go
to our remote section and our main game
and our player. We have our speed here
at 300. So, if we go back to our game,
now if we click speed, this should go to
350. And it does 350. Perfect. Now,
we're a little faster. Now, there's
currently no cap on speed. So
technically, you can get this speed up
to infinite, which would completely
break the game clearly. So that's
something you'd want to add yourself. A
nice little cap so it doesn't get too
fast, too crazy.
The last thing we want to test is our
game over screen. So let's go ahead and
get beat up here. Look at that. All
right, game over is popped up. And when
we click this restart button, it should
just restart from the beginning. Restart
from the beginning. Zero. And we have
one shot. So everything is reset.
You did it. You built a survivor like
from scratch. You have infinite terrain,
endless hordes, XP systems, upgrades,
and a complete game loop. From here, the
sky really is the limit. You can add
sound, new weapons, boss fights. I can't
wait to see what you make. And if you
enjoyed this series, please share your
projects in the comments or on our
Patreon or coffee. I really do love
seeing what you build. If you found this
helpful at all or fun, leave a comment
on what your GDO gamedev goals are.
Please like, subscribe, and hit that
notification bell. It really helps out
the channel. And thank you to all our
current and past Patreon and coffee
members. Your generous support keeps the
channel moving. If you want source code
suggesting future tutorials or full
access to tutorials the day they are
launched instead of waiting for the
YouTube scheduled videos, please
consider becoming a member yourself. The
links are in the description. I'm
Spaghetti Syntax and remember, finished,
not perfect. Fail fast, fail often.
Always stay curious and I'll see you at
the next checkpoint.
Ask follow-up questions or revisit key timestamps.
This video tutorial focuses on enhancing a game by implementing several key features: an upgrade system with buttons for health, speed, and ammo; a health bar with invincibility frames; a game over screen with a restart option; and improved enemy AI with 'floating' motion and visual feedback on hit. The tutorial walks through the coding process in Godot, explaining how to connect signals, manage game state (like pausing and unpausing), and add visual elements to improve player experience and game feedback. It concludes with a comprehensive test of all implemented features and encourages viewers to expand upon the game.
Videos recently processed by our community