Adventure game (pt.1) New Beginnings!

Hello everyone welcome to a brand new blog post where today we will be going over the beginning of our new game called Adventure. In this game we will be following the main character that has to defeat enemies and bosses and get to save the realm. But without further ado lets get started.

The first thing we need to do is get our player moving. This is the code we will use for this.

This is the main four pieces of movement code, our character will use to move around the map. These are definitely the most important pieces of code our character needs. With these you should be able to move around. But you may notice that your character could be facing the wrong direction. This is because we didn’t use this code.

This allows our 8 direction movement to be able to sense and see which direction the player is moving in and have the character face that way, and it will also play the animation of our character walking that way.

Our next piece of code will be for our players attack.

This is also a crucial piece of code for our character as if they cannot attack they will be defenseless when being attacked by the monsters we will be adding.

This code will pin our sword to our player so that it will not spawn some place random each time we swing. Once it is pinned to our player we need to actually code that will make us swing. for this I chose the “z” key.

And it should look something like this

Thank you for reading my blog post I hope you enjoyed and check out my yt channel link: https://www.youtube.com/channel/UCrlNUqQVBxLIbdltHQBdcYg?view_as=subscriber

My channels name is Drago Gaming and I upload nearly daily streams so you should go check it out and consider subbing if you are new.