Open bobatealee opened 1 month ago
This is essential for older style games!
The pixel rounding is a huge problem in this case. In both the RPG and Beat-em-up games I've made, I had to write custom movement code because of this.
I hope this is a simple feature to implement. Thanks for making the suggestion @bobatealee!
Reviewed guidelines
Checked for duplicate suggestions
Summary
The 8 Direction behavior currently dampens an object's speed when moving diagonally, so that the diagonal speed is proportional to straight horizontal and vertical movement.
Depending on what kind of game you are making, this can have unfortunate side effects. For one, it doesn't feel good in terms of game feel - your object is perceptually moving slower. Secondly, in projects with 'pixel rounding' turned on, this can cause issues with jitteriness when paired with speeds that do not divide into clean numbers while dampened.
Possible workarounds or alternatives
I have personally run into this issue while making a game, and have had to settle for writing my own custom movement with consistent speeds both horizontal/vertical and diagonal, in addition to custom collision detection.
The movement is tick-based and has to apply values based on delta time, which can cause slight jitteriness based on delta time fluctuation. 8 Direction's built-in collision detection is robust and consistent, while custom collision detection may often act strange when encountering edge cases.
Proposed solution
I believe that the 8 Direction behavior should have a toggle for enabling/disabling diagonal movement dampening, on by default, similar to 'default controls' and 'allow sliding'.
Why is this idea important?
8 Direction is one of the most popular behaviors and is a must-have for RPGs and top-down games. As both of these genres, as well as many others, are rooted in history and have origins tracing back to NES/SNES, style (pixel rounding) and game feel can have a big impact on the type of project you want to make.
Adding a new toggle for movement dampening would make the behavior a lot more versatile and applicable for these types of games without the need to rewrite the entire behavior using custom logic.
Additional remarks
No response