-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Change osu!taiko's scrolling time range to match stable #26681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
1731d7b
a46ca14
d5b08c4
62e1481
7da92eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
using System; | ||
using osu.Framework.Bindables; | ||
using osu.Framework.Graphics; | ||
using osu.Game.Rulesets.Taiko.Beatmaps; | ||
using osu.Game.Rulesets.UI; | ||
|
||
namespace osu.Game.Rulesets.Taiko.UI | ||
|
@@ -12,11 +13,22 @@ public partial class TaikoPlayfieldAdjustmentContainer : PlayfieldAdjustmentCont | |
{ | ||
private const float default_relative_height = TaikoPlayfield.DEFAULT_HEIGHT / 768; | ||
|
||
public const float DEFAULT_ASPECT = 16f / 9f; | ||
public const float MAXIMUM_ASPECT = 16f / 9f; | ||
public const float MINIMUM_ASPECT = 5f / 4f; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's better not to introduce terms like "DEFAULT" in public constants in the codebase, I would keep that constant in the helper method instead. Also probably best to make all these constants private, as they're no longer used anywhere outside of the class itself (see other comment). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense, applied in a46ca14, though do note that the maximum and minimum will need to be adjustable by mods in my next pr (to match stable's wider and mod-variable time range for classic mods) |
||
|
||
public readonly IBindable<bool> LockPlayfieldAspectRange = new BindableBool(true); | ||
|
||
public static double AspectRatioToTimeRange(float aspectRatio) | ||
{ | ||
const float default_time_range = 7000 / TaikoBeatmapConverter.VELOCITY_MULTIPLIER; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should be explicitly specified that such number was taken purely by visual comparison with stable. Also, can you give further insight as to why this number is being divided by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment added in a46ca14 It being divided by // Stable internally increased the slider velocity of objects by a factor of `VELOCITY_MULTIPLIER`.
// To simulate this, we shrink the time range by that factor here.
// This, when combined with the rest of the scrolling ruleset machinery (see `MultiplierControlPoint` et al.),
// has the effect of increasing each multiplier control point's multiplier by `VELOCITY_MULTIPLIER`, ensuring parity with stable. Though now that it's a constant, we could just make the default 5000 instead. Or we could include this comment here. Do let me know if one of these would be preferable |
||
|
||
// This is the fraction of the width that should not contribute to time range. | ||
const float ratio_compensator = 380f / 1366f; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would name it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Renamed in a46ca14 |
||
|
||
return (aspectRatio - ratio_compensator) / (DEFAULT_ASPECT - ratio_compensator) * default_time_range; | ||
} | ||
|
||
protected override void Update() | ||
{ | ||
base.Update(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move this inside the helper method, especially since part of the code relies on constants from that class in itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied in a46ca14. Because it needs access to the draw width and height, I've added a
ComputeTimeRange
onTaikoPlayfieldAdjustmentContainer
too.DrawableTaikoEditorRuleset.ComputeTimeRange
seems a bit redundant now, but it's referenced inDrawableTaikoEditorRuleset
, so it's kept for now. Do let me know if it would be preferable to just use the one in adjustment container instead.