1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:07:25 +08:00
Commit Graph

60680 Commits

Author SHA1 Message Date
Bartłomiej Dach
7e5533e205
Fix not being able to receive full score for extremely short sliders with repeats
Closes #23862.

Score V2 is a scoring algorithm, which aside from the raw numerical
values of each judgement, incorporates a combo component, wherein each
judgement's "combo score" is derived from both the raw numerical value
of the object and the current combo after the given judgement. In
particular, this means that Score V2 is sensitive to the _order_ of
judging objects, as if two objects with the same start time are judged
using different ordering, they can end up having a different "combo
score".

The issue that this change is fixing is an instance of one such
reordering. Upon inspection, it turned out that the simulated autoplay
run, which is used to determine max possible score so that it can be
standardised to 1 million again, was processing a slider repeat before a
slider tail circle, while actual gameplay was processing the same slider
repeat _after_ the slider tail circle.

The cause of that behaviour is unfortunately due to `LegacyLastTick`.
The sliders which cause the issue are extremely short. Stable had a
behaviour, in which to provide leniency, slider tails were artificially
offset back by 36ms. However, if the slider is not long enough to make
this possible, the last tick is placed in the middle of the slider. If
that slider also happens to have exactly 1 repeat, then this means that
the last tick and the repeat have the same time instant.

Because of the time equality, what begins to matter now is the _order_
of processing the elements of the drawable slider in the hierarchy. For
the purposes of legacy skins, tail circles were moved below ticks in
fce3eacd7d - but in this particular case,
it means that the order of processing the slider elements is now
inadvertently inverted, causing the entire debacle.

While the fact that scoring depends on order of processing of visuals is
suboptimal, there isn't a great way to address this without significant
restructuring. Due to the structure of processing judgements currently
in place, in which each judgement is processed independently from others
by its corresponding drawable hit object, this is probably the best that
can be done for the time being at least.
2023-06-10 12:14:08 +02:00
Bartłomiej Dach
3bf900a4df
Add failing test case for slider scenario 2023-06-10 12:14:08 +02:00
Dean Herbert
659a042065
Merge pull request #23844 from peppy/memory-caching-nrt
Apply NRT to `MemoryCachingComponent` classes
2023-06-09 23:28:21 +09:00
Dean Herbert
b595ddaf89
Merge pull request #23848 from bdach/bump-replay-version
Bump replay version in encoder after Score V2 changes
2023-06-09 23:05:34 +09:00
Bartłomiej Dach
52412c673d
Bump replay version in encoder after Score V2 changes
One release too late, but this may help in the future if we need to
discern replays set with Score V2 from older lazer replays.
2023-06-09 14:49:49 +02:00
Bartłomiej Dach
ee746decf0
Merge pull request #23845 from peppy/cache-replay-import-username-lookups
Add a very simple user cache to `ScoreImporter`
2023-06-09 14:42:55 +02:00
Bartłomiej Dach
287229efd5
Fix code quality inspection 2023-06-09 14:25:53 +02:00
Bartłomiej Dach
58507291b9
Apply NRT in MemoryCachingComponent test-only subclasses 2023-06-09 13:48:42 +02:00
Bartłomiej Dach
11694f35fe
Apply NRT in MemoryCachingComponent subclasses too 2023-06-09 13:47:35 +02:00
Bartłomiej Dach
15df2875ec
Merge pull request #23841 from peppy/replay-audio-settings
Fix audio settings not displaying while watching a replay
2023-06-09 13:16:39 +02:00
Dean Herbert
c5e77e13de Add a very simple user cache to ScoreImporter 2023-06-09 19:03:28 +09:00
Dean Herbert
4685ba83e1 Apply NRT to MemoryCachingComponent classes 2023-06-09 19:00:05 +09:00
Bartłomiej Dach
fbbeb3893b
Merge pull request #23832 from peppy/fix-catch-distance-spacing-display
Fix weird right-toolbox distance snapping display in osu!catch editor
2023-06-09 11:50:11 +02:00
Dean Herbert
631090db6c
Merge pull request #23817 from smoogipoo/scoring-hotfix
Fix imported osu!stable scores being scaled by the classic scoring mode
2023-06-09 18:47:49 +09:00
Bartłomiej Dach
c9bb687547
Merge branch 'master' into scoring-hotfix 2023-06-09 11:20:21 +02:00
Bartłomiej Dach
ca25ac446b
Be slightly more specific with error message 2023-06-09 11:20:12 +02:00
Dean Herbert
c2663f27a1 Fix audio settings not displaying while watching a replay 2023-06-09 17:58:44 +09:00
Dean Herbert
53f935714e Inline binary reading to avoid polluting RealmAccess with nested class 2023-06-09 17:34:27 +09:00
Dean Herbert
a9071e7afd try-catch more 2023-06-09 17:33:59 +09:00
Dan Balasescu
3c51b5a53a
Merge pull request #23809 from peppy/crop-texture-uploads-song-select
Greatly improve song select performance by cropping beatmap backgrounds before display
2023-06-09 15:04:57 +09:00
Dean Herbert
1ab3b43b59 Fix weird right-toolbox distance snapping display in osu!catch editor 2023-06-09 14:36:17 +09:00
Dan Balasescu
67562a3856 Catch errors during score parsing 2023-06-09 14:35:29 +09:00
Bartłomiej Dach
3597698544
Merge pull request #23722 from peppy/beat-divisor-better-defaults
Improve usability of beat divisor control
2023-06-08 21:16:03 +02:00
Bartłomiej Dach
4b3b22f046
Merge branch 'master' into beat-divisor-better-defaults 2023-06-08 20:35:03 +02:00
Bartłomiej Dach
b66d1aa33d
Fix code quality inspection 2023-06-08 20:32:16 +02:00
Dean Herbert
0875fc6233 Update tests in line with new behaviour 2023-06-09 02:28:38 +09:00
Bartłomiej Dach
a595b7804b
Merge pull request #23820 from peppy/update-framework
Update framework
2023-06-08 19:08:11 +02:00
Dean Herbert
46dc47b0b4 Update framework 2023-06-09 01:22:29 +09:00
Bartłomiej Dach
05bd912a21
Revert internal access modifier application
Unfortunately breaks a few classes (which is fixable), and also breaks
Moq/Castle dynamic proxies (which is unfortunate).

