JRVeale / hello-game

I started making a game engine. I got the jist of how they work, and decided it would be better to just use existing ones
0 stars 0 forks source link

Overhaul movement #8

Open JRVeale opened 5 years ago

JRVeale commented 5 years ago

Add a facing direction to TransformComponent.

Set it based on WASD (/ joystick direction / mouse / whatever at some point later). On WASD keyup/down update facing direction (if is lifting of last key, leave facing direction as is. (might need to consider timing, to allow ending up facing diagonally, despite not being able to lift keys at exactly the same time) While any one of WASD pressed (or equivalent for other control systems...), move in that direction at 'speed'.

Also update sprite used at each direction option (round to nearest of 8 directions once joysticks allow further fidelity). Will have a sprite for each direction idle and moving..

Deals with diagonal speed, and allows facing direction for interactions/dropping items...