Making fluid rolling/ dashing

I’m making a fast paced top down movement right now. But I need a good roll similar to Enter the Gungeon. The roll goes in the direction of the mouse. But I’m not sure how to get the movement to be separate from normal movement.

Any examples would be awesome.

1 Like

Here, I’ll make an example real quick.

1 Like

for the dash, you could add a cool player shadow that was the same as the dash sprite, could add some good vfx and particles (if you can) and add a good animation for it

for the roll, you need only about 3 sprites (2 for the dive and 1 for the roll) cuz you can just rotate the sprite for the roll, if you want, you can add in-between frames for in-between (who would’ve known) the roll, for example. a straight form, then a diagonal form. and do that over again a few times

i also want to tell you the code for it (its basic, I just want you to get a start and add on it) you would need a button trigger and make it where when you click a button, the trigger will get a number (to whatever your liking is) and it will go in the X input, so make sure you get the X input right

For the roll, you need the same setup except you need a wire that activates the animation. i know that the code and how to do the sprites and stuff is really basic, but I just want you to get a good start so you can edit it easier and build upon it to your own liking. I’m sorry if I didn’t explain enough, if you point out what i need to tell you more of, i will do it gladly, but other words, good luck on your game and i hope this helps

1 Like

Any news on that example :sweat_smile:
I’ve only ever made tower defense games so movement is very foreign to me.

I just need a code example of mapping Point A to point B for the roll/dash. I’d probably use eases, but idk how to calculate the angle and distance.

JR01’s angle to velocity bundle perhaps?

Does that work with “Mouse Move” to set the angle?

1 Like

Idk you’ll have to check it. I can’t really go on Flowlab rn because Im outside hiking

1 Like

wait a sec… I’ve been really busy. Sorry.

Here: https://flowlab.io/games/play/2354261

Sorry for the wait and the bad sprites.

2 Likes

Thanks a ton, it works exactly how I wanted!

3 Likes