Devlog #1 - Player movement


Devlog 1

This first week has had a lot of experimenting as well as deciding on basic movement and animations. A test playground was created to test movement.

 Basic movement mechanics are pretty much done and feel great like jumping and moving, on the other hand the Impulse ability is still a work in progress(pretty much done just needs some tweaks and fixes), the core concept is working pretty well but a problem I currently have is that when I use the ability towards the same direction I'm running it doesn't work. I think I've got somewhat of an idea why, which is because when the user clicks A or D it doesn't take into account the impulse ability which is in another script, so pretty much when the impulse ability is used while running, the impulse is cancelled out by the running because the force is not taken into account when doing calc for rigid body velocity. I think I just confused myself even more just now....

An example of the problem described above

I've also decided that you should be able to charge the ability for a stronger force, which I have implemented. So if you choose to click the mouse button, there won't be much of a force but if you hold the mouse button for a longer time the force will be much stronger. To combat people spamming this ability like a rocket ship, I added a cooldown for 2 seconds with a cooldown text using a coroutine in  which will appear after the use of the ability. A charge bar was also added for players, so they can see how much they have charged up their ability.

I also decided to added a kind of random thing, but when a player is holding their charging ability down the player sprite will flip towards the cursor, but when they are not, the sprite will flip whichever direction the player is moving.

Animations have also been implemented for running, jumping and idling although when the game is built and put into itch.io these animations seem to break (something I have to fix), for my animator I created 2 blend trees, Movement holds the run and idle animations, and Jumping holds the fall and jump animations.

Blend tree set up for running and idle states

Example of Animations and Movement

Another problem encountered is when the player runs into a wall or the side of a platform the player sticks when the user is holding a movement key, this was easily fixed by using a physics material with zero friction then applying it to the player rigidbody.


 Improvements:

 I still do want to add onto the impulse ability, the core is done but litte tadbits to create a smoother and cooler feel like creating a effect for the impulse ability when it is as max charge or creating an effect for when the impulse ability is used, maybe by using raycasting, for example when the first object in the raycast is hit an animation/effect will play on the object, might have to go with an easier or simple way to implement this maybe.

The player jump feels a bit too floaty but also feels nice, although I'm not too sure yet if I want to go down the route of a arcadey jump or more of a higher gravity jump hopefully that makes sense.

Testing/Feedback:

Unfortunately I was not able to attend the testing tutorial, so I have not got any feedback this week. 


References:

Mucho pixels, 2023, https://muchopixels.itch.io/character-animation-asset-pack - player animations and design used this asset pack.

Leave a comment

Log in with itch.io to leave a comment.