LeaPhant / flowabot

Modular Discord bot with fun features including twitch commands and advanced osu! commands. 🌷
MIT License
111 stars 33 forks source link

Add proper slider rendering #1

Open LeaPhant opened 5 years ago

LeaPhant commented 5 years ago

Currently the slider rendering lacks catmull sliders and bezier sliders are poorly implemented. Slider repeats aren't implemented visually either. I need help for this as I'm really bad at math/rendering so feel free to PR.

Here are references from the osu!lazer codebase:

ppy/osu/osu.Game/Rulesets/Objects/SliderPath.cs ppy/osu-framework/osu.Framework/MathUtils/PathApproximator.cs

LeaPhant commented 5 years ago

Update on this: I added catmull sliders and circular arc sliders, bezier sliders could still be optimized but it's fine for now. Also I finally got slider point interpolation so every point on a slider track always the same distance, this prevents any sudden velocity changes and should result in always smooth linear movement of the slider ball (this is huge). Now that slider tracks are cleaned up slider repeats are next.

LeaPhant commented 5 years ago

Update: Slider repeats have been added, slider ticks are mostly done but I still have to find the algorithm which osu uses to decide which slider ticks to dismiss. Also slider velocity is still buggy and some sliders are too slow and therefore too long in time, but this is a fix to do in my osu-parser fork.

LeaPhant commented 5 years ago

Slider velocity is finally fixed in the osu-parser fork, slider length should be accurate now.

LeaPhant commented 5 years ago

Update: Slider ticks are finally correct and with that I'm pretty sure sliders are basically done. Now only minor changes like performance improvements or adding a gradient to slider bodies are left.