Commit Graph

617 Commits

Author SHA1 Message Date
cbd563e80b Rename to IHasDuration 2020-05-27 12:38:39 +09:00
417e31d77f Rename function for consistency 2020-05-26 10:17:56 +09:00
d69111c665 Fix spelling of breadth 2020-05-26 10:17:34 +09:00
8fc60d12c9 Add back comments 2020-05-25 22:09:09 +09:00
2c16619ecd Move time to position conversion to ScrollingHitObjectContainer 2020-05-25 19:32:39 +09:00
f395ef24a4 Merge branch 'master' into editor-position-snap 2020-05-22 16:42:09 +09:00
6f388b731e Fix display start time in sequential scroll algorithm 2020-05-21 21:56:59 +02:00
b1fd7da824 Merge branch 'master' into editor-position-snap 2020-05-21 15:47:20 +09:00
5ad7842b91 Move ScreenSpacePositionAtTime to inside Column implementation 2020-05-21 13:33:02 +09:00
ce223a2bd8 Silence hit sounds while seeking 2020-05-21 11:08:06 +09:00
44fdf1e6b0 Reword xmldoc 2020-05-10 20:09:41 +09:00
c712e98f2b Merge branch 'master' into publicly-expose-hud 2020-05-10 20:06:28 +09:00
2f12c4126a Apply suggestions from code review
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2020-05-10 13:49:08 +09:00
be3b77cf25 Fix potentially skipping hitobject updates 2020-05-08 20:09:59 +09:00
22dda3fe02 Make ScrollingHitObjectContainer respond to defaults applied events 2020-05-08 18:49:58 +09:00
30dd158c33 Rename property to AllowGameplayOverlays and update XMLDoc accordingly. 2020-05-08 09:37:50 +02:00
83998d5ba5 Trim whitespace. 2020-05-07 09:39:14 +02:00
83be5455d3 Disable the display of HUD through DisplayHud property. 2020-05-07 08:52:36 +02:00
064e5004ed Merge branch 'master' into fix-mania-selection 2020-04-29 17:15:48 +09:00
1aaab40228 Fix mods affecting mania scroll speed 2020-04-28 19:34:02 +09:00
da30eafa30 Prevent potential exception 2020-04-28 14:47:45 +09:00
86ef73aa27 Implement HitObjectContainer.Clear() 2020-04-23 11:16:59 +09:00
7b2144a1a7 Fix merge mishap 2020-04-03 23:31:46 +09:00
3289fa7c66 Merge branch 'master' into better-mania-scrollspeed 2020-04-03 23:25:14 +09:00
d90db5649d Improve comment slightly 2020-04-03 18:32:07 +09:00
1ff2cc31d1 Implement more familiar scroll speed options in mania 2020-04-03 18:25:01 +09:00
b42d1104b7 Fix mania converts scrolling at incorrect speeds 2020-04-03 13:16:01 +09:00
66486b094c Remove unnecessary dependency, allow null mods 2020-04-01 13:31:17 +09:00
2abb8a37df Merge branch 'master' into show-mod-settings-tooltip 2020-03-29 14:35:04 +09:00
07462120e4 Split break tracking into its own component 2020-03-26 15:30:23 +09:00
2b1245f63a Improve xmldoc in a couple of places 2020-03-26 12:50:00 +09:00
448961b330 Rename incorrect variable 2020-03-24 15:39:01 +09:00
388cf5c83a Fix catch positional data being incorrectly recorded 2020-03-24 15:38:54 +09:00
022465f546 Add encoding and import support 2020-03-24 14:51:52 +09:00
617149fb27 Implement in player 2020-03-23 20:06:18 +09:00
14a85a84bf Add proper screen space - gamefield mapping 2020-03-23 20:06:18 +09:00
6d48068061 Move replay recorder to final location 2020-03-23 20:04:15 +09:00
232c255986 Basic test scene setup 2020-03-23 17:33:02 +09:00
a6b153673e Fix icons not updating tooltip text correctly 2020-03-23 14:58:02 +09:00
4f9ac7b81e Merge branch 'master' into show-mod-settings-tooltip 2020-03-23 14:57:54 +09:00
d8041a0dcb Increase sample concurrency to better match stable 2020-03-22 02:16:28 +09:00
18bf7c913b show mod settings in ModIcon tooltip 2020-03-18 23:43:26 -04:00
6c28fd21c7 osu-side changes 2020-02-24 20:52:15 +09:00
5fde4f2c0c Fix lifetime calculation in overlapping algorithm
Changes to lifetime calculation in scrolling rulesets introduced in
#7367, which aimed to account for the distance between hit objects'
origin and its edge entering the scrolling area, fixed some issues with
hitobjects appearing abruptly, but also regressed some other scenarios.

Upon investigation, the regression was localised to the overlapping
scroll algorithm. The reason for this was two-fold:

* The previous code used TimeAt() to calculate the time of travel from
  the hit object's edge to its origin. For other algorithms, that time
  can be accurately reconstructed, because they don't have periods of
  time where there are multiple hit objects scrolling at different
  velocities.

  That invariant does not hold for the overlapping algorithm, therefore
  it is possible for different values to be technically correct for
  TimeAt(). However, the only value that matters for the adjustment
  is the one that's indicated by the control point that applies to the
  hit object origin, which can be uniquely identified.

* Additionally, the offset returned (even if correct) was applied
  externally to the hit object's start time and passed to
  GetDisplayStartTime(). In the overlapping algorithm, the choice of
  control point used in GetDisplayStartTime() is important, since
  the value of the speed multiplier is read within.

  Externally rewinding the hit object's start time meant that in some
  cases the speed multiplier of the *previous* control point is applied,
  which led to hit objects appearing too late if the scrolling rate
  decreased.

Because of the above, modify GetDisplayStartTime() to take the offset
into account in all algorithms, and apply the adjustment correctly
inside of them. The constant and sequential algorithms needed no
adjustment from the previous logic, since:

* the constant algorithm disregarded control points, and
* the sequential algorithm would effectively rewind to time = 0,
  calculate the absolute distance from time = 0 to the hit object start,
  apply the origin offset *to the absolute distance*, and then convert
  back to time, applying all control points in sequence. Due to this
  it was impossible for control points to get mixed up while
  calculating.

As for the overlapping algorithm, the high-level logic is as follows:

* The distance that the origin has to travel is the length of the scroll
  plus the distance from the origin to the object edge.
* The above distance divided by the scroll length gives the relative
  scroll lengths that the object has to travel.
* As one relative scroll length takes one time range, the relative
  travel length multiplied by the time range gives the absolute travel
  time of the object origin.
* Finally, the control point multiplier applicable at origin time is
  applied to the whole travel time.

Correctness of the above is demonstrated by visual tests added before
and headless unit tests of the algorithms themselves. The sequential
scroll algorithm was not covered by unit tests, and remains uncovered
due to floating-point inaccuracies that should be addressed separately.
2020-02-06 23:13:28 +01:00
7b2f58eb30 Apply OnRelease method signature refactorings 2020-01-22 13:22:34 +09:00
e096688ac8 simplify some stuff 2020-01-16 17:58:47 +08:00
970653470c format 2020-01-15 17:49:45 +08:00
5d160376c0 nullable-ize Mod.Icon 2020-01-14 21:22:00 +08:00
abdebcfddc switch to changing Mod property 2020-01-14 20:11:32 +08:00
c08fc62e00 expose setter of Mod 2020-01-14 19:59:43 +08:00