Godot 4 ARPG Tutorial - Lesson 3: Player Animations & Camera Setup
Summary
TLDRIn this tutorial, the creator guides viewers through developing animations and a follow cam for a top-down Zelda-like game in Godot 4. Key topics include setting up player animations for different directions, creating a camera that tracks the player, and coding to integrate these features. The video also delves into the history of arcade games, emphasizing the impact of Zelda's open-world design on the gaming industry. The creator encourages personalizing the game with unique experiences and concludes with a quote from Albert Einstein about embracing new challenges.
Takeaways
- ๐ฎ The tutorial series focuses on creating a Zelda-like top-down ARPG in Godot 4.
- ๐ The title of the series was humorously changed to 'Zero to Bogan Zelda' after introducing a character named Bogan.
- ๐น๏ธ The lesson's objectives include completing player animations and setting up a camera that follows the player.
- ๐จ Animations are crucial for making games enjoyable and giving characters life.
- ๐น The 'follow cam' is necessary to keep the player visible at all times on the screen.
- ๐ ๏ธ Skills from the previous lesson on setting up animations are applied, and new skills for setting up the follow cam are introduced.
- ๐น๏ธ The Golden Age of arcade games is discussed, highlighting the evolution from rigid games to more explorable and saveable game experiences.
- ๐ The success of Zelda is attributed to its design as an adventure role-playing game (ARPG) that allows exploration and choice from the start.
- ๐จโ๐จ Shigeru Miyamoto's childhood experiences influenced the design of Zelda, emphasizing the importance of childhood memories in game development.
- ๐ก The tutorial encouragesๅญฆๅs to incorporate their own life experiences to make their games unique.
- ๐ ๏ธ The process of setting up the follow cam in Godot is demonstrated, including limiting the camera's view to the map area.
Q & A
What is the main focus of this lesson in the Godot series?
-The main focus of this lesson is to complete the player animations and set up a camera that follows the player around in a Zelda-like top-down ARPG game in Godot 4.
Why did the instructor change the title from 'Zero to Zelda' to 'Zero to Bogan Zelda'?
-The instructor changed the title to 'Zero to Bogan Zelda' after adding a Bogan character to the game, which is a humorous nod to the character's appearance and the personal nature of game characters.
What is the purpose of adding animations to the player character?
-Animations are added to the player character to give the game and the character more life, making it more enjoyable to play by having fully animated movements rather than just idle states.
Why is a follow cam important in a top-down game?
-A follow cam is important because it ensures that the player is always visible on the screen, providing a better gameplay experience by allowing the player to see their character and actions at all times.
What skills are required for today's lesson?
-The skills required for today's lesson include setting up animations from the previous lesson and following along to set up the follow cam.
What is the significance of the 'Golden Age of arcade games' mentioned in the script?
-The 'Golden Age of arcade games' is significant as it represents a time when games were simple, rigid, and had limited exploration. It contrasts with games like Zelda, which introduced more open-world exploration and complexity.
How does the world design of Zelda contribute to its addictive nature?
-The world design of Zelda contributes to its addictive nature by creating a sense of a vast open map to explore, even though it's relatively small in size. It allows players freedom of choice from the start without instructions, which encourages exploration and discovery.
What does the instructor suggest as a key element for creating a successful video game?
-The instructor suggests that a key element for creating a successful video game is designing it with a childlike heart and drawing from memories of childhood, as exemplified by Shigeru Miyamoto's approach to developing The Legend of Zelda.
What is the advice given by Shigeru Miyamoto that the instructor shares with the students?
-The advice given by Shigeru Miyamoto, as shared by the instructor, is to draw on personal childhood experiences and a sense of wonder to create engaging and successful games.
How does the instructor guide students to create animations in Godot?
-The instructor guides students to create animations in Godot by first demonstrating the process for one animation and then allowing students to follow along quickly for the rest, emphasizing the importance of consistent naming conventions for animations.
What is the role of the 'lastDirection' variable in the code?
-The 'lastDirection' variable in the code keeps track of the direction the player is facing to ensure that the correct idle or walking animation is played based on the last known direction of movement.
Outlines
๐ฎ Introduction to Bogan Zelda and Animation Setup
The script begins with a welcome to the lab and a series focused on creating a Zelda-like top-down action RPG in Godot 4. The previous lesson was humorously titled 'Zero to Zelda,' but with the addition of a 'Bogan' character, the title was playfully changed to 'Zero to Bogan Zelda.' The instructor acknowledges the personal significance of characters and introduces a boat, suggesting a 'Bogan Link' rather than 'Bogan Zelda.' The main objectives for this lesson are to complete the player's animations and set up a camera that follows the player. The importance of animations in bringing a game and character to life is discussed, as well as the necessity of a follow cam for player visibility. The skills required for the lesson involve setting up animations and configuring a follow cam. The historical context of arcade games and their evolution into more expansive experiences like Zelda is also touched upon, highlighting the open-world design and lack of instructions as a key element of Zelda's addictive nature.
๐บ๏ธ Setting Up the Follow Cam and Limiting Camera Movement
The paragraph describes the process of setting up a follow cam in Godot. The instructor guides viewers through adding a Camera2D node as a child to the player in the world scene. The initial camera setup is critiqued for showing unwanted gray space, so adjustments are made to limit the camera's view to the map's boundaries. The instructor demonstrates how to use the rulers in the Godot editor to determine the right and bottom limits for the camera, ensuring the camera follows the player without revealing the gray space outside the map. The process involves a practical demonstration within the Godot engine, showing the before and after effects of the camera limit adjustments.
๐ถโโ๏ธ Creating Player Animations
This section details the creation of player animations within the Godot engine. The instructor explains the need for six animations: idle down, idle up, idle right, walk down, walk right, and walk up. The process involves selecting the appropriate sprite sheets and setting them up in the Animated Sprite 2D node. The naming convention for animations is emphasized, with the use of underscores to separate words. The instructor demonstrates the setup for the 'walk right' animation and then quickly goes over the remaining animations, suggesting viewers follow along or pause the video to keep up. The goal is to have fully animated player movements that enhance the game's visual appeal.
๐ป Coding Player Animations and Movement
The focus of this paragraph is on coding the player's animations and movement within the Godot engine. The instructor presents a new script with extensive comments to guide viewers through the code. The script includes variables for tracking the player's last direction and the animated sprite. The 'physics process' function is explained, detailing how it processes the player's movement and updates animations accordingly. The code checks for movement in the X and Y directions to trigger walking animations, and it includes logic to play idle animations when the player is not moving. A feature to flip the sprite horizontally based on the last direction is also implemented. The instructor encourages viewers to understand the code thoroughly to facilitate future customization.
๐ Testing Animations and Encouraging Creativity
In this part, the instructor tests the newly coded animations within the game engine. The player's ability to walk in different directions and flip horizontally is demonstrated, showing that the animations play correctly based on the player's direction. The instructor also encourages viewers to use an online pixel art editor called Piskel to customize their player sprite, emphasizing the importance of experimentation and personalization in game development. The idea is to not be limited by the provided assets and to explore one's own creative vision.
๐ Lesson Wrap-up and Preview of Next Steps
The script concludes with a wrap-up of the lesson's achievements, which include completing player animations and setting up a follow camera. The instructor provides a 'must, may, might' list for further practice, suggesting experimentation with the sprite editor and adjusting the map size and camera limits. The lesson's final thoughts are encapsulated in a quote attributed to Albert Einstein about making mistakes and trying new things, which is presented as inspiration for continued learning and creativity. The instructor previews the next lesson, which will involve adding collision shapes to improve player interaction with the game world.
Mindmap
Keywords
๐กGodot
๐กZelda
๐กTop-down ARPG
๐กAnimations
๐กCamera
๐กBogan
๐กAlliterative
๐กPixel Art
๐กCollision Shapes
๐กShigeru Miyamoto
๐กCode
Highlights
Introduction to creating a Zelda-like top-down ARPG in Godot 4
Renaming the series to 'Zero to Bogan Zelda' with the addition of a character
Importance of personalizing game characters and respecting player attachment
Explanation of the plan to complete player animations and set up a follow cam
Reasoning behind animations to give games and characters life
The necessity of a camera that follows the player for visibility
Skills required for the tutorial including setting up animations and follow cam
Historical context of the Golden Age of arcade games and their limitations
Evolution of games from arcade to home consoles allowing for save games and larger worlds
How Zelda's world design made a small map feel vast and open for exploration
The significance of the ARPG genre in creating an engaging game experience
Inspiration from Shigeru Miyamoto's childhood experiences in creating Zelda
Encouragement for game developers to incorporate their own life experiences into game design
Guide on setting up the follow cam in Godot to limit it to the map space
Explanation of how to use rulers in Godot to set camera limits
Process of creating player animations in Godot
Details on coding the animations to correspond with player direction and movement
Testing the new animations and ensuring they work correctly with player movement
Invitation to customize the player character using an online pixel art editor
Albert Einstein quote on the importance of making mistakes in the pursuit of innovation
Transcripts
foreign
guys and welcome back to my lab and to
our series on creating a zelda-like
top-down arpg in Godot 4. last lesson we
called it zero to Zelda which I thought
was a great alliterative title but
because we added in our Bogan character
in that last episode I thought maybe we
should change it up and now it's zero to
Bogan Zelda
that might really upset some people I
don't know we'll see we did say in the
last episode that uh characters could be
pretty personal and pretty important to
people hopefully I haven't offended
anyone introducing the boat well really
it's a Bogan link isn't it not Bogan
Zelda Zelda was the princess and anyway
this lesson we will be getting the rest
of our animations done for our player at
the moment all we have is the idle down
which is a little bit boring it just
means that guy sort of Bops along no
matter which way he's facing so we're
going to get that sorted and we're also
going to set up a camera that will
follow our player around so let's have a
quick look at what we're going to be
covering in this lesson and then I'm
going to talk to you a little bit about
some of the aspects of Zelda that I
think set it apart so what are we doing
in this lesson well first up we're going
to create the rest of our animations for
our players so that they're fully
animated and then we're also going to
create a follow cam so that we get to
see our player all the time not just
when they happen to be in the right
place and why are we doing this well
animations give our game and our
character life they make it far more
enjoyable to play a game when it's fully
animated so that's why we're doing that
to get rid of the boring and of course
we need the camera to follow the player
so we can see what we are doing the
skills you're going to need today we're
going to need to be able to apply the
skills from our last lesson where we set
up our animations because you're going
to be doing that without me for some of
them but you also need to follow along
as we set up the follow cam so that you
have that organized for you as well and
our success today is that you've got a
fully animated character and a camera
that follows them around
the Golden Age of arcade games was
actually a little bit before my time
when I used to spend times in arcades
the games we were playing with things
like cigarelli and Daytona USA and
things like that but a bit before then
games like Pac-Man and asteroids and
things like that Space Invaders were all
the rage and you got to admit that by
today's standards those sorts of games
leave a little bit to be desired so back
in the early 80s games were very rigid
and fixed every pixel was super duper
important because of the low resolution
so things like Space Invaders it really
all happened on the one screen at the
same time you didn't really explore you
didn't really progress same like Pac-Man
the whole maze was there right in front
of you
but when games started leaving the
arcade and finding their way into living
rooms developers were able to change
things up a little bit
save games for example meant that
suddenly we didn't need to keep our game
to a size that was conquerable within a
standard setting of an arcade game what
a couple of hours maybe you couldn't
really extend it much beyond that most
arcade games were all about the high
score as opposed to completing the game
when games like Zelda came along in the
80s though this kind of changed see
Zelda's world is actually only about 16
screens by 16 screens I think it might
even be smaller 16x8 and that's quite
tiny but the way they designed the world
made it feel like an enormous open map
that you could explore right from the
start you could choose from the very
beginning of Zelda to go left to go
right to go into a cave it was all open
there were no instructions you were just
dumped there in the middle of a clearing
and a sort of expected to find your own
way but within that is actually the
secret of why Zelda is such an addictive
game even to this day you see the reason
the Legend of Zelda was so incredibly
successful is actually sort of hidden
away in the arpg title the arpg stands
for adventure role playing game and I
want to read to you
um a little bit that the designer or
developer of the original Legend of
Zelda had to say about his design
choices and the process there and I
think the secret to the success is
actually hidden in what he said here so
follow along so this is the words of
Shigeru Miyamoto who is I guess one of
my heroes considering all the amazing
things that he had a hand in there at
Nintendo let's read this through and
you'll see what I mean when I was
younger I grew up in the countryside of
Japan what that meant was I spent a lot
of my time playing in the rice paddies
and exploring the hillsides and having
fun Outdoors when I got into the Upper
Elementary School ages that was when I
really got into hiking and mountain
climbing there was a place near Kobe
where there's a mountain and you climb
the mountain and there's a big lake near
the top of it we had gone on this hiking
trip and climbed up the mountain I was
so amazed it was the first time I had
ever experienced hiking up this mountain
and seeing this big lake at the top of
it I drew on that inspiration when we
were working on the Legend of Zelda game
and we were creating this Grand Outdoor
Adventure where you go through these
narrowed confined spaces and come out
upon this great lake so it was around
that time that I really began to start
drawing on my experiences as a child and
bringing that into game development so
you see one of the key elements of a get
extremely successful video game
franchise is actually designing it with
a childlike heart referring back to
memories of childhood are how Shigeru
miyamotso created such an amazing game
as a Legend of Zelda now most of you
watching this are still children so
hopefully you've got some first person
real world experiences where you have
experienced that sense of wonder that
you can actually bring into your game
development right so remember whilst
you're following along with this
tutorial you are following what I am
asking you to do but what's going to set
your game apart from just the
boilerplate that I give you is you
influencing it with your own life
experiences what are things that you
enjoy what are things that you think
would become an exciting feature in your
game don't just follow what I do start
thinking about what you can do to make
your game unique and true to yourself
and remember the words of Shigeru
Miyamoto that it was actually when he
started bringing his chai childhood into
his game development that he really
became successful and I think that's
something for us to remember so now
we're going to go over into Godot and
get started on our camera setup and then
we're going to do our rest of our
animations which is going to have a
pretty hefty chunk of coding in there
and once we've got all of that done you
will have a player that can move all
around the screen the camera is going to
follow them and their animations are
going to change depending on which way
the player is currently facing all right
we're backing a dough and it's time to
sort out our follow cam now this is
actually exceptionally easy all right so
make sure you're on the world scene
which is the one that shows you the tile
map and if you remember we dragged our
player into the world scene in the last
episode so make sure you're on that so
this is what it looks like I got my
little dude up in the corner there
there's me world map I'm going to click
on the player node in the world scene
and I'm going to right click and go add
child node and then we're going to
search for the camera 2D so you start
typing in the search window and it
should come up as the first thing when
you start typing that in so I'm going to
hit enter and now we've got the camera
2D attached as a child node to our
player in the world scene all right
super easy but we need to refine it a
little bit so if we go and hit play now
something a bit annoying happens right
so our camera is showing all of that
gray space there's no limits to it we
haven't created any limits for our
camera so it'll just go wherever our guy
goes but at the moment our guy can walk
straight off the map we're going to
change that in a later episode we're
going to set it up with some Collision
shapes but for now we also just want to
limit the camera to the actual map space
so that our guy can walk to the edge of
the map and the camera doesn't keep
going and showing the gray it'll
actually stop and the guy will sort of
walk to the edge if that makes sense so
right now it looks like this terrible
terrible let's close that down now we've
got over here so as long as you've got
camera 2D selected on the left hand side
you should be able to go to the
inspector window come down and click on
the limit and open those up and now you
see you've got all these numbers in here
left top right bottom big numbers too so
the left and the top are actually going
to be super easy if you've done your map
the same way as me so I started my map
at that origin point there and I've only
Built down and to the right which means
that my left pixel can be zero and my
top pixel can be zero so just to show
you what that does if we now hit play
the camera no longer shows that gray
space and our player can walk and it'll
still follow in that direction it'll
follow here but it'll stop at the edge
so our player doesn't um expose all that
gray space right that's what we're going
for there so let's close that back down
and work out how we're going to do the
other two so the other two are clearly
not going to be zero right because we've
built a mile along so make sure we've
got our camera 2D selected we've got our
limits here now there is a little cheat
so there's probably a way to do this
that's like perfect but I'm not a
perfectionist right near enough is good
enough with a lot of things especially
when we're just learning about them in
the first stages your canvas actually
has a ruler around the edge that tells
you how many pixels along you are so we
can just use these rulers to work out
roughly where we want our camera to stop
so for our right guide you can see we've
got a 750 here and an 800 here so
probably something around 770 or 760
actually maybe even higher let's go to
say 770
um that works for me and it actually has
created a little guide there showing us
roughly where it is so we can actually
go a bit further 775 or we can go
further 780 that'll do all right 780 but
now we've still got to deal with the
bottom and we won't get that guide for
the bottom it's a little bit different
but we can still zoom in and work out
what we can work out so our bottom is
between 400 and 450
um probably closer to 400 so let's just
go say 410
um I'm pretty happy with that now let's
press play again and see if we've
actually successfully got that set up
hang on let me just put that back on
there to double check so yours should
look something like mine if you made the
map the same size as mine but if you've
made your map larger or smaller these
numbers are going to need to be
different so use your rulers to make
sure you're getting the right
measurement for your map we're all going
to have slightly different Maps right so
that's the settings I've got there I'm
going to hit play and hopefully we won't
see any gray so we know the camera
doesn't follow us left and top that's
brilliant we go to the bottom excellent
There's No Gray showing and now we're
going to take the incredibly long walk
to the right do to do we should get some
music in here later hey and there we go
no gray No Gray anywhere on the map
fandantastic all right that is our
follow cam sorted our next step is to
start working on our animation okay
animation time so this is going to get
done a little bit different later before
what I'm going to do is I'm going to
guide you through the first one because
we don't we've only done it once right
in our last lesson so I'm going to guide
you through the first one and then the
rest of them I'm actually going to just
fast forward so you're going to see it
on the screen so if you need to pause to
double check what I'm doing you can do
that otherwise you can just put on fast
forward do it yourself because you've
got the hang of it once we got those
animations in then it's time for the
coding so that's what to look for so to
get started with our animations we need
to first go to our player scene and we
need to click on our animated Sprite 2D
so so far all we've managed to do is get
our idle down animation done but we're
actually going to have six animations
you might think we should have eight but
we're only going to make right facing
ones we're not going to make facing ones
I'm not going to tell you why you can
have about a bit of a think about how we
might do that in the code how do we turn
right ones in the left ones in the code
anyway we're only going to do the six so
we're going to have idle down idle up
idle right walk down Walk Up Walk right
that's it so six so first thing I'm
going to do is make the first one I'm
going to call it walk right so I'm using
underscores in our naming conventions
here and I want to keep that consistent
so in our code I'll be using these exact
terms so where I've gone idle underscore
down or walk underscore right it's
really important that what I put in
there is the same as what I put in the
code all right you can't have variations
between those two because in the code
we're going to specifically refer to
certain animations so make sure you put
an understandable name for each of your
animations and you use the same ones in
your code easiest way to do that is just
to copy what I'm doing all right anyway
we've got our walk right if you remember
how we did this we click on the little
grid pattern we click on our Bogan
Sprites and then we've got to change the
horizontal and vertical if you recall it
comes up as like a four by four grid
because it doesn't know right how many
Sprites there are we just change it I
think it was five by ten
so there we are so what did I say we
were going to do walk right so we're
going to have a look here I think our
walk right is this set here these four
here so I'm going to grab those ones
click add frame and then I'm going to
press play to see if that looks right
yeah you can see his little arms are
bopping away his legs are going back and
forth I know none of my uh animations
and drawings and things are particularly
crash hot you are more than welcome to
use your own this is just me having a
bit of a laugh all right so I've done
the walk right I'm now going to rapidly
go through the other four of them
um so you can either follow along with
the fast forward you can pause it
whatever works for you
please
foreign
that's all the animations done we've got
idle down idle right idle up walk down
walk right and walk up hopefully you've
got the same ones as me all sorted out
because if you've got the same names
it's going to make the coding a heck of
a lot easier so next thing we're going
to do is uh uh head over to the code I
would say we'd go and test it but we
haven't actually changed anything so
there'd be absolutely no point in
testing this so we need to save what
we've done and head over to our code now
so remember how to do that we go to the
script up the top
like that and then that should bring up
all of our code excellent so we're going
to now have a look at how we can change
our code to allow all of our other
animations to take place as well all
right so coding time now this is going
to be awkward without that so let's just
click off of animated Sprite 2D to get
rid of that from the bottom there and
here is our code from last lesson now
I've got a lot of changes to make to
this and I think rather than going
through and typing them in line by line
I'm going to paste in the whole new bit
of code we'll talk through it all line
by line I've got a ton of comments in
there so if you don't want to listen to
me you can just I don't know take a
screenshot of it or something and read
them but the idea is I really want you
to understand what each line of code is
therefore so that when you decide to
make some changes to it and I'm hoping
you do later on you will know what to
change and why okay so it's there's no
point just copying it in blindly that's
not going to teach you anything it might
get your character moving which is
exciting and what we want but the whole
point of this is that you are capable of
later on in this series actually going I
don't like that code I'm going to change
it you can't change it unless you
understand it right so let's copying
copy in the new code and work our way
through it
so so
here we go look at it all so now we've
gone from like 20 odd lines to 75 but
half of that is still actually comets so
back up to the top and you will see
there's a lot of things that are still
the same so we're still extending our
character body 2D we've still got our
speed variable I've still got it at 100
you may have changed it you're welcome
to do that
um we are here now creating a new
variable called last Direction and so
that's just to keep track of which way
the player has been facing so that when
we switch our animations between idle
and walking we get the right one right
we don't want to have it walking right
and then when it stops walking right it
idles facing up or something like that
that would look weird the guy would look
slightly possessed I think just
magically turning like that so that's
how we remember our last uh the last way
we were facing we've then got another
variable called animated Sprite and this
is just to uh do with that animated
Sprite 2D that um we were just playing
around we thought we need to get data
from that animated Sprite 2D so we start
this variable called animated Sprite
then in our function ready we assign the
animated Sprite 2D to that variable that
we just created okay so keeping on going
we've got that physics process Delta did
any of you uh do the the might from the
last lesson and actually look that up I
hope some of you did it's really worth
the the time to research some of these
things so you get a better understanding
of them all right we've got some
explanations there but that is all
basically the same as last time so from
line 24 to line 35 it's basically
exactly the same right we've got physics
process we've got our get now Vector
based on those keys that are
automatically coded right the up down
left right key on the keyboard is
automatically mapped in Godot to the UI
left UI right UI up UI down we've still
got our velocity equals Direction time
speed keeping on scrolling and then we
get down here so if the character is
moving so the direction is zero that's
what the exclamation equals so it is not
zero
update the last Direction variable so
remember our last Direction uh where was
that up here somewhere last direction we
want to update that last Direction
depending on the character's movement
scrolling on down so if Direction X is
not zero the animated Sprite should play
Walking right so have a think about that
if it's not zero we're walking right so
if it's zero we're not walking we're
idling yeah so but if it isn't zero if
there is any movement going on we need
to play a walking animation so we're
saying if it's not zero If X is not zero
Play Walk Right else if uh Y is less
than zero we're going to be walk up so
you think our y to the sky right so from
our uh our Cartesian planes and things
like that X and Y to the sky so our
y-axis is the one going up and down if
that is less than zero right we're going
to play walk up if it's greater than
zero we play walk down so how hopefully
that makes sense when you think about it
in terms of those planes of movement X
and Y and we've still got another else
and that's because we need to then have
our idle animations so if our Direction
isn't is greater than zero we're going
to play these ones here which are our
walking animations but if our velocity
is zero basically we want to do nothing
we wanted to play the idle just
depending on which way we're facing will
determine which idle and if you recall I
said earlier have a think about how we
might get the right one to just become a
left one without creating that animation
that's this bit here animated Sprite dot
flip H flip horizontal right so if it's
this way we're flipping it so that's
what that bit is there so based on the
last Direction and then we've still got
our move and slide so that is our 75
lines of code that's actually only about
15 or 20 loads of code
um I will leave this bit on the screen
for a little while longer just in case
you're wanting to to copy that down then
uh I don't think I can zoom this out to
be honest otherwise I would oh hang on
we can pop out on the the new version I
keep forgetting about things like this
the new update to Godot actually lets
you pop windows out
um so you if you're a multi-monitor user
like I am you can just drag bits off
into different screens now that doesn't
really help when I'm trying to record it
obviously but yeah there's lots of
opportunities uh to move this around so
it works for your sort of workflow
but
um for now let's just I'll scroll back
up to the top so you should have most of
this you need less you need line nine
because you don't have that you need
line 13 because you don't have that 17
and 20 you also need but then you can
skip down to Line 39
um and 41 and then Etc so pause this at
the right spot so you can copy the code
that you need to code this is the
awkward part about doing it like this
isn't it I can't just be like here take
the file I mean I probably could paste
the code in somewhere but pause it copy
it in you actually do learn it better
when you physically type it when you
just copy and paste just saying um it's
you're activating different parts of the
brain when you're physically typing if
you really want to know how to remember
something handwriting is actually even
more effective but that's enough of a
neuroscience Sidetrack for right now
handwriting code I'm going to make our
Player move so get all that copy down
and then what we're going to do we're
going to test our new animations then
we're going to wrap it up
all right are you ready to test to see
if our animations all work so I've just
gone back into our world to the 2D view
but I'm going to come up and click on
the play button then we're going to see
all right so far so good time to press
some buttons so down and he starts
walking down righty starts walking right
let's see if our flip H works when I hit
left it just flips around and you see
the idle stays on the last Direction
they were facing
say that whenever I take my finger off
it stays facing that way now we should
still have diagonal ones right as well
so he sort of walks diagonally up and
down
I'm really happy with how that's coming
out I hope you are too
um I did say in our last episode that
you'll get to have a bit of control over
what the character is for your game and
what I would encourage you to do we're
going to talk about this in our must
main mind in a minute there's a free
um bit of software that you can use
online in the web called piscal you can
take that Sprite strip that I gave you
and you can edit it to your heart's
content if you don't like the uh the
Bogan with the green thongs and the blue
footy shorts and you want to change it I
have no problems with you changing that
all right but I would recommend keeping
us like a backup as well because you
might do things you're like oh no he
looks horrid you know so just experiment
right you don't learn nothing unless you
experiment okay pretty sure Albert
Einstein sits Sun along the lines if
you've never failed you've never learned
so have a crack at changing up that
character you might think that this
Bogan does not suit your game that
you've got in your mind so we're gonna
I'm gonna give you some instructions on
that in a moment but don't feel found by
what I'm doing follow my instructions
but then use your own Creative Flair to
make it your game alright so let's head
on over let's do a debrief I'll give you
your your uh must May might for this
lesson just because there's a few things
we want to do to wrap up
um and then we're going to have a look
at what we're doing in the next lesson
so it must May might for this lesson as
well you need to finish setting up your
player animations and you need to update
your code so that all those animations
start working you may like to experiment
with changing your Sprite using the
piscal free online pixel art editor or
uh you might if you've got the time
experiment with changing the size of
your map and then adjusting your camera
limits
so what do we get done today well we
finished creating our animations we
created our follow camera and we also
updated our script to enable those
animations to show next time well we're
going to add Collision shapes to our
player and to our world to start making
it so our player can actually interact
better with the world around them and
the quota I'd like to leave you with
this week is from Albert Einstein that I
referred to earlier here's the proper
one anyone who has never made a mistake
has never tried anything new I've put a
little asterisk there because it might
be apocryphal but I like it anyway
see you next time
Browse More Related Video
How To Make a Topdown RPG in Godot 4: Adding The Player (Part 1)
Start Your Game Creation Journey Today! (Godot beginner tutorial)
Roblox Studio - 8 Direction Movement System - Scripting Tutorial
How To Make a Topdown RPG in Godot 4: Adding Classes and Projectiles (Part 5)
How To Make a Topdown RPG in Godot 4: Adding Combo Attacks and an Enemy(Part 2)
How To Make An 8-Directional Movement System With Animations! | Scratch Tutorials
5.0 / 5 (0 votes)