Relevant error:

    System.TypeLoadException : Method 'GetPanelBackground' in type 'Castle.Proxies.IWorkingBeatmapProxy' from assembly 'DynamicProxyGenAssembly2, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
    Stack Trace:
        at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
        at System.Reflection.Emit.TypeBuilder.CreateTypeInfo()
        at Castle.DynamicProxy.Generators.Emitters.AbstractTypeEmitter.BuildType()
        at Castle.DynamicProxy.Generators.BaseInterfaceProxyGenerator.GenerateType(String typeName, INamingScope namingScope)
        at Castle.DynamicProxy.Generators.BaseProxyGenerator.<>c__DisplayClass13_0.<GetProxyType>b__0(CacheKey cacheKey)
        at Castle.Core.Internal.SynchronizedDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
        at Castle.DynamicProxy.Generators.BaseProxyGenerator.GetProxyType()
        at Castle.DynamicProxy.DefaultProxyBuilder.CreateInterfaceProxyTypeWithoutTarget(Type interfaceToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options)
        at Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyTypeWithoutTarget(Type interfaceToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options)
        at Castle.DynamicProxy.ProxyGenerator.CreateInterfaceProxyWithoutTarget(Type interfaceToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options, IInterceptor[] interceptors)
        at Moq.CastleProxyFactory.CreateProxy(Type mockType, IInterceptor interceptor, Type[] interfaces, Object[] arguments) in C:\projects\moq4\src\Moq\Interception\CastleProxyFactory.cs:line 50

In theory it would be possible to fix this via application of

    [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]

