Devlog #1 - Basic Movement


Welcome to the first devlog of hopefully many, where you can (also hopefully) learn something from my mistakes. There will be tidbits of code scattered arounc, flanked with anecdotes of my own experience and the dos and don'ts of someone who has no idea what they're doing.

The Basics (Of Movement and Dashing)

The first thing to do was get our placeholder character moving along. There's a probably a lot of ways to do movement and a lot of better ways to do movement, but this is the way I did it.

 At some point I'll probably switch over to the new input system so it's easier to rebind things and turn this into a console game if it ever gets that far, but for something quick and dirty and motivating, I just did a simple changing of velocity on the Rigidbody, like a force that moves the object. So our little placeholder is being subject to the whims of invisible coded forces bound to the WASD keys.

A little tweaking of the sprite with blend tree so he faces the correct direction on diagonals. 


Basic Movement Code for anyone interested

To get a little fancy with it, I also gave our little guy a dash ability. It's very basic and you could easily find the code for it on Youtube, but here it is all the same. 


The final step was to add in the placeholder animations so that our lad wasn't just sliding over the place like an ice cube on ice. After that,  he was ready for some more advance things, but that will come in the next update!

Leave a comment

Log in with itch.io to leave a comment.