1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-11 04:17:18 +08:00

5501 Commits

Author SHA1 Message Date
Dan Balasescu
550ff85550
Cancel difficulty calculation after 10 seconds by default 2025-03-04 11:22:47 +09:00
Dan Balasescu
033952029e
Cancel ApplyDefaults() when requested
Also didn't notice a particular case here, but if all code passes up
until we get to the `foreach (var h in nestedHitObjects)` below, then we
could end up stuck here for quite a while.
2025-03-03 14:46:13 +09:00
Dan Balasescu
52dad09b20
Cancel slider generation when requested
Didn't notice a particular case with this one, just came up as I was
looking through code.
2025-03-03 14:19:43 +09:00
Dan Balasescu
ad9a963bd0
Exit loop when cancellation requested
The following manages to create all hitobjects but proceeds to get stuck
in this method:

`dotnet run -- difficulty 1607040 -r:2`
2025-03-03 14:19:19 +09:00
Dean Herbert
87b6dddd11
Merge branch 'master' into pp-dev 2025-02-27 00:08:43 +09:00
Dean Herbert
b3965f0dd0
Merge pull request #32077 from bdach/double-click-difficulty-slider-nub
Fix double-clicking difficulty adjust sliders not resetting the value to default correctly
2025-02-25 21:08:46 +09:00
Bartłomiej Dach
1f562ab47d
Fix double-clicking difficulty adjust sliders not resetting the value to default correctly
- Closes https://github.com/ppy/osu/issues/31888
- Supersedes / closes https://github.com/ppy/osu/pull/32060
2025-02-25 07:40:55 +01:00
Bartłomiej Dach
41db3c1501
Fix taiko swell ending samples playing at results sometimes
Closes https://github.com/ppy/osu/issues/32052.

Sooooo... this is going to be a rant...

To understand why this is going to require a rant, dear reader, please
do the following:

1. Read the issue thread and follow the reproduction scenario (download
   map linked, fire up autoplay, seek near end, wait for results, hear
   the sample spam).
2. Now exit out to song select, *hide the toolbar*, and attempt
   reproducing the issue again.
3. Depending on ambient mood, laugh or cry.

Now, *why on earth* would the *TOOLBAR* have any bearing on anything?

Well, the chain of failure is something like this:

- The toolbar hides for the duration of gameplay, naturally.
- When progressing to results, the toolbar gets automatically unhidden.
- This triggers invalidations on `ScrollingHitObjectContainer`. I'm not
  precisely sure which property it is that triggers the invalidations,
  but one clearly does. It may be position or size or whichever.
- When the invalidation is triggered on `layoutCache`, the next
  `Update()` call is going to recompute lifetimes for ALL hitobject
  entries.
- In case of swells, it happens that the calculated lifetime end of the
  swell is larger than what it actually ended up being determined as at
  the instant of judging the swell, and thus, the swell is *resurrected*,
  reassigned a DHO, and the DHO calls `UpdateState()` and plays the
  sample again despite the `samplePlayed` flag in `LegacySwell`, because
  all of that is ephemeral state that does not survive a hitobject
  getting resurrected.

Now I *could* just fix this locally to the swell, maybe, by having some
time lenience check, but the fact that hitobjects can be resurrected by
the *toolbar* appearing, of all possible causes in the world, feels
just completely wrong. So I'm adding a local check in SHOC to not
overwrite lifetime ends of judged object entries.