onto the `osu.Game` assembly, but I think this would be bad precedent.
2023-06-08 15:23:09 +02:00
Bartłomiej Dach
e1395fd62f
Merge pull request #23816 from peppy/mania-combo-ratio
Change osu!mania scoring ratio to 99% acc (to match previous lazer scoring)
2023-06-08 14:42:09 +02:00
Dan Balasescu
76df11c398 Don't scale stable scores with the classic scoring mode 2023-06-08 21:38:10 +09:00
Dan Balasescu
facf7de053 Parse ScoreInfo.IsLegacyScore from replays 2023-06-08 21:38:10 +09:00
Bartłomiej Dach
6dbf02454f
Fix bad math 2023-06-08 14:19:34 +02:00
Dean Herbert
cccc06de48 Fix potential failure if beatmap background isn't tall enough 2023-06-08 21:10:40 +09:00
Dean Herbert
ff4d376c84 Mark relevant components as internal 2023-06-08 21:01:05 +09:00
Dean Herbert
dbb7ddac52 Change osu!mania scoring ratio to 99% acc (to match previous lazer scoring) 2023-06-08 20:55:13 +09:00
Bartłomiej Dach
6f774551e6
Merge pull request #23812 from peppy/reduce-editor-note-note-snapping
Reduce the radius of note-to-note snapping in osu! editor
2023-06-08 13:54:11 +02:00
Bartłomiej Dach
6fd99394d2
Merge branch 'master' into reduce-editor-note-note-snapping 2023-06-08 13:20:07 +02:00
Bartłomiej Dach
2958ce35be
Adjust object snapping test cases to pass with new radius 2023-06-08 13:19:47 +02:00
Bartłomiej Dach
e6503c24c8
Merge branch 'master' into crop-texture-uploads-song-select 2023-06-08 12:24:16 +02:00
Bartłomiej Dach
281aae91ec
Merge pull request #23808 from peppy/working-beatmap-get-background
Refactor `IWorkingBeatmap.Background` to `GetBackground()`
2023-06-08 12:23:07 +02:00
Bartłomiej Dach
0ec6bc1bb8
Merge pull request #23768 from peppy/fix-editor-drum-roll
Fix ticks being created after the end of drum rolls in osu!taiko editor
2023-06-08 10:59:53 +02:00
Dean Herbert
95ad18ed2e Reduce the radius of note-to-note snapping in osu! editor
Stable uses `0.15f`, but for whatever reason that feels too large still.

I've ballparked this.

Addresses https://github.com/ppy/osu/discussions/23806.
2023-06-08 17:44:33 +09:00
Bartłomiej Dach
079e687bee
Fix incorrect mock setup after refactor 2023-06-08 10:09:27 +02:00
Bartłomiej Dach
7acd186a3d
Revert to previous bound in drum roll tick generation
While `EndTime + tickSpacing` _was_ closer to what stable was using, it
could cause undesirable edge cases wherein a tick would be spawned
outside of the drum roll's duration
(see https://github.com/ppy/osu/pull/23768/files#r1222073027).

For this reason, stick with the old code for now, as it is not as
susceptible to that sort of breakage.
2023-06-08 09:56:39 +02:00
Bartłomiej Dach
b6a1377955
Merge branch 'master' into fix-editor-drum-roll 2023-06-08 09:55:10 +02:00
Bartłomiej Dach
31652c551f
Merge pull request #23798 from peppy/fix-section-container-scroll-attempt-2
Fix settings jump buttons not always seeking to correct location the first time
2023-06-08 09:52:39 +02:00
Dean Herbert
3978d4babb Crop and disable mipmaps on beatmap panel backgrounds
This is an effort to improve general performance at song select. At
least on the metal renderer, I can notice very high draw frame overheads
related to texture uploads.

By reducing the size of the texture uploads to roughly match what is
actually being displayed on screen (using a relatively inexpensive crop
operation), we can bastly reduce stuttering both during initial load and
carousel scroll.

You might ask if it's safe to disable mipmapping, but I've tested with
lower resolutions and bilinear filtering seems to handle just fine.
Bilinear without mipmaps only falls apart when you scale below 50% and
we're not going too far past that at minimum game scale, if at all.
2023-06-08 16:51:07 +09:00
Bartłomiej Dach
5162f5c3d8
Fix code quality inspections 2023-06-08 09:20:43 +02:00
Dean Herbert
a842f79ad4 Refactor IWorkingBeatmap.Background to GetBackground() 2023-06-08 16:19:32 +09:00