what is up guys back at it again with
another godot tutorial let me just
preview the game that we're going to
create it's a let's say a 2d platformer
i don't know the gender of this game i'd
call the 2d platformer i don't care i'm
gonna hit command b and run the game
just so that i can preview the game i
also did this game in unity as well i
called it monster chase and i'm gonna
call a monster chase here as well so we
have our player over here he is moving
and he needs to avoid these monsters
because if they kill him if they hit him
and apparently i'm very good at this
game come on man where's the monster
here from the left side because we're
randomizing here's another from the left
side and one when it touches me i'm just
gonna resize this so we can play a
little bit better but anyways when one
of these monsters touches me and you
just saw i'm gonna die you see bam boom
i have died the game has restarted so
basically that is the game but we will
see how we can create and control our
player how we can create these monsters
how they can have their own ai and how
we're gonna do all of the good stuff
that you just saw so
let's get into the video so the first
thing i'm gonna do is delete this editor
or close this editor because i have
another one and yeah don't mind my
edit video recording software over here
so voila here is our new project the
first thing that i'm going to do is i'm
going to create a 2d scene and this one
is going to be gameplay so i'm going to
call this one gameplay and in the
resources folder i'm going to create a
new folder and call it scenes and hit ok
and in the scenes folder i'm going to
save the gameplay scene so go over there
and save it
now before we continue let's go over
here and import these assets so these
are the assets i'm just going to copy
them these sprites you can download the
link will be in the description below so
make sure that you download
it so open file manager paste them so
when i go back here in my engine they
are going to load i'm going to click on
the plus button right here next to
gameplay to open the new scene because
we're going to create a player and here
i'm going to call this one player
because he is going to be our player i
mean what else can i say is going to be
our player
now in regards to our player
i'm going to change the type because
currently the type is node 2d i'm going
to right click on it and i'm going to go
here change type and i'm going to filter
for kinematic
body 2d so kinematic body 2d because i
want our player to be kinematic body 2d
command s to save this in the scenes
folder so command has to save it
so what is the first thing to do with
our player first of all i'm gonna click
on the plus button and here i'm gonna
filter for
animated sprite actually not spread
animation but animated sprite here it is
and i'm going to call this one animation
and let me just zoom in over here so i'm
going to zoom in
and this is our animation for the player
what we need to do is we need to click
on it so click on this animation over
here and for the frames we are going to
click here new frames so new sprite
frames i'm going to click there and here
we can create our sprite frames so the
first one is gonna be idle and for the
idle let me just go here in sprites and
player and i'm gonna drag this one so
this is our idle animation so the first
one the first frame nothing too
complicated
next right here where it says idol you
see this box over this documenting and
it has a little plus button at the
bottom right corner i'm going to click
on that and it will create a new
animation i'm going to call this one
walk
and for the walk i'm going to select all
images from two up to seven
and i'm going to simply drag and drop
them over here so now selecting the
animation over here and clicking play
you will see that the animation is
playing but it's playing slow so i'm
going to take here the
frames per second i'm going to say 12
which is going to make them you see it's
gonna make them a little bit faster
so yeah this is what i want and let me
just go back over here and turn off the
playing and i'm going to click here idle
to play idle again
so now selecting the player you see we
have this exclamation mark over here we
need to add a shape because this is a
kinematic body we need to have a shape
on it so i'm going to right click
add the child node and filter for
collision shape 2d
and attach that collision shape to the
on the player
next go here inside of our shape you see
click on it and on the right side you
see we have the shape i'm going to click
on that and i'm going to select new
rectangular shape and i'm going to zoom
in and move it something like this maybe
move it over here
and resize it so this is something you
can do on your own this is nothing
complicated and i'm going to save it
simply this is the body this is the
shape where we're going to detect
collisions when it comes to our players
so when the player touches something
in our case a monster so when we touch a
monster over here as you can see on the
left or right side or up or above or up
or above above or down anyways
we are going to detect that collision
but we need this shape in order to do
that so now we have the player and if i
go here in our gameplay and take the
scene here and put the player inside of
the scene and if so i'm gonna call lol
on this one instead of running the game
i start my screen recording software
okay that was awkward so let us continue
command b to run our game which was
which is going to brought me to select
which scene is going to be the main
scene when we run our game and it's
going to be game play so i'm going to
double click here and it is going to be
game playing this is what we see now i
am going to resize this a little bit so
in order to resize it we need to go into
project and project settings
and here for in the window let me just
find it over here where is it where is
it
here it is window
so the width of my project is going to
be
1280 so hd by 720
the test width is going to be 640
and the test height is going to be
360. so half of this value
and we're still not done because if i go
back here and run the game you will see
what we have you see you see the players
over here we don't want that we need to
go back again so project and project
settings and at the bottom for the
stretch
it's disabled we need to set it a 2d and
aspect is going to be keep and now
when i come back command b
we're gonna see our player and it looks
really nice so now we have our really
really cool game it looks i mean it
looks nice on the window for hd
resolution
so what is the next step to do let's go
over here in our resources folder and
create a new folder that i'm going to
call scripts so scripts folder and
inside of that folder i'm gonna right
click and create a new script i'm going
to choose here c sharp and let's go over
here a new script and i'm going to call
this one player and i'm going to hit
create and it's going to create it and
here in the gameplay scene
select or actually in the player scene
select the player and go here for the
scripts and load it so from the scripts
folder we're going to load the player
script and let me just
double click on it and open it in visual
studio because we are going to use
visual studio for this
and here i'm going to keep it in the
dock or unkeep it from the dock so let's
go over here what do we need in our
player script what is that thing that we
need well we always need a couple of
aerials
variables but before that let me just
tag the class and move a little bit down
and move this like this here and this is
going to be this is not going to be
processed but it's going to be
physics process so we're going to have a
physics process
and here above
we are going to inherit from kinematic
body so kinematic body 2d instead of the
node we're going to have a private
vector 2 which is going to be our
movement and i'm going to call that one
by default vector 2 0.
next we're going to have a private float
which is going to be our move underscore
speed by default i'm going to say it's
400 and these variables are
self-explanatory so movement we're going
to use for the movement speed we're
going to use for the speed now moving
forward we're going to have a private
float gravity which is going to be equal
to 20. i know gravity is
8.9.8 but i don't care i'm going to set
it in 20 breaking the laws of physics
over here
and we are also going to have a private
flow this is going to be our jump
underscore force by default i'm going to
say negative
900
we're gonna have here also
a private vector two which is going to
be up direction so up the ir is equal to
vector 2 up like this
and basically that's that later on we
will have for animation here we will
have a private animated sprite which i'm
going to call animation but that will
come don't worry about that now
inside of the player movement which is
something that we didn't create so here
player movement like this
and inside of the player movement is
where we are going to detect the input
but first of all let me just format this
and call the player movement inside of
the physics process so this is where i'm
going to call it now inside of the
player movement what we're going to do
is we're going to detect if our
input so if input dot
is key so is key pressed
and or actually is action so we're going
to use an action so is action pressed
and the action
is going to be here in quotes and i'm
going to call this one move right
so move right
and as you can assume i'm going to
duplicate this and i'm going to say else
if input is move left
and also here we're going to have else
so we're going to have all of these
statements so what is gonna happen next
what what you're gonna do well if we're
moving right right we're gonna move the
player right if we're moving left we're
gonna move left but before that we need
to copy these so we need to go back here
in our engine and project and project
settings
and here for the input map
i'm going to paste move right
i'm also going to paste move left and
i'm also going to type here jump so
we're going to have jump as well now
here for our move left or actually move
right i'm going to click on the plus
button and select a key and that key is
going to be d so i click d on my
keyboard i'm going to click ok
click on the plus button and key again
and right arrow and click ok so now we
have the right key as well or the right
arrow key click on the plus button and
key and i'm going to click a now and
click ok
and click on the plus button for move
left key and left arrow which is going
to say left and i'm going to click ok
for the jump
click on it
key
space
okay
and now we're good to go because now you
see here on our move right we have the d
and the right and move left a and left
and on jump we have space which means in
our game or in
when we press that button so here for
the right when we press d or or right
arrow we're gonna move to the right side
and here for the left if we press the a
key or left arrow we're gonna move to
the left and when we press space we're
gonna jump so what's going to happen
here in our move right
is when we click on it we're going to
say movement x is equal to move speed
like this
and when we press the left button we're
going to say movement x
is equal to negative of move speed so
move speed so now we have we have the
negative because the left side is the
negative side and here we have the
player movement i'm just going to tag it
because at the bottom of our player
movement we're simply going to say move
and slide which is a built-in function
from the kinematic body so here simply
we're going to call movement and we are
good to go now of course if i go back in
our engine command b to test this out we
are going to have some complications but
you're going to see what you see now
when i move you see
first of all
we don't have gravity
second i'm i simply press the key once
i'm not pressing it currently i released
it but he's still moving you see press
once and he's moving to the right or the
left side depending on what key have i
pressed
so
this is awkward as you can see we don't
want our player to move like this but
maybe you want if you want to you can
leave the code like this but if you
don't in the else when we don't press
anything movement x is gonna be equal to
zero because here we're going to reset
it
if i go back now
and actually i need to go back in my
engine so command b
if i go back in my engine
you see what's going to happen
like this and now when i release it he's
going to stop when i move it he is still
there he is well
stopping when i move him he is moving
when i release it he is stopping so
that's why here in the else statement we
need to set movement x is equal to zero
because if we don't want to move then we
need to reset the movement back now also
in regards to our gravity
here we're going to say movement dot y
plus equals gravity which is going to
apply this gravity to our player now as
you can see it's going to apply this
gravity to the player and if i go back
in our engine and command b
we are going to see that the player
will fall down
now in order to fix that we need to go
back here in our game plan first of all
i'm going to right click here and add a
child node i'm simply going to add a
node 2d
and this node 2d
i'm going to move it here this is going
to be our bg parent and i'm going to
duplicate one and another one is going
to be our ground parent now the ground
parent i'm going to right click on it
and change the type it's going to be a
static body so it's going to be a static
body and i'm going to save it but let's
go over here for the ground parent or
actually for the bg parents so let me
just find our background so we have the
sprites we have the player here is our
background so this is our background and
i'm going to put this one as a child of
the bg parent now select the background
and here i'm going to rename it to
background one because we're going to
have multiple of these and let's go over
here in the offset i'm going to click on
this centered so i don't want it to be
centered and for the transform i'm going
to say 0 0 for x and y
and i'm going to duplicate it so now we
have background 2 and for the transform
of background 2 for the y position i'm
going to say 700 or negative excuse me
720 which is going to move the
background over here as you can see
now how we're going to create our
backgrounds is that we are simply going
to move them by
we are going to move them if i select
both of them and duplicate them so now
we have background
three and i'm not going to make it as a
child so move it over here so we have
background three and back round four if
i go over here for the transform and on
the x-axis for both of them i'm going to
say 1280 it's gonna move them as you can
see right over here so 1280 is gonna
move over here duplicate them again so
now we have five
and six
so
copy these and 1280 and 1280 how much is
that
i'm not good at that so yeah i have no
idea about math so 12 80 plus 12 80
that's 2 5 6 0 so here i'm going to say
2
5
6 0 as you can see right here and again
duplicate them so i'm going to duplicate
them we're gonna have seven and eight
so for these we also need to add twelve
eighty so how much is that so twelve
eighty so let me just calculate that so
twelve eighty three thousand eight three
eight four zero so three eight
four zero
let's go over here do the same thing for
these you get the point this is what you
need to do so let me just move the 10
over here
and select the 10 and 9
add 1280 so let me say here 1280
5000 and
well it's 5 000
[Music]
and 120 and this is enough
of course you're going to do the same
thing for the right side as well so i'm
going to duplicate here
background one and two let me just move
them down so now we have here no not as
children of background 10. so
background that needs to go over here so
select these two and now these are going
to go on the negative 1280 you get the
points so do that up to negative so up
to negative
5120 and we're gonna do the same thing
for our ground so here for the ground
parent i'm going to select the ground
put it over here
so this is going to be our ground one
like this
and let me just offset it so i'm not
going to have set it i'm going to
uncenter it so to say so i'm going to
uncenter the ground and the first ground
i'm going to position it 0 here and y is
going to be 6
5
2 so yeah this is going to be for our
first graph i'm going to duplicate it
move the ground over
and not like this
over here let me select it and i'm going
to hold shift to put it right next to
the other one so select the ground and
this one
let me just select here the y is going
to be 652
and the x is going to be 450 as you can
see so 450 and i'm going to do that for
another ground so let's go here 450
that's 900 we have the grounds here
currently we are going to have the
grounds all over where the backgrounds
are i'm just going to test the player's
movement so i'm going to test the player
movements then i'm going to pause the
video form all of these grounds and then
you're going to see what we have but
before that select the ground parent
right click and add a child node and
we're going to add here a collision
shape because we need to do that and for
the collision shape i'm going to go here
and select a rectangular shape and it's
right here so what i need to do with the
collision shape is resize it a little
bit
take the collision shape and position it
over here
and let me just resize it so that it
fits the ground so that we can land on
it
so if i command b now so command b
now we stand on the ground you see we
stand on the ground we can move as you
can see i still cannot jump we will do
that starting from the next video
because i wanted to create these grounds
i wanted to create the backgrounds and
now we are moving with the player and
now i am going to pause the video form
all the grounds and the backgrounds and
come back so you can copy and paste this
or simply download the complete project
and copy and paste it so i'll back be
back in a moment okay i am back and as
you can see what i did i simply
duplicated these backgrounds and then i
repositioned them i duplicated the
grounds and positioned them so the
difference between the grounds if i take
the ground one you see it's at x
position zero y position will be the
same so
652 that's for every single ground so
don't touch the y for the x as you can
see the position for the first one is x
at zero the next one is 450 which means
every next one is at 450
units to the left or to the right side
as you can see so when i move these on
the left side so this one is going to be
450 next one is going to be 900 because
450 plus 450 plus 450 it's 900 so now
take 900 and add to it 450 which is
1350 so add again 1 450 that's 1800 so
on and so forth you get the point this
is to the right side to the left side
the negative one is the same numbers but
only negative so let me just find here
this ground i believe so from ground 16
it's negative 450 then ground 17 it's
negative 900 then 80 negative 1350 you
get the point so you're going to do this
on your own it's a bit tedious for you
to watch me to create all of this it's
not fun but this is part of game
development so you need to do it and the
same thing for our backgrounds so if you
take a look at here the first background
so both of these are at zero for the x
now for the y this one is at negative
720 so the above one and every
background that's above you see we have
two of these so the one that's up it's
at y position negative 720
only x position would change and the x
position will change for 1 000 or 1280
so 1 280. so if for example we have
background one at zero if we want to add
the next one to it then it will be at x
1280 then the next one is it x 1280
multiplies by two then by three you get
the point you just add to it though that
value and it will position it right next
to each other i also added this moon
just so it adds a little bit depth to
our game looks nice so yeah nothing in
particular would not change our game our
game can function without it but
basically yeah this is this is setting
up our level and creating players
movements so starting from the next
video we are going to animate the player
make him jump so we'll see you then
what is cracking people in the previous
video we started our 2d platformer-ish
game and we created our level and we
created the movement of the player but
we didn't animate the player and we
didn't make him jump so uh let's take a
look at how we can do that
so i have the player over here and in
order to animate him we need to get this
component or this node you see animation
because this is his animation and in
order to do that we need to go back here
and i already have a reference to it as
you can see but we need to get the real
reference inside of the ready function
so i need to say here animation
is equal to get node and not name get
node the node type is animated sprite
you see here this is the type of the
node animated sprite and how do i know
that if i go over here and hover over it
you see the type is animated sprite
and now we need to provide the name of
the note that we want to get so what is
the name of it it's animation like this
and let me just command b here to remove
these so yeah we also need to use the
jump four so that this right here will
be removed can i remove it like this no
i don't know
anyways it's not important so we have
here the animated sprite and we get it
here from the animation what i'm gonna
do is go below the player movement and
here i'm going to create a void function
that's going to
animate our player and i'm going to call
this one animate movement which takes
two boolean parameters one is going to
be bull moving and another one is going
to be bull move right and why do we need
this well we'll see in a second
first of all if we are moving so here if
moving not move right but if moving
moving come on finally
so if we are moving then simply we're
going to call
animation.play and we're going to play
the walk animation how do i know it's
walk well if i go back here you see i
have two animations walk and idle as you
can see over here i have selected walk
now i have idle if you want them to play
so if you want to play one of them if i
want to play the walk simply click or
call play and call walk there you go
simple as that and here else if we are
not moving so else if we are not moving
simply we are going to go and call here
idle
which is going to play the idle
animation now
we are going to call this inside over
here so let me just take this
so here when we are moving you see we're
moving to the right which means here i'm
going to say true for moving and true
moving to the right side as you can see
move right we have here move right and
here we're moving to the left so here
i'm going to say true for moving
and
false because we're moving to the left
side move right here is false and here
when we stop moving we can simply say
false here and here we can say either
true or false it doesn't matter because
we will see in a second but i want to
demonstrate you one thing so if we go
back over here
and i hit command b to play our game
which is going to run it notice now when
i start moving you see he's animated
everything is cool this is totally
normal right well wrong because now if i
go to the left side you see he's moving
backwards except if you want to have
this kind of functionality where your
player is moving backwards for i don't
know what reason because i don't know
you're weird so yeah anyways you see if
i click or hold command d or command d
just d or a or left arrow or right arrow
what's wrong with me you see he's moving
he's being animated but when he goes to
the left side he's not facing that side
that's why i added this right here move
right why well because if we are moving
over here so when we are moving i'm
going to also check if
move right so if we're moving to the
right side else if we're moving to the
left side because if we are moving to
the right i need to go back here and
demonstrate that for you notice where
the player is facing he is currently
looking to the right side if i select
the animation which is our animated
sprite and go over here in the inspector
and for the properties you see here i
have something called flip h and flip v
h is for horizontal v is for vertical if
i check this
on for h you see he's gonna flip it and
he's gonna start looking to the left
side as you can see flip it again he's
looking to the right side flip it again
left side you see what i mean
so when we flip it and by default as you
can see how this sprite is created
he is facing the right side so when we
don't flip it he's going to face the
right side which means over here we're
going to call animation flip h is false
because when we don't flip it he's
looking the right side
and here else if we're moving to the
left side we need to flip it because as
again i said
that
by default this sprite is looking to the
right side how it's created so if we try
to move to the left we need to flip it
if i go back now and command b to run
our game
you will see now when i go to the right
he is facing the right side which is
okay we're not flipping him but if we go
to the left pay attention you see bam he
is flipping flip flippa you see he is
flipping you know flipping anyways
i don't want to know you even though
you're annoyed but you're here to learn
so when we go to the right side now
everything is cool we are not flipping
him he's facing the right side if we go
to the left he is also being or he's
flipped and looking to the left side
which brings me back here in our else
you see here in the else statement when
we stop moving so here this these two
are for movement so if we move to the
right side true is for movement and true
we're moving to the right if we are
moving to the left so movement is true
so we're moving and here falls because
we we are moving to the left side but in
the else statement we are not moving so
here we can say false or we need to save
false because we're not moving and here
we can say either true or false and
notice if i go back here and not over
here but command b over here you will
notice that nothing will happen i can
move you see
he is moving and everything is fine if i
stop the movement he is facing the side
where i have stopped moving so if i'm
holding a key and i release it he's
facing the left and this is where he's
gonna face when when i release the
button because if you go over here in
our animation or enemy movement only if
we are moving we are going to flip him
else if we are not moving we are not
going to flip him and that is basically
what we are doing here and this is how
we can
this is how we can determine
when to move when not to move and when
to flip the character so moving forward
what is the next step to do now we need
to jump and in order to jump we have a
built-in function from our
kinematic body 2d so this bad boy over
here so if i go here right above our
move and slide
and move and slide is also a function
that we simply provide so we call it
it's built in into kinematic body which
will move into the
direction where we provided and we
provided movement
here and we know we are getting the
movement over here so if we press the
right arrow key or the d key we're going
to say movement x is equal to move speed
if we press the a key or the left arrow
move speed is negative so we're moving
to the left or to the right if we don't
press movement x is zero but here i'm
going to test if is on floor so this is
a built-in function it will tell us if
we are on the floor and if that is the
case
if our input dot is key just so is
action just pressed and that action is
going to be jump and if you remember in
the first video we set the jump to be
equal to space so when we press space on
our keyboard we are going to jump but
notice here so what is the next thing to
do we need to say movement that y is
going to be equal to jump force simple
as that you see movement y is equal to
jump force
if i go back
and in our game command b let's test it
out and see if it actually works so
command b
if i jump
nothing is working what is wrong with
teacher you're crazy what are you doing
calm down calm down man i'm pressing
space but it is not working so what is
the issue you see here if i go back you
we have the jump and just to be 100 sure
that i added the jumps input map here it
is so we have the jump is space so yeah
everything was clear but it's not
working why
well because you see here move and slide
we need to tell it if i hover over you
see i don't know if you can see the
explanation you see here we have move
and slide which takes a vector to linear
velocity but it also takes a vector to
floor normal what does that mean we need
to tell it where is the floor we know
that going down so in gda engine when we
go down and if i take here my highlight
tool so highlight
going down
and come on highlight so this is the
coordinate system
this is the y-axis this is the x-axis
plus is over here negative is over here
for the x but for the y negative is up
plus is down so when we go down we are
going positive we are doing plus which
means we need to tell in which direction
is the floor
and in order to tell that we have this
right here up direction you see up
direction because i'm saying up because
this is a shortcut for writing this new
vector 2 0 for the x 1 for the y so this
is that shortcut so if i say here vector
2 up
it's the same thing as if i wrote vector
2 0 for x 1 for the y so yeah i need to
get that out of the way
but here we need to provide that so we
need to say here
up dri so up the ri which essentially
will have a positive value which means
we're going down so now it will inform
our kinematic body the down is the
floor
so if i go back now here and command b
to run our game let's see if the floor
will be detected space way space way
space
you get the point you see now it knows
where is the floor or the ground because
we told it it's down it's below us but
we also have one more issue i'm gonna go
here and i'm going to say gd.print which
is good though for print and here i'm
going to say the value is like this i'm
going to say plus movement
now this movement over here
is our movement you see it's our
movement over here that we are adding to
it you see over this everything here
that we're adding but i want to show you
one thing if i go back here in our
engine and command b notice what's gonna
happen in the output we are going to
print so let's go here in the output you
see the value keeps increasing even
though we're just standing on the ground
you see i'm just standing if i jump you
see the value is at the value that we
provide but then it starts increasing
and we don't want that so i'm just gonna
close this you see we don't want that
it's increasing even though it's not
gonna hurt our game but maybe you will
need it for something else where it will
hurt your game if you have it like this
so in order to fix it we need to simply
say here movement
is equal to move and slide and here
provide well simply movement so
everything else is going to be the same
except here we're going to say movement
is equal to move and slide and voila
that is that
so if i go back now here and command b
so command b to run the game
notice now what's going to happen here
in the output
we're standing you see we're standing
but the output is if i clear it you see
the output is zero if i jump we go up to
negative 90 or 80 800 how much we set
and then it's gonna go back down again
you see if i go over here let me just
find where we jumped where did we jump
here it is so we jumped so the value was
negative 900 then it fell down because
we're subtracting gravity as you can see
over here we're actually adding gravity
you see plus equals gravity then we move
down but then when we land on the floor
you see the movement value starts to get
zero zero zero zero and we don't want
that even though as i already said this
will not hurt our game the previous one
where we added the values but i just
wanted to show you that in case you
create some game on your own use this or
you use this code that i provided over
here and then you have issues so this is
how you will know what the issue is and
basically this is how we can animate and
move our player and starting from the
next video we will probably add the
camera so program the movement of the
camera then we will add enemies and yeah
wrapping up our game if you want to
learn more about godot i have that in my
game development academy hopefully by
now i hope i have also blender and in
game maker and i'm working on unreal if
i don't have it already click on the
link below and i probably have a month
trial so i have one month trial for two
dollars you can try the academy out for
two dollars click on the link below and
you can learn for one month for two
dollars like yeah so yeah i will see you
guys in another video
was cracking people back out again with
r2d platformer game so in the previous
video we programmed the player jump and
we also programmed animations now we're
gonna make the camera follow player
because if i hit the play button command
b to run the game we are going to see
that
well our player can go outside of the
screen and this is not what we want we
want the camera to follow him that
simple so uh let's take a look at how we
can do that and by the way if you want
to try out my academy you can do that
link will be in the description below
try it out for one month for two bucks
even if you don't want to invest two
bucks then well yeah good luck learning
game development so uh yeah anyways let
me just go back over here why can't i
move this a little bit down so yeah now
i can
so if i go into the gameplay this is
what we have this is our scene this
right over here and let me just draw so
that i can show you what i mean so this
over here
this is our scene i'm not sure if you
can see these lines but it's not
important but that is what we see and if
i go back over here and let me just fold
all of this in the gameplay and right
click and add the child node i'm going
to add the camera 2d
i'm going to call this bad boy main cam
and
this main camera let me just go over
here in the transform of it and the
position for it is going to be
640 by 360 because half of the width and
the height of our screen so we can
position it at the center but even
though we have the camera if i command b
to run our game we are still gonna go
out of the screen as you can see already
so how can we make the camera follow the
player first of all what i'm going to do
is i'm going to click on the camera
and we're going to create a script so
let me just go over here in the scripts
and right click and create a new c sharp
script and i'm going to call that one
camera follow
so let's go over here camera so camera
follow and i'm going to hit create and
of course select the main camera go over
here at the bottom and on the script
here where it's empty click here to load
it and we're going to load it from
scripts and camera follow voila
let me just double click this bad boy
and open it this in visual studio okay
so uh let me just tag this
and let's go over here so what do we
need everything or the magic is going to
happen in our override let me just go
like this
so that i can format this correctly and
we're going to inherit from node 2d
instead of the node only so no 2d the
next thing that we need to do is we need
to get or create a private node 2d for
our player so i'm going to call this one
player target
and well we are going to use it to get
the player now also here we're going to
have a public bull
player died because when we die we don't
want the camera to follow the player and
here in our ready function we are going
to say here player target is equal to
but first we need to get the parent so
we need to see here get parent because
if we just use get node we cannot use
this
so here i'm going to say get node and
it's going to be node 2d like this and
i'm going to call it player i cannot
just say this i cannot just say get node
2d because the player is not a child
of the camera get node so when you call
get node on a node or on a game object
it will try to get the node that is a
child of it that's why we need to get
the parent and the parent is the
gameplay so first we get the parent then
we get the
child
and let me just go over here in the
process
if the player has died we are going to
return now return means simply exit out
of the function because
if we have died if the player is dead
well there is no need for us to
well
there is no need for us to
continue to follow him and besides that
we are going to kill the player move him
out of the game so that will not even be
possible so below if the player is not
that we're going to say here vector 2
temporary position is equal to the
current position of our camera
next we're simply going to say temporary
position or actually we don't even need
to do this we are simply going to say
temporary position is equal to player
target so player target dot get the
position so we're going to get the
position from the player target and
simply we're going to say position of
the camera is equal to temp and this is
how we are going to follow it and even
so we can simply do this so like this
we don't even need
this vector to so we can simply say
position is equal to player target get
the position so if i go back here in my
engine command b to run it
we are going to notice now the camera is
going to follow our player but
that is not the case and i told you the
camera is going to follow play what is
the issue now well the issue is we need
to select the main camera
and we need to go over here let me just
find where it says so position scale
offset
here it is inside of the camera 2d so we
have the offset we have the anchor
rotating zoom
we have something here that is called
current let me just find it here it is
current
this needs to be checked so when you
check that check box that means that the
current camera or what we currently see
will be the main camera so if i command
b to run the game now we will notice
that the camera now is following the
player so if i move to the left you see
the
camera is following the player if i jump
the camera is following the player if i
go back over here
again
the camera is following the player as
you can see you see you know we and now
we have the camera following the player
and i don't want to i don't want to
resize it like this so uh what is the
next step to do well the next step to do
is we are going to add our monsters in
our game and then we are going to start
spawning them in our game and all the
good stuff anyways fire here from mr.com
if you want to try out my game
development academy for one month you
can do that two bucks only for that link
will be in the description below and uh
yeah i will see you guys in another
video
what's up people fire herefront.com
and in the previous video we have the
camera following the players so what is
the next step to do the next step is to
create the enemies and put them in our
game so uh let us see how we can do that
but hey if you want to try them out
if you were trying on again if you want
to try out my game double academy so now
i have it right you can do that for two
bucks link will be in description below
so uh what we can do now is here we're
gonna click on the plus button so this
is going to be our empty seam and this
is where we are going to create our
zombies now let me just double click on
this note scene and i'm going to rename
this one to red zombie because first we
are going to have the red zombie now
well actually the green one whichever
one you prefer
but what is the issue here is that we
need to change so i'm going to right
click and i'm going to change the type
of this node because it is going to be a
kinematic body
so yeah kinematic body and i'm going to
save that one here in the scenes folder
i'm also going to right click on it and
add the child this is going to be our
animated sprite so click on animated
sprite and double click on it and i'm
going to call this one animation because
we're going to need this bad boy
and the
selecting the animated sprite let me
just clear everything here going into
the animation so clicking over here
clicking here on new frames we are going
to create a new frame this is going to
be our walk animation and this is the
green zombie so let's go over here
and in the enemies for the sprites we
have the zombie green select all these
images so all the images and put them
over here so if i zoom on our zombie and
click here to play you will see now the
zombie is playing but i'm going to add
12 frames so that he plays a little bit
faster because i believe 12 frames is
okay
yeah 12 frames is okay you can pump it
up if you believe it's not okay so yeah
that's up to you i'm going to select the
green zombie game object and go here add
node and i'm going to add a collision
shape 2d
now for the collision shape 2d we need
to select here a shape so it's going to
be a rectangular one and i'm going to
simply move this over here in the middle
and resize it so move it a little bit
more in the middle
something like this
and the zombies animation is confusing
me so i need to uncheck it so that it
doesn't play
and now i can simply resize this dude
and voila we are good to go so this is
going to be our green zombie this is
everything we need to do for him if i go
over here in our scenes i'm going to
duplicate the green zombie and i'm going
to call this one red
zombies we're going to have a red zombie
i'm going to duplicate the green zombie
again
and i'm going to call this one ghost so
select here the red zombie and double
click here and i'm going to change this
one to red zombie
and selecting here the animation for the
sprite i'm going to select all these
frames or actually i'm simply going to
delete all of this and create a new
animation for the walk
and go simply here inside of our folder
and select all the animations for the
red zombie and simply put them here
that's all we need to do everything else
is going to be the same and doing the
same thing for the ghost so here it is
ghosty goes goes goes goes goes up ghost
ghost ghost ghost ghost anyways here is
the ghost
we need to do the same thing select the
animation here delete this one so the
walk one needs to go you gotta go ah no
delete notes click on the animation
delete it click here on a new anim and
i'm going to call this one walk
let's go over here and twims our frames
are going to be 12 and also for the red
zombie over here i forgot that
you need to put the frames at 12 so this
animation is well played and let's go
over here in the enemies and we have the
ghosts select all the ghosts put them
over here and voila but for the ghost we
need to move this a little bit here
something like this can do
just resize a little bit more
and if i play it let's go here in the
animation and play it it's our ghosty
ghosty look at the ghosts look at that
ghost
so yeah basically these are our
animations and i can go here
inside of the scripts folder and right
click and i can create a new script this
is going to be a new c sharp script so
let's go over here new script and i'm
going to call this one monster this is
going to be a universal script you're
going to attach it on the go so let's go
over here and load in script and monster
so attach it on the monster red zombie
select it go here under scripts and load
scripts and monster
green zombie go select it go here script
empty load and let's go under scripts
and monster so make sure that it is
attached on every single one of these
enemies and let me just go over here and
make sure that you check these
animations so that these animations are
playing so let's go over here the
animations are playing
and let's go in our visual studio and
for the monster what do we need first of
all the monster is also going to inherit
from kinematic body 2d make sure it's a
kinematic body 2d don't make don't click
or don't select kinematic body only so
it's going to be a kinematic body 2d let
me just
let me just put this over here
so what do we need in order to move our
zombies
well we need to move speed so it's going
to be private flow to move speed by
default i'm going to say 600 because i
want the zombies to move fast as the
speed of light we also going to have a
private gravity so private
float gravity which is going to be equal
to 20 f we are also going to have a
private vector so private vector 2 this
is going to be our movement and you can
see where this is going i'm going to do
the same the similar thing i did for our
player we're also going to have here a
private or actually it's going to be a
public one so here i'm going to say
public
bull move left to determine if we're
going to move left or right and we're
also going to have a public bull is
ghost
and
because we don't want the ghost to be at
the we don't want ghosts to be at the
bottom or actually landing on the ground
because the ghost is floating that's why
we're going to check if we have a ghost
we are also going to have here a private
float minimum underscore x and a maximum
underscore x now for what you're going
to use these well simply here in our
game play i'm going to click on the plus
here and actually no not here i'm going
to click on this link which is going to
allow me to let's say for example attach
the ghost and i'm going to take the
ghost and
somewhere over here okay so this is
going to be the minimum so the minimum
is going to be negative
5090. so that is the minimum x so here
we can go and we can say minimum x is
equal to negative
5900 and i said 90 but it's actually 900
so i can take the ghost now and not let
me just go here what did i do i put it
as a child of the main cameras let's see
negative 5
900
okay
it can also be here so yeah it can be
that value i don't care because we're
going to cue it
that's why here let me just go
and not the background but select the
ghost and over here
let's say six thousand and
six hundred and fifty yeah six thousand
six hundred and fifty is going to be the
maximum x so let's go over here maximum
is going to be equal to this value again
what we're gonna do is we're going to
have the bounce because when the zombies
or the ghost or whatever
goes out of the screen we don't need it
anymore so we are going to kill it we're
going to cue it and that's why we're
using minimum and maximum what is going
to happen inside of the already function
well we're going to determine first of
all
if this dot name is equal to ghost so if
the name of this game object or this
note holding the script is the ghost we
are going to say is ghost is equal to
true
now we are also going to check here if
move left so move left right here if we
are supposed to move left we need to see
here move speed so move speed is going
to be multiplied equals to so multiplied
equal to by negative one f and then
we're going to say here get the node and
the node is going to be animated sprite
and the name of that node is animation
and then simply we're going to say flip
horizontal is going to be equal to true
this is if we are moving to the left
side if we are moving to the right side
we are not going to do this but if we
are moving to the left then we are going
to do it and simply here in our physics
process so here i'm going to say
underscore physics process this is going
to be the physics process here we're
going to say movement like this dot y
and we're going to say plus equals
gravity but we are going to check if
this is not the ghost so if not the
ghost that we are going to do that now
pay attention here
i added an exclamation mark what is an
exclamation mark well it makes what's
after it the opposite if this is ghost
is true this will make it the opposite
which means it will make it false
and voila but if this is ghost is false
then what we're gonna do is well if it's
a ghost actually if it's not the ghost
excuse me so here as you can see
i'm adding is ghost i'm saying it to be
equal to true if this game object or
note has the value or name ghost so if
this is not the ghost we are going to
add the gravity and as i said if this is
ghost is true
then this will make it
the opposite which is false and this
right here will not be executed but if
this is ghost is false this will make it
opposite which is true and this will be
executed simple as that
and simply here i'm going to say
movement so movement dot x is equal to
move speed and then we're simply going
to call here movement is equal to move
and slide and here we're going to pass
the movement simple as that and that is
all we need to do and we can test this
out and not over here
here and in order to test it out i'm
going to go here and let's say i attach
the ghost so let's see let's see i've
attached the ghost let's i'm going to
put the ghost over here
and i'm going to command b so let's see
if this actually is going to work so now
the ghost should come from our right
side or left side and we that is the
case but the ghost also went out of the
screen so we need to kill the ghost
that's why we have the bounce
so let's go over here
and what i can simply do is i can test
if the position that x is greater than
the maximum x
or if the position that x is less than
the minimum x we can q free so we can q
free our zombie or the ghost or whatever
again notice here if the position x of
that game object be that the ghost or
whatever
if it's greater than the maximum x q
free or if it's lower than the minimum x
then q free this means this is an or
operator or however it's called this
means only one of these needs to be true
so this can either be true or this can
either be true if both of these are not
true only then we will not execute this
q3 but if this is true if only one of
these is true then we will execute by
the way notice here i don't i didn't add
parentheses or curly brackets because if
you only have one statement
after the if statement if you only have
one line of code after that you don't
have to call
you don't have to call
curly brackets so you can do it without
curly brackets but only if you have one
line of code if you add here another
line of code for example into a is equal
to general 15 or 12 like this then this
one this right here this a will not be
executed inside of the if statement
so again remember that and we cannot
test this out
unfortunately we can i mean if we follow
our game object and all of the good
stuff but let me just try to do this i'm
gonna run the game and try to run
over here but since i've added the value
to the zombie he will move faster than
me you see he will move faster and
let's hope and here we need to
put the correct
or arrange the backgrounds correctly so
yeah as you can see we don't see him
anymore you can do the exact same thing
to put the bounce for the player this
will be your homework following this
tutorial so do the exact same thing to
put the bounce on the player and here i
made a mistake for these bounds yeah for
the background but this is well easily
adjustable so don't worry about that
anyways this was about our monsters the
next in the next video we're going to
start spawning them in our game then we
are going to start detecting the
collision all the good stuff anyways if
you want to try on my academy two bucks
only click the link below and i will see
you guys in another video
how did italy do people moving forward
with our game let us start spawning the
enemies in the game so the player can
avoid them and all the good stuff and uh
yeah this is getting awkward let's get
into the game so the first thing that we
need to do is go here in the scripts
folder i'm gonna right click over here
and use c sharp script
make sure it's a c sharp one let's go
over here and i'm going to call this one
gameplay so gameplay and make sure that
you attach it here on the gameplay game
object so script empty load we're going
to go under scripts and i'm going to
select the gameplay
so first of all let me just double click
it and open here in visual studio while
we are waiting to open our script and
giving space and all this here if you
want to try out my academy you can do
that for two bucks link will be in the
description below one month access for
two bucks just to try it out and if you
like it you can stick with it if you
don't well then don't simple as that so
here in our gameplay and we can inherit
note it's not a problem
we need first of all an export variable
it's going to be a private packed scene
and we are going to have the green
zombie so green zombie red zombie and
the ghost i'm a ghost ghost ghost ghost
ghost
and what is the next step we also need a
private vector too spawn underscore left
and we also need and here of course i'm
going to say new vector 2 like this and
we need spawn write this is the position
where we are going to spawn these game
objects or nodes or how we're going to
call them let me just go over here first
and i am going to take let's take the
red zombie and put it over here
so somewhere around here we can start
spotting this is on the left side by the
way so the y-axis can be 455
so here i'm going to say comma 455 for
the y on both here so comma again 455
for the y
and let's go back
so for the left side it's negative five
thousand
and ten or simply could be five thousand
ah it can be five thousand so let's go
over here
and put it
so what did i just do
command v to paste it okay so negative
five thousand this is for the left side
and for the right side we need to go
back over here and i need to take this
bad boy
so let's take him
and put him over here
positive 6390
so here it can be positive 6390f
this is where we are going to start
spawning these or actually actually
actually actually let me just go back
probably here
6090 because
let me just make sure where is the
bounce for the monster so yeah yeah it
can be negative 5090. let me just go
over here and see negative 5000
yeah it can be like this and here 6390
because here is the positive six hundred
six thousand six hundred and fifty so
yeah this can do so these two are going
to be are
these are going to be where we are going
to spawn these enemies
and in order to spawn then we need to
create a function so i'm going to go
over here and remove this and i'm going
to call this one void on monster spawn
underscore spawn like this
we are going to spawn the monster now
how we are going to do that well it's
going to be very easy first of all here
i'm going to say in a random enemy
surrend nme it's going to be equal to
new random
like this and i'm going to say here next
from 0 up to 3 this is going to return a
number
between a zero and three but not
including three so it will return zero
one or two
and here we're going to say switching
case and here i'm going to pass my
random enemy and based on the case
so the value case can be zero like this
so case zero and like this and below we
need to see break we're going to have
case one and case two so here case one
and here case two of course here at the
top we need to say monster and i'm going
to call this one new monster so new
monster is going to be equal to null
like this and depending on here if we
have case 0 we're going to spawn a green
zombie so we're going to say new monster
is equal to green zombie dot instance as
monster like this
and here below i'm going to duplicate
this and this is going to be the red
zombie and here below i'm going to
duplicate this and this is going to be
the ghost so depending on the random
value here from 0 up to 2 so zero one or
two
we are going to either spawn the green
zombie the red zombie or the ghost ghost
ghost ghost goes anyways what we are
going to do next is here i'm going to
say vector to temp is gonna be equal to
or simply
declare it
and i hear my fans going crazy and not
fans like you are my fan but here let me
just go
show preferences
and i'm going to put them over here i
think this is okay so that we don't hear
them and i don't have to edit this and
all of the annoying things
so the next thing that we need to do
over here is we're going to again
randomize here i'm going to say new
random and i'm going to call here next
from 0 to 2 if that number is greater
than zero
we are going to spawn to the right side
so here spawn to the right
else if this number is not greater than
zero meaning it's a zero so else here
below not packed scene but this over
here come on what you're doing like this
else we're going to say here spawn
left
so what's gonna happen here is you're
going to say temp is equal to spawn
right and here we're going to say temp
is equal to spawn left like this but
also here if we are spawning to the
right side our enemy needs to start
moving to the left side so what we need
to do is we need to say here new monster
that move left is equal to true why
again if i go over here you see if we
spawn him to the right side this is on
the right side you see this is our
player and this is the right side so our
enemy needs to start moving to the left
side
so that is the that is the reason why so
let me just remove this okay
and
practically the
last thing that we need to say here is
new monster dot set position we are
going to pass here temp and add the
child new monster new
monstero
and voila now
we can call this here in the ready
function so i can spawn it here calling
it in the ready function let's go over
here command b just to see if this
actually works will this work will this
work can we have a debugger let me just
see oh
[Music]
you see here notice we have a null
reference exception and the line where
we have it it's 31 and 15. let's go in
the 31 and 15. so 15 this is the line
over here and 31 okay let me just
okay you see this is where we had that
problem now the reason for that is this
i need to go and select the gameplay i
need to attach these so here for the
green zombie drag and drop attach the
green zombie for the red one drag and
drop attach the red one and for the
ghost drag and drop and attach the ghost
i'm a ghost ghost ghost ghost ghost and
i'm going to command b now and
everything works but pay attention now
we are going to have a monster either
from the right side or from the left
side okay here he is so he is pawn we it
works but we only have one
that is the issue we only have one and
in order to spawn more we need to call
this function repeat repeatedly over and
over and over again
so let's do that so right click here on
the gameplay and i'm going to click here
add a child node is going to be a timer
we need to go back over here and this
monster spawn let me just remove it i'm
not going to call it in the ready i'm
going to copy this name on monster spawn
because i'm going to go here select the
timer go under his node and signals and
select the timeout connect the signal
over here at the gameplay so connect
that signal and name the signal on
monster spawn and hit connect
but we need to select the timer again go
here in the inspector i'm going to say
let's say every two seconds and auto
start on its own one shot don't check
this if you check it it will be only
called once if this is not checked it
will be called over and over and over
again so let's see that and i'm going to
hit command
b and now we should see monsters
spawning from both sides and every two
seconds we're going to have new monster
okay this is the gauss goes i'm gonna go
goes ghost ghosts we can probably move
the move the y-axis a little bit lower
so that the ghost is not that but you
see we have one issue here one issue
another issue so we have issues here
okay we have issues as you can see and
our game is lagging and all of the good
stuff you see okay we will see how we
can fix this starting from the next
video but what i'm gonna do is i'm
simply gonna go back and probably not
four five five let me just take the
ghost and position him over here where's
my ghost
no not a child of a timer where is the
ghost here he is and move the ghost over
here move a little bit down something
like this can do transform here it's
negative so
oh actually for the y not the x here i'm
going to say
three five so five three five this is
going to be our y or actually yeah our y
so here negative five three five five
three five so that the ghost is lower a
little bit lower to the ground anyways
this was our this is well all for this
video we're spawning the monsters in the
next video we are going to detect
collision between the monsters and the
player we are also going to see how we
can
avoid collisions between the monsters
and all the good stuff if you want to
try on my game development academy you
can do that for just two bucks one month
pass for two dollars if you want it go
get it if not good luck learning game
development and i will see you guys in
another video
what is a cracking people this is the
last video of this series monster chase
game which is a 2d platformer-ish game
in the dark game engine so uh let's get
into it we need to detect collision
between the player and the zombies and
kill him we need to also prevent
collision between the zombies and
themselves
and yeah we also need to restart the
game when the player dies so let's take
a look at how we can do all of that so
yeah so the first thing that i am going
to do i am going to go over here
in our green zombie
and we are going to
undo the collision with the zombies so
i'm going to make sure that the zombies
are not colliding with each other so we
can do that by selecting the the green
zombie game object over here the
kinematic body and here for the
collision
i am going to set the layer over here
where it is but the mask i'm going to
move it over here so make sure that you
move the mask over here do the same
thing for the red zombie so let's go
over here collision move the mask over
here also for the ghost select him
collision and here move the mask and
everything is gonna be okay simple fix
is that so if i command b to run our
game we are going to see now that our
zombies are not hitting each other or
actually they can hit each other but
they're going to simply pass between
each other you see okay but i can
collide with them so i can collide with
them so they collided with me okay now
you see the zombie has passed and we
have another ghost and now you saw they
passed through each other so yeah you
saw it uh i'm not gonna repeat it again
you saw it you're not blind
okay what is the next step well here i'm
gonna go on the player and select the
player and command
b or actually right click and attach an
area 2d so i'm going to attach an area
2d and what i'm going to do is i'm going
to zoom in on this collision shape and
i'm going to duplicate this one and i'm
going to resize it like this or actually
no no no
delete it why why did i duplicate it
resize the collision like this so simply
resize the collision like this but here
for the area 2d i'm going to right click
and add another collision 2d
or collision shape and here for the
empty we're going to select here a
rectangular shape but this one just like
this one i'm going to resize this bad
boy so let me just move him over here
something like this
just a little more
a little bit upwards no select this one
okay this one
and voila
so these are going to be this is going
to be our collision now what we need to
do is we need to create a function so
select the collision area and go here
under node and here we're going to
select this body entered so make sure
you select that
connect it with the player over here so
connect is at the bottom right corner
and here i'm simply going to call this
function on
body entered and i'm going to connect it
so let's go in the player and here
i'm going to say void on body entered
which takes a physics body 2d which i'm
simply going to call body what's going
to happen over here well here we're
going to test if the body
so if body is in group
enemy like this
then what's going to happen we are going
to kill free
r
player but first of all let me just
select this enemy copy this so we need
to go back here in our engine select the
green zombie and here
green zombie and where it says node
signals we have down the right side
group select the group and here pasted
enemy and click add do the same thing
for the red zombie so here paste add go
here on the ghost do the same thing and
paste it and voila we're good to go so
what's gonna happen now if i command b
we are gonna go
over here
and when one of the zombies or monsters
touches us we are going to see one thing
first of all we're going to have an
error we're going to fix it don't worry
but let me just show you that bam you
see
we crashed our app crashed what happened
here well in the camera follow on line
23
camera follow line 23
this is the error the error is we're
using the player target but we have died
this is why we're going to use player
died variable over here so when we die
the first thing that i'm going to do is
i'm going to say get the parent which is
the gameplay parent then i'm going to
say get the node and the node is going
to be
camera follow so camera follow
and the name of the node is gonna be
main cam so main camera dot player dime
is equal to true so we need to inform it
you see player died is true so that this
right here
will be true so if player died we're
gonna hit return and we are not gonna
follow the player let's check that out
so command b to run our game again and
see will that work
so now when one of the zombies touches
us we're gonna die but the game is not
going to so let's go over here and now
bam you see i've died
you see i've died but the game is still
on
the game is still on and we didn't crash
okay
so what is the next step we need to
restart the game when we die
and for that we're gonna select our
gameplay and go inside so go inside of
the gameplay and what we are gonna do is
here below i'm going to create void
so void
underscore on
player underscore died like this and
here's something i'm going to say get
the tree dot reload the current scene
and here i'm going to simply say public
void
player died
like this
and i'm going to say here restart
dot
start now what is this restart well here
on top we are going to create a private
timer that i'm going to call restart
like this and here inside of our ready
function we're going to say restart is
equal to get the node which is going to
be our timer node and i'm going to call
it restart
like this so now we need to create it so
let's go here
and
let's go in our engine select the
gameplay and add a child it's going to
be a timer and double click on it and
rename it to restart we do need to copy
this function name so on player died so
make sure that you copy it and
selecting the on or restart go in the
node and signals select the timeout
connect it on the gameplay and paste
here so we are going to paste the on
player guide and connected
everything is okay the only thing that
is left for us to do is go back here in
the inspector select the timer
and here i'm going to check one shot and
i'm going to see here two which means
after two seconds we are going to call
it so when we call over here so when we
call restart after two seconds it will
call this signal over here and voila
that is that and we are only going to
call it once that's why i set here one
shot to be true because we don't want to
restart the game 2 000 times when the
player dies
and over here in the player
when we die so we get the parent over
here for the camera to inform the camera
that we have died but we also need to
say here get the parent which is going
to be our gameplay and we need to say
here player died to inform it that the
player has died which will in turn go
back here in the gameplay it will call
this right here restart start after two
seconds it will call this and we will
restart our game so if i command b now
so command b
let's take a look at here what we have
so here and let's try to jump
and now when we die so let me just wait
over here because one of the monsters
will show up eventually bam we died
boom
the game has restarted okay you see now
congratulations you're creating a 2d
platformer maybe this is not technically
a 2d platformer but probably some of you
wise guys will will correct me and i
don't care about that you're here to
learn i made the 2d platformer because i
didn't know the genre of this game
anyways you can download the complete
project link will be in the description
below along with this with the assets
you can use them for whatever you want
to use them of course you're going to
use it to follow the tutorial but
congratulations you have created your
first game in the gdo game engine my
brother and until next time fight here
from astute.com if you want to try my
gamedev academy for two bucks one month
click the link below and i will see you
guys
in another video