Gamejam Devlog - Timedust v0.0.5 - Attack Move


Hiya!

So as I said in my lost post, the chunk to do is the attack move. It is needed indeed to activate the time devices, and it will surely be more than useful in order to slay some hostiles along the way.

I also realized that there are only a few days left before the end of the jam, so I'll be a bit more expeditive in thoses posts from now on. Perhaps I'll give more details on the process in post mortem posts.

So I kinda separated the task into 2 parts. First, character wise, and 2nd the visual slash effect.

Character wise:

I had to add a state ATTACK to the character, so he would play the animation after a button press. i also had to tweak and adjust the dash move because the way I implemented it, the dash was the highest priority over the other movements. However, while testing I felt it was more natural to actually be able to stop the dash in midair for attacking.

The dash could serve to get quickly closer to an NME and quickly attack it. Moreover, as the dash speed en length are set in stone (i may tweak the values later, what I mean is that ingame, the Player don't have control over those parameters), the attack move can also be used as a dash cancel, thus allowing more precision while moving.

The attack moves forces the character to stop and, if he attacks in mid-air, I also turned gravity off during the attack animation, giving a more aerial feeling to the controls that I really like.

Slash Effect:

I separated the slash effect from the character, as I prefered keeping all the character's sprites aligned and centered. 
So I created a new preloaded scene containing the slash effect. If the conditions are met, the character will spawn a swordslash in the world.
I used a Position2D node to define the spawning coordinates. In the gif, it's the small godot sprite that follows the character along that acts as a debug. I make sure the spawning point follow the player correctly and switch place according to the direction he faces by using the direction variable (-1 or 1 ) as a multiplier to the x coordinates (with a small offset so the FX doesn't spawn on the character)


Timedust devlog attack move

A button press spawns the slash effect

Get Timedust - Jam Edition

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.