Devlog 1 - Moving Around
Devlog 1
Part 1
2024-03-10
Last time I got all the animations setup with a character in a basic parallax environment.
After that I created a simple character controller using a State Machine pattern to move and jump while playing the respective animations for running, jumping, or falling. With that my character could move around the scene. I added another dummy character to act as an enemy placeholder and began working on camera behaviors.
With two characters in the scene I updated the camera script to focus on the area between the two players and zoom in/out with parallax effects - up to a limit.
There was a bit of work involving some small math equation to solve to control the zoom out behavior with the parallax. Each of the parallax layers have their Y offset adjusted based on the current camera zoom and a tuning scalar value.
I Later modified my tuning script to work with ParallaxLayer(s) or ParallaxBackground(s). This was necessary to remove the warping effect caused by parallax zoom out when the players move away from each other. Now the grass texture will stay closely fixed in place relative to other static objects when parallax zooming.
Part 2
2024-03-11
Spent a bit of time faffing with shaders trying to make some falling leaves and god-rays. Paused on that to focus more on gameplay.
After crawling out of that rabbit hole I made a simple training dummy sprite to beat up instead of a animated character.
At this point I’ve begun working on attack inputs - starting with the basic attack rekka. This has become a bit of a rhythmic process creating all the different player states with input mappings and transitions. Finished adding hitbox keyframes for idle, run, jump, and attack rekka.
When allowing the player to change facing direction originally we were only flipping the sprite H axis - this has created a bug causing the keyframed hitboxes to not be flipped with it. To fix this I began by modifying the scale X value on the root player character, however this created some strange behaviors in Godot where it doesn’t like making the X scale negative. Instead it modifies the rotation and makes Y negative. The solution ended up being to modify the rotation and Y scale manually instead of relying on Godot to modify it based on X scale.
I’ve since gone on to add separate Area nodes for the different attack hitboxes and keyframed those.
Added the air attack state, after which I spent some time tuning the parallax behaviours for when a player gets knocked up into the air.
Then I started working on the dodge/roll mechanic giving it invulnerability frames. Dodge functions similar to a dash as well making it a good gap closer. You can even roll mid air for an instant air dash - although the animations recovery frames are a bit strange. Will need to separate them into different animations later.
And thats about all I changed in this update. Did some slight visual tweaks and QoL changes for the web player build to go along with this update.
I’m planning on adding a type of start screen with character selection. Maybe having the characters as shadows in the treetops and when you choose one they jump down. When this is done I’ll remove the cover image gif so people don’t get baited into thinking its the web player anymore.
Files
Akashi (2D Fighting Game)
A simple 2D fighter demo.
More posts
- Devlog 4 - Local Multiplayer GroundworkApr 08, 2024
- Devlog 3 - Minimal Mobile SupportMar 22, 2024
- Devlog 2 - Some AccessibilityMar 19, 2024
- Devlog 0 - Getting StartedMar 11, 2024
Leave a comment
Log in with itch.io to leave a comment.