ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
14.64k stars 2.16k forks source link

Add automatic generation of breaks in editor #28528

Closed bdach closed 1 week ago

bdach commented 1 week ago

https://github.com/ppy/osu/assets/20418176/be600b9c-e20b-4360-884f-155089396b85

Breaks are automatically inserted between objects if there is ample time to do so, namely there must be at least:

Breaks that have been manually adjusted are not moved by the automatic regeneration on changes, unless they would break gameplay (by having an object's duration intersect a break), in which case they are forcibly removed. This manual adjustment tracking state is dodgy at best (will not work properly with undo/redo, because this info is not and should not be serialised out by the legacy beatmap encoder, which means that the manual tracking will be dropped upon undo), but it is what it is. That subsystem needs to get replaced by something else at some point anyway.

No manual add/remove of breaks right now, I'm mostly hoping we won't have to add it with this in (but will do if people request it for whatever reason I guess).

Code size is on the larger side but ~300 lines is tests so...