The reason why I'm making that check specific to end time is that I can
see valid reasons why you would want to recompute lifetime *start* even
on a judged object (such as playfield geometry changing in a significant
way). I can't think of a valid reason to do that to lifetime *end*.
2025-02-24 14:30:55 +01:00
Bartłomiej Dach
de78518fea
Fix "use current distance snap" button incorrectly factoring in last object with velocity
Closes https://github.com/ppy/osu/issues/32003.
2025-02-21 12:52:59 +01:00
James Wilson
9f90ebb2f7
Calculate hit windows in performance calculator instead of databased difficulty attributes (#31735)
* Calculate hit windows in performance calculator instead of databased difficulty attributes

* Apply mods to beatmap difficulty in osu! performance calculator

* Remove `GreatHitWindow` difficulty attribute for osu!mania

* Remove use of approach rate and overall difficulty attributes for osu!

* Remove use of hit window difficulty attributes in osu!taiko

* Remove use of approach rate attribute in osu!catch

* Remove unused attribute IDs

* Code quality

* Fix `computeDeviationUpperBound` being called before `greatHitWindow` is set
2025-02-07 19:21:12 +09:00
Dean Herbert
6c069b3373
Merge branch 'master' into pp-dev 2025-02-07 14:09:25 +09:00
Bartłomiej Dach
731f100aaf
Fix incorrect snapping behaviour when previous object is not snapped to beat 2025-02-04 11:45:15 +01:00
Bartłomiej Dach
2d6f64e891
Fix code quality 2025-02-03 15:18:03 +01:00
Bartłomiej Dach
df37768ff4
Remove unused method
Only used in test code.
2025-02-03 14:01:51 +01:00
Bartłomiej Dach
a1185df2eb
Refactor IDistanceSnapProvider to accept slider velocity objects as a reference
Method signatures are also changed to be a lot more explicit as to what
inputs they expect.
2025-02-03 14:00:57 +01:00
Dean Herbert
cf3a379b1c
Merge pull request #31368 from frenzibyte/mobile-fix-mania
Improve osu!mania playability on mobile devices
2025-02-01 14:49:46 +09:00
Dan Balasescu
48b1c7398e
Merge pull request #31655 from bdach/deabstractify-editor-snap
Refactor editor object snapping to remove bad abstractions
2025-01-30 01:38:42 +09:00
Dean Herbert
d8ec3b77e4
Fix incremental unstable rate calculation not matching expectations
The `EventCount` variable wasn't factoring in that some results do not
affect unstable rate. It would therefore become more incorrect as the
play continued.

Closes https://github.com/ppy/osu/issues/31712.
2025-01-29 17:11:12 +09:00
Salman Alshamrani
ffc37cece0 Avoid extra unnecessary DI
Co-authored-by: Dean Herbert <pe@ppy.sh>
2025-01-25 19:12:42 -05:00
Bartłomiej Dach
daec91f61d
Refactor further to avoid weird non-virtual common method 2025-01-24 13:14:31 +01:00
Bartłomiej Dach
269ade178e
Fix tests 2025-01-24 11:59:07 +01:00
Bartłomiej Dach
32d341a468
Remove IPositionSnapProvider 2025-01-24 11:59:07 +01:00
Bartłomiej Dach
a6987f5c95
Remove dependence of placement blueprints on IPositionSnapProvider 2025-01-24 11:59:07 +01:00
Bartłomiej Dach
15b6e28ebe
Remove dependence of blueprint containers on IPositionSnapProvider 2025-01-24 11:59:05 +01:00
Dean Herbert
5cc8181bad
Expose GameplayStartTime in IGameplayClock 2025-01-24 15:29:49 +09:00
Dean Herbert
aeca37c230
Merge branch 'master' into pp-dev 2025-01-21 13:19:01 +09:00
Natelytle
5b4ba9225d
Move error function from osu.Game.Utils to osu.Game.Rulesets.Difficulty.Utils (#31520)
* Move error function implementation to osu.Game.Rulesets.Difficulty.Utils

* Rename ErrorFunction.cs to DifficultyCalculationUtils_ErrorFunction.cs
2025-01-17 19:37:34 +00:00
Dean Herbert
42e5cb58b7
Merge branch 'master' into mobile-fix-mania 2025-01-16 18:08:46 +09:00
Shawn Presser
6008c3138e Typo fix 2025-01-15 19:29:41 -06:00
Dean Herbert
ef7982fbfa
Merge pull request #31446 from EVAST9919/new-combo-editor
Fix performance degradation while trying to place object with a new combo in the editor.
2025-01-15 12:56:06 +09:00
Salman Alshamrani
c1ac27d658 Fix failing tests
- Caches `DrawableRuleset` in editor compose screen for mania playfield adjustment container (because it's used to wrap the blueprint container as well)
- Fixes `ManiaModWithPlayfieldCover` performing a no-longer-correct direct cast with a naive-but-working approach.
2025-01-12 22:56:40 -05:00
Salman Alshamrani
f121b03a78 Merge branch 'master' into mobile-fix-mania 2025-01-12 02:00:49 -05:00
Bartłomiej Dach
933f5db208
Merge branch 'master' into new-combo-editor 2025-01-10 14:13:14 +01:00
Bartłomiej Dach
48196949e0
Add combo colour override control to editor
Closes https://github.com/ppy/osu/issues/25608.

Logic mostly matching stable. All operations are done on `ComboOffset`
which still makes overridden combo colours weirdly relatively dependent
on each other rather than them be an "absolute" choice, but alas...

As per stable, two consecutive new combos can use the same colour only
if they are separated by a break:

    52f3f75ed7/osu!/GameModes/Edit/Modes/EditorModeCompose.cs#L4564-L4571

This control is only available once the user has changed the combo
colours from defaults; additionally, only a single new combo object
must be selected for the colour selector to show up.
2025-01-10 13:40:56 +01:00
Dan Balasescu
38d95abc24
Merge pull request #31462 from bdach/ternary-button-is-bad
Simplify editor "ternary button" structure
2025-01-10 14:24:41 +09:00
Givikap120
b21c6457b1
Punish speed PP for scores with high deviation (#30907) 2025-01-09 13:27:54 +00:00
Bartłomiej Dach
5c8ae6f851
Simplify editor "ternary button" structure
As I look into re-implementing the ability to choose combo colour for an
object (also known as "colourhax") from the editor UI, I stumble upon
these wretched ternary items again and sigh a deep sigh of annoyance.

The structure is overly rigid. `TernaryItem` does nothing that
`DrawableTernaryItem` couldn't, except make it more annoying to add
specific sub-variants of `DrawableTernaryItem` that could do more
things.

Yes you could sprinkle more levels of virtuals to
`CreateDrawableButton()` or something, but after all, as Saint Exupéry
says, "perfection is finally attained not when there is no longer
anything to add, but when there is no longer anything to take away."
So I'm leaning for taking one step towards perfection.
2025-01-09 13:41:22 +01:00
Dean Herbert
c8f72fdbe9
Fix rate adjustments changing the spacing between replay frames 2025-01-09 13:30:04 +09:00
StanR
392bb5718c
Simplify angle bonus formula (#31449)
* Simplify angle bonus formula

* Simplify further

* Simplify acute too

* Tests
2025-01-08 10:03:22 +00:00
Andrei Zavatski
8f4eafea4e Fix combo properties multiple reassignments 2025-01-07 14:00:31 +03:00
Dan Balasescu
77d9c955ea
Merge pull request #31306 from bdach/aspire-slider-breakage
Fix slider event generator incorrectly not generating repeats when tick distance is zero
2025-01-07 11:50:18 +09:00
Andrei Zavatski
e8dc09f5bc Reduce HitSampleInfo constants allocations 2025-01-07 00:36:58 +03:00
Dean Herbert
cca63b599e
Always block scroll input above editor toolbox areas
Originally this was an intentional choice (see
https://github.com/ppy/osu/pull/18088) when these controls were more
transparent and didn't for a solid toolbox area.

But this is no longer the case, so for now let's always block scroll to
match user expectations.

Closes #31262.
2025-01-02 14:31:27 +09:00
Salman Alshamrani
7563a18c7f Allow locking orientation on iOS in certain circumstances 2024-12-29 22:15:21 -05:00
Jay Lawton
824497d82c
Rewrite of the Rhythm Skill within osu!taiko (#31284)
* implement bell curve into diffcalcutils

* remove unneeded attributes

* implement new rhythm skill

* change dho variables

* update dho rhythm

* interval interface

* implement rhythmevaluator

* evenhitobjects

* evenpatterns

* evenrhythm

* change attribute ordering

* initial balancing

* change naming to Same instead of Even

* remove attribute bump for display

* Fix diffcalc tests

---------

Co-authored-by: StanR <hi@stanr.info>
2024-12-27 16:30:30 +03:00
Bartłomiej Dach
e7225399a2
Fix slider event generator incorrectly not generating repeats when tick distance is zero
RFC. This closes https://github.com/ppy/osu/issues/31186.

To explain why: The issue occurs on
https://osu.ppy.sh/beatmapsets/594828#osu/1258033, specifically on the
slider at time 128604. The failure site is

	fa0d2f4af2/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderCircleOverlay.cs (L65-L66)

wherein `LastRepeat` is `null`, even though the slider's `RepeatCount`
is 1 and thus `SpanCount` is 2.

In this case, `SliderEventGenerator` is given a non-zero `tickDistance`
but a zero `length`. The former is clamped to the latter:

	fa0d2f4af2/osu.Game/Rulesets/Objects/SliderEventGenerator.cs (L34)

Because of this, a whole block of code pertaining to tick generation
gets turned off, because of zero tick spacing - however, that block also
includes within it *repeat* generation, for seemingly very little reason
whatsoever:

	fa0d2f4af2/osu.Game/Rulesets/Objects/SliderEventGenerator.cs (L47-L77)

While a zero tick distance would indeed cause `generateTicks()` to loop
forever, it should have absolutely no effect on repeats.

While this *is* ultimately an aspire-tier bug caused by people pushing
things to limits, I do believe that in this case a fix is warranted
because of how hard the current behaviour violates invariants. I do not
like the possibility of having a slider with multiple spans and no
repeats.
2024-12-27 12:38:31 +01:00
Bartłomiej Dach
0d16ed028b
Add setters to hitobject coordinate interfaces 2024-12-27 11:01:47 +01:00
StanR
6808a5a77c
Change slider drop penalty to use actual number of difficult sliders, fix slider drop penalty being too lenient (#31055)
* Change slider drop penalty to use actual number of difficult sliders, fix slider nerf being too lenient

* Move cubing to performance calculation

* Add separate list for slider strains

* Rename difficulty atttribute

* Rename attribute in perfcalc

* Check if AimDifficultSliderCount is more than 0, code quality fixes

* Add `AimDifficultSliderCount` to the list of databased attributes

* Code quality

---------

Co-authored-by: James Wilson <tsunyoku@gmail.com>
2024-12-21 23:45:29 +00:00
StanR
f722f94f26
Simplify osu! high-bpm acute angle jumps bonus (#30902)
* Simplify osu! high-bpm acute angle jumps bonus

* Add aim wiggle bonus

* Add hitwindow-based aim velocity decrease

* Revert "Add hitwindow-based aim velocity decrease"

This reverts commit bcebe9662cfcb7a72805e48712525ef54ec9820e.

* Move wiggle multiplier to a const, slightly decrease acute bonus multiplier

* Make sure the previous object in the wiggle bonus is also part of the wiggle

* Scale the wiggle bonus multiplayer down

* Increase the acute angle jump bonus multiplier

* Make wiggle bonus only apply on >150 bpm streams, make repetitive angle penalty

* Reduce wiggle bonus multiplier to not break velocity>difficulty relation

* Adjust wiggle falloff function to fix stability issues

* Adjust wiggle consts

* Update tests
2024-12-20 23:32:51 +00:00
Dean Herbert
55dff1f0ef
Merge branch 'master' into skinnable-mod-display 2024-12-20 14:08:51 +09:00