From 1be2725c22c4cbd1a587a4b42cc16dc61c5e5cc6 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Tue, 3 Nov 2026 12:49:40 +0800 Subject: [PATCH 01/34] Feature: Define chart format v1 with exact-fraction beats, the five note types and the beat-to-time map --- CHANGELOG.md | 8 ++ CLAUDE.md | 2 +- core/build.gradle.kts | 3 + .../net/trilleo/hexium/core/chart/Beat.kt | 22 +++++ .../net/trilleo/hexium/core/chart/Chart.kt | 80 +++++++++++++++++++ .../trilleo/hexium/core/chart/TimingMap.kt | 44 ++++++++++ .../net/trilleo/hexium/core/chart/BeatTest.kt | 50 ++++++++++++ .../hexium/core/chart/TimingMapTest.kt | 75 +++++++++++++++++ docs/ARCHITECTURE.md | 6 +- docs/CHART_FORMAT.md | 62 ++++++++++++-- docs/DESIGN.md | 8 +- docs/JUDGEMENT.md | 4 +- gradle.properties | 2 + 13 files changed, 350 insertions(+), 16 deletions(-) create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/chart/Beat.kt create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/chart/TimingMap.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/chart/BeatTest.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index 0517c97..f5ccb13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ # Hexium - Change Log ## Unreleased + +### New Features + +#### Charts + ++ Defined chart format v1. + + Note times are exact beat fractions, so they never drift. + + BPM changes and the chart offset set where each beat falls in the song. diff --git a/CLAUDE.md b/CLAUDE.md index 41ff5b2..9546e03 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,7 +2,7 @@ Hexium is a Fabric rhythm game mod for Minecraft 26.3 (Kotlin, Java 25): a 4-lane keyboard track plus a mouse-aimed sky screen, with an in-game editor and online charts. -It is client-only. The project is at Milestone 0 (set-up done); see the roadmap in +It is client-only. The project is at Milestone 1 (core engine); see the roadmap in docs/DESIGN.md. ## Working with me diff --git a/core/build.gradle.kts b/core/build.gradle.kts index ac41b38..bb6e836 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -5,5 +5,8 @@ plugins { } dependencies { + // Chart JSON, tree API only. In the mod it comes from Fabric Language Kotlin. + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:${providers.gradleProperty("kotlinx_serialization_version").get()}") + testImplementation(kotlin("test")) } diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/Beat.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Beat.kt new file mode 100644 index 0000000..6c2483c --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Beat.kt @@ -0,0 +1,22 @@ +package net.trilleo.hexium.core.chart + +/** + * A time in beats as an exact fraction, stored as `[whole, num, den]` in chart files. + * + * It can hold invalid values so the validator can report them. [compareTo] and [toDouble] + * only mean something when [isValid] is true. + * + * `equals` compares the fields as written, so `[12,2,4]` and `[12,1,2]` aren't equal but + * do compare as the same time. Use [compareTo] for time. + */ +data class Beat(val whole: Int, val num: Int, val den: Int) : Comparable { + val isValid: Boolean + get() = whole >= 0 && den > 0 && num >= 0 && num < den + + override fun compareTo(other: Beat): Int { + if (whole != other.whole) return whole.compareTo(other.whole) + return (num.toLong() * other.den).compareTo(other.num.toLong() * den) + } + + fun toDouble(): Double = whole + num.toDouble() / den +} diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt new file mode 100644 index 0000000..1505d56 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt @@ -0,0 +1,80 @@ +package net.trilleo.hexium.core.chart + +/* + * The chart format as data, exactly as in docs/CHART_FORMAT.md. These classes can hold + * values the format forbids, so the validator can report them instead of the parser + * failing on the first one. + */ + +enum class Difficulty { BASIC, ADVANCED, EXPERT, MASTER } + +enum class SkyButton { L, R } + +/** Shapes the slide segment leaving a point. */ +enum class Ease { LINEAR, IN, OUT, IN_OUT } + +/** One `.json` file. */ +data class DifficultyChart( + val formatVersion: Int, + val difficulty: Difficulty, + val level: Int, + val laneCount: Int, + val offsetMs: Double, + val bpm: List, + val meter: List, + val notes: List, +) + +data class BpmChange(val t: Beat, val bpm: Double) + +data class MeterChange(val t: Beat, val num: Int, val den: Int) + +sealed interface Note { + data class Tap(val t: Beat, val lane: Int) : Note + + data class Hold(val t: Beat, val end: Beat, val lane: Int) : Note + + data class SkyTap( + val t: Beat, + val x: Double, + val y: Double, + val button: SkyButton, + val size: Double, + ) : Note + + data class Slide( + val button: SkyButton, + val radius: Double, + val points: List, + ) : Note + + /** [dir] is in degrees (0 = right, 90 = up), or null to accept any direction. */ + data class Flick( + val t: Beat, + val x: Double, + val y: Double, + val dir: Double?, + val size: Double, + ) : Note +} + +data class SlidePoint(val t: Beat, val x: Double, val y: Double, val ease: Ease) + +/** The `meta.json` file. */ +data class ChartMeta( + val formatVersion: Int, + val id: String, + val title: String, + val artist: String, + val charter: String, + val previewStartMs: Int, + val license: License, + val difficulties: List, +) + +data class License(val type: LicenseType, val source: String?) + +enum class LicenseType { ORIGINAL, PERMITTED } + +/** The chart data of a `.hexium` package: its `meta.json` and every difficulty file. */ +data class ChartPackage(val meta: ChartMeta, val charts: List) diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/TimingMap.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/TimingMap.kt new file mode 100644 index 0000000..246feb2 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/TimingMap.kt @@ -0,0 +1,44 @@ +package net.trilleo.hexium.core.chart + +/** + * Turns beats into song milliseconds using `offsetMs` and the BPM list. Lookups don't + * allocate, so they're safe in per-frame code. + * + * Expects BPM data that passed the validator, and throws [IllegalArgumentException] if it + * didn't: running a chart without validating it is a programming error. + */ +class TimingMap(offsetMs: Double, bpm: List) { + private val startBeat = DoubleArray(bpm.size) + private val startMs = DoubleArray(bpm.size) + private val msPerBeat = DoubleArray(bpm.size) + + init { + require(bpm.isNotEmpty()) { "BPM list is empty" } + for (i in bpm.indices) { + val change = bpm[i] + require(change.t.isValid) { "BPM entry $i has an invalid time" } + require(change.bpm > 0.0) { "BPM entry $i is not above 0" } + startBeat[i] = change.t.toDouble() + msPerBeat[i] = MS_PER_MINUTE / change.bpm + if (i == 0) { + require(startBeat[0] == 0.0) { "First BPM entry is not at beat 0" } + startMs[0] = offsetMs + } else { + require(change.t > bpm[i - 1].t) { "BPM entry $i does not rise in time" } + startMs[i] = startMs[i - 1] + (startBeat[i] - startBeat[i - 1]) * msPerBeat[i - 1] + } + } + } + + fun beatToMs(beat: Beat): Double = beatToMs(beat.toDouble()) + + fun beatToMs(beat: Double): Double { + var i = startBeat.size - 1 + while (i > 0 && beat < startBeat[i]) i-- + return startMs[i] + (beat - startBeat[i]) * msPerBeat[i] + } + + private companion object { + const val MS_PER_MINUTE = 60000.0 + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/BeatTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/BeatTest.kt new file mode 100644 index 0000000..bef8f39 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/BeatTest.kt @@ -0,0 +1,50 @@ +package net.trilleo.hexium.core.chart + +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFalse +import kotlin.test.assertTrue + +class BeatTest { + @Test + fun fractionsWithoutReducingAreTheSameTime() { + assertEquals(0, Beat(12, 2, 4).compareTo(Beat(12, 1, 2))) + } + + @Test + fun ordersByWholeThenFraction() { + assertTrue(Beat(1, 3, 4) < Beat(2, 0, 1)) + assertTrue(Beat(2, 1, 3) < Beat(2, 1, 2)) + assertTrue(Beat(2, 1, 2) > Beat(2, 1, 3)) + } + + @Test + fun comparesHugeDenominatorsWithoutOverflow() { + val max = Int.MAX_VALUE + assertTrue(Beat(0, max - 2, max - 1) < Beat(0, max - 1, max)) + assertTrue(Beat(max, 1, max) < Beat(max, 2, max)) + } + + @Test + fun convertsToDouble() { + assertEquals(12.75, Beat(12, 3, 4).toDouble()) + assertEquals(0.0, Beat(0, 0, 1).toDouble()) + } + + @Test + fun acceptsValidFractions() { + assertTrue(Beat(0, 0, 1).isValid) + assertTrue(Beat(12, 3, 4).isValid) + assertTrue(Beat(12, 2, 4).isValid) + } + + @Test + fun rejectsInvalidFractions() { + assertFalse(Beat(12, 5, 4).isValid, "numerator above denominator") + assertFalse(Beat(12, 4, 4).isValid, "numerator equal to denominator") + assertFalse(Beat(-1, 0, 1).isValid, "negative whole") + assertFalse(Beat(1, -1, 4).isValid, "negative numerator") + assertFalse(Beat(1, 0, 0).isValid, "zero denominator") + assertFalse(Beat(1, 0, -4).isValid, "negative denominator") + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt new file mode 100644 index 0000000..6b45a68 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt @@ -0,0 +1,75 @@ +package net.trilleo.hexium.core.chart + +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFailsWith + +class TimingMapTest { + private val tolerance = 1e-9 + + private fun bpm(whole: Int, bpm: Double) = BpmChange(Beat(whole, 0, 1), bpm) + + @Test + fun beatZeroFallsOnTheOffset() { + assertEquals(120.0, TimingMap(120.0, listOf(bpm(0, 174.0))).beatToMs(Beat(0, 0, 1)), tolerance) + } + + @Test + fun negativeOffsetPutsBeatZeroBeforeTheAudio() { + assertEquals(-250.0, TimingMap(-250.0, listOf(bpm(0, 120.0))).beatToMs(Beat(0, 0, 1)), tolerance) + assertEquals(250.0, TimingMap(-250.0, listOf(bpm(0, 120.0))).beatToMs(Beat(1, 0, 1)), tolerance) + } + + @Test + fun constantBpm() { + val map = TimingMap(0.0, listOf(bpm(0, 120.0))) + assertEquals(500.0, map.beatToMs(Beat(1, 0, 1)), tolerance) + assertEquals(6375.0, map.beatToMs(Beat(12, 3, 4)), tolerance) + } + + @Test + fun thirdsOfABeatDoNotDrift() { + val map = TimingMap(0.0, listOf(bpm(0, 120.0))) + assertEquals(1000.0 * 1000.0 / 2.0 + 500.0 / 3.0, map.beatToMs(Beat(1000, 1, 3)), tolerance) + } + + @Test + fun bpmChangeUsesTheNewTempoFromItsBeat() { + val map = TimingMap(120.0, listOf(bpm(0, 174.0), bpm(64, 87.0))) + val atChange = 120.0 + 64 * 60000.0 / 174.0 + assertEquals(atChange - 60000.0 / 174.0, map.beatToMs(Beat(63, 0, 1)), tolerance) + assertEquals(atChange, map.beatToMs(Beat(64, 0, 1)), tolerance) + assertEquals(atChange + 60000.0 / 87.0, map.beatToMs(Beat(65, 0, 1)), tolerance) + } + + @Test + fun bpmChangeOnAFraction() { + val map = TimingMap(0.0, listOf(bpm(0, 120.0), BpmChange(Beat(2, 1, 2), 60.0))) + assertEquals(1250.0, map.beatToMs(Beat(2, 1, 2)), tolerance) + assertEquals(1750.0, map.beatToMs(Beat(3, 0, 1)), tolerance) + } + + @Test + fun manyChangesAddUp() { + val map = TimingMap(0.0, listOf(bpm(0, 120.0), bpm(1, 60.0), bpm(2, 240.0), bpm(3, 120.0))) + assertEquals(500.0, map.beatToMs(Beat(1, 0, 1)), tolerance) + assertEquals(1500.0, map.beatToMs(Beat(2, 0, 1)), tolerance) + assertEquals(1750.0, map.beatToMs(Beat(3, 0, 1)), tolerance) + assertEquals(2250.0, map.beatToMs(Beat(4, 0, 1)), tolerance) + } + + @Test + fun doubleBeatMatchesExactBeat() { + val map = TimingMap(120.0, listOf(bpm(0, 174.0), bpm(64, 87.0))) + assertEquals(map.beatToMs(Beat(65, 1, 2)), map.beatToMs(65.5), tolerance) + } + + @Test + fun refusesBpmDataTheValidatorWouldReject() { + assertFailsWith { TimingMap(0.0, emptyList()) } + assertFailsWith { TimingMap(0.0, listOf(bpm(1, 120.0))) } + assertFailsWith { TimingMap(0.0, listOf(bpm(0, 0.0))) } + assertFailsWith { TimingMap(0.0, listOf(bpm(0, 120.0), bpm(0, 90.0))) } + assertFailsWith { TimingMap(0.0, listOf(BpmChange(Beat(0, 0, 0), 120.0))) } + } +} diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 38018f6..064aeac 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -4,13 +4,15 @@ The music's playback position is the only clock. Minecraft's 20 TPS tick (50 ms) ## Toolchain -Minecraft 26.3 is unobfuscated, so no mappings are needed. The project uses Gradle 9.8.2, Fabric Loom 1.19, Fabric Loader 0.20.1, Fabric API 0.165.0+26.3, Kotlin 2.4.21 and Fabric Language Kotlin 1.14.2, on Java 25. `gradle.properties` and the Gradle wrapper are the source of truth for versions; update this line when they change. Hexium is written in Kotlin with Gradle Kotlin DSL build scripts. The mod depends on Fabric Language Kotlin, which players install alongside Fabric API. Mixins stay in Java: each one is a few lines that call into Kotlin. +Minecraft 26.3 is unobfuscated, so no mappings are needed. The project uses Gradle 9.8.2, Fabric Loom 1.19, Fabric Loader 0.20.1, Fabric API 0.165.0+26.3, Kotlin 2.4.21, Fabric Language Kotlin 1.14.2 and kotlinx-serialization-json 1.11.0, on Java 25. `gradle.properties` and the Gradle wrapper are the source of truth for versions; update this line when they change. Hexium is written in Kotlin with Gradle Kotlin DSL build scripts. The mod depends on Fabric Language Kotlin, which players install alongside Fabric API. Mixins stay in Java: each one is a few lines that call into Kotlin. + +`core` reads and writes chart JSON with kotlinx-serialization-json's tree API (`JsonElement`), without the compiler plugin or annotations on the model, so the parser can report every error in a file with its path. The mod doesn't bundle the library: Fabric Language Kotlin already ships it, so `kotlinx_serialization_version` in `gradle.properties` must stay on the version Fabric Language Kotlin bundles. ## Gradle modules | Module | Depends on | Holds | | --- | --- | --- | -| `core` | nothing (plain Kotlin/JVM, Java 25) | Chart model, parser, validator, timing map (BPM changes → ms), judge engine, scoring, replay format | +| `core` | only kotlinx-serialization-json (plain Kotlin/JVM, Java 25) | Chart model, parser, validator, timing map (BPM changes → ms), judge engine, scoring, replay format | | `mod` | `core`, Fabric API, Fabric Language Kotlin | Menu, session, stage loading, audio clock, input capture, rendering, HUD, screens, editor, network client | | `server` | `core` | Backend API, auth, chart storage, leaderboards, replay verifier | | `tools` | `core` | CLI: chart lint, chart convert, replay re-judge (used by CI and developers) | diff --git a/docs/CHART_FORMAT.md b/docs/CHART_FORMAT.md index 6195bda..e4483f6 100644 --- a/docs/CHART_FORMAT.md +++ b/docs/CHART_FORMAT.md @@ -9,15 +9,41 @@ Write this spec before any gameplay code and save it as `docs/CHART_FORMAT.md`. | `meta.json` | yes | Id, title, artist, charter, preview start, license declaration, difficulty list | | `audio.ogg` | yes | The song (OGG Vorbis) | | `jacket.png` | no | Cover art, square, 512 px | -| `.json` | yes, one per difficulty | Timing and notes | +| `.json` | yes, one per difficulty | Timing and notes. The file name is the difficulty in lower case, for example `expert.json` | | `stage/`, `events.json` | later (Milestone 8) | Stage world and beat-synced events | ## Time and position -- Time is a beat count stored as an exact fraction `[whole, numerator, denominator]`, for example `[12, 3, 4]` = beat 12¾. This avoids drift from rounding. The timing map turns beats into milliseconds using the BPM list and `offsetMs` (where beat 0 falls in the audio). +- Time is a beat count stored as an exact fraction `[whole, numerator, denominator]`, for example `[12, 3, 4]` = beat 12¾. This avoids drift from rounding. `whole` is 0 or more, `denominator` is above 0 and `numerator` runs from 0 up to (not including) `denominator`. Fractions don't have to be reduced: `[12, 2, 4]` and `[12, 1, 2]` are the same time, but `[12, 5, 4]` is invalid. The timing map turns beats into milliseconds using the BPM list and `offsetMs` (where beat 0 falls in the audio). - Sky positions are normalised screen coordinates: `x` from 0 (left) to 1 (right), `y` from 0 (bottom) to 1 (top). Charts stay valid if the screen size changes. - Lanes are numbered `0` to `3`. `laneCount` is stored so 5–6K could come later. +## meta.json + +```json +{ + "formatVersion": 1, + "id": "example-song", + "title": "Example Song", + "artist": "Example Artist", + "charter": "Example Charter", + "previewStartMs": 30000, + "license": { "type": "permitted", "source": "https://example.com/license" }, + "difficulties": [ "BASIC", "ADVANCED", "EXPERT" ] +} +``` + +| Field | Content | +| --- | --- | +| `id` | Lower-case slug, `[a-z0-9-]`, 1 to 64 characters | +| `title`, `artist`, `charter` | Display text, not blank | +| `previewStartMs` | Where the song select preview starts, an integer of 0 or more | +| `license.type` | `original` or `permitted` | +| `license.source` | Optional link or note showing where the permission comes from | +| `difficulties` | At least one difficulty, no repeats. Each one has its matching `.json` in the package, and the package has no other difficulty files | + +Difficulties are `BASIC`, `ADVANCED`, `EXPERT` and `MASTER`. + ## Example difficulty file ```json @@ -41,12 +67,34 @@ Write this spec before any gameplay code and save it as `docs/CHART_FORMAT.md`. } ``` -`dir` on a flick is optional, in degrees (0 = right, 90 = up). Leave it out to accept any direction. Difficulties BASIC and ADVANCED use the easy tap windows. +`dir` on a flick is optional, in degrees (0 = right, 90 = up). Leave it out to accept any direction. Difficulties BASIC and ADVANCED use the easy tap windows. `level` is a whole number. + +`button` is required on sky taps and slides, and is `L` or `R`. Every other field in the example is required. `size` and `radius` are in the same normalised units as `x` and `y`. + +`ease` is `linear`, `in`, `out` or `inOut`. It shapes the segment leaving that point, so the last point's `ease` is ignored (but still required). + +Unknown fields are ignored with a warning, so a chart written for a later version of the same format still loads. + +Hold and slide tick rates are not part of the chart. They're fixed in `JudgementConfig` (see [JUDGEMENT.md](JUDGEMENT.md)). ## Validator rules (in `core`, also run on upload) -- `formatVersion` is known. BPM is above 0. The first BPM entry is at beat 0. -- Holds in the same lane don't overlap. A tap doesn't sit inside a hold in its lane. +The validator returns errors and warnings and never throws. The audio length and package size are given by the caller, and a rule is skipped when its value isn't given (a loose difficulty file has neither). The server works out both values itself and never trusts the uploader's. + +Errors: + +- `formatVersion` is known. `laneCount` is 4 in format v1. `level` is 1 or more. +- Every beat time is a valid fraction (see Time and position). +- BPM is above 0. The first BPM entry is at beat 0. BPM entries rise strictly in time. +- The first meter entry is at beat 0. Meter entries rise strictly in time. `num` and `den` are above 0. +- `lane` is from 0 up to `laneCount`. A hold's `end` is after its `t`. +- Holds in the same lane don't overlap. A tap doesn't sit inside a hold in its lane. A hold covers its start up to, but not including, its end: a hold may start exactly where another ends, and a tap may sit exactly on a hold's end, but a tap on a hold's head is an error. +- No two taps or hold heads share the same time and lane, since one press resolves at most one note. - Slide points rise strictly in time, with at least 2 points. All x and y values are in \[0, 1\]. -- The last note ends before the audio does. The package is under a size limit (for example 30 MB). -- Warning (not an error): more than about 3 ground inputs plus a sky input in the same 1/16 beat, since that's hard to play with one hand on the keys. +- `size` and `radius` are above 0. `dir` is from 0 up to (not including) 360. +- The last note ends before the audio does. The package is under 30 MiB. +- `meta.json` follows the rules in its section above, and every chart's `difficulty` is listed in it. + +Warning (not an error): + +- A sliding window of 1/16 beat holds at least 4 ground inputs and at least 1 sky input, since that's hard to play with one hand on the keys. Only note starts count: taps and hold heads for ground, sky taps, flicks and the first point of a slide for sky. diff --git a/docs/DESIGN.md b/docs/DESIGN.md index ce3c802..f57186a 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -21,6 +21,9 @@ Confirmed decisions: | Platform | Fabric, Minecraft 26.3, solo play now; multiplayer possibly later | | Repo | TriBinary/Hexium; development on a fork, merged by PR (as with TownyMenu) | | Judgement | CHUNITHM standard; ground hold = head judgement + ticks, no tail; sky slide = hold click + follow path, ticks only, no head or tail | +| Slide button | Each slide names its required button (L or R), like sky taps | +| Tick rate | Hold and slide ticks are fixed at 1/4 beat in `JudgementConfig`, not set per chart | +| Package extension | Chart packages are `.hexium` files | One caution on aiming: with real camera rotation, the ground track moves on screen whenever the player turns. Milestone 3 has a readability playtest gate, with a fallback if it fails. @@ -192,7 +195,4 @@ The biggest risk is the gameplay feel of real camera rotation. It's tested in Mi 1. **Offline-launcher players:** let them play everything except leaderboards and uploads? Or add your own website accounts as a second login method? 2. **Life gauge:** none in v1 (score and lamps only). Do you want a CHUNITHM-style clear gauge later? -3. **Slide button:** do slides say which button to hold (L or R, like sky taps, as in the format above), or can either button work? -4. **Hold and slide tick rate:** 1/4 beat by default. Should it be per chart or fixed? -5. **Speed changes:** mid-song note speed changes ("soflan") are left out of format v1. Do you want them in v2? -6. **Chart file extension:** chart packages use .hexium in this guide. Keep it, or pick something shorter? +3. **Speed changes:** mid-song note speed changes ("soflan") are left out of format v1. Do you want them in v2? diff --git a/docs/JUDGEMENT.md b/docs/JUDGEMENT.md index b80e404..f143e64 100644 --- a/docs/JUDGEMENT.md +++ b/docs/JUDGEMENT.md @@ -14,8 +14,8 @@ Judgements use CHUNITHM's names and windows: Justice Critical, Justice, Attack, ## Rules per note - **Tap and sky tap:** judged by |press time − target|. A sky tap also needs the crosshair inside the note's hit area at the moment of the click. A press with no note in its Miss window does nothing (no penalty). -- **Ground hold:** the head is judged like a tap. The body has invisible ticks, one every 1/4 beat by default (tunable, at least one per hold). Each tick is judged on how long ago the key was last held. Releasing and pressing again inside the window keeps Justice Critical, like CHUNITHM. There's no tail judgement, and holding past the end is never penalised. -- **Sky slide:** no head or tail judgement. Ticks every 1/4 beat along the path. A tick is "held" while the required button is down AND the crosshair is inside the path's hit radius at the path's current position. Tick windows as above. +- **Ground hold:** the head is judged like a tap. The body has invisible ticks, one every 1/4 beat (fixed in `JudgementConfig`, not set per chart, at least one per hold). Each tick is judged on how long ago the key was last held. Releasing and pressing again inside the window keeps Justice Critical, like CHUNITHM. There's no tail judgement, and holding past the end is never penalised. +- **Sky slide:** no head or tail judgement. Ticks every 1/4 beat along the path (the same fixed rate as holds). A tick is "held" while the required button is down AND the crosshair is inside the path's hit radius at the path's current position. Tick windows as above. - **Flick:** hit when the crosshair passes through the note's hit area between two frames, moving faster than a minimum speed (screen units per second), in the optional required direction. The judgement is the crossing time against the target. - A missed head doesn't auto-fail the hold's ticks. Each tick stands on its own. diff --git a/gradle.properties b/gradle.properties index 5bd03e3..d9c5eed 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,3 +20,5 @@ fabric_api_version=0.165.0+26.3 # Kotlin kotlin_version=2.4.21 fabric_kotlin_version=1.14.2+kotlin.2.4.21 +# Must stay on the version Fabric Language Kotlin bundles: the mod doesn't ship its own. +kotlinx_serialization_version=1.11.0 From d7b63310ddd7b1ae6d84e32cf3d5589fac0803c3 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Tue, 3 Nov 2026 12:58:11 +0800 Subject: [PATCH 02/34] Feature: Read and write Hexium chart files with clear errors for broken charts --- CHANGELOG.md | 2 + .../net/trilleo/hexium/core/chart/Chart.kt | 12 +- .../trilleo/hexium/core/chart/ChartIssue.kt | 23 ++ .../trilleo/hexium/core/chart/ChartParser.kt | 381 ++++++++++++++++++ .../trilleo/hexium/core/chart/ChartWriter.kt | 95 +++++ .../hexium/core/chart/ChartParserTest.kt | 363 +++++++++++++++++ .../hexium/core/chart/ChartWriterTest.kt | 177 ++++++++ docs/CHART_FORMAT.md | 2 +- 8 files changed, 1052 insertions(+), 3 deletions(-) create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartParser.kt create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartWriter.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartParserTest.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartWriterTest.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index f5ccb13..2de9092 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,3 +9,5 @@ + Defined chart format v1. + Note times are exact beat fractions, so they never drift. + BPM changes and the chart offset set where each beat falls in the song. ++ Added reading and writing of chart files. + + A broken chart lists every problem it has and where to find it, instead of stopping at the first one. diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt index 1505d56..8386dc4 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt @@ -11,7 +11,12 @@ enum class Difficulty { BASIC, ADVANCED, EXPERT, MASTER } enum class SkyButton { L, R } /** Shapes the slide segment leaving a point. */ -enum class Ease { LINEAR, IN, OUT, IN_OUT } +enum class Ease(val id: String) { + LINEAR("linear"), + IN("in"), + OUT("out"), + IN_OUT("inOut"), +} /** One `.json` file. */ data class DifficultyChart( @@ -74,7 +79,10 @@ data class ChartMeta( data class License(val type: LicenseType, val source: String?) -enum class LicenseType { ORIGINAL, PERMITTED } +enum class LicenseType(val id: String) { + ORIGINAL("original"), + PERMITTED("permitted"), +} /** The chart data of a `.hexium` package: its `meta.json` and every difficulty file. */ data class ChartPackage(val meta: ChartMeta, val charts: List) diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt new file mode 100644 index 0000000..de73cb0 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt @@ -0,0 +1,23 @@ +package net.trilleo.hexium.core.chart + +enum class Severity { ERROR, WARNING } + +/** What kind of problem an issue is. Stable, so the editor and tests can act on it. */ +enum class IssueCode { + INVALID_JSON, + WRONG_TYPE, + MISSING_FIELD, + UNKNOWN_FIELD, + UNKNOWN_VALUE, + UNKNOWN_FORMAT_VERSION, +} + +/** A problem in a chart file. [path] points at it, for example `notes[3].lane`, or `$` for the whole file. */ +data class ChartIssue( + val severity: Severity, + val code: IssueCode, + val path: String, + val message: String, +) { + override fun toString(): String = "$severity $path: $message" +} diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartParser.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartParser.kt new file mode 100644 index 0000000..d0e1464 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartParser.kt @@ -0,0 +1,381 @@ +package net.trilleo.hexium.core.chart + +import kotlinx.serialization.SerializationException +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.JsonArray +import kotlinx.serialization.json.JsonElement +import kotlinx.serialization.json.JsonNull +import kotlinx.serialization.json.JsonObject +import kotlinx.serialization.json.JsonPrimitive +import kotlinx.serialization.json.doubleOrNull +import kotlinx.serialization.json.intOrNull +import net.trilleo.hexium.core.HexiumCore + +/** [value] is null when [issues] holds an error. */ +data class ParseResult(val value: T?, val issues: List) + +/** + * Reads chart files. Never throws: every problem in the file comes back as an issue. + * + * This only checks a file's shape (fields, types, known names). Whether the values follow + * the format's rules is the validator's job. + */ +object ChartParser { + fun parseDifficulty(text: String): ParseResult = parse(text, FileReader::readDifficulty) + + fun parseMeta(text: String): ParseResult = parse(text, FileReader::readMeta) + + private fun parse(text: String, read: FileReader.(JsonObject) -> T?): ParseResult { + val reader = FileReader() + if (nestsTooDeeply(text)) { + reader.error(IssueCode.INVALID_JSON, ROOT, "is not valid JSON: nested more than $MAX_NESTING levels deep") + return ParseResult(null, reader.issues) + } + val root = try { + Json.parseToJsonElement(text) + } catch (e: SerializationException) { + reader.error(IssueCode.INVALID_JSON, ROOT, "is not valid JSON: ${e.message?.lineSequence()?.first()}") + return ParseResult(null, reader.issues) + } + if (root !is JsonObject) { + reader.error(IssueCode.WRONG_TYPE, ROOT, "must be an object") + return ParseResult(null, reader.issues) + } + if (!reader.readFormatVersion(root)) return ParseResult(null, reader.issues) + val value = reader.read(root) + return ParseResult(if (reader.hasError) null else value, reader.issues) + } + + /** The JSON library overflows the stack on extreme nesting, and uploads can be hostile. */ + private fun nestsTooDeeply(text: String): Boolean { + var depth = 0 + var inString = false + var i = 0 + while (i < text.length) { + val c = text[i] + if (inString) { + if (c == '\\') i++ else if (c == '"') inString = false + } else if (c == '"') { + inString = true + } else if (c == '[' || c == '{') { + if (++depth > MAX_NESTING) return true + } else if (c == ']' || c == '}') { + depth-- + } + i++ + } + return false + } +} + +private const val ROOT = "$" + +private const val FORMAT_VERSION = "formatVersion" + +/** Far more than a chart needs (6 levels), with room for unknown fields. */ +private const val MAX_NESTING = 32 + +private val DIFFICULTY_FIELDS = setOf(FORMAT_VERSION, "difficulty", "level", "laneCount", "offsetMs", "bpm", "meter", "notes") +private val META_FIELDS = + setOf(FORMAT_VERSION, "id", "title", "artist", "charter", "previewStartMs", "license", "difficulties") +private val LICENSE_FIELDS = setOf("type", "source") +private val BPM_FIELDS = setOf("t", "bpm") +private val METER_FIELDS = setOf("t", "num", "den") +private val TAP_FIELDS = setOf("type", "t", "lane") +private val HOLD_FIELDS = setOf("type", "t", "end", "lane") +private val SKY_TAP_FIELDS = setOf("type", "t", "x", "y", "button", "size") +private val SLIDE_FIELDS = setOf("type", "button", "radius", "points") +private val SLIDE_POINT_FIELDS = setOf("t", "x", "y", "ease") +private val FLICK_FIELDS = setOf("type", "t", "x", "y", "dir", "size") + +private val DIFFICULTY_NAMES = Difficulty.entries.map { it.name to it } +private val BUTTON_NAMES = SkyButton.entries.map { it.name to it } +private val EASE_NAMES = Ease.entries.map { it.id to it } +private val LICENSE_NAMES = LicenseType.entries.map { it.id to it } + +/** Reads one file, collecting issues. A read returns null when it reported an error. */ +private class FileReader { + val issues = ArrayList() + var hasError = false + private set + + fun error(code: IssueCode, path: String, message: String) { + hasError = true + issues += ChartIssue(Severity.ERROR, code, path, message) + } + + fun readFormatVersion(root: JsonObject): Boolean { + val version = int(root, FORMAT_VERSION, ROOT) ?: return false + if (version != HexiumCore.CHART_FORMAT_VERSION) { + error( + IssueCode.UNKNOWN_FORMAT_VERSION, + FORMAT_VERSION, + "is $version, but this version of Hexium reads format ${HexiumCore.CHART_FORMAT_VERSION}", + ) + return false + } + return true + } + + fun readDifficulty(root: JsonObject): DifficultyChart? { + warnUnknownFields(root, ROOT, DIFFICULTY_FIELDS) + val difficulty = choice(root, "difficulty", ROOT, DIFFICULTY_NAMES) + val level = int(root, "level", ROOT) + val laneCount = int(root, "laneCount", ROOT) + val offsetMs = double(root, "offsetMs", ROOT) + val bpm = objects(root, "bpm", ROOT, ::readBpm) + val meter = objects(root, "meter", ROOT, ::readMeter) + val notes = objects(root, "notes", ROOT, ::readNote) + if (difficulty == null || level == null || laneCount == null || offsetMs == null) return null + if (bpm == null || meter == null || notes == null) return null + return DifficultyChart(HexiumCore.CHART_FORMAT_VERSION, difficulty, level, laneCount, offsetMs, bpm, meter, notes) + } + + fun readMeta(root: JsonObject): ChartMeta? { + warnUnknownFields(root, ROOT, META_FIELDS) + val id = string(root, "id", ROOT) + val title = string(root, "title", ROOT) + val artist = string(root, "artist", ROOT) + val charter = string(root, "charter", ROOT) + val previewStartMs = int(root, "previewStartMs", ROOT) + val license = child(root, "license", ROOT)?.let { readLicense(it, "license") } + val difficulties = difficulties(root) + if (id == null || title == null || artist == null || charter == null) return null + if (previewStartMs == null || license == null || difficulties == null) return null + return ChartMeta(HexiumCore.CHART_FORMAT_VERSION, id, title, artist, charter, previewStartMs, license, difficulties) + } + + private fun readLicense(element: JsonElement, path: String): License? { + val license = asObject(element, path) ?: return null + warnUnknownFields(license, path, LICENSE_FIELDS) + val type = choice(license, "type", path, LICENSE_NAMES) + val hasSource = "source" in license + val source = if (hasSource) string(license, "source", path) else null + if (type == null || (hasSource && source == null)) return null + return License(type, source) + } + + private fun difficulties(root: JsonObject): List? { + val array = array(root, "difficulties", ROOT) ?: return null + val result = ArrayList(array.size) + for (i in array.indices) { + val path = "difficulties[$i]" + val text = textOf(array[i], path) ?: continue + result += choiceOf(text, path, DIFFICULTY_NAMES) ?: continue + } + return result + } + + private fun readBpm(bpm: JsonObject, path: String): BpmChange? { + warnUnknownFields(bpm, path, BPM_FIELDS) + val t = beat(bpm, "t", path) + val value = double(bpm, "bpm", path) + if (t == null || value == null) return null + return BpmChange(t, value) + } + + private fun readMeter(meter: JsonObject, path: String): MeterChange? { + warnUnknownFields(meter, path, METER_FIELDS) + val t = beat(meter, "t", path) + val num = int(meter, "num", path) + val den = int(meter, "den", path) + if (t == null || num == null || den == null) return null + return MeterChange(t, num, den) + } + + private fun readNote(note: JsonObject, path: String): Note? { + val type = string(note, "type", path) ?: return null + return when (type) { + "tap" -> readTap(note, path) + "hold" -> readHold(note, path) + "skyTap" -> readSkyTap(note, path) + "slide" -> readSlide(note, path) + "flick" -> readFlick(note, path) + else -> { + error( + IssueCode.UNKNOWN_VALUE, + join(path, "type"), + "is \"$type\", must be one of tap, hold, skyTap, slide, flick", + ) + null + } + } + } + + private fun readTap(note: JsonObject, path: String): Note? { + warnUnknownFields(note, path, TAP_FIELDS) + val t = beat(note, "t", path) + val lane = int(note, "lane", path) + if (t == null || lane == null) return null + return Note.Tap(t, lane) + } + + private fun readHold(note: JsonObject, path: String): Note? { + warnUnknownFields(note, path, HOLD_FIELDS) + val t = beat(note, "t", path) + val end = beat(note, "end", path) + val lane = int(note, "lane", path) + if (t == null || end == null || lane == null) return null + return Note.Hold(t, end, lane) + } + + private fun readSkyTap(note: JsonObject, path: String): Note? { + warnUnknownFields(note, path, SKY_TAP_FIELDS) + val t = beat(note, "t", path) + val x = double(note, "x", path) + val y = double(note, "y", path) + val button = choice(note, "button", path, BUTTON_NAMES) + val size = double(note, "size", path) + if (t == null || x == null || y == null || button == null || size == null) return null + return Note.SkyTap(t, x, y, button, size) + } + + private fun readSlide(note: JsonObject, path: String): Note? { + warnUnknownFields(note, path, SLIDE_FIELDS) + val button = choice(note, "button", path, BUTTON_NAMES) + val radius = double(note, "radius", path) + val points = objects(note, "points", path, ::readSlidePoint) + if (button == null || radius == null || points == null) return null + return Note.Slide(button, radius, points) + } + + private fun readSlidePoint(point: JsonObject, path: String): SlidePoint? { + warnUnknownFields(point, path, SLIDE_POINT_FIELDS) + val t = beat(point, "t", path) + val x = double(point, "x", path) + val y = double(point, "y", path) + val ease = choice(point, "ease", path, EASE_NAMES) + if (t == null || x == null || y == null || ease == null) return null + return SlidePoint(t, x, y, ease) + } + + private fun readFlick(note: JsonObject, path: String): Note? { + warnUnknownFields(note, path, FLICK_FIELDS) + val t = beat(note, "t", path) + val x = double(note, "x", path) + val y = double(note, "y", path) + val hasDir = "dir" in note + val dir = if (hasDir) double(note, "dir", path) else null + val size = double(note, "size", path) + if (t == null || x == null || y == null || size == null || (hasDir && dir == null)) return null + return Note.Flick(t, x, y, dir, size) + } + + private fun warnUnknownFields(obj: JsonObject, path: String, known: Set) { + for (key in obj.keys) { + if (key !in known) { + issues += ChartIssue( + Severity.WARNING, + IssueCode.UNKNOWN_FIELD, + join(path, key), + "is not a known field and was ignored", + ) + } + } + } + + private fun child(obj: JsonObject, key: String, path: String): JsonElement? { + val element = obj[key] + if (element == null) error(IssueCode.MISSING_FIELD, join(path, key), "is missing") + return element + } + + private fun wrongType(path: String, expected: String) { + error(IssueCode.WRONG_TYPE, path, "must be $expected") + } + + private fun asObject(element: JsonElement, path: String): JsonObject? { + if (element !is JsonObject) wrongType(path, "an object") + return element as? JsonObject + } + + private fun array(obj: JsonObject, key: String, path: String): JsonArray? { + val element = child(obj, key, path) ?: return null + if (element !is JsonArray) wrongType(join(path, key), "a list") + return element as? JsonArray + } + + /** Reads a list of objects. Items with errors are left out, which is fine: the file has failed by then. */ + private fun objects( + obj: JsonObject, + key: String, + path: String, + read: (JsonObject, String) -> T?, + ): List? { + val array = array(obj, key, path) ?: return null + val listPath = join(path, key) + val result = ArrayList(array.size) + for (i in array.indices) { + val itemPath = "$listPath[$i]" + val item = asObject(array[i], itemPath) ?: continue + result += read(item, itemPath) ?: continue + } + return result + } + + private fun int(obj: JsonObject, key: String, path: String): Int? { + val element = child(obj, key, path) ?: return null + val value = intOf(element) + if (value == null) wrongType(join(path, key), "a whole number") + return value + } + + private fun intOf(element: JsonElement): Int? { + val primitive = element as? JsonPrimitive ?: return null + if (primitive.isString || primitive is JsonNull) return null + return primitive.intOrNull + } + + private fun double(obj: JsonObject, key: String, path: String): Double? { + val element = child(obj, key, path) ?: return null + val primitive = element as? JsonPrimitive + val value = if (primitive == null || primitive.isString || primitive is JsonNull) null else primitive.doubleOrNull + if (value == null || !value.isFinite()) { + wrongType(join(path, key), "a number") + return null + } + return value + } + + private fun string(obj: JsonObject, key: String, path: String): String? { + val element = child(obj, key, path) ?: return null + return textOf(element, join(path, key)) + } + + private fun textOf(element: JsonElement, path: String): String? { + val primitive = element as? JsonPrimitive + if (primitive == null || !primitive.isString) { + wrongType(path, "text") + return null + } + return primitive.content + } + + private fun choice(obj: JsonObject, key: String, path: String, names: List>): T? { + val text = string(obj, key, path) ?: return null + return choiceOf(text, join(path, key), names) + } + + private fun choiceOf(text: String, path: String, names: List>): T? { + for ((name, value) in names) { + if (name == text) return value + } + error(IssueCode.UNKNOWN_VALUE, path, "is \"$text\", must be one of ${names.joinToString { it.first }}") + return null + } + + private fun beat(obj: JsonObject, key: String, path: String): Beat? { + val element = child(obj, key, path) ?: return null + val array = element as? JsonArray + if (array != null && array.size == 3) { + val whole = intOf(array[0]) + val num = intOf(array[1]) + val den = intOf(array[2]) + if (whole != null && num != null && den != null) return Beat(whole, num, den) + } + wrongType(join(path, key), "[whole, numerator, denominator], all whole numbers") + return null + } + + private fun join(path: String, key: String): String = if (path == ROOT) key else "$path.$key" +} diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartWriter.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartWriter.kt new file mode 100644 index 0000000..dc096ff --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartWriter.kt @@ -0,0 +1,95 @@ +package net.trilleo.hexium.core.chart + +import kotlinx.serialization.json.JsonPrimitive + +/** + * Writes chart files in a fixed layout, one note per line, so the same chart always gives + * the same text and diffs stay readable. It writes what it's given and doesn't validate, + * but throws [IllegalArgumentException] on NaN or infinity, which JSON can't hold. + */ +object ChartWriter { + fun writeDifficulty(chart: DifficultyChart): String = buildString { + append("{\n") + append(" \"formatVersion\": ").append(chart.formatVersion).append(",\n") + append(" \"difficulty\": ").append(text(chart.difficulty.name)).append(",\n") + append(" \"level\": ").append(chart.level).append(",\n") + append(" \"laneCount\": ").append(chart.laneCount).append(",\n") + append(" \"offsetMs\": ").append(number(chart.offsetMs)).append(",\n") + appendList("bpm", chart.bpm) { append(bpmLine(it)) } + append(",\n") + appendList("meter", chart.meter) { append(meterLine(it)) } + append(",\n") + appendList("notes", chart.notes) { appendNote(it) } + append("\n}\n") + } + + fun writeMeta(meta: ChartMeta): String = buildString { + append("{\n") + append(" \"formatVersion\": ").append(meta.formatVersion).append(",\n") + append(" \"id\": ").append(text(meta.id)).append(",\n") + append(" \"title\": ").append(text(meta.title)).append(",\n") + append(" \"artist\": ").append(text(meta.artist)).append(",\n") + append(" \"charter\": ").append(text(meta.charter)).append(",\n") + append(" \"previewStartMs\": ").append(meta.previewStartMs).append(",\n") + append(" \"license\": { \"type\": ").append(text(meta.license.type.id)) + if (meta.license.source != null) append(", \"source\": ").append(text(meta.license.source)) + append(" },\n") + append(" \"difficulties\": [ ") + append(meta.difficulties.joinToString { text(it.name) }) + append(" ]\n}\n") + } + + private fun StringBuilder.appendList(key: String, items: List, appendItem: StringBuilder.(T) -> Unit) { + append(" \"").append(key).append("\": [") + for (i in items.indices) { + append(if (i == 0) "\n " else ",\n ") + appendItem(items[i]) + } + if (items.isNotEmpty()) append("\n ") + append("]") + } + + private fun bpmLine(bpm: BpmChange) = "{ \"t\": ${beat(bpm.t)}, \"bpm\": ${number(bpm.bpm)} }" + + private fun meterLine(meter: MeterChange) = "{ \"t\": ${beat(meter.t)}, \"num\": ${meter.num}, \"den\": ${meter.den} }" + + private fun StringBuilder.appendNote(note: Note) { + when (note) { + is Note.Tap -> append("{ \"type\": \"tap\", \"t\": ${beat(note.t)}, \"lane\": ${note.lane} }") + is Note.Hold -> + append("{ \"type\": \"hold\", \"t\": ${beat(note.t)}, \"end\": ${beat(note.end)}, \"lane\": ${note.lane} }") + is Note.SkyTap -> append( + "{ \"type\": \"skyTap\", \"t\": ${beat(note.t)}, \"x\": ${number(note.x)}, \"y\": ${number(note.y)}, " + + "\"button\": \"${note.button.name}\", \"size\": ${number(note.size)} }", + ) + is Note.Slide -> { + append("{ \"type\": \"slide\", \"button\": \"${note.button.name}\", \"radius\": ${number(note.radius)}, \"points\": [") + for (i in note.points.indices) { + append(if (i == 0) "\n " else ",\n ") + append(slidePointLine(note.points[i])) + } + if (note.points.isNotEmpty()) append("\n ") + append("] }") + } + is Note.Flick -> { + append("{ \"type\": \"flick\", \"t\": ${beat(note.t)}, \"x\": ${number(note.x)}, \"y\": ${number(note.y)}, ") + if (note.dir != null) append("\"dir\": ${number(note.dir)}, ") + append("\"size\": ${number(note.size)} }") + } + } + } + + private fun slidePointLine(point: SlidePoint) = + "{ \"t\": ${beat(point.t)}, \"x\": ${number(point.x)}, \"y\": ${number(point.y)}, \"ease\": \"${point.ease.id}\" }" + + private fun beat(beat: Beat) = "[${beat.whole},${beat.num},${beat.den}]" + + private fun text(value: String) = JsonPrimitive(value).toString() + + /** Whole values are written without a decimal point. Other values keep the digits that read back exactly. */ + private fun number(value: Double): String { + require(value.isFinite()) { "JSON can't hold $value" } + val whole = value.toLong() + return if (whole.toDouble().equals(value)) whole.toString() else value.toString() + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartParserTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartParserTest.kt new file mode 100644 index 0000000..a134d90 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartParserTest.kt @@ -0,0 +1,363 @@ +package net.trilleo.hexium.core.chart + +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertNotNull +import kotlin.test.assertNull +import kotlin.test.assertTrue + +class ChartParserTest { + /** The example from docs/CHART_FORMAT.md. */ + private val specExample = """ + { + "formatVersion": 1, + "difficulty": "EXPERT", + "level": 11, + "laneCount": 4, + "offsetMs": 120, + "bpm": [ { "t": [0,0,1], "bpm": 174 }, { "t": [64,0,1], "bpm": 87 } ], + "meter": [ { "t": [0,0,1], "num": 4, "den": 4 } ], + "notes": [ + { "type": "tap", "t": [4,0,1], "lane": 0 }, + { "type": "hold", "t": [4,1,2], "end": [6,0,1], "lane": 2 }, + { "type": "skyTap", "t": [5,0,1], "x": 0.25, "y": 0.60, "button": "L", "size": 1.0 }, + { "type": "slide", "button": "L", "radius": 0.06, "points": [ + { "t": [6,0,1], "x": 0.20, "y": 0.50, "ease": "linear" }, + { "t": [7,0,1], "x": 0.70, "y": 0.80, "ease": "inOut" } ] }, + { "type": "flick", "t": [8,0,1], "x": 0.50, "y": 0.40, "dir": 90, "size": 1.0 } + ] + } + """.trimIndent() + + private val metaExample = """ + { + "formatVersion": 1, + "id": "example-song", + "title": "Example Song", + "artist": "Example Artist", + "charter": "Example Charter", + "previewStartMs": 30000, + "license": { "type": "permitted", "source": "https://example.com/license" }, + "difficulties": [ "BASIC", "EXPERT" ] + } + """.trimIndent() + + /** A chart around one note, for testing note fields. */ + private fun chartWithNote(note: String) = """ + { "formatVersion": 1, "difficulty": "BASIC", "level": 1, "laneCount": 4, "offsetMs": 0, + "bpm": [], "meter": [], "notes": [ $note ] } + """.trimIndent() + + private fun assertSingleError(result: ParseResult<*>, code: IssueCode, path: String) { + assertNull(result.value) + assertEquals(1, result.issues.size, result.issues.toString()) + val issue = result.issues[0] + assertEquals(Severity.ERROR, issue.severity) + assertEquals(code, issue.code) + assertEquals(path, issue.path) + assertTrue(issue.message.isNotBlank()) + } + + @Test + fun readsTheSpecExample() { + val result = ChartParser.parseDifficulty(specExample) + assertEquals(emptyList(), result.issues) + assertEquals( + DifficultyChart( + formatVersion = 1, + difficulty = Difficulty.EXPERT, + level = 11, + laneCount = 4, + offsetMs = 120.0, + bpm = listOf(BpmChange(Beat(0, 0, 1), 174.0), BpmChange(Beat(64, 0, 1), 87.0)), + meter = listOf(MeterChange(Beat(0, 0, 1), 4, 4)), + notes = listOf( + Note.Tap(Beat(4, 0, 1), 0), + Note.Hold(Beat(4, 1, 2), Beat(6, 0, 1), 2), + Note.SkyTap(Beat(5, 0, 1), 0.25, 0.60, SkyButton.L, 1.0), + Note.Slide( + SkyButton.L, + 0.06, + listOf( + SlidePoint(Beat(6, 0, 1), 0.20, 0.50, Ease.LINEAR), + SlidePoint(Beat(7, 0, 1), 0.70, 0.80, Ease.IN_OUT), + ), + ), + Note.Flick(Beat(8, 0, 1), 0.50, 0.40, 90.0, 1.0), + ), + ), + result.value, + ) + } + + @Test + fun readsTheMetaExample() { + val result = ChartParser.parseMeta(metaExample) + assertEquals(emptyList(), result.issues) + assertEquals( + ChartMeta( + formatVersion = 1, + id = "example-song", + title = "Example Song", + artist = "Example Artist", + charter = "Example Charter", + previewStartMs = 30000, + license = License(LicenseType.PERMITTED, "https://example.com/license"), + difficulties = listOf(Difficulty.BASIC, Difficulty.EXPERT), + ), + result.value, + ) + } + + @Test + fun optionalFieldsCanBeLeftOut() { + val flick = """{ "type": "flick", "t": [8,0,1], "x": 0.5, "y": 0.4, "size": 1.0 }""" + val note = ChartParser.parseDifficulty(chartWithNote(flick)).value?.notes?.single() + assertEquals(Note.Flick(Beat(8, 0, 1), 0.5, 0.4, null, 1.0), note) + + val meta = ChartParser.parseMeta(metaExample.replace(""", "source": "https://example.com/license"""", "")) + assertEquals(License(LicenseType.PERMITTED, null), meta.value?.license) + } + + @Test + fun everyEaseAndButtonIsRead() { + val slide = """{ "type": "slide", "button": "R", "radius": 0.1, "points": [ + { "t": [0,0,1], "x": 0, "y": 0, "ease": "linear" }, + { "t": [1,0,1], "x": 0, "y": 0, "ease": "in" }, + { "t": [2,0,1], "x": 0, "y": 0, "ease": "out" }, + { "t": [3,0,1], "x": 0, "y": 0, "ease": "inOut" } ] }""" + val note = ChartParser.parseDifficulty(chartWithNote(slide)).value?.notes?.single() as Note.Slide + assertEquals(SkyButton.R, note.button) + assertEquals(listOf(Ease.LINEAR, Ease.IN, Ease.OUT, Ease.IN_OUT), note.points.map { it.ease }) + } + + @Test + fun valuesTheFormatForbidsAreLeftForTheValidator() { + val result = ChartParser.parseDifficulty(chartWithNote("""{ "type": "tap", "t": [1,5,0], "lane": 99 }""")) + assertEquals(emptyList(), result.issues) + assertEquals(Note.Tap(Beat(1, 5, 0), 99), result.value?.notes?.single()) + } + + @Test + fun brokenJsonIsReportedNotThrown() { + assertSingleError(ChartParser.parseDifficulty("{ not json"), IssueCode.INVALID_JSON, "$") + assertSingleError(ChartParser.parseDifficulty(""), IssueCode.INVALID_JSON, "$") + assertSingleError(ChartParser.parseDifficulty("{} trailing"), IssueCode.INVALID_JSON, "$") + assertSingleError(ChartParser.parseMeta("{ not json"), IssueCode.INVALID_JSON, "$") + } + + @Test + fun veryDeepNestingIsNotACrash() { + val result = ChartParser.parseDifficulty("[".repeat(100_000)) + assertNull(result.value) + assertEquals(IssueCode.INVALID_JSON, result.issues.single().code) + } + + @Test + fun nestingLimitIgnoresBracketsInsideText() { + val brackets = "[".repeat(100) + val result = ChartParser.parseMeta(metaExample.replace("Example Song", brackets)) + assertEquals(emptyList(), result.issues) + assertEquals(brackets, result.value?.title) + + val escapedQuote = """\\\"""" + brackets + val escaped = ChartParser.parseMeta(metaExample.replace("Example Song", escapedQuote)) + assertEquals(emptyList(), escaped.issues) + } + + @Test + fun nestingStopsAtTheLimit() { + fun nested(levels: Int) = "[".repeat(levels) + "]".repeat(levels) + assertSingleError(ChartParser.parseDifficulty(nested(32)), IssueCode.WRONG_TYPE, "$") + assertSingleError(ChartParser.parseDifficulty(nested(33)), IssueCode.INVALID_JSON, "$") + } + + @Test + fun rootMustBeAnObject() { + assertSingleError(ChartParser.parseDifficulty("[]"), IssueCode.WRONG_TYPE, "$") + } + + @Test + fun unknownFormatVersionStopsParsing() { + val text = """{ "formatVersion": 2, "somethingNew": true }""" + assertSingleError(ChartParser.parseDifficulty(text), IssueCode.UNKNOWN_FORMAT_VERSION, "formatVersion") + assertSingleError(ChartParser.parseMeta(text), IssueCode.UNKNOWN_FORMAT_VERSION, "formatVersion") + } + + @Test + fun missingFormatVersionStopsParsing() { + assertSingleError(ChartParser.parseDifficulty("{}"), IssueCode.MISSING_FIELD, "formatVersion") + assertSingleError( + ChartParser.parseDifficulty("""{ "formatVersion": "1" }"""), + IssueCode.WRONG_TYPE, + "formatVersion", + ) + } + + @Test + fun missingFieldsNameTheirPath() { + assertSingleError( + ChartParser.parseDifficulty(specExample.replace(""""level": 11,""", "")), + IssueCode.MISSING_FIELD, + "level", + ) + assertSingleError( + ChartParser.parseDifficulty(chartWithNote("""{ "type": "tap", "t": [1,0,1] }""")), + IssueCode.MISSING_FIELD, + "notes[0].lane", + ) + assertSingleError( + ChartParser.parseMeta(metaExample.replace(""""type": "permitted", """, "")), + IssueCode.MISSING_FIELD, + "license.type", + ) + } + + @Test + fun everyNoteFieldIsRequiredExceptDir() { + val notes = listOf( + """{ "type": "tap", "t": [1,0,1], "lane": 0 }""" to listOf("t", "lane"), + """{ "type": "hold", "t": [1,0,1], "end": [2,0,1], "lane": 0 }""" to listOf("t", "end", "lane"), + """{ "type": "skyTap", "t": [1,0,1], "x": 0, "y": 0, "button": "L", "size": 1 }""" to + listOf("t", "x", "y", "button", "size"), + """{ "type": "slide", "button": "L", "radius": 0.1, "points": [] }""" to + listOf("button", "radius", "points"), + """{ "type": "flick", "t": [1,0,1], "x": 0, "y": 0, "dir": 0, "size": 1 }""" to + listOf("t", "x", "y", "size"), + ) + for ((note, fields) in notes) { + assertEquals(emptyList(), ChartParser.parseDifficulty(chartWithNote(note)).issues, note) + for (field in fields) { + val without = note.replace(Regex(""", "$field": (\[[^]]*]|"[^"]*"|[\d.]+)"""), "") + assertSingleError( + ChartParser.parseDifficulty(chartWithNote(without)), + IssueCode.MISSING_FIELD, + "notes[0].$field", + ) + } + } + } + + @Test + fun slidePointFieldsAreRequired() { + val slide = """{ "type": "slide", "button": "L", "radius": 0.1, "points": [ { "t": [1,0,1], "x": 0, "y": 0 } ] }""" + assertSingleError( + ChartParser.parseDifficulty(chartWithNote(slide)), + IssueCode.MISSING_FIELD, + "notes[0].points[0].ease", + ) + } + + @Test + fun wrongTypesAreReported() { + val cases = listOf( + """"lane": "0"""" to "notes[0].lane", + """"lane": 1.5""" to "notes[0].lane", + """"lane": 99999999999""" to "notes[0].lane", + """"lane": true""" to "notes[0].lane", + """"lane": null""" to "notes[0].lane", + ) + for ((lane, path) in cases) { + assertSingleError( + ChartParser.parseDifficulty(chartWithNote("""{ "type": "tap", "t": [1,0,1], $lane }""")), + IssueCode.WRONG_TYPE, + path, + ) + } + assertSingleError( + ChartParser.parseDifficulty(chartWithNote("").replace("[ ]", "1").replace("[ ]", "1")), + IssueCode.WRONG_TYPE, + "notes", + ) + assertSingleError(ChartParser.parseDifficulty(chartWithNote("1")), IssueCode.WRONG_TYPE, "notes[0]") + } + + @Test + fun numbersMustBeFinite() { + assertSingleError( + ChartParser.parseDifficulty(specExample.replace(""""offsetMs": 120""", """"offsetMs": 1e999""")), + IssueCode.WRONG_TYPE, + "offsetMs", + ) + } + + @Test + fun beatsMustBeThreeWholeNumbers() { + for (beat in listOf("[1,0]", "[1,0,1,0]", "[1,0.5,1]", """[1,"0",1]""", "4", "[99999999999,0,1]")) { + assertSingleError( + ChartParser.parseDifficulty(chartWithNote("""{ "type": "tap", "t": $beat, "lane": 0 }""")), + IssueCode.WRONG_TYPE, + "notes[0].t", + ) + } + } + + @Test + fun unknownNamesAreReportedWithTheirChoices() { + val noteType = ChartParser.parseDifficulty(chartWithNote("""{ "type": "laser" }""")) + assertSingleError(noteType, IssueCode.UNKNOWN_VALUE, "notes[0].type") + assertTrue("laser" in noteType.issues[0].message) + assertTrue("flick" in noteType.issues[0].message) + + val difficulty = ChartParser.parseDifficulty(specExample.replace("EXPERT", "expert")) + assertSingleError(difficulty, IssueCode.UNKNOWN_VALUE, "difficulty") + assertTrue("MASTER" in difficulty.issues[0].message) + + assertSingleError( + ChartParser.parseDifficulty(specExample.replace(""""button": "L", "size"""", """"button": "M", "size"""")), + IssueCode.UNKNOWN_VALUE, + "notes[2].button", + ) + assertSingleError( + ChartParser.parseDifficulty(specExample.replace("inOut", "bounce")), + IssueCode.UNKNOWN_VALUE, + "notes[3].points[1].ease", + ) + assertSingleError( + ChartParser.parseMeta(metaExample.replace("permitted", "stolen")), + IssueCode.UNKNOWN_VALUE, + "license.type", + ) + assertSingleError( + ChartParser.parseMeta(metaExample.replace("BASIC", "EASY")), + IssueCode.UNKNOWN_VALUE, + "difficulties[0]", + ) + } + + @Test + fun unknownFieldsWarnAndStillLoad() { + val result = ChartParser.parseDifficulty( + specExample + .replace(""""level": 11,""", """"level": 11, "mood": "calm",""") + .replace(""""lane": 0 }""", """"lane": 0, "colour": 3 }"""), + ) + assertNotNull(result.value) + assertEquals(listOf("mood", "notes[0].colour"), result.issues.map { it.path }) + for (issue in result.issues) { + assertEquals(Severity.WARNING, issue.severity) + assertEquals(IssueCode.UNKNOWN_FIELD, issue.code) + } + assertEquals(Note.Tap(Beat(4, 0, 1), 0), result.value.notes.first()) + } + + @Test + fun unknownFieldsWarnInMeta() { + val result = ChartParser.parseMeta(metaExample.replace(""""type": "permitted",""", """"type": "permitted", "year": 2026,""")) + assertNotNull(result.value) + assertEquals("license.year", result.issues.single().path) + } + + @Test + fun everyErrorInAFileIsReported() { + val result = ChartParser.parseDifficulty( + """{ "formatVersion": 1, "level": "x", "laneCount": 4, "offsetMs": 0, "bpm": [], "meter": [], + "notes": [ { "type": "tap", "t": [1,0,1] }, { "type": "laser" } ] }""", + ) + assertNull(result.value) + assertEquals( + listOf("difficulty", "level", "notes[0].lane", "notes[1].type"), + result.issues.map { it.path }, + ) + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartWriterTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartWriterTest.kt new file mode 100644 index 0000000..8bad594 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartWriterTest.kt @@ -0,0 +1,177 @@ +package net.trilleo.hexium.core.chart + +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFailsWith + +class ChartWriterTest { + private val chart = DifficultyChart( + formatVersion = 1, + difficulty = Difficulty.EXPERT, + level = 11, + laneCount = 4, + offsetMs = 120.0, + bpm = listOf(BpmChange(Beat(0, 0, 1), 174.0), BpmChange(Beat(64, 0, 1), 87.5)), + meter = listOf(MeterChange(Beat(0, 0, 1), 4, 4)), + notes = listOf( + Note.Tap(Beat(4, 0, 1), 0), + Note.Hold(Beat(4, 1, 2), Beat(6, 0, 1), 2), + Note.SkyTap(Beat(5, 0, 1), 0.25, 0.6, SkyButton.L, 1.0), + Note.Slide( + SkyButton.R, + 0.06, + listOf( + SlidePoint(Beat(6, 0, 1), 0.2, 0.5, Ease.LINEAR), + SlidePoint(Beat(6, 1, 3), 0.3, 0.6, Ease.IN), + SlidePoint(Beat(6, 2, 3), 0.4, 0.7, Ease.OUT), + SlidePoint(Beat(7, 0, 1), 0.7, 0.8, Ease.IN_OUT), + ), + ), + Note.Flick(Beat(8, 0, 1), 0.5, 0.4, 90.0, 1.0), + Note.Flick(Beat(9, 0, 1), 0.5, 0.4, null, 1.0), + ), + ) + + private val meta = ChartMeta( + formatVersion = 1, + id = "example-song", + title = "Example \"Song\" \\ 歌\n", + artist = "Example Artist", + charter = "Example Charter", + previewStartMs = 30000, + license = License(LicenseType.PERMITTED, "https://example.com/license"), + difficulties = listOf(Difficulty.BASIC, Difficulty.MASTER), + ) + + private fun assertRoundTrips(chart: DifficultyChart) { + val result = ChartParser.parseDifficulty(ChartWriter.writeDifficulty(chart)) + assertEquals(emptyList(), result.issues) + assertEquals(chart, result.value) + } + + @Test + fun writesTheFixedLayout() { + val small = chart.copy( + bpm = chart.bpm.take(1), + notes = listOf( + Note.Tap(Beat(4, 0, 1), 0), + Note.Slide( + SkyButton.L, + 0.06, + listOf( + SlidePoint(Beat(6, 0, 1), 0.2, 0.5, Ease.LINEAR), + SlidePoint(Beat(7, 0, 1), 0.7, 0.8, Ease.IN_OUT), + ), + ), + Note.Flick(Beat(8, 0, 1), 0.5, 0.4, null, 1.0), + ), + ) + assertEquals( + """ + { + "formatVersion": 1, + "difficulty": "EXPERT", + "level": 11, + "laneCount": 4, + "offsetMs": 120, + "bpm": [ + { "t": [0,0,1], "bpm": 174 } + ], + "meter": [ + { "t": [0,0,1], "num": 4, "den": 4 } + ], + "notes": [ + { "type": "tap", "t": [4,0,1], "lane": 0 }, + { "type": "slide", "button": "L", "radius": 0.06, "points": [ + { "t": [6,0,1], "x": 0.2, "y": 0.5, "ease": "linear" }, + { "t": [7,0,1], "x": 0.7, "y": 0.8, "ease": "inOut" } + ] }, + { "type": "flick", "t": [8,0,1], "x": 0.5, "y": 0.4, "size": 1 } + ] + } + """.trimIndent() + "\n", + ChartWriter.writeDifficulty(small), + ) + } + + @Test + fun writesTheMetaLayout() { + assertEquals( + """ + { + "formatVersion": 1, + "id": "song", + "title": "T", + "artist": "A", + "charter": "C", + "previewStartMs": 5, + "license": { "type": "original" }, + "difficulties": [ "BASIC", "MASTER" ] + } + """.trimIndent() + "\n", + ChartWriter.writeMeta( + meta.copy( + id = "song", + title = "T", + artist = "A", + charter = "C", + previewStartMs = 5, + license = License(LicenseType.ORIGINAL, null), + ), + ), + ) + } + + @Test + fun everyNoteTypeRoundTrips() { + assertRoundTrips(chart) + } + + @Test + fun metaRoundTripsIncludingEscapedText() { + val result = ChartParser.parseMeta(ChartWriter.writeMeta(meta)) + assertEquals(emptyList(), result.issues) + assertEquals(meta, result.value) + } + + @Test + fun fractionsStayAsWritten() { + val chart = chart.copy(notes = listOf(Note.Tap(Beat(12, 2, 4), 0))) + assertEquals(true, """"t": [12,2,4]""" in ChartWriter.writeDifficulty(chart)) + assertRoundTrips(chart) + } + + @Test + fun numbersKeepTheirExactValue() { + for (value in listOf(0.0, -0.0, -250.0, 0.1, 1.0 / 3.0, 1e-7, 1e21, 123456.789)) { + assertRoundTrips(chart.copy(offsetMs = value)) + } + } + + @Test + fun forbiddenValuesStillRoundTripForTheValidator() { + assertRoundTrips( + chart.copy( + level = 0, + laneCount = 9, + bpm = emptyList(), + notes = listOf(Note.Tap(Beat(-1, 5, 0), 99)), + ), + ) + } + + @Test + fun outputIsStable() { + val once = ChartWriter.writeDifficulty(chart) + val twice = ChartWriter.writeDifficulty(ChartParser.parseDifficulty(once).value!!) + assertEquals(once, twice) + } + + @Test + fun refusesNumbersJsonCannotHold() { + assertFailsWith { ChartWriter.writeDifficulty(chart.copy(offsetMs = Double.NaN)) } + assertFailsWith { + ChartWriter.writeDifficulty(chart.copy(offsetMs = Double.POSITIVE_INFINITY)) + } + } +} diff --git a/docs/CHART_FORMAT.md b/docs/CHART_FORMAT.md index e4483f6..e9c97e0 100644 --- a/docs/CHART_FORMAT.md +++ b/docs/CHART_FORMAT.md @@ -73,7 +73,7 @@ Difficulties are `BASIC`, `ADVANCED`, `EXPERT` and `MASTER`. `ease` is `linear`, `in`, `out` or `inOut`. It shapes the segment leaving that point, so the last point's `ease` is ignored (but still required). -Unknown fields are ignored with a warning, so a chart written for a later version of the same format still loads. +Optional fields are left out when unused, not set to `null`. Unknown fields are ignored with a warning, so a chart with extra fields still loads. JSON nested more than 32 levels deep is rejected. Hold and slide tick rates are not part of the chart. They're fixed in `JudgementConfig` (see [JUDGEMENT.md](JUDGEMENT.md)). From f3af2a56bedaffa904240abb2d476bfcebdb4e0b Mon Sep 17 00:00:00 2001 From: Trilleo Date: Tue, 3 Nov 2026 13:05:20 +0800 Subject: [PATCH 03/34] Feature: Check charts against the format rules and warn about one-handed density --- CHANGELOG.md | 3 + .../trilleo/hexium/core/chart/ChartIssue.kt | 33 ++ .../hexium/core/chart/ChartValidator.kt | 429 +++++++++++++++ .../core/chart/ChartPackageValidatorTest.kt | 171 ++++++ .../hexium/core/chart/ChartValidatorTest.kt | 505 ++++++++++++++++++ docs/CHART_FORMAT.md | 4 +- 6 files changed, 1143 insertions(+), 2 deletions(-) create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartPackageValidatorTest.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index 2de9092..3f3579d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,3 +11,6 @@ + BPM changes and the chart offset set where each beat falls in the song. + Added reading and writing of chart files. + A broken chart lists every problem it has and where to find it, instead of stopping at the first one. ++ Added the chart validator. + + Checks charts and packages against every rule in the chart format. + + Warns when a moment is too dense to play with one hand on the keys. diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt index de73cb0..17f9808 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt @@ -10,6 +10,39 @@ enum class IssueCode { UNKNOWN_FIELD, UNKNOWN_VALUE, UNKNOWN_FORMAT_VERSION, + + BAD_LANE_COUNT, + BAD_LEVEL, + INVALID_BEAT, + BPM_NOT_POSITIVE, + FIRST_BPM_NOT_AT_ZERO, + BPM_NOT_RISING, + FIRST_METER_NOT_AT_ZERO, + METER_NOT_RISING, + METER_NOT_POSITIVE, + LANE_OUT_OF_RANGE, + HOLD_END_NOT_AFTER_START, + HOLDS_OVERLAP, + TAP_INSIDE_HOLD, + DUPLICATE_TAP, + SLIDE_TOO_FEW_POINTS, + SLIDE_POINTS_NOT_RISING, + POSITION_OUT_OF_RANGE, + SIZE_NOT_POSITIVE, + RADIUS_NOT_POSITIVE, + DIR_OUT_OF_RANGE, + NOTE_AFTER_AUDIO, + TOO_DENSE, + + BAD_ID, + BLANK_TEXT, + NEGATIVE_PREVIEW, + NO_DIFFICULTIES, + REPEATED_DIFFICULTY, + MISSING_DIFFICULTY_FILE, + UNLISTED_DIFFICULTY_FILE, + DUPLICATE_DIFFICULTY_FILE, + PACKAGE_TOO_LARGE, } /** A problem in a chart file. [path] points at it, for example `notes[3].lane`, or `$` for the whole file. */ diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt new file mode 100644 index 0000000..f7ccecf --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt @@ -0,0 +1,429 @@ +package net.trilleo.hexium.core.chart + +import java.math.BigInteger +import net.trilleo.hexium.core.HexiumCore + +/** The numbers behind the validator's rules (docs/CHART_FORMAT.md). */ +object ChartLimits { + /** A package must be smaller than this. */ + const val MAX_PACKAGE_BYTES: Long = 30L * 1024 * 1024 + const val LANE_COUNT: Int = 4 + const val MAX_ID_LENGTH: Int = 64 + + /** The density warning needs at least this many inputs in a window of 1/[DENSITY_WINDOW_DENOMINATOR] beat. */ + const val DENSITY_GROUND_INPUTS: Int = 4 + const val DENSITY_SKY_INPUTS: Int = 1 + const val DENSITY_WINDOW_DENOMINATOR: Int = 16 +} + +/** + * Checks charts against the rules in docs/CHART_FORMAT.md. Never throws: every problem comes + * back as an issue. A bad value is reported once, and rules that need it skip it. + * + * The audio length and package size come from the caller, and their rules are skipped when + * they're null. The server must work them out itself, never trust the uploader's. + */ +object ChartValidator { + fun validateChart(chart: DifficultyChart, audioDurationMs: Double? = null): List = + ChartChecker(chart, audioDurationMs).check() + + fun validateMeta(meta: ChartMeta): List { + val issues = ArrayList() + if (meta.formatVersion != HexiumCore.CHART_FORMAT_VERSION) { + issues += error( + IssueCode.UNKNOWN_FORMAT_VERSION, + "formatVersion", + "is ${meta.formatVersion}, but this version of Hexium reads format ${HexiumCore.CHART_FORMAT_VERSION}", + ) + } + if (!isValidId(meta.id)) { + issues += error( + IssueCode.BAD_ID, + "id", + "is \"${meta.id}\", must be 1 to ${ChartLimits.MAX_ID_LENGTH} characters from a-z, 0-9 and -", + ) + } + if (meta.title.isBlank()) issues += error(IssueCode.BLANK_TEXT, "title", "must not be blank") + if (meta.artist.isBlank()) issues += error(IssueCode.BLANK_TEXT, "artist", "must not be blank") + if (meta.charter.isBlank()) issues += error(IssueCode.BLANK_TEXT, "charter", "must not be blank") + if (meta.previewStartMs < 0) { + issues += error(IssueCode.NEGATIVE_PREVIEW, "previewStartMs", "is ${meta.previewStartMs}, must be 0 or more") + } + if (meta.difficulties.isEmpty()) { + issues += error(IssueCode.NO_DIFFICULTIES, "difficulties", "must list at least one difficulty") + } + for (i in meta.difficulties.indices) { + if (meta.difficulties.indexOf(meta.difficulties[i]) != i) { + issues += error(IssueCode.REPEATED_DIFFICULTY, "difficulties[$i]", "${meta.difficulties[i]} is listed twice") + } + } + return issues + } + + fun validatePackage( + pkg: ChartPackage, + audioDurationMs: Double? = null, + packageSizeBytes: Long? = null, + ): List { + val issues = ArrayList() + if (packageSizeBytes != null && packageSizeBytes >= ChartLimits.MAX_PACKAGE_BYTES) { + issues += error( + IssueCode.PACKAGE_TOO_LARGE, + "$", + "is $packageSizeBytes bytes, must be under ${ChartLimits.MAX_PACKAGE_BYTES}", + ) + } + for (issue in validateMeta(pkg.meta)) issues += issue.copy(path = "$META_FILE:${issue.path}") + checkDifficultyFiles(pkg, issues) + for (chart in pkg.charts) { + val file = fileName(chart.difficulty) + for (issue in validateChart(chart, audioDurationMs)) issues += issue.copy(path = "$file:${issue.path}") + } + return issues + } + + private fun checkDifficultyFiles(pkg: ChartPackage, issues: MutableList) { + val listed = pkg.meta.difficulties + for (i in listed.indices) { + if (listed.indexOf(listed[i]) != i) continue + if (pkg.charts.none { it.difficulty == listed[i] }) { + issues += error( + IssueCode.MISSING_DIFFICULTY_FILE, + "$META_FILE:difficulties[$i]", + "lists ${listed[i]}, but the package has no ${fileName(listed[i])}", + ) + } + } + val seen = HashSet() + for (chart in pkg.charts) { + val file = fileName(chart.difficulty) + if (chart.difficulty !in listed) { + issues += error(IssueCode.UNLISTED_DIFFICULTY_FILE, file, "is not listed in $META_FILE") + } + if (!seen.add(chart.difficulty)) { + issues += error(IssueCode.DUPLICATE_DIFFICULTY_FILE, file, "appears more than once in the package") + } + } + } + + private fun isValidId(id: String): Boolean { + if (id.isEmpty() || id.length > ChartLimits.MAX_ID_LENGTH) return false + for (c in id) { + if (c !in 'a'..'z' && c !in '0'..'9' && c != '-') return false + } + return true + } + + private fun fileName(difficulty: Difficulty) = "${difficulty.name.lowercase()}.json" + + private const val META_FILE = "meta.json" +} + +private fun error(code: IssueCode, path: String, message: String) = ChartIssue(Severity.ERROR, code, path, message) + +private fun text(beat: Beat) = "[${beat.whole},${beat.num},${beat.den}]" + +/** A tap or hold whose times are fit for the overlap rules. [end] is null for a tap. */ +private class GroundNote(val t: Beat, val end: Beat?, val path: String) + +/** Where a note starts, for the density warning. */ +private class NoteStart(val t: Beat, val isSky: Boolean, val path: String) + +private class ChartChecker(private val chart: DifficultyChart, private val audioDurationMs: Double?) { + private val issues = ArrayList() + private val groundByLane = LinkedHashMap>() + private val starts = ArrayList() + private var lastEnd: Beat? = null + private var lastEndPath = "" + + fun check(): List { + checkHeader() + val bpmIsUsable = checkBpm() + checkMeter() + for (i in chart.notes.indices) checkNote(chart.notes[i], "notes[$i]") + for (lane in groundByLane.values) checkLaneOverlaps(lane) + if (bpmIsUsable) checkAudioEnd() + checkDensity() + return issues + } + + private fun report(code: IssueCode, path: String, message: String) { + issues += error(code, path, message) + } + + private fun checkHeader() { + if (chart.formatVersion != HexiumCore.CHART_FORMAT_VERSION) { + report( + IssueCode.UNKNOWN_FORMAT_VERSION, + "formatVersion", + "is ${chart.formatVersion}, but this version of Hexium reads format ${HexiumCore.CHART_FORMAT_VERSION}", + ) + } + if (chart.level < 1) report(IssueCode.BAD_LEVEL, "level", "is ${chart.level}, must be 1 or more") + if (chart.laneCount != ChartLimits.LANE_COUNT) { + report(IssueCode.BAD_LANE_COUNT, "laneCount", "is ${chart.laneCount}, must be ${ChartLimits.LANE_COUNT}") + } + } + + /** Reports an invalid beat and returns whether it was valid. */ + private fun checkBeat(beat: Beat, path: String): Boolean { + if (beat.isValid) return true + report( + IssueCode.INVALID_BEAT, + path, + "is ${text(beat)}: whole must be 0 or more, and numerator from 0 up to the denominator, which must be above 0", + ) + return false + } + + /** Returns whether the BPM list is fit for the timing map. */ + private fun checkBpm(): Boolean { + val before = issues.size + if (chart.bpm.isEmpty()) report(IssueCode.FIRST_BPM_NOT_AT_ZERO, "bpm", "must have an entry at beat 0") + var previous: Beat? = null + for (i in chart.bpm.indices) { + val change = chart.bpm[i] + if (!(change.bpm > 0.0)) report(IssueCode.BPM_NOT_POSITIVE, "bpm[$i].bpm", "is ${change.bpm}, must be above 0") + val path = "bpm[$i].t" + if (!checkBeat(change.t, path)) continue + if (i == 0 && change.t.compareTo(BEAT_ZERO) != 0) { + report(IssueCode.FIRST_BPM_NOT_AT_ZERO, path, "is ${text(change.t)}, the first entry must be at beat 0") + } + if (previous != null && change.t <= previous) { + report(IssueCode.BPM_NOT_RISING, path, "is ${text(change.t)}, must be after the entry before it (${text(previous)})") + } + previous = change.t + } + return issues.size == before + } + + private fun checkMeter() { + if (chart.meter.isEmpty()) report(IssueCode.FIRST_METER_NOT_AT_ZERO, "meter", "must have an entry at beat 0") + var previous: Beat? = null + for (i in chart.meter.indices) { + val change = chart.meter[i] + if (change.num <= 0) report(IssueCode.METER_NOT_POSITIVE, "meter[$i].num", "is ${change.num}, must be above 0") + if (change.den <= 0) report(IssueCode.METER_NOT_POSITIVE, "meter[$i].den", "is ${change.den}, must be above 0") + val path = "meter[$i].t" + if (!checkBeat(change.t, path)) continue + if (i == 0 && change.t.compareTo(BEAT_ZERO) != 0) { + report(IssueCode.FIRST_METER_NOT_AT_ZERO, path, "is ${text(change.t)}, the first entry must be at beat 0") + } + if (previous != null && change.t <= previous) { + report(IssueCode.METER_NOT_RISING, path, "is ${text(change.t)}, must be after the entry before it (${text(previous)})") + } + previous = change.t + } + } + + private fun checkNote(note: Note, path: String) { + when (note) { + is Note.Tap -> checkTap(note, path) + is Note.Hold -> checkHold(note, path) + is Note.SkyTap -> checkSkyTap(note, path) + is Note.Slide -> checkSlide(note, path) + is Note.Flick -> checkFlick(note, path) + } + } + + private fun checkTap(note: Note.Tap, path: String) { + val laneIsValid = checkLane(note.lane, path) + if (!checkBeat(note.t, "$path.t")) return + starts += NoteStart(note.t, false, path) + noteEnd(note.t, path) + if (laneIsValid) groundNotes(note.lane) += GroundNote(note.t, null, path) + } + + private fun checkHold(note: Note.Hold, path: String) { + val laneIsValid = checkLane(note.lane, path) + val startIsValid = checkBeat(note.t, "$path.t") + val endIsValid = checkBeat(note.end, "$path.end") + if (startIsValid) starts += NoteStart(note.t, false, path) + if (!startIsValid || !endIsValid) return + noteEnd(note.t, path) + noteEnd(note.end, path) + if (note.end <= note.t) { + report( + IssueCode.HOLD_END_NOT_AFTER_START, + "$path.end", + "is ${text(note.end)}, must be after the hold's start (${text(note.t)})", + ) + } else if (laneIsValid) { + groundNotes(note.lane) += GroundNote(note.t, note.end, path) + } + } + + private fun checkSkyTap(note: Note.SkyTap, path: String) { + checkPosition(note.x, note.y, path) + checkSize(note.size, path) + if (!checkBeat(note.t, "$path.t")) return + starts += NoteStart(note.t, true, path) + noteEnd(note.t, path) + } + + private fun checkSlide(note: Note.Slide, path: String) { + if (!(note.radius > 0.0)) report(IssueCode.RADIUS_NOT_POSITIVE, "$path.radius", "is ${note.radius}, must be above 0") + if (note.points.size < 2) { + report(IssueCode.SLIDE_TOO_FEW_POINTS, "$path.points", "has ${note.points.size}, must have at least 2") + } + var previous: Beat? = null + var allValid = true + for (i in note.points.indices) { + val point = note.points[i] + val pointPath = "$path.points[$i]" + checkPosition(point.x, point.y, pointPath) + if (!checkBeat(point.t, "$pointPath.t")) { + allValid = false + continue + } + if (previous != null && point.t <= previous) { + report( + IssueCode.SLIDE_POINTS_NOT_RISING, + "$pointPath.t", + "is ${text(point.t)}, must be after the point before it (${text(previous)})", + ) + } + previous = point.t + } + if (note.points.isNotEmpty() && note.points[0].t.isValid) { + starts += NoteStart(note.points[0].t, true, path) + } + if (allValid) { + for (point in note.points) noteEnd(point.t, path) + } + } + + private fun checkFlick(note: Note.Flick, path: String) { + checkPosition(note.x, note.y, path) + checkSize(note.size, path) + val dir = note.dir + if (dir != null && !(dir >= 0.0 && dir < 360.0)) { + report(IssueCode.DIR_OUT_OF_RANGE, "$path.dir", "is $dir, must be from 0 up to 360") + } + if (!checkBeat(note.t, "$path.t")) return + starts += NoteStart(note.t, true, path) + noteEnd(note.t, path) + } + + private fun checkLane(lane: Int, path: String): Boolean { + if (lane >= 0 && lane < chart.laneCount) return true + report(IssueCode.LANE_OUT_OF_RANGE, "$path.lane", "is $lane, must be from 0 up to ${chart.laneCount}") + return false + } + + private fun checkPosition(x: Double, y: Double, path: String) { + if (!(x >= 0.0 && x <= 1.0)) report(IssueCode.POSITION_OUT_OF_RANGE, "$path.x", "is $x, must be from 0 to 1") + if (!(y >= 0.0 && y <= 1.0)) report(IssueCode.POSITION_OUT_OF_RANGE, "$path.y", "is $y, must be from 0 to 1") + } + + private fun checkSize(size: Double, path: String) { + if (!(size > 0.0)) report(IssueCode.SIZE_NOT_POSITIVE, "$path.size", "is $size, must be above 0") + } + + private fun groundNotes(lane: Int) = groundByLane.getOrPut(lane) { ArrayList() } + + private fun noteEnd(t: Beat, path: String) { + val last = lastEnd + if (last == null || t > last) { + lastEnd = t + lastEndPath = path + } + } + + /** Walks one lane in time order, in one pass so a huge uploaded chart can't take quadratic time. */ + private fun checkLaneOverlaps(lane: List) { + val sorted = lane.sortedWith(compareBy { it.t }) + var longest: GroundNote? = null + for (note in sorted) { + val end = note.end + if (end == null) continue + val held = longest + if (held != null && note.t < held.end!!) { + report( + IssueCode.HOLDS_OVERLAP, + note.path, + "overlaps the hold at ${held.path}, which runs until ${text(held.end)}", + ) + } + if (held == null || end > held.end!!) longest = note + } + + longest = null + var nextHold = 0 + val holds = sorted.filter { it.end != null } + var previousTap: GroundNote? = null + for (note in sorted) { + if (note.end != null) continue + while (nextHold < holds.size && holds[nextHold].t <= note.t) { + val hold = holds[nextHold++] + val held = longest + if (held == null || hold.end!! > held.end!!) longest = hold + } + val held = longest + if (held != null && note.t < held.end!!) { + report( + IssueCode.TAP_INSIDE_HOLD, + note.path, + "at ${text(note.t)} sits inside the hold at ${held.path}, which runs until ${text(held.end)}", + ) + } + if (previousTap != null && previousTap.t.compareTo(note.t) == 0) { + report(IssueCode.DUPLICATE_TAP, note.path, "is at the same time and lane as the tap at ${previousTap.path}") + } + previousTap = note + } + } + + private fun checkAudioEnd() { + val end = lastEnd + if (audioDurationMs == null || end == null) return + val endMs = TimingMap(chart.offsetMs, chart.bpm).beatToMs(end) + if (!(endMs < audioDurationMs)) { + report(IssueCode.NOTE_AFTER_AUDIO, lastEndPath, "ends at $endMs ms, but the audio ends at $audioDurationMs ms") + } + } + + private fun checkDensity() { + val sorted = starts.sortedWith(compareBy { it.t }) + var left = 0 + var ground = 0 + var sky = 0 + var warnedUntil = -1 + for (right in sorted.indices) { + if (sorted[right].isSky) sky++ else ground++ + while (!isInsideDensityWindow(sorted[left].t, sorted[right].t)) { + if (sorted[left].isSky) sky-- else ground-- + left++ + } + if (ground >= ChartLimits.DENSITY_GROUND_INPUTS && sky >= ChartLimits.DENSITY_SKY_INPUTS) { + if (left > warnedUntil) { + issues += ChartIssue( + Severity.WARNING, + IssueCode.TOO_DENSE, + sorted[left].path, + "starts $ground ground and $sky sky inputs within 1/${ChartLimits.DENSITY_WINDOW_DENOMINATOR} beat, " + + "which is hard to play with one hand on the keys", + ) + } + warnedUntil = right + } + } + } + + /** Exact, since denominators can be anything: whether `later - earlier` is under the window. */ + private fun isInsideDensityWindow(earlier: Beat, later: Beat): Boolean { + val wholeBeats = later.whole - earlier.whole + if (wholeBeats > 1) return false + val earlierDen = BigInteger.valueOf(earlier.den.toLong()) + val laterDen = BigInteger.valueOf(later.den.toLong()) + val bothDens = earlierDen * laterDen + val difference = BigInteger.valueOf(wholeBeats.toLong()) * bothDens + + BigInteger.valueOf(later.num.toLong()) * earlierDen - + BigInteger.valueOf(earlier.num.toLong()) * laterDen + return difference * BigInteger.valueOf(ChartLimits.DENSITY_WINDOW_DENOMINATOR.toLong()) < bothDens + } + + private companion object { + val BEAT_ZERO = Beat(0, 0, 1) + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartPackageValidatorTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartPackageValidatorTest.kt new file mode 100644 index 0000000..1d15dae --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartPackageValidatorTest.kt @@ -0,0 +1,171 @@ +package net.trilleo.hexium.core.chart + +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertTrue + +class ChartPackageValidatorTest { + private val meta = ChartMeta( + formatVersion = 1, + id = "example-song-2", + title = "Example Song", + artist = "Example Artist", + charter = "Example Charter", + previewStartMs = 0, + license = License(LicenseType.ORIGINAL, null), + difficulties = listOf(Difficulty.BASIC, Difficulty.EXPERT), + ) + + private fun chart(difficulty: Difficulty, vararg notes: Note) = DifficultyChart( + formatVersion = 1, + difficulty = difficulty, + level = 1, + laneCount = 4, + offsetMs = 0.0, + bpm = listOf(BpmChange(Beat(0, 0, 1), 120.0)), + meter = listOf(MeterChange(Beat(0, 0, 1), 4, 4)), + notes = notes.toList(), + ) + + private val pkg = ChartPackage(meta, listOf(chart(Difficulty.BASIC), chart(Difficulty.EXPERT))) + + private fun assertOnlyError(issues: List, code: IssueCode, path: String) { + assertEquals(1, issues.size, issues.toString()) + assertEquals(code, issues[0].code) + assertEquals(path, issues[0].path) + assertEquals(Severity.ERROR, issues[0].severity) + assertTrue(issues[0].message.isNotBlank()) + } + + private fun assertMetaError(meta: ChartMeta, code: IssueCode, path: String) { + assertOnlyError(ChartValidator.validateMeta(meta), code, path) + } + + @Test + fun goodMetaPasses() = assertEquals(emptyList(), ChartValidator.validateMeta(meta)) + + @Test + fun goodPackagePasses() = assertEquals(emptyList(), ChartValidator.validatePackage(pkg)) + + @Test + fun unknownFormatVersionFails() = + assertMetaError(meta.copy(formatVersion = 2), IssueCode.UNKNOWN_FORMAT_VERSION, "formatVersion") + + @Test + fun idLimitsPass() { + assertEquals(emptyList(), ChartValidator.validateMeta(meta.copy(id = "a"))) + assertEquals(emptyList(), ChartValidator.validateMeta(meta.copy(id = "a".repeat(64)))) + assertEquals(emptyList(), ChartValidator.validateMeta(meta.copy(id = "0-9-a-z"))) + } + + @Test + fun badIdsFail() { + for (id in listOf("", "a".repeat(65), "Upper", "under_score", "with space", "sláinte", "../evil")) { + assertMetaError(meta.copy(id = id), IssueCode.BAD_ID, "id") + } + } + + @Test + fun blankTextFails() { + assertMetaError(meta.copy(title = ""), IssueCode.BLANK_TEXT, "title") + assertMetaError(meta.copy(artist = " "), IssueCode.BLANK_TEXT, "artist") + assertMetaError(meta.copy(charter = "\t"), IssueCode.BLANK_TEXT, "charter") + } + + @Test + fun previewAtZeroOrLaterPasses() { + assertEquals(emptyList(), ChartValidator.validateMeta(meta.copy(previewStartMs = 90000))) + } + + @Test + fun negativePreviewFails() = + assertMetaError(meta.copy(previewStartMs = -1), IssueCode.NEGATIVE_PREVIEW, "previewStartMs") + + @Test + fun noDifficultiesFails() = assertMetaError(meta.copy(difficulties = emptyList()), IssueCode.NO_DIFFICULTIES, "difficulties") + + @Test + fun repeatedDifficultyFails() { + assertMetaError( + meta.copy(difficulties = listOf(Difficulty.BASIC, Difficulty.BASIC)), + IssueCode.REPEATED_DIFFICULTY, + "difficulties[1]", + ) + } + + @Test + fun metaIssuesInAPackageNameTheFile() { + assertOnlyError( + ChartValidator.validatePackage(pkg.copy(meta = meta.copy(title = ""))), + IssueCode.BLANK_TEXT, + "meta.json:title", + ) + } + + @Test + fun listedDifficultyWithoutAFileFails() { + assertOnlyError( + ChartValidator.validatePackage(pkg.copy(charts = listOf(chart(Difficulty.BASIC)))), + IssueCode.MISSING_DIFFICULTY_FILE, + "meta.json:difficulties[1]", + ) + } + + @Test + fun fileNotListedFails() { + assertOnlyError( + ChartValidator.validatePackage(pkg.copy(charts = pkg.charts + chart(Difficulty.MASTER))), + IssueCode.UNLISTED_DIFFICULTY_FILE, + "master.json", + ) + } + + @Test + fun twoFilesForOneDifficultyFail() { + assertOnlyError( + ChartValidator.validatePackage(pkg.copy(charts = pkg.charts + chart(Difficulty.BASIC))), + IssueCode.DUPLICATE_DIFFICULTY_FILE, + "basic.json", + ) + } + + @Test + fun chartIssuesInAPackageNameTheFile() { + val bad = chart(Difficulty.EXPERT, Note.Tap(Beat(1, 0, 1), 9)) + assertOnlyError( + ChartValidator.validatePackage(pkg.copy(charts = listOf(chart(Difficulty.BASIC), bad))), + IssueCode.LANE_OUT_OF_RANGE, + "expert.json:notes[0].lane", + ) + } + + @Test + fun audioLengthReachesEveryChart() { + val late = chart(Difficulty.EXPERT, Note.Tap(Beat(4, 0, 1), 0)) + val withLate = pkg.copy(charts = listOf(chart(Difficulty.BASIC), late)) + assertEquals(emptyList(), ChartValidator.validatePackage(withLate, audioDurationMs = 2000.5)) + assertOnlyError( + ChartValidator.validatePackage(withLate, audioDurationMs = 2000.0), + IssueCode.NOTE_AFTER_AUDIO, + "expert.json:notes[0]", + ) + } + + @Test + fun packageUnderTheLimitPasses() { + assertEquals(emptyList(), ChartValidator.validatePackage(pkg, packageSizeBytes = ChartLimits.MAX_PACKAGE_BYTES - 1)) + } + + @Test + fun packageSizeIsSkippedWhenNotGiven() { + assertEquals(emptyList(), ChartValidator.validatePackage(pkg, packageSizeBytes = null)) + } + + @Test + fun packageAtOrOverTheLimitFails() { + assertEquals(30L * 1024 * 1024, ChartLimits.MAX_PACKAGE_BYTES) + for (size in listOf(ChartLimits.MAX_PACKAGE_BYTES, ChartLimits.MAX_PACKAGE_BYTES + 1)) { + assertOnlyError(ChartValidator.validatePackage(pkg, packageSizeBytes = size), IssueCode.PACKAGE_TOO_LARGE, "$") + } + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt new file mode 100644 index 0000000..0764b53 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt @@ -0,0 +1,505 @@ +package net.trilleo.hexium.core.chart + +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertTrue + +/** Every rule has a passing and a failing case. A failing case must give exactly one issue, with no follow-on errors. */ +class ChartValidatorTest { + private fun b(whole: Int, num: Int = 0, den: Int = 1) = Beat(whole, num, den) + + private val chart = DifficultyChart( + formatVersion = 1, + difficulty = Difficulty.EXPERT, + level = 1, + laneCount = 4, + offsetMs = 0.0, + bpm = listOf(BpmChange(b(0), 120.0)), + meter = listOf(MeterChange(b(0), 4, 4)), + notes = emptyList(), + ) + + private fun withNotes(vararg notes: Note) = chart.copy(notes = notes.toList()) + + private fun slide(vararg points: SlidePoint, radius: Double = 0.1) = Note.Slide(SkyButton.L, radius, points.toList()) + + private fun point(t: Beat, x: Double = 0.5, y: Double = 0.5) = SlidePoint(t, x, y, Ease.LINEAR) + + private fun skyTap(t: Beat, x: Double = 0.5, y: Double = 0.5, size: Double = 1.0) = + Note.SkyTap(t, x, y, SkyButton.L, size) + + private fun flick(t: Beat, x: Double = 0.5, y: Double = 0.5, dir: Double? = null, size: Double = 1.0) = + Note.Flick(t, x, y, dir, size) + + private fun assertValid(chart: DifficultyChart, audioDurationMs: Double? = null) { + assertEquals(emptyList(), ChartValidator.validateChart(chart, audioDurationMs)) + } + + private fun assertOnlyIssue( + issues: List, + code: IssueCode, + path: String, + severity: Severity = Severity.ERROR, + ) { + assertEquals(1, issues.size, issues.toString()) + assertEquals(code, issues[0].code) + assertEquals(path, issues[0].path) + assertEquals(severity, issues[0].severity) + assertTrue(issues[0].message.isNotBlank()) + } + + private fun assertOnlyError(chart: DifficultyChart, code: IssueCode, path: String, audioDurationMs: Double? = null) { + assertOnlyIssue(ChartValidator.validateChart(chart, audioDurationMs), code, path) + } + + @Test + fun emptyChartIsValid() = assertValid(chart) + + // formatVersion + + @Test + fun knownFormatVersionPasses() = assertValid(chart.copy(formatVersion = 1)) + + @Test + fun unknownFormatVersionFails() = + assertOnlyError(chart.copy(formatVersion = 2), IssueCode.UNKNOWN_FORMAT_VERSION, "formatVersion") + + // laneCount and level + + @Test + fun fourLanesPass() = assertValid(chart.copy(laneCount = 4)) + + @Test + fun otherLaneCountsFail() { + assertOnlyError(chart.copy(laneCount = 6), IssueCode.BAD_LANE_COUNT, "laneCount") + assertOnlyError(chart.copy(laneCount = 0), IssueCode.BAD_LANE_COUNT, "laneCount") + } + + @Test + fun levelOneAndUpPasses() { + assertValid(chart.copy(level = 1)) + assertValid(chart.copy(level = 15)) + } + + @Test + fun levelBelowOneFails() = assertOnlyError(chart.copy(level = 0), IssueCode.BAD_LEVEL, "level") + + // Fractions + + @Test + fun unreducedFractionsPass() = assertValid(withNotes(Note.Tap(b(12, 2, 4), 0))) + + @Test + fun invalidFractionsFailOnceEverywhere() { + val bad = b(12, 5, 4) + assertOnlyError(withNotes(Note.Tap(bad, 0)), IssueCode.INVALID_BEAT, "notes[0].t") + assertOnlyError(withNotes(Note.Hold(bad, b(13), 0)), IssueCode.INVALID_BEAT, "notes[0].t") + assertOnlyError(withNotes(Note.Hold(b(1), bad, 0)), IssueCode.INVALID_BEAT, "notes[0].end") + assertOnlyError(withNotes(skyTap(bad)), IssueCode.INVALID_BEAT, "notes[0].t") + assertOnlyError(withNotes(flick(bad)), IssueCode.INVALID_BEAT, "notes[0].t") + assertOnlyError( + withNotes(slide(point(b(1)), point(bad), point(b(2)))), + IssueCode.INVALID_BEAT, + "notes[0].points[1].t", + ) + assertOnlyError( + chart.copy(bpm = chart.bpm + BpmChange(bad, 90.0)), + IssueCode.INVALID_BEAT, + "bpm[1].t", + ) + assertOnlyError( + chart.copy(meter = chart.meter + MeterChange(bad, 3, 4)), + IssueCode.INVALID_BEAT, + "meter[1].t", + ) + } + + @Test + fun invalidFractionKindsAreAllCaught() { + for (bad in listOf(b(-1), b(1, 4, 4), b(1, -1, 4), b(1, 0, 0), b(1, 0, -4))) { + assertOnlyError(withNotes(Note.Tap(bad, 0)), IssueCode.INVALID_BEAT, "notes[0].t") + } + } + + @Test + fun audioRuleSkipsNotesWithInvalidBeats() { + assertOnlyError(withNotes(Note.Tap(b(1, 0, 0), 0)), IssueCode.INVALID_BEAT, "notes[0].t", audioDurationMs = 1.0) + } + + // BPM + + @Test + fun bpmAboveZeroPasses() = assertValid(chart.copy(bpm = listOf(BpmChange(b(0), 0.001)))) + + @Test + fun bpmAtOrBelowZeroFails() { + for (bad in listOf(0.0, -120.0, Double.NaN)) { + assertOnlyError(chart.copy(bpm = listOf(BpmChange(b(0), bad))), IssueCode.BPM_NOT_POSITIVE, "bpm[0].bpm") + } + } + + @Test + fun firstBpmAtBeatZeroPasses() = assertValid(chart.copy(bpm = listOf(BpmChange(b(0, 0, 4), 120.0)))) + + @Test + fun firstBpmElsewhereFails() { + assertOnlyError(chart.copy(bpm = listOf(BpmChange(b(1), 120.0))), IssueCode.FIRST_BPM_NOT_AT_ZERO, "bpm[0].t") + assertOnlyError(chart.copy(bpm = emptyList()), IssueCode.FIRST_BPM_NOT_AT_ZERO, "bpm") + } + + @Test + fun risingBpmPasses() = assertValid(chart.copy(bpm = chart.bpm + BpmChange(b(0, 1, 2), 90.0) + BpmChange(b(1), 60.0))) + + @Test + fun bpmNotRisingFails() { + val same = chart.bpm + BpmChange(b(0, 0, 3), 90.0) + assertOnlyError(chart.copy(bpm = same), IssueCode.BPM_NOT_RISING, "bpm[1].t") + val back = chart.bpm + BpmChange(b(4), 90.0) + BpmChange(b(2), 60.0) + assertOnlyError(chart.copy(bpm = back), IssueCode.BPM_NOT_RISING, "bpm[2].t") + } + + // Meter + + @Test + fun firstMeterAtBeatZeroPasses() = assertValid(chart.copy(meter = listOf(MeterChange(b(0, 0, 2), 3, 4)))) + + @Test + fun firstMeterElsewhereFails() { + assertOnlyError(chart.copy(meter = listOf(MeterChange(b(1), 4, 4))), IssueCode.FIRST_METER_NOT_AT_ZERO, "meter[0].t") + assertOnlyError(chart.copy(meter = emptyList()), IssueCode.FIRST_METER_NOT_AT_ZERO, "meter") + } + + @Test + fun risingMeterPasses() = assertValid(chart.copy(meter = chart.meter + MeterChange(b(4), 3, 4))) + + @Test + fun meterNotRisingFails() { + assertOnlyError(chart.copy(meter = chart.meter + MeterChange(b(0), 3, 4)), IssueCode.METER_NOT_RISING, "meter[1].t") + } + + @Test + fun meterAboveZeroPasses() = assertValid(chart.copy(meter = listOf(MeterChange(b(0), 7, 8)))) + + @Test + fun meterAtOrBelowZeroFails() { + assertOnlyError(chart.copy(meter = listOf(MeterChange(b(0), 0, 4))), IssueCode.METER_NOT_POSITIVE, "meter[0].num") + assertOnlyError(chart.copy(meter = listOf(MeterChange(b(0), 4, -4))), IssueCode.METER_NOT_POSITIVE, "meter[0].den") + } + + // Lanes and holds + + @Test + fun lanesInRangePass() = assertValid(withNotes(Note.Tap(b(1), 0), Note.Tap(b(1), 3), Note.Hold(b(2), b(3), 3))) + + @Test + fun lanesOutOfRangeFail() { + assertOnlyError(withNotes(Note.Tap(b(1), 4)), IssueCode.LANE_OUT_OF_RANGE, "notes[0].lane") + assertOnlyError(withNotes(Note.Tap(b(1), -1)), IssueCode.LANE_OUT_OF_RANGE, "notes[0].lane") + assertOnlyError(withNotes(Note.Hold(b(1), b(2), 4)), IssueCode.LANE_OUT_OF_RANGE, "notes[0].lane") + } + + @Test + fun holdEndingAfterItsStartPasses() = assertValid(withNotes(Note.Hold(b(1), b(1, 1, 32), 0))) + + @Test + fun holdNotEndingAfterItsStartFails() { + assertOnlyError(withNotes(Note.Hold(b(1), b(1), 0)), IssueCode.HOLD_END_NOT_AFTER_START, "notes[0].end") + assertOnlyError(withNotes(Note.Hold(b(1, 2, 4), b(1, 1, 2), 0)), IssueCode.HOLD_END_NOT_AFTER_START, "notes[0].end") + assertOnlyError(withNotes(Note.Hold(b(2), b(1), 0)), IssueCode.HOLD_END_NOT_AFTER_START, "notes[0].end") + } + + @Test + fun holdsThatDoNotOverlapPass() { + assertValid(withNotes(Note.Hold(b(1), b(2), 0), Note.Hold(b(3), b(4), 0))) + assertValid(withNotes(Note.Hold(b(1), b(2), 0), Note.Hold(b(1), b(2), 1))) + } + + @Test + fun holdMayStartWhereAnotherEnds() = assertValid(withNotes(Note.Hold(b(1), b(2), 0), Note.Hold(b(2), b(3), 0))) + + @Test + fun overlappingHoldsFail() { + assertOnlyError( + withNotes(Note.Hold(b(1), b(3), 0), Note.Hold(b(2), b(4), 0)), + IssueCode.HOLDS_OVERLAP, + "notes[1]", + ) + } + + @Test + fun holdsOverlapWhateverTheFileOrder() { + assertOnlyError( + withNotes(Note.Hold(b(2), b(4), 0), Note.Hold(b(1), b(3), 0)), + IssueCode.HOLDS_OVERLAP, + "notes[0]", + ) + } + + @Test + fun holdInsideALongerHoldFailsEvenAfterAShortOne() { + val issues = ChartValidator.validateChart( + withNotes(Note.Hold(b(1), b(10), 0), Note.Hold(b(2), b(3), 0), Note.Hold(b(4), b(5), 0)), + ) + assertEquals(listOf("notes[1]", "notes[2]"), issues.map { it.path }) + assertEquals(setOf(IssueCode.HOLDS_OVERLAP), issues.map { it.code }.toSet()) + } + + @Test + fun holdsSharingAHeadFailOnce() { + assertOnlyError(withNotes(Note.Hold(b(1), b(2), 0), Note.Hold(b(1), b(3), 0)), IssueCode.HOLDS_OVERLAP, "notes[1]") + } + + @Test + fun tapOutsideAHoldPasses() { + assertValid(withNotes(Note.Hold(b(2), b(3), 0), Note.Tap(b(1), 0), Note.Tap(b(4), 0))) + assertValid(withNotes(Note.Hold(b(2), b(3), 0), Note.Tap(b(2, 1, 2), 1))) + } + + @Test + fun tapOnAHoldsEndPasses() = assertValid(withNotes(Note.Hold(b(2), b(3), 0), Note.Tap(b(3), 0))) + + @Test + fun tapInsideAHoldFails() { + assertOnlyError(withNotes(Note.Hold(b(2), b(3), 0), Note.Tap(b(2, 1, 2), 0)), IssueCode.TAP_INSIDE_HOLD, "notes[1]") + } + + @Test + fun tapOnAHoldsHeadFailsOnce() { + assertOnlyError(withNotes(Note.Tap(b(2), 0), Note.Hold(b(2), b(3), 0)), IssueCode.TAP_INSIDE_HOLD, "notes[0]") + } + + @Test + fun tapInsideALongHoldAfterAShortOneFails() { + val issues = ChartValidator.validateChart( + withNotes(Note.Hold(b(1), b(10), 0), Note.Hold(b(2), b(3), 0), Note.Tap(b(5), 0)), + ) + assertEquals( + listOf(IssueCode.HOLDS_OVERLAP to "notes[1]", IssueCode.TAP_INSIDE_HOLD to "notes[2]"), + issues.map { it.code to it.path }, + ) + } + + @Test + fun tapsAtDifferentTimesOrLanesPass() { + assertValid(withNotes(Note.Tap(b(1), 0), Note.Tap(b(1), 1), Note.Tap(b(2), 0))) + } + + @Test + fun twoTapsAtTheSameTimeAndLaneFail() { + assertOnlyError(withNotes(Note.Tap(b(1, 1, 2), 0), Note.Tap(b(1, 2, 4), 0)), IssueCode.DUPLICATE_TAP, "notes[1]") + } + + // Slides, positions, sizes + + @Test + fun slideWithRisingPointsPasses() = assertValid(withNotes(slide(point(b(1)), point(b(1, 1, 8)), point(b(2))))) + + @Test + fun slideWithTooFewPointsFails() { + assertOnlyError(withNotes(slide(point(b(1)))), IssueCode.SLIDE_TOO_FEW_POINTS, "notes[0].points") + assertOnlyError(withNotes(slide()), IssueCode.SLIDE_TOO_FEW_POINTS, "notes[0].points") + } + + @Test + fun slidePointsNotRisingFail() { + assertOnlyError( + withNotes(slide(point(b(1)), point(b(1, 0, 2)))), + IssueCode.SLIDE_POINTS_NOT_RISING, + "notes[0].points[1].t", + ) + assertOnlyError( + withNotes(slide(point(b(2)), point(b(1)))), + IssueCode.SLIDE_POINTS_NOT_RISING, + "notes[0].points[1].t", + ) + } + + @Test + fun positionsInsideTheScreenPass() { + assertValid( + withNotes( + skyTap(b(1), x = 0.0, y = 1.0), + flick(b(2), x = 1.0, y = 0.0), + slide(point(b(3), 0.0, 0.0), point(b(4), 1.0, 1.0)), + ), + ) + } + + @Test + fun positionsOutsideTheScreenFail() { + assertOnlyError(withNotes(skyTap(b(1), x = -0.01)), IssueCode.POSITION_OUT_OF_RANGE, "notes[0].x") + assertOnlyError(withNotes(skyTap(b(1), y = 1.01)), IssueCode.POSITION_OUT_OF_RANGE, "notes[0].y") + assertOnlyError(withNotes(flick(b(1), x = 1.5)), IssueCode.POSITION_OUT_OF_RANGE, "notes[0].x") + assertOnlyError(withNotes(flick(b(1), y = Double.NaN)), IssueCode.POSITION_OUT_OF_RANGE, "notes[0].y") + assertOnlyError( + withNotes(slide(point(b(1)), point(b(2), x = 2.0))), + IssueCode.POSITION_OUT_OF_RANGE, + "notes[0].points[1].x", + ) + assertOnlyError( + withNotes(slide(point(b(1), y = -1.0), point(b(2)))), + IssueCode.POSITION_OUT_OF_RANGE, + "notes[0].points[0].y", + ) + } + + @Test + fun sizeAndRadiusAboveZeroPass() { + assertValid(withNotes(skyTap(b(1), size = 0.1), flick(b(2), size = 0.1), slide(point(b(3)), point(b(4)), radius = 0.01))) + } + + @Test + fun sizeAndRadiusAtOrBelowZeroFail() { + assertOnlyError(withNotes(skyTap(b(1), size = 0.0)), IssueCode.SIZE_NOT_POSITIVE, "notes[0].size") + assertOnlyError(withNotes(flick(b(1), size = -1.0)), IssueCode.SIZE_NOT_POSITIVE, "notes[0].size") + assertOnlyError(withNotes(slide(point(b(1)), point(b(2)), radius = 0.0)), IssueCode.RADIUS_NOT_POSITIVE, "notes[0].radius") + } + + @Test + fun dirInRangeOrLeftOutPasses() { + assertValid(withNotes(flick(b(1), dir = 0.0), flick(b(2), dir = 359.9), flick(b(3), dir = null))) + } + + @Test + fun dirOutOfRangeFails() { + assertOnlyError(withNotes(flick(b(1), dir = 360.0)), IssueCode.DIR_OUT_OF_RANGE, "notes[0].dir") + assertOnlyError(withNotes(flick(b(1), dir = -1.0)), IssueCode.DIR_OUT_OF_RANGE, "notes[0].dir") + } + + // The last note against the audio. At 120 BPM, beat 4 is 2000 ms. + + @Test + fun notesEndingBeforeTheAudioPass() { + assertValid(withNotes(Note.Tap(b(4), 0)), audioDurationMs = 2000.5) + } + + @Test + fun audioRuleIsSkippedWithoutALength() = assertValid(withNotes(Note.Tap(b(4000), 0)), audioDurationMs = null) + + @Test + fun lastNoteAtOrPastTheAudioEndFails() { + assertOnlyError(withNotes(Note.Tap(b(4), 0)), IssueCode.NOTE_AFTER_AUDIO, "notes[0]", audioDurationMs = 2000.0) + assertOnlyError(withNotes(Note.Tap(b(5), 0)), IssueCode.NOTE_AFTER_AUDIO, "notes[0]", audioDurationMs = 2000.0) + } + + @Test + fun audioRuleUsesWhereANoteEnds() { + assertOnlyError(withNotes(Note.Hold(b(1), b(4), 0)), IssueCode.NOTE_AFTER_AUDIO, "notes[0]", audioDurationMs = 2000.0) + assertOnlyError(withNotes(slide(point(b(1)), point(b(4)))), IssueCode.NOTE_AFTER_AUDIO, "notes[0]", audioDurationMs = 2000.0) + assertOnlyError(withNotes(skyTap(b(4))), IssueCode.NOTE_AFTER_AUDIO, "notes[0]", audioDurationMs = 2000.0) + assertOnlyError(withNotes(flick(b(4))), IssueCode.NOTE_AFTER_AUDIO, "notes[0]", audioDurationMs = 2000.0) + } + + @Test + fun audioRuleReportsOnlyTheLastNoteWhateverTheFileOrder() { + assertOnlyError( + withNotes(Note.Tap(b(5), 0), Note.Tap(b(6), 0), Note.Tap(b(1), 0)), + IssueCode.NOTE_AFTER_AUDIO, + "notes[1]", + audioDurationMs = 2000.0, + ) + } + + @Test + fun audioRuleUsesOffsetAndBpmChanges() { + val timed = chart.copy(offsetMs = 500.0, bpm = chart.bpm + BpmChange(b(2), 60.0)) + val note = Note.Tap(b(3), 0) + assertValid(timed.copy(notes = listOf(note)), audioDurationMs = 2500.5) + assertOnlyError(timed.copy(notes = listOf(note)), IssueCode.NOTE_AFTER_AUDIO, "notes[0]", audioDurationMs = 2500.0) + } + + @Test + fun audioRuleIsSkippedWhenBpmIsBroken() { + val broken = chart.copy(bpm = listOf(BpmChange(b(0), 0.0)), notes = listOf(Note.Tap(b(4), 0))) + assertOnlyError(broken, IssueCode.BPM_NOT_POSITIVE, "bpm[0].bpm", audioDurationMs = 1.0) + } + + // The density warning + + private fun fourLanes(t: Beat) = arrayOf(Note.Tap(t, 0), Note.Tap(t, 1), Note.Tap(t, 2), Note.Tap(t, 3)) + + private fun assertDensityWarning(chart: DifficultyChart, path: String = "notes[0]") { + assertOnlyIssue(ChartValidator.validateChart(chart), IssueCode.TOO_DENSE, path, Severity.WARNING) + } + + @Test + fun fourGroundPlusSkyWarns() = assertDensityWarning(withNotes(*fourLanes(b(1)), skyTap(b(1)))) + + @Test + fun threeGroundPlusSkyPasses() { + assertValid(withNotes(Note.Tap(b(1), 0), Note.Tap(b(1), 1), Note.Tap(b(1), 2), skyTap(b(1)))) + } + + @Test + fun fourGroundAlonePasses() = assertValid(withNotes(*fourLanes(b(1)))) + + @Test + fun holdHeadsCountAsGround() { + assertDensityWarning( + withNotes(Note.Hold(b(1), b(2), 0), Note.Tap(b(1), 1), Note.Tap(b(1), 2), Note.Tap(b(1), 3), skyTap(b(1))), + ) + } + + @Test + fun heldKeysDoNotCount() { + assertValid(withNotes(Note.Hold(b(0), b(2), 0), Note.Tap(b(1), 1), Note.Tap(b(1), 2), Note.Tap(b(1), 3), skyTap(b(1)))) + } + + @Test + fun flicksAndSlideStartsCountAsSky() { + assertDensityWarning(withNotes(*fourLanes(b(1)), flick(b(1)))) + assertDensityWarning(withNotes(*fourLanes(b(1)), slide(point(b(1)), point(b(2))))) + } + + @Test + fun laterSlidePointsDoNotCount() = assertValid(withNotes(*fourLanes(b(2)), slide(point(b(1)), point(b(2)), point(b(3))))) + + @Test + fun notesCloserThanASixteenthWarn() { + assertDensityWarning(withNotes(*fourLanes(b(1)), skyTap(b(1, 1, 32)))) + } + + @Test + fun notesExactlyASixteenthApartPass() = assertValid(withNotes(*fourLanes(b(1)), skyTap(b(1, 1, 16)))) + + @Test + fun theWindowSlidesAcrossSixteenthBoundaries() { + assertDensityWarning(withNotes(*fourLanes(b(1, 31, 64)), skyTap(b(1, 33, 64)))) + } + + @Test + fun theWindowIsIndependentOfFileOrder() { + assertDensityWarning(withNotes(skyTap(b(1, 1, 32)), *fourLanes(b(1))), path = "notes[1]") + } + + @Test + fun theWindowComparesHugeDenominatorsExactly() { + val max = Int.MAX_VALUE + assertDensityWarning(withNotes(*fourLanes(b(0, max - 1, max)), skyTap(b(1, 1, max)))) + assertValid(withNotes(*fourLanes(b(0, max - 1, max)), skyTap(b(2)))) + } + + @Test + fun oneClusterWarnsOnce() { + val notes = fourLanes(b(1)) + skyTap(b(1)) + skyTap(b(1, 1, 64)) + skyTap(b(1, 2, 64)) + assertDensityWarning(chart.copy(notes = notes.toList())) + } + + @Test + fun separateClustersWarnSeparately() { + val notes = fourLanes(b(1)) + skyTap(b(1)) + fourLanes(b(2)) + skyTap(b(2)) + val issues = ChartValidator.validateChart(chart.copy(notes = notes.toList())) + assertEquals(listOf("notes[0]", "notes[5]"), issues.map { it.path }) + } + + @Test + fun manyProblemsAreAllReported() { + val issues = ChartValidator.validateChart( + chart.copy(level = 0, laneCount = 6, notes = listOf(Note.Tap(b(1), 9), skyTap(b(1), x = 2.0))), + ) + assertEquals( + listOf(IssueCode.BAD_LEVEL, IssueCode.BAD_LANE_COUNT, IssueCode.LANE_OUT_OF_RANGE, IssueCode.POSITION_OUT_OF_RANGE), + issues.map { it.code }, + ) + } +} diff --git a/docs/CHART_FORMAT.md b/docs/CHART_FORMAT.md index e9c97e0..6a5efa6 100644 --- a/docs/CHART_FORMAT.md +++ b/docs/CHART_FORMAT.md @@ -89,7 +89,7 @@ Errors: - The first meter entry is at beat 0. Meter entries rise strictly in time. `num` and `den` are above 0. - `lane` is from 0 up to `laneCount`. A hold's `end` is after its `t`. - Holds in the same lane don't overlap. A tap doesn't sit inside a hold in its lane. A hold covers its start up to, but not including, its end: a hold may start exactly where another ends, and a tap may sit exactly on a hold's end, but a tap on a hold's head is an error. -- No two taps or hold heads share the same time and lane, since one press resolves at most one note. +- No two taps or hold heads share the same time and lane, since one press resolves at most one note. (Two holds sharing a head are reported as an overlap.) - Slide points rise strictly in time, with at least 2 points. All x and y values are in \[0, 1\]. - `size` and `radius` are above 0. `dir` is from 0 up to (not including) 360. - The last note ends before the audio does. The package is under 30 MiB. @@ -97,4 +97,4 @@ Errors: Warning (not an error): -- A sliding window of 1/16 beat holds at least 4 ground inputs and at least 1 sky input, since that's hard to play with one hand on the keys. Only note starts count: taps and hold heads for ground, sky taps, flicks and the first point of a slide for sky. +- A sliding window shorter than 1/16 beat (notes exactly 1/16 beat apart aren't in the same window) holds at least 4 ground inputs and at least 1 sky input, since that's hard to play with one hand on the keys. Only note starts count: taps and hold heads for ground, sky taps, flicks and the first point of a slide for sky. From 2c17fac3126b41261157aa053f2a1b69259630f4 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Tue, 3 Nov 2026 13:17:04 +0800 Subject: [PATCH 04/34] Feature: Add basic, advanced and expert example charts for charters to learn the format from --- .gitattributes | 2 + CHANGELOG.md | 9 ++ core/build.gradle.kts | 6 ++ .../net/trilleo/hexium/core/chart/Chart.kt | 7 +- .../trilleo/hexium/core/chart/ChartIssue.kt | 1 + .../trilleo/hexium/core/chart/ChartParser.kt | 21 ++-- .../hexium/core/chart/ChartValidator.kt | 14 ++- .../trilleo/hexium/core/chart/TimingMap.kt | 21 ++-- .../hexium/core/chart/ChartParserTest.kt | 47 +++++++++ .../hexium/core/chart/ChartValidatorTest.kt | 40 ++++++++ .../hexium/core/chart/ExampleChartsTest.kt | 99 +++++++++++++++++++ .../hexium/core/chart/TimingMapTest.kt | 19 ++++ docs/CHART_FORMAT.md | 6 +- docs/DESIGN.md | 4 +- docs/DEVELOPMENT.md | 1 + docs/examples/advanced.json | 34 +++++++ docs/examples/basic.json | 30 ++++++ docs/examples/expert.json | 49 +++++++++ 18 files changed, 388 insertions(+), 22 deletions(-) create mode 100644 .gitattributes create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/chart/ExampleChartsTest.kt create mode 100644 docs/examples/advanced.json create mode 100644 docs/examples/basic.json create mode 100644 docs/examples/expert.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..206e6b0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# The example chart tests compare text exactly, and the spec holds examples they read. +docs/** text eol=lf diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f3579d..ef34f90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,3 +14,12 @@ + Added the chart validator. + Checks charts and packages against every rule in the chart format. + Warns when a moment is too dense to play with one hand on the keys. ++ Added basic, advanced and expert example charts for charters to learn the format from. + +### Fixes + +#### Charts + ++ Fixed chart files loading with numbers that aren't valid JSON, like `0.5f` or `01`. ++ Fixed charts passing validation with a BPM so small that note times broke. ++ Fixed chart files saved with a byte-order mark failing to load. diff --git a/core/build.gradle.kts b/core/build.gradle.kts index bb6e836..bee7d60 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -10,3 +10,9 @@ dependencies { testImplementation(kotlin("test")) } + +tasks.test { + // The tests read the example charts and the spec's examples. + inputs.dir(rootProject.file("docs/examples")) + inputs.file(rootProject.file("docs/CHART_FORMAT.md")) +} diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt index 8386dc4..9257c61 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt @@ -84,5 +84,10 @@ enum class LicenseType(val id: String) { PERMITTED("permitted"), } -/** The chart data of a `.hexium` package: its `meta.json` and every difficulty file. */ +/** + * The chart data of a `.hexium` package: its `meta.json` and every difficulty file. + * + * It keeps no file names, so the zip reader must check that each `.json` holds + * that difficulty. + */ data class ChartPackage(val meta: ChartMeta, val charts: List) diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt index 17f9808..58ceedd 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt @@ -13,6 +13,7 @@ enum class IssueCode { BAD_LANE_COUNT, BAD_LEVEL, + OFFSET_NOT_FINITE, INVALID_BEAT, BPM_NOT_POSITIVE, FIRST_BPM_NOT_AT_ZERO, diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartParser.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartParser.kt index d0e1464..a15e69e 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartParser.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartParser.kt @@ -25,8 +25,9 @@ object ChartParser { fun parseMeta(text: String): ParseResult = parse(text, FileReader::readMeta) - private fun parse(text: String, read: FileReader.(JsonObject) -> T?): ParseResult { + private fun parse(fileText: String, read: FileReader.(JsonObject) -> T?): ParseResult { val reader = FileReader() + val text = fileText.removePrefix(BYTE_ORDER_MARK) if (nestsTooDeeply(text)) { reader.error(IssueCode.INVALID_JSON, ROOT, "is not valid JSON: nested more than $MAX_NESTING levels deep") return ParseResult(null, reader.issues) @@ -72,6 +73,11 @@ private const val ROOT = "$" private const val FORMAT_VERSION = "formatVersion" +private const val BYTE_ORDER_MARK = "\uFEFF" + +/** The JSON library and Kotlin's number parsing both accept more than JSON allows, like `0.5f` and `01`. */ +private val JSON_NUMBER = Regex("-?(0|[1-9][0-9]*)(\\.[0-9]+)?([eE][+-]?[0-9]+)?") + /** Far more than a chart needs (6 levels), with room for unknown fields. */ private const val MAX_NESTING = 32 @@ -321,15 +327,12 @@ private class FileReader { } private fun intOf(element: JsonElement): Int? { - val primitive = element as? JsonPrimitive ?: return null - if (primitive.isString || primitive is JsonNull) return null - return primitive.intOrNull + return numberOf(element)?.intOrNull } private fun double(obj: JsonObject, key: String, path: String): Double? { val element = child(obj, key, path) ?: return null - val primitive = element as? JsonPrimitive - val value = if (primitive == null || primitive.isString || primitive is JsonNull) null else primitive.doubleOrNull + val value = numberOf(element)?.doubleOrNull if (value == null || !value.isFinite()) { wrongType(join(path, key), "a number") return null @@ -337,6 +340,12 @@ private class FileReader { return value } + private fun numberOf(element: JsonElement): JsonPrimitive? { + val primitive = element as? JsonPrimitive ?: return null + if (primitive.isString || primitive is JsonNull) return null + return if (JSON_NUMBER.matches(primitive.content)) primitive else null + } + private fun string(obj: JsonObject, key: String, path: String): String? { val element = child(obj, key, path) ?: return null return textOf(element, join(path, key)) diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt index f7ccecf..e8d49dd 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt @@ -139,10 +139,12 @@ private class ChartChecker(private val chart: DifficultyChart, private val audio fun check(): List { checkHeader() val bpmIsUsable = checkBpm() + val offsetIsUsable = chart.offsetMs.isFinite() + if (!offsetIsUsable) report(IssueCode.OFFSET_NOT_FINITE, "offsetMs", "is ${chart.offsetMs}, must be a finite number") checkMeter() for (i in chart.notes.indices) checkNote(chart.notes[i], "notes[$i]") for (lane in groundByLane.values) checkLaneOverlaps(lane) - if (bpmIsUsable) checkAudioEnd() + if (bpmIsUsable && offsetIsUsable) checkAudioEnd() checkDensity() return issues } @@ -183,7 +185,9 @@ private class ChartChecker(private val chart: DifficultyChart, private val audio var previous: Beat? = null for (i in chart.bpm.indices) { val change = chart.bpm[i] - if (!(change.bpm > 0.0)) report(IssueCode.BPM_NOT_POSITIVE, "bpm[$i].bpm", "is ${change.bpm}, must be above 0") + if (!TimingMap.isUsableBpm(change.bpm)) { + report(IssueCode.BPM_NOT_POSITIVE, "bpm[$i].bpm", "is ${change.bpm}, must be above 0 and give a finite beat length") + } val path = "bpm[$i].t" if (!checkBeat(change.t, path)) continue if (i == 0 && change.t.compareTo(BEAT_ZERO) != 0) { @@ -262,7 +266,9 @@ private class ChartChecker(private val chart: DifficultyChart, private val audio } private fun checkSlide(note: Note.Slide, path: String) { - if (!(note.radius > 0.0)) report(IssueCode.RADIUS_NOT_POSITIVE, "$path.radius", "is ${note.radius}, must be above 0") + if (!(note.radius > 0.0 && note.radius.isFinite())) { + report(IssueCode.RADIUS_NOT_POSITIVE, "$path.radius", "is ${note.radius}, must be a finite number above 0") + } if (note.points.size < 2) { report(IssueCode.SLIDE_TOO_FEW_POINTS, "$path.points", "has ${note.points.size}, must have at least 2") } @@ -317,7 +323,7 @@ private class ChartChecker(private val chart: DifficultyChart, private val audio } private fun checkSize(size: Double, path: String) { - if (!(size > 0.0)) report(IssueCode.SIZE_NOT_POSITIVE, "$path.size", "is $size, must be above 0") + if (!(size > 0.0 && size.isFinite())) report(IssueCode.SIZE_NOT_POSITIVE, "$path.size", "is $size, must be a finite number above 0") } private fun groundNotes(lane: Int) = groundByLane.getOrPut(lane) { ArrayList() } diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/TimingMap.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/TimingMap.kt index 246feb2..5481dd2 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/TimingMap.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/TimingMap.kt @@ -13,11 +13,12 @@ class TimingMap(offsetMs: Double, bpm: List) { private val msPerBeat = DoubleArray(bpm.size) init { + require(offsetMs.isFinite()) { "Offset is not finite" } require(bpm.isNotEmpty()) { "BPM list is empty" } for (i in bpm.indices) { val change = bpm[i] require(change.t.isValid) { "BPM entry $i has an invalid time" } - require(change.bpm > 0.0) { "BPM entry $i is not above 0" } + require(isUsableBpm(change.bpm)) { "BPM entry $i is not a finite number above 0 with a finite beat length" } startBeat[i] = change.t.toDouble() msPerBeat[i] = MS_PER_MINUTE / change.bpm if (i == 0) { @@ -33,12 +34,20 @@ class TimingMap(offsetMs: Double, bpm: List) { fun beatToMs(beat: Beat): Double = beatToMs(beat.toDouble()) fun beatToMs(beat: Double): Double { - var i = startBeat.size - 1 - while (i > 0 && beat < startBeat[i]) i-- - return startMs[i] + (beat - startBeat[i]) * msPerBeat[i] + // Binary search for the last segment starting at or before this beat. + var low = 0 + var high = startBeat.size - 1 + while (low < high) { + val middle = (low + high + 1) ushr 1 + if (startBeat[middle] <= beat) low = middle else high = middle - 1 + } + return startMs[low] + (beat - startBeat[low]) * msPerBeat[low] } - private companion object { - const val MS_PER_MINUTE = 60000.0 + internal companion object { + private const val MS_PER_MINUTE = 60000.0 + + /** Very small values pass "above 0" but make a beat infinitely long, which turns times into NaN. */ + fun isUsableBpm(bpm: Double): Boolean = bpm > 0.0 && bpm.isFinite() && (MS_PER_MINUTE / bpm).isFinite() } } diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartParserTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartParserTest.kt index a134d90..39cb694 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartParserTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartParserTest.kt @@ -172,6 +172,53 @@ class ChartParserTest { assertSingleError(ChartParser.parseDifficulty(nested(33)), IssueCode.INVALID_JSON, "$") } + @Test + fun closingBracketsFirstDoNotHideDeepNesting() { + val text = "]".repeat(100) + "[".repeat(100) + assertSingleError(ChartParser.parseDifficulty(text), IssueCode.INVALID_JSON, "$") + } + + @Test + fun aLeadingByteOrderMarkIsIgnored() { + val result = ChartParser.parseDifficulty("\uFEFF" + specExample) + assertEquals(emptyList(), result.issues) + assertNotNull(result.value) + } + + @Test + fun numbersOutsideJsonsGrammarAreRejected() { + for (bad in listOf("0.5f", "0.5D", "0x1p-1", ".5", "1.", "+0.5", "00.5")) { + assertSingleError( + ChartParser.parseDifficulty(chartWithNote("""{ "type": "flick", "t": [1,0,1], "x": $bad, "y": 0, "size": 1 }""")), + IssueCode.WRONG_TYPE, + "notes[0].x", + ) + } + for (bad in listOf("01", "+1", "0x1")) { + assertSingleError( + ChartParser.parseDifficulty(chartWithNote("""{ "type": "tap", "t": [1,0,1], "lane": $bad }""")), + IssueCode.WRONG_TYPE, + "notes[0].lane", + ) + assertSingleError( + ChartParser.parseDifficulty(chartWithNote("""{ "type": "tap", "t": [$bad,0,1], "lane": 0 }""")), + IssueCode.WRONG_TYPE, + "notes[0].t", + ) + } + } + + @Test + fun numbersInJsonsGrammarAreRead() { + val values = listOf("0" to 0.0, "1.5" to 1.5, "-0.5" to -0.5, "1e-2" to 0.01, "1E2" to 100.0, "2.5e+1" to 25.0) + for ((text, value) in values) { + val note = ChartParser.parseDifficulty( + chartWithNote("""{ "type": "flick", "t": [1,0,1], "x": $text, "y": 0, "size": 1 }"""), + ).value?.notes?.single() as Note.Flick + assertEquals(value, note.x, text) + } + } + @Test fun rootMustBeAnObject() { assertSingleError(ChartParser.parseDifficulty("[]"), IssueCode.WRONG_TYPE, "$") diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt index 0764b53..afeb0fd 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt @@ -138,6 +138,33 @@ class ChartValidatorTest { } } + @Test + fun bpmWhoseBeatLengthIsNotFiniteFails() { + for (bad in listOf(1e-320, Double.POSITIVE_INFINITY)) { + assertOnlyError(chart.copy(bpm = listOf(BpmChange(b(0), bad))), IssueCode.BPM_NOT_POSITIVE, "bpm[0].bpm") + } + } + + @Test + fun finiteOffsetPasses() = assertValid(chart.copy(offsetMs = -250.5)) + + @Test + fun offsetThatIsNotFiniteFails() { + for (bad in listOf(Double.NaN, Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY)) { + assertOnlyError(chart.copy(offsetMs = bad), IssueCode.OFFSET_NOT_FINITE, "offsetMs") + } + } + + @Test + fun audioRuleIsSkippedWhenTheOffsetIsBroken() { + assertOnlyError( + chart.copy(offsetMs = Double.NaN, notes = listOf(Note.Tap(b(4), 0))), + IssueCode.OFFSET_NOT_FINITE, + "offsetMs", + audioDurationMs = 1.0, + ) + } + @Test fun firstBpmAtBeatZeroPasses() = assertValid(chart.copy(bpm = listOf(BpmChange(b(0, 0, 4), 120.0)))) @@ -353,6 +380,10 @@ class ChartValidatorTest { assertOnlyError(withNotes(skyTap(b(1), size = 0.0)), IssueCode.SIZE_NOT_POSITIVE, "notes[0].size") assertOnlyError(withNotes(flick(b(1), size = -1.0)), IssueCode.SIZE_NOT_POSITIVE, "notes[0].size") assertOnlyError(withNotes(slide(point(b(1)), point(b(2)), radius = 0.0)), IssueCode.RADIUS_NOT_POSITIVE, "notes[0].radius") + for (bad in listOf(Double.NaN, Double.POSITIVE_INFINITY)) { + assertOnlyError(withNotes(skyTap(b(1), size = bad)), IssueCode.SIZE_NOT_POSITIVE, "notes[0].size") + assertOnlyError(withNotes(slide(point(b(1)), point(b(2)), radius = bad)), IssueCode.RADIUS_NOT_POSITIVE, "notes[0].radius") + } } @Test @@ -364,6 +395,8 @@ class ChartValidatorTest { fun dirOutOfRangeFails() { assertOnlyError(withNotes(flick(b(1), dir = 360.0)), IssueCode.DIR_OUT_OF_RANGE, "notes[0].dir") assertOnlyError(withNotes(flick(b(1), dir = -1.0)), IssueCode.DIR_OUT_OF_RANGE, "notes[0].dir") + assertOnlyError(withNotes(flick(b(1), dir = Double.NaN)), IssueCode.DIR_OUT_OF_RANGE, "notes[0].dir") + assertOnlyError(withNotes(flick(b(1), dir = Double.POSITIVE_INFINITY)), IssueCode.DIR_OUT_OF_RANGE, "notes[0].dir") } // The last note against the audio. At 120 BPM, beat 4 is 2000 ms. @@ -485,6 +518,13 @@ class ChartValidatorTest { assertDensityWarning(chart.copy(notes = notes.toList())) } + @Test + fun clustersSharingOneNoteWarnOnce() { + val shared = skyTap(b(1, 2, 64)) + val notes = fourLanes(b(1)) + shared + fourLanes(b(1, 5, 64)) + assertDensityWarning(chart.copy(notes = notes.toList())) + } + @Test fun separateClustersWarnSeparately() { val notes = fourLanes(b(1)) + skyTap(b(1)) + fourLanes(b(2)) + skyTap(b(2)) diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ExampleChartsTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ExampleChartsTest.kt new file mode 100644 index 0000000..27e6e5d --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ExampleChartsTest.kt @@ -0,0 +1,99 @@ +package net.trilleo.hexium.core.chart + +import java.io.File +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertTrue + +/** The hand-written charts in docs/examples and the examples in the spec must stay valid. */ +class ExampleChartsTest { + private val docs = File("../docs") + + private fun text(name: String) = File(docs, "examples/$name.json").readText() + + private fun chart(name: String): DifficultyChart { + val result = ChartParser.parseDifficulty(text(name)) + assertEquals(emptyList(), result.issues, name) + return result.value!! + } + + private val names = listOf("basic", "advanced", "expert") + + @Test + fun examplesPassTheValidatorWithoutWarnings() { + for (name in names) assertEquals(emptyList(), ChartValidator.validateChart(chart(name)), name) + } + + @Test + fun examplesAreNamedAfterTheirDifficulty() { + for (name in names) assertEquals(name, chart(name).difficulty.name.lowercase()) + } + + @Test + fun examplesAreWrittenInTheWritersLayout() { + for (name in names) assertEquals(text(name), ChartWriter.writeDifficulty(chart(name)), name) + } + + @Test + fun examplesFormAValidPackage() { + val meta = ChartMeta( + formatVersion = 1, + id = "example", + title = "Example", + artist = "Example", + charter = "Example", + previewStartMs = 0, + license = License(LicenseType.ORIGINAL, null), + difficulties = listOf(Difficulty.BASIC, Difficulty.ADVANCED, Difficulty.EXPERT), + ) + val pkg = ChartPackage(meta, names.map { chart(it) }) + assertEquals(emptyList(), ChartValidator.validatePackage(pkg, audioDurationMs = 60000.0)) + } + + @Test + fun basicIsGroundNotesOnly() { + val notes = chart("basic").notes + assertTrue(notes.any { it is Note.Tap }) + assertTrue(notes.any { it is Note.Hold }) + assertTrue(notes.all { it is Note.Tap || it is Note.Hold }) + } + + @Test + fun advancedAddsSkyTapsAndASlide() { + val notes = chart("advanced").notes + assertTrue(notes.any { it is Note.Tap }) + assertTrue(notes.any { it is Note.Hold }) + assertTrue(notes.any { it is Note.SkyTap }) + assertTrue(notes.any { it is Note.Slide }) + assertTrue(notes.none { it is Note.Flick }) + } + + @Test + fun expertUsesEveryNoteTypeAndTimingChange() { + val chart = chart("expert") + assertTrue(chart.notes.any { it is Note.Tap }) + assertTrue(chart.notes.any { it is Note.Hold }) + assertTrue(chart.notes.any { it is Note.SkyTap }) + assertTrue(chart.notes.any { it is Note.Slide }) + assertTrue(chart.notes.any { it is Note.Flick }) + assertTrue(chart.bpm.size > 1) + assertTrue(chart.meter.size > 1) + } + + @Test + fun theSpecsExamplesAreValid() { + val blocks = Regex("```json\\n(.*?)```", RegexOption.DOT_MATCHES_ALL) + .findAll(File(docs, "CHART_FORMAT.md").readText()) + .map { it.groupValues[1] } + .toList() + assertEquals(2, blocks.size) + + val meta = ChartParser.parseMeta(blocks[0]) + assertEquals(emptyList(), meta.issues) + assertEquals(emptyList(), ChartValidator.validateMeta(meta.value!!)) + + val chart = ChartParser.parseDifficulty(blocks[1]) + assertEquals(emptyList(), chart.issues) + assertEquals(emptyList(), ChartValidator.validateChart(chart.value!!)) + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt index 6b45a68..155aff7 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt @@ -58,6 +58,22 @@ class TimingMapTest { assertEquals(2250.0, map.beatToMs(Beat(4, 0, 1)), tolerance) } + @Test + fun lookupsFindTheRightSegmentInALongList() { + val changes = List(1001) { bpm(it, 120.0) } + val map = TimingMap(0.0, changes) + for (whole in listOf(0, 1, 2, 499, 500, 501, 999, 1000, 1001, 5000)) { + assertEquals(whole * 500.0, map.beatToMs(Beat(whole, 0, 1)), tolerance) + assertEquals(whole * 500.0 + 250.0, map.beatToMs(Beat(whole, 1, 2)), tolerance) + } + } + + @Test + fun beatsBeforeZeroContinueTheFirstTempo() { + val map = TimingMap(1000.0, listOf(bpm(0, 120.0), bpm(4, 60.0))) + assertEquals(500.0, map.beatToMs(-1.0), tolerance) + } + @Test fun doubleBeatMatchesExactBeat() { val map = TimingMap(120.0, listOf(bpm(0, 174.0), bpm(64, 87.0))) @@ -71,5 +87,8 @@ class TimingMapTest { assertFailsWith { TimingMap(0.0, listOf(bpm(0, 0.0))) } assertFailsWith { TimingMap(0.0, listOf(bpm(0, 120.0), bpm(0, 90.0))) } assertFailsWith { TimingMap(0.0, listOf(BpmChange(Beat(0, 0, 0), 120.0))) } + assertFailsWith { TimingMap(0.0, listOf(bpm(0, 1e-320))) } + assertFailsWith { TimingMap(0.0, listOf(bpm(0, Double.POSITIVE_INFINITY))) } + assertFailsWith { TimingMap(Double.NaN, listOf(bpm(0, 120.0))) } } } diff --git a/docs/CHART_FORMAT.md b/docs/CHART_FORMAT.md index 6a5efa6..c2f522c 100644 --- a/docs/CHART_FORMAT.md +++ b/docs/CHART_FORMAT.md @@ -73,7 +73,7 @@ Difficulties are `BASIC`, `ADVANCED`, `EXPERT` and `MASTER`. `ease` is `linear`, `in`, `out` or `inOut`. It shapes the segment leaving that point, so the last point's `ease` is ignored (but still required). -Optional fields are left out when unused, not set to `null`. Unknown fields are ignored with a warning, so a chart with extra fields still loads. JSON nested more than 32 levels deep is rejected. +Optional fields are left out when unused, not set to `null`. Unknown fields are ignored with a warning, so a chart with extra fields still loads. JSON nested more than 32 levels deep is rejected, and numbers must follow JSON's grammar (`0.5f` and `01` are rejected). A byte-order mark at the start of a file is ignored. Hold and slide tick rates are not part of the chart. They're fixed in `JudgementConfig` (see [JUDGEMENT.md](JUDGEMENT.md)). @@ -85,13 +85,13 @@ Errors: - `formatVersion` is known. `laneCount` is 4 in format v1. `level` is 1 or more. - Every beat time is a valid fraction (see Time and position). -- BPM is above 0. The first BPM entry is at beat 0. BPM entries rise strictly in time. +- `offsetMs` is finite. BPM is above 0 and finite, and small enough values that a beat's length overflows are rejected. The first BPM entry is at beat 0. BPM entries rise strictly in time. - The first meter entry is at beat 0. Meter entries rise strictly in time. `num` and `den` are above 0. - `lane` is from 0 up to `laneCount`. A hold's `end` is after its `t`. - Holds in the same lane don't overlap. A tap doesn't sit inside a hold in its lane. A hold covers its start up to, but not including, its end: a hold may start exactly where another ends, and a tap may sit exactly on a hold's end, but a tap on a hold's head is an error. - No two taps or hold heads share the same time and lane, since one press resolves at most one note. (Two holds sharing a head are reported as an overlap.) - Slide points rise strictly in time, with at least 2 points. All x and y values are in \[0, 1\]. -- `size` and `radius` are above 0. `dir` is from 0 up to (not including) 360. +- `size` and `radius` are finite and above 0. `dir` is from 0 up to (not including) 360. - The last note ends before the audio does. The package is under 30 MiB. - `meta.json` follows the rules in its section above, and every chart's `difficulty` is listed in it. diff --git a/docs/DESIGN.md b/docs/DESIGN.md index f57186a..f19bace 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -154,9 +154,9 @@ Ten milestones, each ending in a gate you check yourself. The first playable bui Gameplay runs along the top row and content and release along the bottom row. Online work starts after the core engine and joins at release. -1. **M0 Foundations.** Repo, CI, `CLAUDE.md`, subagents, `docs/JUDGEMENT.md`, `docs/CHART_FORMAT.md`, three hand-written example charts. +1. **M0 Foundations.** Repo, CI, `CLAUDE.md`, subagents, `docs/JUDGEMENT.md`, `docs/CHART_FORMAT.md`. - Gate: you've read and approved both specs. -2. **M1 Core engine** (`core-engineer`). Chart model, parser and validator; timing map; judge for all six note types; scoring; replay format; `tools` CLI (lint, re-judge). +2. **M1 Core engine** (`core-engineer`). Chart model, parser and validator; three hand-written example charts; timing map; judge for all five note types; scoring; replay format; `tools` CLI (lint, re-judge). - Gate: every rule in the judgement spec has a test; golden replays pass. 3. **M2 Ground prototype** (`fabric-client`). Title button and menu; session gating; stage world loading; player lock; audio clock; ground tap and hold rendering; key input; combo and judgement HUD; results screen; offset calibration; debug overlay. - Gate: playtest. Timing feels tight, nothing drifts over a 3-minute song, and vanilla worlds are untouched. diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index fa24c7b..cf77a46 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -19,6 +19,7 @@ The Gradle wrapper downloads the right Gradle version, and Loom downloads Minecr | `server/` | The online server (from Milestone 7). | | `tools/` | Command-line tools: chart lint, replay re-judge. | | `docs/` | Design, specs and developer docs (upper-case file names). | +| `docs/examples/` | Hand-written example charts in the writer's layout, used as test fixtures. | | `CHANGELOG.md` | Player-facing change log, see [RELEASING.md](RELEASING.md). | ## Commands diff --git a/docs/examples/advanced.json b/docs/examples/advanced.json new file mode 100644 index 0000000..5e945b4 --- /dev/null +++ b/docs/examples/advanced.json @@ -0,0 +1,34 @@ +{ + "formatVersion": 1, + "difficulty": "ADVANCED", + "level": 6, + "laneCount": 4, + "offsetMs": 80, + "bpm": [ + { "t": [0,0,1], "bpm": 150 } + ], + "meter": [ + { "t": [0,0,1], "num": 4, "den": 4 } + ], + "notes": [ + { "type": "tap", "t": [4,0,1], "lane": 0 }, + { "type": "tap", "t": [4,1,2], "lane": 1 }, + { "type": "tap", "t": [5,0,1], "lane": 2 }, + { "type": "tap", "t": [5,1,2], "lane": 3 }, + { "type": "skyTap", "t": [6,0,1], "x": 0.25, "y": 0.6, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [7,0,1], "x": 0.75, "y": 0.6, "button": "R", "size": 1 }, + { "type": "hold", "t": [8,0,1], "end": [10,0,1], "lane": 0 }, + { "type": "tap", "t": [8,1,2], "lane": 2 }, + { "type": "tap", "t": [9,0,1], "lane": 3 }, + { "type": "tap", "t": [9,1,2], "lane": 2 }, + { "type": "slide", "button": "L", "radius": 0.08, "points": [ + { "t": [10,0,1], "x": 0.2, "y": 0.5, "ease": "linear" }, + { "t": [12,0,1], "x": 0.8, "y": 0.5, "ease": "linear" } + ] }, + { "type": "tap", "t": [12,0,1], "lane": 1 }, + { "type": "tap", "t": [12,0,1], "lane": 2 }, + { "type": "skyTap", "t": [13,0,1], "x": 0.5, "y": 0.75, "button": "R", "size": 1.2 }, + { "type": "tap", "t": [14,0,1], "lane": 0 }, + { "type": "tap", "t": [14,0,1], "lane": 3 } + ] +} diff --git a/docs/examples/basic.json b/docs/examples/basic.json new file mode 100644 index 0000000..8f8c9d0 --- /dev/null +++ b/docs/examples/basic.json @@ -0,0 +1,30 @@ +{ + "formatVersion": 1, + "difficulty": "BASIC", + "level": 2, + "laneCount": 4, + "offsetMs": 0, + "bpm": [ + { "t": [0,0,1], "bpm": 120 } + ], + "meter": [ + { "t": [0,0,1], "num": 4, "den": 4 } + ], + "notes": [ + { "type": "tap", "t": [4,0,1], "lane": 0 }, + { "type": "tap", "t": [5,0,1], "lane": 1 }, + { "type": "tap", "t": [6,0,1], "lane": 2 }, + { "type": "tap", "t": [7,0,1], "lane": 3 }, + { "type": "hold", "t": [8,0,1], "end": [10,0,1], "lane": 1 }, + { "type": "tap", "t": [11,0,1], "lane": 2 }, + { "type": "tap", "t": [12,0,1], "lane": 3 }, + { "type": "tap", "t": [13,0,1], "lane": 2 }, + { "type": "tap", "t": [14,0,1], "lane": 1 }, + { "type": "tap", "t": [15,0,1], "lane": 0 }, + { "type": "hold", "t": [16,0,1], "end": [18,0,1], "lane": 3 }, + { "type": "tap", "t": [17,0,1], "lane": 0 }, + { "type": "tap", "t": [18,0,1], "lane": 3 }, + { "type": "tap", "t": [20,0,1], "lane": 0 }, + { "type": "tap", "t": [20,0,1], "lane": 3 } + ] +} diff --git a/docs/examples/expert.json b/docs/examples/expert.json new file mode 100644 index 0000000..fd6ca8d --- /dev/null +++ b/docs/examples/expert.json @@ -0,0 +1,49 @@ +{ + "formatVersion": 1, + "difficulty": "EXPERT", + "level": 11, + "laneCount": 4, + "offsetMs": 120, + "bpm": [ + { "t": [0,0,1], "bpm": 174 }, + { "t": [16,0,1], "bpm": 87 } + ], + "meter": [ + { "t": [0,0,1], "num": 4, "den": 4 }, + { "t": [16,0,1], "num": 3, "den": 4 } + ], + "notes": [ + { "type": "tap", "t": [4,0,1], "lane": 0 }, + { "type": "tap", "t": [4,1,4], "lane": 1 }, + { "type": "tap", "t": [4,1,2], "lane": 2 }, + { "type": "tap", "t": [4,3,4], "lane": 3 }, + { "type": "hold", "t": [5,0,1], "end": [7,0,1], "lane": 2 }, + { "type": "skyTap", "t": [5,1,2], "x": 0.25, "y": 0.6, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [6,0,1], "x": 0.75, "y": 0.6, "button": "R", "size": 1 }, + { "type": "tap", "t": [6,1,3], "lane": 0 }, + { "type": "tap", "t": [6,2,3], "lane": 1 }, + { "type": "slide", "button": "L", "radius": 0.06, "points": [ + { "t": [7,0,1], "x": 0.2, "y": 0.5, "ease": "in" }, + { "t": [8,0,1], "x": 0.5, "y": 0.8, "ease": "out" }, + { "t": [9,0,1], "x": 0.8, "y": 0.5, "ease": "inOut" } + ] }, + { "type": "tap", "t": [8,0,1], "lane": 0 }, + { "type": "tap", "t": [8,1,2], "lane": 3 }, + { "type": "flick", "t": [9,1,2], "x": 0.5, "y": 0.4, "dir": 90, "size": 1 }, + { "type": "flick", "t": [10,0,1], "x": 0.3, "y": 0.7, "size": 1 }, + { "type": "hold", "t": [10,1,2], "end": [12,0,1], "lane": 1 }, + { "type": "tap", "t": [11,0,1], "lane": 3 }, + { "type": "tap", "t": [11,1,4], "lane": 2 }, + { "type": "tap", "t": [11,1,2], "lane": 3 }, + { "type": "tap", "t": [12,0,1], "lane": 1 }, + { "type": "tap", "t": [12,0,1], "lane": 2 }, + { "type": "skyTap", "t": [12,0,1], "x": 0.5, "y": 0.5, "button": "L", "size": 1 }, + { "type": "tap", "t": [16,0,1], "lane": 0 }, + { "type": "tap", "t": [17,0,1], "lane": 1 }, + { "type": "tap", "t": [18,0,1], "lane": 2 }, + { "type": "hold", "t": [19,0,1], "end": [21,0,1], "lane": 3 }, + { "type": "flick", "t": [20,0,1], "x": 0.7, "y": 0.3, "dir": 225, "size": 1.5 }, + { "type": "tap", "t": [22,0,1], "lane": 0 }, + { "type": "tap", "t": [22,0,1], "lane": 3 } + ] +} From 4d40d946cd96ba199486d9d7072cd8fe93dc3a63 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Tue, 3 Nov 2026 13:26:48 +0800 Subject: [PATCH 05/34] Fix: Stop oversized chart files running out of memory and define how note size and radius set the hit area --- CHANGELOG.md | 7 + .../trilleo/hexium/core/chart/ChartIssue.kt | 6 + .../trilleo/hexium/core/chart/ChartParser.kt | 52 ++++++-- .../hexium/core/chart/ChartValidator.kt | 12 +- .../core/chart/ChartPackageValidatorTest.kt | 6 + .../hexium/core/chart/ChartParserTest.kt | 120 ++++++++++++++++++ docs/ARCHITECTURE.md | 2 +- docs/CHART_FORMAT.md | 4 +- docs/JUDGEMENT.md | 4 +- gradle.properties | 1 + mod/src/main/resources/fabric.mod.json | 2 +- 11 files changed, 199 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef34f90..751d648 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,3 +23,10 @@ + Fixed chart files loading with numbers that aren't valid JSON, like `0.5f` or `01`. + Fixed charts passing validation with a BPM so small that note times broke. + Fixed chart files saved with a byte-order mark failing to load. ++ Fixed very large or badly broken chart files running out of memory. + + Chart files are limited to 2 MiB, and reading one lists at most 100 problems. ++ Fixed whole-number fields accepting forms like `1e0`. + +#### Misc + ++ Hexium now requires Fabric Language Kotlin 1.14.2 or newer, instead of failing at the first chart load on older versions. diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt index 58ceedd..182fff5 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt @@ -10,6 +10,8 @@ enum class IssueCode { UNKNOWN_FIELD, UNKNOWN_VALUE, UNKNOWN_FORMAT_VERSION, + FILE_TOO_LARGE, + TOO_MANY_PROBLEMS, BAD_LANE_COUNT, BAD_LEVEL, @@ -55,3 +57,7 @@ data class ChartIssue( ) { override fun toString(): String = "$severity $path: $message" } + +/** Cuts file text repeated in an issue, so a hostile file can't make huge messages. */ +internal fun shortened(text: String): String = + if (text.length <= ChartLimits.MAX_ISSUE_TEXT_CHARS) text else text.take(ChartLimits.MAX_ISSUE_TEXT_CHARS) + "…" diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartParser.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartParser.kt index a15e69e..eb3ad4d 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartParser.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartParser.kt @@ -27,6 +27,14 @@ object ChartParser { private fun parse(fileText: String, read: FileReader.(JsonObject) -> T?): ParseResult { val reader = FileReader() + if (fileText.length > ChartLimits.MAX_JSON_FILE_CHARS) { + reader.error( + IssueCode.FILE_TOO_LARGE, + ROOT, + "is ${fileText.length} characters long, the limit is ${ChartLimits.MAX_JSON_FILE_CHARS}", + ) + return ParseResult(null, reader.issues) + } val text = fileText.removePrefix(BYTE_ORDER_MARK) if (nestsTooDeeply(text)) { reader.error(IssueCode.INVALID_JSON, ROOT, "is not valid JSON: nested more than $MAX_NESTING levels deep") @@ -35,7 +43,7 @@ object ChartParser { val root = try { Json.parseToJsonElement(text) } catch (e: SerializationException) { - reader.error(IssueCode.INVALID_JSON, ROOT, "is not valid JSON: ${e.message?.lineSequence()?.first()}") + reader.error(IssueCode.INVALID_JSON, ROOT, "is not valid JSON: ${shortened(e.message?.lineSequence()?.first().orEmpty())}") return ParseResult(null, reader.issues) } if (root !is JsonObject) { @@ -78,6 +86,9 @@ private const val BYTE_ORDER_MARK = "\uFEFF" /** The JSON library and Kotlin's number parsing both accept more than JSON allows, like `0.5f` and `01`. */ private val JSON_NUMBER = Regex("-?(0|[1-9][0-9]*)(\\.[0-9]+)?([eE][+-]?[0-9]+)?") +/** Whole-number fields are digits only: `1e0` and `1.0` are valid JSON but not how a lane is written. */ +private val JSON_WHOLE_NUMBER = Regex("-?(0|[1-9][0-9]*)") + /** Far more than a chart needs (6 levels), with room for unknown fields. */ private const val MAX_NESTING = 32 @@ -104,10 +115,28 @@ private class FileReader { val issues = ArrayList() var hasError = false private set + private var isCut = false fun error(code: IssueCode, path: String, message: String) { hasError = true - issues += ChartIssue(Severity.ERROR, code, path, message) + add(ChartIssue(Severity.ERROR, code, path, message)) + } + + /** Past the cap, one final issue stands in for the rest. It's an error if any of the rest is. */ + private fun add(issue: ChartIssue) { + if (issues.size < ChartLimits.MAX_PARSE_ISSUES) { + issues += issue + } else if (!isCut) { + isCut = true + issues += ChartIssue( + issue.severity, + IssueCode.TOO_MANY_PROBLEMS, + ROOT, + "has too many problems, only the first ${ChartLimits.MAX_PARSE_ISSUES} are listed", + ) + } else if (issue.severity == Severity.ERROR) { + issues[issues.lastIndex] = issues.last().copy(severity = Severity.ERROR) + } } fun readFormatVersion(root: JsonObject): Boolean { @@ -201,7 +230,7 @@ private class FileReader { error( IssueCode.UNKNOWN_VALUE, join(path, "type"), - "is \"$type\", must be one of tap, hold, skyTap, slide, flick", + "is \"${shortened(type)}\", must be one of tap, hold, skyTap, slide, flick", ) null } @@ -270,11 +299,13 @@ private class FileReader { private fun warnUnknownFields(obj: JsonObject, path: String, known: Set) { for (key in obj.keys) { if (key !in known) { - issues += ChartIssue( - Severity.WARNING, - IssueCode.UNKNOWN_FIELD, - join(path, key), - "is not a known field and was ignored", + add( + ChartIssue( + Severity.WARNING, + IssueCode.UNKNOWN_FIELD, + join(path, shortened(key)), + "is not a known field and was ignored", + ), ) } } @@ -327,7 +358,8 @@ private class FileReader { } private fun intOf(element: JsonElement): Int? { - return numberOf(element)?.intOrNull + val number = numberOf(element) ?: return null + return if (JSON_WHOLE_NUMBER.matches(number.content)) number.intOrNull else null } private fun double(obj: JsonObject, key: String, path: String): Double? { @@ -369,7 +401,7 @@ private class FileReader { for ((name, value) in names) { if (name == text) return value } - error(IssueCode.UNKNOWN_VALUE, path, "is \"$text\", must be one of ${names.joinToString { it.first }}") + error(IssueCode.UNKNOWN_VALUE, path, "is \"${shortened(text)}\", must be one of ${names.joinToString { it.first }}") return null } diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt index e8d49dd..d3eb7ef 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt @@ -7,6 +7,16 @@ import net.trilleo.hexium.core.HexiumCore object ChartLimits { /** A package must be smaller than this. */ const val MAX_PACKAGE_BYTES: Long = 30L * 1024 * 1024 + + /** A chart or meta file may be this long, counted in characters. */ + const val MAX_JSON_FILE_CHARS: Int = 2 * 1024 * 1024 + + /** The parser stops listing problems after this many. */ + const val MAX_PARSE_ISSUES: Int = 100 + + /** File text repeated in an issue is cut to this length. */ + const val MAX_ISSUE_TEXT_CHARS: Int = 80 + const val LANE_COUNT: Int = 4 const val MAX_ID_LENGTH: Int = 64 @@ -40,7 +50,7 @@ object ChartValidator { issues += error( IssueCode.BAD_ID, "id", - "is \"${meta.id}\", must be 1 to ${ChartLimits.MAX_ID_LENGTH} characters from a-z, 0-9 and -", + "is \"${shortened(meta.id)}\", must be 1 to ${ChartLimits.MAX_ID_LENGTH} characters from a-z, 0-9 and -", ) } if (meta.title.isBlank()) issues += error(IssueCode.BLANK_TEXT, "title", "must not be blank") diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartPackageValidatorTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartPackageValidatorTest.kt index 1d15dae..e0502e3 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartPackageValidatorTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartPackageValidatorTest.kt @@ -65,6 +65,12 @@ class ChartPackageValidatorTest { } } + @Test + fun longBadIdsAreShortenedInTheMessage() { + val issue = ChartValidator.validateMeta(meta.copy(id = "X".repeat(10_000))).single() + assertTrue(issue.message.length < ChartLimits.MAX_ISSUE_TEXT_CHARS * 2, issue.message.length.toString()) + } + @Test fun blankTextFails() { assertMetaError(meta.copy(title = ""), IssueCode.BLANK_TEXT, "title") diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartParserTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartParserTest.kt index 39cb694..98afdea 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartParserTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartParserTest.kt @@ -219,6 +219,126 @@ class ChartParserTest { } } + @Test + fun wholeNumbersAreDigitsOnly() { + for (bad in listOf("1e0", "1E0", "1.0")) { + assertSingleError( + ChartParser.parseDifficulty(chartWithNote("""{ "type": "tap", "t": [1,0,1], "lane": $bad }""")), + IssueCode.WRONG_TYPE, + "notes[0].lane", + ) + assertSingleError( + ChartParser.parseDifficulty(chartWithNote("""{ "type": "tap", "t": [$bad,0,1], "lane": 0 }""")), + IssueCode.WRONG_TYPE, + "notes[0].t", + ) + } + assertSingleError(ChartParser.parseDifficulty("""{ "formatVersion": 1e0 }"""), IssueCode.WRONG_TYPE, "formatVersion") + assertEquals( + Note.Tap(Beat(1, 0, 1), -1), + ChartParser.parseDifficulty(chartWithNote("""{ "type": "tap", "t": [1,0,1], "lane": -1 }""")).value?.notes?.single(), + ) + } + + @Test + fun theLastRepeatedKeyWins() { + val note = ChartParser.parseDifficulty(chartWithNote("""{ "type": "tap", "t": [1,0,1], "lane": 0, "lane": 3 }""")) + assertEquals(emptyList(), note.issues) + assertEquals(Note.Tap(Beat(1, 0, 1), 3), note.value?.notes?.single()) + } + + @Test + fun filesOverTheSizeLimitAreRejectedBeforeReading() { + val limit = ChartLimits.MAX_JSON_FILE_CHARS + assertEquals(2 * 1024 * 1024, limit) + assertSingleError(ChartParser.parseDifficulty(" ".repeat(limit + 1)), IssueCode.FILE_TOO_LARGE, "$") + assertSingleError(ChartParser.parseMeta(" ".repeat(limit + 1)), IssueCode.FILE_TOO_LARGE, "$") + assertSingleError(ChartParser.parseDifficulty("[".repeat(limit + 1)), IssueCode.FILE_TOO_LARGE, "$") + } + + @Test + fun fileAtTheSizeLimitIsRead() { + val padded = specExample + " ".repeat(ChartLimits.MAX_JSON_FILE_CHARS - specExample.length) + assertEquals(emptyList(), ChartParser.parseDifficulty(padded).issues) + } + + @Test + fun theWorstFileUnderTheLimitStaysBounded() { + val start = """{ "formatVersion": 1, "difficulty": "BASIC", "level": 1, "laneCount": 4, "offsetMs": 0, "bpm": [], "meter": [], "notes": [""" + val end = "1] }" + val items = (ChartLimits.MAX_JSON_FILE_CHARS - start.length - end.length) / 2 + val result = ChartParser.parseDifficulty(start + "1,".repeat(items) + end) + assertNull(result.value) + assertEquals(ChartLimits.MAX_PARSE_ISSUES + 1, result.issues.size) + } + + @Test + fun theHeaviestNestingUnderTheLimitIsStillReported() { + val start = """{ "formatVersion": 1, "extra": [""" + val end = "1] }" + val item = "[".repeat(30) + "1" + "]".repeat(30) + "," + val items = (ChartLimits.MAX_JSON_FILE_CHARS - start.length - end.length) / item.length + val result = ChartParser.parseDifficulty(start + item.repeat(items) + end) + assertNull(result.value) + assertTrue(result.issues.any { it.code == IssueCode.MISSING_FIELD }) + } + + private fun notesText(count: Int, note: String) = chartWithNote(List(count) { note }.joinToString()) + + @Test + fun issuesStopAtTheCapWithAFinalIssue() { + val limit = ChartLimits.MAX_PARSE_ISSUES + assertEquals(100, limit) + + val atCap = ChartParser.parseDifficulty(notesText(limit, "1")) + assertEquals(limit, atCap.issues.size) + assertTrue(atCap.issues.none { it.code == IssueCode.TOO_MANY_PROBLEMS }) + + val over = ChartParser.parseDifficulty(notesText(limit + 50, "1")) + assertNull(over.value) + assertEquals(limit + 1, over.issues.size) + assertEquals(IssueCode.WRONG_TYPE, over.issues[limit - 1].code) + assertEquals(IssueCode.TOO_MANY_PROBLEMS, over.issues[limit].code) + assertEquals(Severity.ERROR, over.issues[limit].severity) + } + + @Test + fun tooManyWarningsStillLoadTheChart() { + val fields = List(ChartLimits.MAX_PARSE_ISSUES + 5) { """"extra$it": 0""" }.joinToString() + val result = ChartParser.parseDifficulty(chartWithNote("""{ "type": "tap", "t": [1,0,1], "lane": 0, $fields }""")) + assertNotNull(result.value) + assertEquals(ChartLimits.MAX_PARSE_ISSUES + 1, result.issues.size) + assertEquals(IssueCode.TOO_MANY_PROBLEMS, result.issues.last().code) + assertEquals(Severity.WARNING, result.issues.last().severity) + } + + @Test + fun anErrorPastTheCapStillFailsAndSaysSo() { + val fields = List(ChartLimits.MAX_PARSE_ISSUES + 5) { """"extra$it": 0""" }.joinToString() + val result = ChartParser.parseDifficulty(chartWithNote("""{ "type": "tap", "t": [1,0,1], "lane": 0, $fields }, 1""")) + assertNull(result.value) + assertEquals(ChartLimits.MAX_PARSE_ISSUES + 1, result.issues.size) + assertTrue(result.issues.any { it.severity == Severity.ERROR }) + assertEquals(Severity.ERROR, result.issues.last().severity) + } + + @Test + fun longTextInIssuesIsShortened() { + val long = "x".repeat(10_000) + val limit = ChartLimits.MAX_ISSUE_TEXT_CHARS + val type = ChartParser.parseDifficulty(chartWithNote("""{ "type": "$long" }""")).issues.single() + assertTrue(type.message.length < limit * 2, type.message.length.toString()) + + val difficulty = ChartParser.parseDifficulty(specExample.replace("EXPERT", long)).issues.single() + assertTrue(difficulty.message.length < limit * 2, difficulty.message.length.toString()) + + val field = ChartParser.parseDifficulty(specExample.replace(""""level": 11,""", """"level": 11, "$long": 0,""")).issues.single() + assertTrue(field.path.length < limit * 2, field.path.length.toString()) + + val broken = ChartParser.parseDifficulty("{ \"$long").issues.single() + assertTrue(broken.message.length < limit * 2, broken.message.length.toString()) + } + @Test fun rootMustBeAnObject() { assertSingleError(ChartParser.parseDifficulty("[]"), IssueCode.WRONG_TYPE, "$") diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 064aeac..a3e83d2 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -6,7 +6,7 @@ The music's playback position is the only clock. Minecraft's 20 TPS tick (50 ms) Minecraft 26.3 is unobfuscated, so no mappings are needed. The project uses Gradle 9.8.2, Fabric Loom 1.19, Fabric Loader 0.20.1, Fabric API 0.165.0+26.3, Kotlin 2.4.21, Fabric Language Kotlin 1.14.2 and kotlinx-serialization-json 1.11.0, on Java 25. `gradle.properties` and the Gradle wrapper are the source of truth for versions; update this line when they change. Hexium is written in Kotlin with Gradle Kotlin DSL build scripts. The mod depends on Fabric Language Kotlin, which players install alongside Fabric API. Mixins stay in Java: each one is a few lines that call into Kotlin. -`core` reads and writes chart JSON with kotlinx-serialization-json's tree API (`JsonElement`), without the compiler plugin or annotations on the model, so the parser can report every error in a file with its path. The mod doesn't bundle the library: Fabric Language Kotlin already ships it, so `kotlinx_serialization_version` in `gradle.properties` must stay on the version Fabric Language Kotlin bundles. +`core` reads and writes chart JSON with kotlinx-serialization-json's tree API (`JsonElement`), without the compiler plugin or annotations on the model, so the parser can report every error in a file with its path. The mod doesn't bundle the library: Fabric Language Kotlin already ships it, so `kotlinx_serialization_version` in `gradle.properties` must stay on the version Fabric Language Kotlin bundles. When bumping Fabric Language Kotlin, also raise its minimum version in `fabric.mod.json`. ## Gradle modules diff --git a/docs/CHART_FORMAT.md b/docs/CHART_FORMAT.md index c2f522c..3d99496 100644 --- a/docs/CHART_FORMAT.md +++ b/docs/CHART_FORMAT.md @@ -69,11 +69,11 @@ Difficulties are `BASIC`, `ADVANCED`, `EXPERT` and `MASTER`. `dir` on a flick is optional, in degrees (0 = right, 90 = up). Leave it out to accept any direction. Difficulties BASIC and ADVANCED use the easy tap windows. `level` is a whole number. -`button` is required on sky taps and slides, and is `L` or `R`. Every other field in the example is required. `size` and `radius` are in the same normalised units as `x` and `y`. +`button` is required on sky taps and slides, and is `L` or `R`. Every other field in the example is required. `size` is a multiplier on the base hit area in `JudgementConfig`, so 1 is normal. `radius` is a fraction of the screen's height, so a slide's hit area is a circle: on a 6-block-tall screen, a `radius` of 0.06 is 0.36 blocks in every direction. `ease` is `linear`, `in`, `out` or `inOut`. It shapes the segment leaving that point, so the last point's `ease` is ignored (but still required). -Optional fields are left out when unused, not set to `null`. Unknown fields are ignored with a warning, so a chart with extra fields still loads. JSON nested more than 32 levels deep is rejected, and numbers must follow JSON's grammar (`0.5f` and `01` are rejected). A byte-order mark at the start of a file is ignored. +Optional fields are left out when unused, not set to `null`. Unknown fields are ignored with a warning, so a chart with extra fields still loads. JSON nested more than 32 levels deep is rejected, and numbers in known fields must follow JSON's grammar (`0.5f` and `01` are rejected). Whole-number fields, including every part of a beat, are digits with an optional minus (`1e0` and `1.0` are rejected). If a key is repeated in an object, the last one wins. A `meta.json` or difficulty file may be at most 2 MiB, counted in characters. The parser lists at most 100 problems in a file, then one final issue saying there are more. The validator has no such cap, so the editor can mark every problem. A byte-order mark at the start of a file is ignored. Hold and slide tick rates are not part of the chart. They're fixed in `JudgementConfig` (see [JUDGEMENT.md](JUDGEMENT.md)). diff --git a/docs/JUDGEMENT.md b/docs/JUDGEMENT.md index f143e64..d48f847 100644 --- a/docs/JUDGEMENT.md +++ b/docs/JUDGEMENT.md @@ -13,9 +13,9 @@ Judgements use CHUNITHM's names and windows: Justice Critical, Justice, Attack, ## Rules per note -- **Tap and sky tap:** judged by |press time − target|. A sky tap also needs the crosshair inside the note's hit area at the moment of the click. A press with no note in its Miss window does nothing (no penalty). +- **Tap and sky tap:** judged by |press time − target|. A sky tap also needs the crosshair inside the note's hit area at the moment of the click. A note's hit area is a circle whose radius is the base hit radius in `JudgementConfig` times the note's `size`. Hit radii are fractions of the screen's height. A press with no note in its Miss window does nothing (no penalty). - **Ground hold:** the head is judged like a tap. The body has invisible ticks, one every 1/4 beat (fixed in `JudgementConfig`, not set per chart, at least one per hold). Each tick is judged on how long ago the key was last held. Releasing and pressing again inside the window keeps Justice Critical, like CHUNITHM. There's no tail judgement, and holding past the end is never penalised. -- **Sky slide:** no head or tail judgement. Ticks every 1/4 beat along the path (the same fixed rate as holds). A tick is "held" while the required button is down AND the crosshair is inside the path's hit radius at the path's current position. Tick windows as above. +- **Sky slide:** no head or tail judgement. Ticks every 1/4 beat along the path (the same fixed rate as holds). A tick is "held" while the required button is down AND the crosshair is inside the path's hit radius (its `radius`, a fraction of the screen's height) at the path's current position. Tick windows as above. - **Flick:** hit when the crosshair passes through the note's hit area between two frames, moving faster than a minimum speed (screen units per second), in the optional required direction. The judgement is the crossing time against the target. - A missed head doesn't auto-fail the hold's ticks. Each tick stands on its own. diff --git a/gradle.properties b/gradle.properties index d9c5eed..358778f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,4 +21,5 @@ fabric_api_version=0.165.0+26.3 kotlin_version=2.4.21 fabric_kotlin_version=1.14.2+kotlin.2.4.21 # Must stay on the version Fabric Language Kotlin bundles: the mod doesn't ship its own. +# When bumping fabric_kotlin_version, also raise its minimum in fabric.mod.json. kotlinx_serialization_version=1.11.0 diff --git a/mod/src/main/resources/fabric.mod.json b/mod/src/main/resources/fabric.mod.json index 03abf44..28d073d 100644 --- a/mod/src/main/resources/fabric.mod.json +++ b/mod/src/main/resources/fabric.mod.json @@ -33,6 +33,6 @@ "minecraft": "~26.3", "java": ">=25", "fabric-api": "*", - "fabric-language-kotlin": "*" + "fabric-language-kotlin": ">=1.14.2" } } From 9e5ac70cec168326537802c63b1a65f95164962a Mon Sep 17 00:00:00 2001 From: Trilleo Date: Tue, 3 Nov 2026 19:23:52 +0800 Subject: [PATCH 06/34] Feature: Judge ground taps and holds with CHUNITHM's windows and add scoring, combo and clear lamps --- CHANGELOG.md | 7 + .../trilleo/hexium/core/chart/ChartIssue.kt | 1 + .../hexium/core/chart/ChartValidator.kt | 21 +- .../net/trilleo/hexium/core/judge/Judge.kt | 163 ++++++++ .../trilleo/hexium/core/judge/JudgeChart.kt | 115 ++++++ .../trilleo/hexium/core/judge/Judgement.kt | 5 + .../hexium/core/judge/JudgementConfig.kt | 38 ++ .../hexium/core/chart/ChartValidatorTest.kt | 19 + .../hexium/core/judge/JudgeAllocationTest.kt | 37 ++ .../hexium/core/judge/JudgeGroundTest.kt | 372 ++++++++++++++++++ .../hexium/core/judge/JudgeTestCharts.kt | 28 ++ .../trilleo/hexium/core/judge/ScoreTest.kt | 129 ++++++ docs/CHART_FORMAT.md | 3 +- docs/JUDGEMENT.md | 12 +- 14 files changed, 942 insertions(+), 8 deletions(-) create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgeChart.kt create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/judge/Judgement.kt create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgementConfig.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeAllocationTest.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeGroundTest.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeTestCharts.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/judge/ScoreTest.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index 751d648..83520e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,12 @@ + Warns when a moment is too dense to play with one hand on the keys. + Added basic, advanced and expert example charts for charters to learn the format from. +#### Gameplay + ++ Added judging for ground taps and holds, with CHUNITHM's windows. + + Hold ticks are judged on how long ago the key was last down. ++ Added scoring up to 1,010,000, combo and clear lamps (Full Combo, All Justice, All Justice Critical). + ### Fixes #### Charts @@ -26,6 +32,7 @@ + Fixed very large or badly broken chart files running out of memory. + Chart files are limited to 2 MiB, and reading one lists at most 100 problems. + Fixed whole-number fields accepting forms like `1e0`. ++ Fixed charts with a huge hold being able to run out of memory when their ticks are built. #### Misc diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt index 182fff5..04f892a 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt @@ -35,6 +35,7 @@ enum class IssueCode { RADIUS_NOT_POSITIVE, DIR_OUT_OF_RANGE, NOTE_AFTER_AUDIO, + TOO_MANY_JUDGED_OBJECTS, TOO_DENSE, BAD_ID, diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt index d3eb7ef..7b41d54 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt @@ -2,6 +2,8 @@ package net.trilleo.hexium.core.chart import java.math.BigInteger import net.trilleo.hexium.core.HexiumCore +import net.trilleo.hexium.core.judge.JudgeChart +import net.trilleo.hexium.core.judge.JudgementConfig /** The numbers behind the validator's rules (docs/CHART_FORMAT.md). */ object ChartLimits { @@ -17,6 +19,9 @@ object ChartLimits { /** File text repeated in an issue is cut to this length. */ const val MAX_ISSUE_TEXT_CHARS: Int = 80 + /** Keeps a huge hold from exhausting memory when its ticks are built. */ + const val MAX_JUDGED_OBJECTS: Int = 1_000_000 + const val LANE_COUNT: Int = 4 const val MAX_ID_LENGTH: Int = 64 @@ -145,6 +150,7 @@ private class ChartChecker(private val chart: DifficultyChart, private val audio private val starts = ArrayList() private var lastEnd: Beat? = null private var lastEndPath = "" + private var judgedObjects = 0L fun check(): List { checkHeader() @@ -155,6 +161,9 @@ private class ChartChecker(private val chart: DifficultyChart, private val audio for (i in chart.notes.indices) checkNote(chart.notes[i], "notes[$i]") for (lane in groundByLane.values) checkLaneOverlaps(lane) if (bpmIsUsable && offsetIsUsable) checkAudioEnd() + if (judgedObjects > ChartLimits.MAX_JUDGED_OBJECTS) { + report(IssueCode.TOO_MANY_JUDGED_OBJECTS, "notes", "has $judgedObjects judged objects, the limit is ${ChartLimits.MAX_JUDGED_OBJECTS}") + } checkDensity() return issues } @@ -245,6 +254,7 @@ private class ChartChecker(private val chart: DifficultyChart, private val audio if (!checkBeat(note.t, "$path.t")) return starts += NoteStart(note.t, false, path) noteEnd(note.t, path) + judgedObjects++ if (laneIsValid) groundNotes(note.lane) += GroundNote(note.t, null, path) } @@ -262,9 +272,10 @@ private class ChartChecker(private val chart: DifficultyChart, private val audio "$path.end", "is ${text(note.end)}, must be after the hold's start (${text(note.t)})", ) - } else if (laneIsValid) { - groundNotes(note.lane) += GroundNote(note.t, note.end, path) + return } + judgedObjects += 1 + ticks(note.t, note.end) + if (laneIsValid) groundNotes(note.lane) += GroundNote(note.t, note.end, path) } private fun checkSkyTap(note: Note.SkyTap, path: String) { @@ -273,6 +284,7 @@ private class ChartChecker(private val chart: DifficultyChart, private val audio if (!checkBeat(note.t, "$path.t")) return starts += NoteStart(note.t, true, path) noteEnd(note.t, path) + judgedObjects++ } private fun checkSlide(note: Note.Slide, path: String) { @@ -306,6 +318,8 @@ private class ChartChecker(private val chart: DifficultyChart, private val audio } if (allValid) { for (point in note.points) noteEnd(point.t, path) + val last = note.points.lastOrNull() + if (last != null && last.t > note.points[0].t) judgedObjects += ticks(note.points[0].t, last.t) } } @@ -319,8 +333,11 @@ private class ChartChecker(private val chart: DifficultyChart, private val audio if (!checkBeat(note.t, "$path.t")) return starts += NoteStart(note.t, true, path) noteEnd(note.t, path) + judgedObjects++ } + private fun ticks(start: Beat, end: Beat) = JudgeChart.tickCount(start, end, JudgementConfig.DEFAULT.ticksPerBeat) + private fun checkLane(lane: Int, path: String): Boolean { if (lane >= 0 && lane < chart.laneCount) return true report(IssueCode.LANE_OUT_OF_RANGE, "$path.lane", "is $lane, must be from 0 up to ${chart.laneCount}") diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt b/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt new file mode 100644 index 0000000..7734df3 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt @@ -0,0 +1,163 @@ +package net.trilleo.hexium.core.judge + +/** + * Judges one play of a chart from timestamped input, in song milliseconds. The mod calls this + * every frame and the server calls it with a replay, through the same code, so both get the + * same result. Nothing here allocates after construction. + * + * Results don't depend on how often [advanceTo] is called, only on the input. Time can't go + * backwards: an input older than the current time counts as happening now. + */ +class Judge(private val chart: JudgeChart) { + private val config = chart.config + private val weights = intArrayOf( + config.justiceCriticalWeightPercent, + config.justiceWeightPercent, + config.attackWeightPercent, + config.missWeightPercent, + ) + + private var now = Double.NEGATIVE_INFINITY + + private val nextPress = IntArray(chart.laneCount) + private val laneDown = BooleanArray(chart.laneCount) + private val laneLastDownMs = DoubleArray(chart.laneCount) { Double.NEGATIVE_INFINITY } + private var nextTick = 0 + + private val judgedObject = IntArray(chart.objectCount) + private val judgedResult = Array(chart.objectCount) { Judgement.MISS } + private val judgedDelta = DoubleArray(chart.objectCount) + private val counts = IntArray(weights.size) + private var weightSum = 0L + + val objectCount: Int + get() = chart.objectCount + + /** How many objects have been judged. Results stay in this order, so a reader can keep its own position. */ + var judgedCount = 0 + private set + var combo = 0 + private set + var maxCombo = 0 + private set + + val score: Int + get() { + if (chart.objectCount == 0) return 0 + return (config.perfectScoreBase * weightSum / (100L * chart.objectCount)).toInt() + } + + /** [ClearLamp.NONE] until every object is judged. */ + val clearLamp: ClearLamp + get() { + if (chart.objectCount == 0 || judgedCount < chart.objectCount) return ClearLamp.NONE + if (count(Judgement.MISS) > 0) return ClearLamp.NONE + if (count(Judgement.ATTACK) > 0) return ClearLamp.FULL_COMBO + if (count(Judgement.JUSTICE) > 0) return ClearLamp.ALL_JUSTICE + return ClearLamp.ALL_JUSTICE_CRITICAL + } + + fun count(judgement: Judgement): Int = counts[judgement.ordinal] + + fun judgement(index: Int): Judgement = judgedResult[index] + + /** The judged object's index in the chart's notes. */ + fun judgedNote(index: Int): Int = chart.objectNote[judgedObject[index]] + + /** Input time minus target time. Negative is early. NaN if there was no input to measure. */ + fun judgedDeltaMs(index: Int): Double = judgedDelta[index] + + /** Judges everything due before [timeMs]. */ + fun advanceTo(timeMs: Double) { + if (timeMs > now) now = timeMs + settleBefore(now) + } + + /** Judges everything left, once the song is over. */ + fun finish() { + settleBefore(Double.POSITIVE_INFINITY) + } + + fun pressLane(lane: Int, timeMs: Double) { + if (lane < 0 || lane >= chart.laneCount || laneDown[lane]) return + advanceTo(timeMs) + laneDown[lane] = true + laneLastDownMs[lane] = now + val next = nextPress[lane] + val targets = chart.pressMs[lane] + if (next >= targets.size) return + val delta = now - targets[next] + if (delta < -config.earlyMissMs) return + nextPress[lane] = next + 1 + record(chart.pressObject[lane][next], pressJudgement(delta), delta) + } + + fun releaseLane(lane: Int, timeMs: Double) { + if (lane < 0 || lane >= chart.laneCount || !laneDown[lane]) return + advanceTo(timeMs) + laneDown[lane] = false + laneLastDownMs[lane] = now + } + + /** Judges unpressed notes and ticks due before [limit], earliest first. At equal times, notes go before ticks. */ + private fun settleBefore(limit: Double) { + while (true) { + var lane = -1 + var dueMs = limit + for (i in nextPress.indices) { + if (nextPress[i] < chart.pressMs[i].size) { + val deadline = chart.pressMs[i][nextPress[i]] + chart.attackWindowMs + if (deadline < dueMs) { + dueMs = deadline + lane = i + } + } + } + val tickIsDue = nextTick < chart.tickMs.size && chart.tickMs[nextTick] < dueMs + if (tickIsDue) { + judgeTick() + } else if (lane >= 0) { + record(chart.pressObject[lane][nextPress[lane]], Judgement.MISS, Double.NaN) + nextPress[lane]++ + } else { + return + } + } + } + + private fun judgeTick() { + val tick = nextTick++ + val lane = chart.tickLane[tick] + val tickMs = chart.tickMs[tick] + val age = if (laneDown[lane]) 0.0 else tickMs - laneLastDownMs[lane] + record(chart.tickObject[tick], tickJudgement(age), -age) + } + + private fun pressJudgement(delta: Double): Judgement { + val distance = if (delta < 0.0) -delta else delta + return when { + distance <= config.justiceCriticalMs -> Judgement.JUSTICE_CRITICAL + distance <= config.justiceMs -> Judgement.JUSTICE + distance <= chart.attackWindowMs -> Judgement.ATTACK + else -> Judgement.MISS + } + } + + private fun tickJudgement(age: Double): Judgement = when { + age <= config.tickJusticeCriticalMs -> Judgement.JUSTICE_CRITICAL + age <= config.tickJusticeMs -> Judgement.JUSTICE + age <= config.tickAttackMs -> Judgement.ATTACK + else -> Judgement.MISS + } + + private fun record(obj: Int, judgement: Judgement, deltaMs: Double) { + val index = judgedCount++ + judgedObject[index] = obj + judgedResult[index] = judgement + judgedDelta[index] = deltaMs + counts[judgement.ordinal]++ + weightSum += weights[judgement.ordinal] + combo = if (judgement == Judgement.MISS) 0 else combo + 1 + if (combo > maxCombo) maxCombo = combo + } +} diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgeChart.kt b/core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgeChart.kt new file mode 100644 index 0000000..cb61a76 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgeChart.kt @@ -0,0 +1,115 @@ +package net.trilleo.hexium.core.judge + +import java.math.BigInteger +import net.trilleo.hexium.core.chart.Beat +import net.trilleo.hexium.core.chart.ChartLimits +import net.trilleo.hexium.core.chart.Difficulty +import net.trilleo.hexium.core.chart.DifficultyChart +import net.trilleo.hexium.core.chart.Note +import net.trilleo.hexium.core.chart.TimingMap + +/** + * A chart turned into the flat arrays the judge walks, built once when a chart loads so that + * playing it doesn't allocate. Every judged object (tap, hold head, tick) has an id. + * + * Expects a chart that passed the validator. Only ground notes are judged so far. + */ +class JudgeChart private constructor( + val config: JudgementConfig, + internal val attackWindowMs: Double, + val objectCount: Int, + internal val objectNote: IntArray, + internal val pressObject: Array, + internal val pressMs: Array, + internal val tickObject: IntArray, + internal val tickMs: DoubleArray, + internal val tickLane: IntArray, +) { + val laneCount: Int + get() = pressMs.size + + private class Press(val ms: Double, val note: Int, val lane: Int) + + private class Tick(val ms: Double, val note: Int, val lane: Int) + + companion object { + fun compile(chart: DifficultyChart, config: JudgementConfig = JudgementConfig.DEFAULT): JudgeChart { + val timing = TimingMap(chart.offsetMs, chart.bpm) + val presses = ArrayList() + val ticks = ArrayList() + for (i in chart.notes.indices) { + when (val note = chart.notes[i]) { + is Note.Tap -> presses += Press(timing.beatToMs(note.t), i, note.lane) + is Note.Hold -> { + presses += Press(timing.beatToMs(note.t), i, note.lane) + val count = tickCount(note.t, note.end, config.ticksPerBeat) + require(presses.size + ticks.size + count <= ChartLimits.MAX_JUDGED_OBJECTS) { "Too many judged objects" } + for (k in 0 until count.toInt()) { + ticks += Tick(timing.beatToMs(tickBeat(note.t, note.end, k, count, config.ticksPerBeat)), i, note.lane) + } + } + is Note.SkyTap, is Note.Slide, is Note.Flick -> {} + } + } + presses.sortWith(compareBy { it.ms }) + ticks.sortWith(compareBy { it.ms }) + + val objectCount = presses.size + ticks.size + val objectNote = IntArray(objectCount) + var nextObject = 0 + val pressObject = Array(chart.laneCount) { lane -> IntArray(presses.count { it.lane == lane }) } + val pressMs = Array(chart.laneCount) { DoubleArray(pressObject[it].size) } + val filled = IntArray(chart.laneCount) + for (press in presses) { + val slot = filled[press.lane]++ + pressObject[press.lane][slot] = nextObject + pressMs[press.lane][slot] = press.ms + objectNote[nextObject++] = press.note + } + val tickObject = IntArray(ticks.size) + val tickMs = DoubleArray(ticks.size) + val tickLane = IntArray(ticks.size) + for (i in ticks.indices) { + tickObject[i] = nextObject + tickMs[i] = ticks[i].ms + tickLane[i] = ticks[i].lane + objectNote[nextObject++] = ticks[i].note + } + val isEasy = chart.difficulty == Difficulty.BASIC || chart.difficulty == Difficulty.ADVANCED + return JudgeChart( + config, + if (isEasy) config.easyAttackMs else config.attackMs, + objectCount, + objectNote, + pressObject, + pressMs, + tickObject, + tickMs, + tickLane, + ) + } + + /** + * How many ticks a hold or slide from [start] to [end] has: one every 1/[ticksPerBeat] beat, + * excluding both ends, or one at the end if none fit. Exact, since a tick that lands on the + * end must be left out however the fractions round. + */ + internal fun tickCount(start: Beat, end: Beat, ticksPerBeat: Int): Long { + val startDen = BigInteger.valueOf(start.den.toLong()) + val endDen = BigInteger.valueOf(end.den.toLong()) + val bothDens = startDen * endDen + val length = BigInteger.valueOf(end.whole.toLong() - start.whole.toLong()) * bothDens + + BigInteger.valueOf(end.num.toLong()) * startDen - + BigInteger.valueOf(start.num.toLong()) * endDen + val steps = length * BigInteger.valueOf(ticksPerBeat.toLong()) + val division = steps.divideAndRemainder(bothDens) + val between = if (division[1].signum() == 0) division[0] - BigInteger.ONE else division[0] + return maxOf(1L, between.toLong()) + } + + private fun tickBeat(start: Beat, end: Beat, index: Int, count: Long, ticksPerBeat: Int): Double { + if (count == 1L && start.toDouble() + 1.0 / ticksPerBeat >= end.toDouble()) return end.toDouble() + return start.toDouble() + (index + 1).toDouble() / ticksPerBeat + } + } +} diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judgement.kt b/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judgement.kt new file mode 100644 index 0000000..8c788f8 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judgement.kt @@ -0,0 +1,5 @@ +package net.trilleo.hexium.core.judge + +enum class Judgement { JUSTICE_CRITICAL, JUSTICE, ATTACK, MISS } + +enum class ClearLamp { NONE, FULL_COMBO, ALL_JUSTICE, ALL_JUSTICE_CRITICAL } diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgementConfig.kt b/core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgementConfig.kt new file mode 100644 index 0000000..de11190 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgementConfig.kt @@ -0,0 +1,38 @@ +package net.trilleo.hexium.core.judge + +/** The windows, weights and sizes the judge and score use (docs/JUDGEMENT.md). Nothing else may hold these numbers. */ +data class JudgementConfig( + val justiceCriticalMs: Double = 33.33, + val justiceMs: Double = 66.67, + val attackMs: Double = 83.33, + /** The Attack window for BASIC and ADVANCED. */ + val easyAttackMs: Double = 100.0, + /** A press this early, but outside the Attack window, uses up the note as a Miss. */ + val earlyMissMs: Double = 150.0, + + val tickJusticeCriticalMs: Double = 50.0, + val tickJusticeMs: Double = 100.0, + val tickAttackMs: Double = 150.0, + val ticksPerBeat: Int = 4, + + val flickJusticeCriticalMs: Double = 83.33, + val flickJusticeMs: Double = 166.67, + /** In screen heights per second. */ + val flickMinSpeed: Double = 1.0, + val flickDirectionToleranceDegrees: Double = 45.0, + + /** A note's hit radius at `size` 1, as a fraction of the screen's height. */ + val baseHitRadius: Double = 0.08, + /** The screen's width divided by its height. */ + val screenAspect: Double = 2.0, + + val perfectScoreBase: Long = 1_000_000, + val justiceCriticalWeightPercent: Int = 101, + val justiceWeightPercent: Int = 100, + val attackWeightPercent: Int = 50, + val missWeightPercent: Int = 0, +) { + companion object { + val DEFAULT = JudgementConfig() + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt index afeb0fd..59cac5f 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt @@ -447,6 +447,25 @@ class ChartValidatorTest { assertOnlyError(broken, IssueCode.BPM_NOT_POSITIVE, "bpm[0].bpm", audioDurationMs = 1.0) } + // The judged-object limit. A hold has its head plus a tick every 1/4 beat between its start and end. + + @Test + fun chartAtTheJudgedObjectLimitPasses() { + assertEquals(1_000_000, ChartLimits.MAX_JUDGED_OBJECTS) + assertValid(withNotes(Note.Hold(b(0), b(250_000), 0))) + } + + @Test + fun chartOverTheJudgedObjectLimitFails() { + assertOnlyError(withNotes(Note.Hold(b(0), b(250_000, 1, 4), 0)), IssueCode.TOO_MANY_JUDGED_OBJECTS, "notes") + assertOnlyError(withNotes(Note.Hold(b(0), b(Int.MAX_VALUE), 0)), IssueCode.TOO_MANY_JUDGED_OBJECTS, "notes") + assertOnlyError( + withNotes(slide(point(b(0)), point(b(Int.MAX_VALUE)))), + IssueCode.TOO_MANY_JUDGED_OBJECTS, + "notes", + ) + } + // The density warning private fun fourLanes(t: Beat) = arrayOf(Note.Tap(t, 0), Note.Tap(t, 1), Note.Tap(t, 2), Note.Tap(t, 3)) diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeAllocationTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeAllocationTest.kt new file mode 100644 index 0000000..0be2883 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeAllocationTest.kt @@ -0,0 +1,37 @@ +package net.trilleo.hexium.core.judge + +import java.lang.management.ManagementFactory +import kotlin.test.Test +import kotlin.test.assertTrue +import net.trilleo.hexium.core.chart.Note + +/** The judge runs every frame in the mod, so playing a chart must not allocate. */ +class JudgeAllocationTest { + private val threads = ManagementFactory.getThreadMXBean() as com.sun.management.ThreadMXBean + + @Test + fun playingAChartDoesNotAllocate() { + val notes = Array(40_000) { + if (it % 2 == 0) Note.Tap(beat(it + 1), it % 4) else Note.Hold(beat(it + 1), beat(it + 1, 1, 2), it % 4) + } + val chart = JudgeChart.compile(chartOf(*notes)) + + val judge = Judge(chart) + val thread = Thread.currentThread().threadId() + val before = threads.getThreadAllocatedBytes(thread) + var i = 0 + while (i < notes.size) { + val time = (i + 1) * 1000.0 + judge.advanceTo(time) + judge.pressLane(i % 4, time) + judge.advanceTo(time + 10.0) + judge.releaseLane(i % 4, time + 600.0) + judge.advanceTo(time + 700.0) + i++ + } + judge.finish() + val allocated = threads.getThreadAllocatedBytes(thread) - before + assertTrue(allocated < 64 * 1024, "allocated $allocated bytes over ${notes.size} notes") + assertTrue(judge.judgedCount == judge.objectCount) + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeGroundTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeGroundTest.kt new file mode 100644 index 0000000..8692b60 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeGroundTest.kt @@ -0,0 +1,372 @@ +package net.trilleo.hexium.core.judge + +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertTrue +import net.trilleo.hexium.core.chart.BpmChange +import net.trilleo.hexium.core.chart.Difficulty +import net.trilleo.hexium.core.chart.Note + +class JudgeGroundTest { + /** A note at time 0, so window limits are exact in floating point. */ + private fun tapAt(pressMs: Double, difficulty: Difficulty = Difficulty.EXPERT): List { + val judge = judgeOf(Note.Tap(beat(0), 0), difficulty = difficulty) + judge.pressLane(0, pressMs) + judge.finish() + return judge.judgements() + } + + private val jc = listOf(Judgement.JUSTICE_CRITICAL) + private val justice = listOf(Judgement.JUSTICE) + private val attack = listOf(Judgement.ATTACK) + private val miss = listOf(Judgement.MISS) + + @Test + fun tapWindowsAreInclusiveOnBothSides() { + assertEquals(jc, tapAt(0.0)) + assertEquals(jc, tapAt(20.0)) + assertEquals(jc, tapAt(33.33)) + assertEquals(jc, tapAt(-33.33)) + assertEquals(justice, tapAt(33.34)) + assertEquals(justice, tapAt(-33.34)) + assertEquals(justice, tapAt(66.67)) + assertEquals(justice, tapAt(-66.67)) + assertEquals(attack, tapAt(66.68)) + assertEquals(attack, tapAt(-66.68)) + assertEquals(attack, tapAt(83.33)) + assertEquals(attack, tapAt(-83.33)) + } + + @Test + fun lateBeyondAttackIsAMissAndThePressDoesNothing() { + val judge = judgeOf(Note.Tap(beat(0), 0)) + judge.pressLane(0, 83.34) + assertEquals(miss, judge.judgements()) + judge.finish() + assertEquals(1, judge.judgedCount) + } + + @Test + fun earlyBeyondAttackUsesUpTheNoteAsAMissUpTo150Ms() { + assertEquals(miss, tapAt(-83.34)) + assertEquals(miss, tapAt(-150.0)) + val judge = judgeOf(Note.Tap(beat(0), 0)) + judge.pressLane(0, -100.0) + assertEquals(miss, judge.judgements()) + judge.releaseLane(0, -90.0) + judge.pressLane(0, 0.0) + assertEquals(1, judge.judgedCount, "the note is already used up") + } + + @Test + fun pressEarlierThan150MsDoesNothing() { + val judge = judgeOf(Note.Tap(beat(0), 0)) + judge.pressLane(0, -150.01) + assertEquals(0, judge.judgedCount) + judge.releaseLane(0, -100.0) + judge.pressLane(0, 10.0) + assertEquals(jc, judge.judgements()) + } + + @Test + fun basicAndAdvancedUseTheEasyAttackWindow() { + for (difficulty in listOf(Difficulty.BASIC, Difficulty.ADVANCED)) { + assertEquals(attack, tapAt(100.0, difficulty)) + assertEquals(attack, tapAt(-100.0, difficulty)) + assertEquals(miss, tapAt(100.01, difficulty)) + assertEquals(miss, tapAt(-100.01, difficulty)) + assertEquals(jc, tapAt(33.33, difficulty)) + assertEquals(justice, tapAt(66.67, difficulty)) + } + } + + @Test + fun expertAndMasterUseTheNormalAttackWindow() { + for (difficulty in listOf(Difficulty.EXPERT, Difficulty.MASTER)) { + assertEquals(attack, tapAt(83.33, difficulty)) + assertEquals(miss, tapAt(83.34, difficulty)) + } + } + + @Test + fun unpressedNoteMissesOnceItsWindowHasPassed() { + val judge = judgeOf(Note.Tap(beat(0), 0)) + judge.advanceTo(83.33) + assertEquals(0, judge.judgedCount) + judge.advanceTo(83.34) + assertEquals(miss, judge.judgements()) + } + + @Test + fun pressWithNoNoteNearbyDoesNothing() { + val judge = judgeOf(Note.Tap(beat(5), 0)) + judge.pressLane(0, 1000.0) + assertEquals(0, judge.judgedCount) + assertEquals(1, judgeOf(Note.Tap(beat(5), 0)).objectCount) + } + + @Test + fun otherLanesDoNotHitTheNote() { + val judge = judgeOf(Note.Tap(beat(1), 2)) + judge.pressLane(1, 1000.0) + assertEquals(0, judge.judgedCount) + judge.pressLane(2, 1000.0) + assertEquals(jc, judge.judgements()) + } + + @Test + fun lanesOutsideTheChartAreIgnored() { + val judge = judgeOf(Note.Tap(beat(1), 0)) + judge.pressLane(-1, 1000.0) + judge.pressLane(4, 1000.0) + judge.releaseLane(9, 1000.0) + assertEquals(0, judge.judgedCount) + } + + @Test + fun onePressResolvesOnlyTheEarliestNote() { + val judge = judgeOf(Note.Tap(beat(1), 0), Note.Tap(beat(1, 1, 10), 0)) + judge.pressLane(0, 1050.0) + assertEquals(justice, judge.judgements()) + judge.releaseLane(0, 1060.0) + judge.pressLane(0, 1100.0) + assertEquals(justice + jc, judge.judgements()) + } + + @Test + fun notesAreResolvedWhateverTheFileOrder() { + val judge = judgeOf(Note.Tap(beat(2), 0), Note.Tap(beat(1), 0)) + judge.pressLane(0, 1000.0) + judge.releaseLane(0, 1010.0) + judge.pressLane(0, 2000.0) + assertEquals(jc + jc, judge.judgements()) + assertEquals(1, judge.judgedNote(0)) + assertEquals(0, judge.judgedNote(1)) + } + + @Test + fun keyAlreadyDownDoesNotPressAgain() { + val judge = judgeOf(Note.Tap(beat(1), 0)) + judge.pressLane(0, 500.0) + judge.pressLane(0, 1000.0) + assertEquals(0, judge.judgedCount) + } + + @Test + fun missedNoteBeforeAPressGoesFirst() { + val judge = judgeOf(Note.Tap(beat(1), 0), Note.Tap(beat(2), 1)) + judge.pressLane(1, 2000.0) + assertEquals(miss + jc, judge.judgements()) + } + + @Test + fun recordsThePressOffset() { + val judge = judgeOf(Note.Tap(beat(1), 0)) + judge.pressLane(0, 980.0) + assertEquals(-20.0, judge.judgedDeltaMs(0), 1e-9) + val missed = judgeOf(Note.Tap(beat(1), 0)) + missed.finish() + assertTrue(missed.judgedDeltaMs(0).isNaN()) + } + + // Holds. Beat 1 is 1000 ms, so ticks every 1/4 beat are 250 ms apart. + + @Test + fun holdHeadIsJudgedLikeATap() { + val judge = judgeOf(Note.Hold(beat(1), beat(2), 0)) + judge.pressLane(0, 1040.0) + assertEquals(justice, judge.judgements()) + } + + @Test + fun ticksFallEveryQuarterBeatExcludingStartAndEnd() { + val chart = JudgeChart.compile(chartOf(Note.Hold(beat(1), beat(2), 0))) + assertEquals(4, chart.objectCount, "head plus ticks at 1250, 1500 and 1750") + val judge = Judge(chart) + judge.pressLane(0, 1000.0) + judge.advanceTo(1250.0) + assertEquals(1, judge.judgedCount) + judge.advanceTo(1250.01) + assertEquals(2, judge.judgedCount) + judge.advanceTo(1750.01) + assertEquals(4, judge.judgedCount) + judge.finish() + assertEquals(4, judge.judgedCount, "no tail") + assertEquals(jc + jc + jc + jc, judge.judgements()) + } + + @Test + fun tickOnAnExactFractionOfTheEndIsLeftOut() { + val chart = JudgeChart.compile(chartOf(Note.Hold(beat(0, 1, 3), beat(0, 5, 6), 0))) + assertEquals(2, chart.objectCount, "1/3 + 1/2 beat long: head plus one tick, none on the end") + val longer = JudgeChart.compile(chartOf(Note.Hold(beat(0, 1, 3), beat(0, 6, 7), 0))) + assertEquals(3, longer.objectCount) + } + + @Test + fun holdTooShortForATickGetsOneAtItsEnd() { + val chart = JudgeChart.compile(chartOf(Note.Hold(beat(1), beat(1, 1, 8), 0))) + assertEquals(2, chart.objectCount) + val judge = Judge(chart) + judge.pressLane(0, 1000.0) + judge.advanceTo(1125.0) + assertEquals(1, judge.judgedCount) + judge.advanceTo(1125.01) + assertEquals(2, judge.judgedCount) + val exact = JudgeChart.compile(chartOf(Note.Hold(beat(1), beat(1, 1, 4), 0))) + assertEquals(2, exact.objectCount, "exactly 1/4 beat long also has no tick between") + } + + @Test + fun ticksFollowBpmChanges() { + val chart = chartOf(Note.Hold(beat(0), beat(2), 0)) + val compiled = JudgeChart.compile(chart.copy(bpm = chart.bpm + BpmChange(beat(1), 120.0))) + val judge = Judge(compiled) + judge.pressLane(0, 0.0) + judge.advanceTo(1125.0) + assertEquals(1 + 3 + 1, judge.judgedCount, "ticks at 250, 500, 750 and 1000 ms") + judge.advanceTo(1125.01) + assertEquals(6, judge.judgedCount) + } + + private fun tickFor(age: Double): Judgement { + val judge = judgeOf(Note.Hold(beat(0), beat(0, 1, 8), 0)) + judge.pressLane(0, 0.0) + judge.releaseLane(0, 125.0 - age) + judge.finish() + assertEquals(2, judge.judgedCount) + return judge.judgement(1) + } + + @Test + fun tickWindowsAreOnHowLongAgoTheKeyWasDown() { + assertEquals(Judgement.JUSTICE_CRITICAL, tickFor(0.0)) + assertEquals(Judgement.JUSTICE_CRITICAL, tickFor(50.0)) + assertEquals(Judgement.JUSTICE, tickFor(50.5)) + assertEquals(Judgement.JUSTICE, tickFor(100.0)) + assertEquals(Judgement.ATTACK, tickFor(100.5)) + assertEquals(Judgement.ATTACK, tickFor(120.0)) + } + + @Test + fun tickWindowsEndAt150Ms() { + val attackJudge = judgeOf(Note.Hold(beat(1), beat(1, 1, 8), 0)) + attackJudge.pressLane(0, 975.0) + attackJudge.releaseLane(0, 975.0) + attackJudge.finish() + assertEquals(Judgement.ATTACK, attackJudge.judgement(1), "released exactly 150 ms before the tick") + + val missJudge = judgeOf(Note.Hold(beat(1), beat(1, 1, 8), 0)) + missJudge.pressLane(0, 974.5) + missJudge.releaseLane(0, 974.5) + missJudge.finish() + assertEquals(Judgement.MISS, missJudge.judgement(1)) + } + + @Test + fun tickWithTheKeyDownIsJusticeCritical() { + val judge = judgeOf(Note.Hold(beat(0), beat(1), 0)) + judge.pressLane(0, 0.0) + judge.finish() + assertEquals(List(4) { Judgement.JUSTICE_CRITICAL }, judge.judgements()) + } + + @Test + fun releasingAndPressingAgainInsideTheWindowKeepsJusticeCritical() { + val judge = judgeOf(Note.Hold(beat(0), beat(1), 0)) + judge.pressLane(0, 0.0) + judge.releaseLane(0, 230.0) + judge.pressLane(0, 260.0) + judge.finish() + assertEquals(List(4) { Judgement.JUSTICE_CRITICAL }, judge.judgements()) + } + + @Test + fun pressAfterATickDoesNotHelpIt() { + val judge = judgeOf(Note.Hold(beat(0), beat(1), 0)) + judge.pressLane(0, -1000.0) + judge.releaseLane(0, -1000.0) + judge.pressLane(0, 251.0) + judge.finish() + assertEquals( + listOf(Judgement.MISS, Judgement.JUSTICE_CRITICAL, Judgement.JUSTICE_CRITICAL), + judge.judgements().drop(1), + ) + } + + @Test + fun missedHeadDoesNotFailTheTicks() { + val judge = judgeOf(Note.Hold(beat(1), beat(2), 0)) + judge.pressLane(0, 1200.0) + judge.finish() + assertEquals(listOf(Judgement.MISS) + List(3) { Judgement.JUSTICE_CRITICAL }, judge.judgements()) + } + + @Test + fun neverPressedHoldMissesEverything() { + val judge = judgeOf(Note.Hold(beat(1), beat(2), 0)) + judge.finish() + assertEquals(List(4) { Judgement.MISS }, judge.judgements()) + } + + @Test + fun keyDownBeforeTheHoldCountsForItsTicks() { + val judge = judgeOf(Note.Hold(beat(1), beat(2), 0)) + judge.pressLane(0, 500.0) + judge.finish() + assertEquals(listOf(Judgement.MISS) + List(3) { Judgement.JUSTICE_CRITICAL }, judge.judgements()) + } + + @Test + fun holdingPastTheEndIsNeverPenalised() { + val judge = judgeOf(Note.Hold(beat(0), beat(1), 0)) + judge.pressLane(0, 0.0) + judge.advanceTo(100_000.0) + judge.finish() + assertEquals(List(4) { Judgement.JUSTICE_CRITICAL }, judge.judgements()) + } + + @Test + fun skippingAStepDoesNotChangeTheOrderOrResult() { + val notes = arrayOf( + Note.Hold(beat(1), beat(2), 0), + Note.Tap(beat(1, 1, 2), 1), + Note.Tap(beat(1, 3, 4), 2), + Note.Hold(beat(2), beat(3), 3), + ) + fun play(step: Double): List> { + val judge = judgeOf(*notes) + var time = 0.0 + fun advance(to: Double) { + while (time + step < to) { + time += step + judge.advanceTo(time) + } + time = to + judge.advanceTo(to) + } + advance(1000.0) + judge.pressLane(0, 1000.0) + advance(1750.0) + judge.pressLane(2, 1750.0) + advance(1900.0) + judge.releaseLane(0, 1900.0) + advance(2600.0) + judge.pressLane(3, 2600.0) + judge.finish() + return List(judge.judgedCount) { judge.judgedNote(it) to judge.judgement(it) } + } + val baseline = play(1000.0) + assertEquals(baseline, play(4.0)) + assertEquals(baseline, play(16.67)) + assertEquals(chartOf(*notes).let { JudgeChart.compile(it).objectCount }, baseline.size) + } + + @Test + fun inputTimesCannotGoBackwards() { + val judge = judgeOf(Note.Tap(beat(1), 0)) + judge.advanceTo(1020.0) + judge.pressLane(0, 1000.0) + assertEquals(20.0, judge.judgedDeltaMs(0), 1e-9) + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeTestCharts.kt b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeTestCharts.kt new file mode 100644 index 0000000..6002cbf --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeTestCharts.kt @@ -0,0 +1,28 @@ +package net.trilleo.hexium.core.judge + +import net.trilleo.hexium.core.chart.Beat +import net.trilleo.hexium.core.chart.BpmChange +import net.trilleo.hexium.core.chart.Difficulty +import net.trilleo.hexium.core.chart.DifficultyChart +import net.trilleo.hexium.core.chart.MeterChange +import net.trilleo.hexium.core.chart.Note + +internal fun beat(whole: Int, num: Int = 0, den: Int = 1) = Beat(whole, num, den) + +/** At 60 BPM with no offset, beat N is N seconds, which keeps expected times readable. */ +internal fun chartOf(vararg notes: Note, difficulty: Difficulty = Difficulty.EXPERT, bpm: Double = 60.0) = DifficultyChart( + formatVersion = 1, + difficulty = difficulty, + level = 1, + laneCount = 4, + offsetMs = 0.0, + bpm = listOf(BpmChange(beat(0), bpm)), + meter = listOf(MeterChange(beat(0), 4, 4)), + notes = notes.toList(), +) + +internal fun judgeOf(vararg notes: Note, difficulty: Difficulty = Difficulty.EXPERT) = + Judge(JudgeChart.compile(chartOf(*notes, difficulty = difficulty))) + +/** What was judged, in order. */ +internal fun Judge.judgements(): List = List(judgedCount) { judgement(it) } diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/judge/ScoreTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/judge/ScoreTest.kt new file mode 100644 index 0000000..c71b5b2 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/judge/ScoreTest.kt @@ -0,0 +1,129 @@ +package net.trilleo.hexium.core.judge + +import kotlin.test.Test +import kotlin.test.assertEquals +import net.trilleo.hexium.core.chart.Note + +class ScoreTest { + private fun play(presses: List): Judge { + val notes = Array(presses.size) { Note.Tap(beat(it + 1), 0) } + val judge = judgeOf(*notes) + for (i in presses.indices) { + val offset = presses[i] ?: continue + val time = (i + 1) * 1000.0 + offset + judge.pressLane(0, time) + judge.releaseLane(0, time + 1.0) + } + judge.finish() + return judge + } + + private val jc = 0.0 + private val justice = 50.0 + private val attack = 70.0 + + @Test + fun perfectPlayScores1010000() { + val judge = play(listOf(jc, jc, jc)) + assertEquals(1_010_000, judge.score) + assertEquals(ClearLamp.ALL_JUSTICE_CRITICAL, judge.clearLamp) + } + + @Test + fun weightsAre101And100And50And0() { + assertEquals(1_010_000, play(listOf(jc)).score) + assertEquals(1_000_000, play(listOf(justice)).score) + assertEquals(500_000, play(listOf(attack)).score) + assertEquals(0, play(listOf(null)).score) + } + + @Test + fun scoreIsRoundedDown() { + assertEquals(333_333, play(listOf(justice, null, null)).score) + assertEquals(673_333, play(listOf(jc, jc, null)).score) + } + + @Test + fun everyObjectCountsTowardsTheTotal() { + val judge = judgeOf(Note.Hold(beat(1), beat(2), 0), Note.Tap(beat(3), 1)) + assertEquals(5, judge.objectCount) + judge.pressLane(0, 1000.0) + judge.finish() + assertEquals(4 * 1_010_000 / 5, judge.score, "head and three ticks out of five") + } + + @Test + fun scoreBuildsUpDuringPlay() { + val judge = judgeOf(Note.Tap(beat(1), 0), Note.Tap(beat(2), 0)) + judge.pressLane(0, 1000.0) + assertEquals(505_000, judge.score) + } + + @Test + fun comboGrowsWithEveryObjectAndAMissBreaksIt() { + val judge = judgeOf(Note.Tap(beat(1), 0), Note.Tap(beat(2), 0), Note.Tap(beat(3), 0), Note.Tap(beat(4), 0)) + judge.pressLane(0, 1000.0) + judge.releaseLane(0, 1001.0) + judge.pressLane(0, 2070.0) + judge.releaseLane(0, 2071.0) + assertEquals(2, judge.combo) + judge.advanceTo(3100.0) + assertEquals(0, judge.combo) + judge.pressLane(0, 4000.0) + assertEquals(1, judge.combo) + assertEquals(2, judge.maxCombo) + } + + @Test + fun ticksAddToCombo() { + val judge = judgeOf(Note.Hold(beat(1), beat(2), 0)) + judge.pressLane(0, 1000.0) + judge.finish() + assertEquals(4, judge.combo) + assertEquals(4, judge.maxCombo) + } + + @Test + fun countsEachJudgement() { + val judge = play(listOf(jc, jc, justice, attack, null)) + assertEquals(2, judge.count(Judgement.JUSTICE_CRITICAL)) + assertEquals(1, judge.count(Judgement.JUSTICE)) + assertEquals(1, judge.count(Judgement.ATTACK)) + assertEquals(1, judge.count(Judgement.MISS)) + } + + @Test + fun lampsFollowTheWorstJudgement() { + assertEquals(ClearLamp.ALL_JUSTICE_CRITICAL, play(listOf(jc, jc)).clearLamp) + assertEquals(ClearLamp.ALL_JUSTICE, play(listOf(jc, justice)).clearLamp) + assertEquals(ClearLamp.FULL_COMBO, play(listOf(jc, attack)).clearLamp) + assertEquals(ClearLamp.NONE, play(listOf(jc, null)).clearLamp) + } + + @Test + fun noLampBeforeTheEnd() { + val judge = judgeOf(Note.Tap(beat(1), 0), Note.Tap(beat(2), 0)) + judge.pressLane(0, 1000.0) + assertEquals(ClearLamp.NONE, judge.clearLamp) + } + + @Test + fun chartWithNoObjectsScoresZeroWithNoLamp() { + val judge = judgeOf() + judge.finish() + assertEquals(0, judge.score) + assertEquals(ClearLamp.NONE, judge.clearLamp) + } + + @Test + fun largeChartsDoNotOverflow() { + val judge = judgeOf(*Array(200_000) { Note.Tap(beat(it + 1), it % 4) }) + for (i in 0 until 200_000) { + val time = (i + 1) * 1000.0 + judge.pressLane(i % 4, time) + judge.releaseLane(i % 4, time + 1.0) + } + judge.finish() + assertEquals(1_010_000, judge.score) + } +} diff --git a/docs/CHART_FORMAT.md b/docs/CHART_FORMAT.md index 3d99496..4d6ffb0 100644 --- a/docs/CHART_FORMAT.md +++ b/docs/CHART_FORMAT.md @@ -71,7 +71,7 @@ Difficulties are `BASIC`, `ADVANCED`, `EXPERT` and `MASTER`. `button` is required on sky taps and slides, and is `L` or `R`. Every other field in the example is required. `size` is a multiplier on the base hit area in `JudgementConfig`, so 1 is normal. `radius` is a fraction of the screen's height, so a slide's hit area is a circle: on a 6-block-tall screen, a `radius` of 0.06 is 0.36 blocks in every direction. -`ease` is `linear`, `in`, `out` or `inOut`. It shapes the segment leaving that point, so the last point's `ease` is ignored (but still required). +`ease` is `linear`, `in`, `out` or `inOut`. It shapes the segment leaving that point, so the last point's `ease` is ignored (but still required). With `t` as the progress along the segment from 0 to 1, measured in beats so a BPM change doesn't bend the path, the position moves by `t` for `linear`, `t²` for `in`, `1 − (1 − t)²` for `out` and `3t² − 2t³` for `inOut`. Optional fields are left out when unused, not set to `null`. Unknown fields are ignored with a warning, so a chart with extra fields still loads. JSON nested more than 32 levels deep is rejected, and numbers in known fields must follow JSON's grammar (`0.5f` and `01` are rejected). Whole-number fields, including every part of a beat, are digits with an optional minus (`1e0` and `1.0` are rejected). If a key is repeated in an object, the last one wins. A `meta.json` or difficulty file may be at most 2 MiB, counted in characters. The parser lists at most 100 problems in a file, then one final issue saying there are more. The validator has no such cap, so the editor can mark every problem. A byte-order mark at the start of a file is ignored. @@ -93,6 +93,7 @@ Errors: - Slide points rise strictly in time, with at least 2 points. All x and y values are in \[0, 1\]. - `size` and `radius` are finite and above 0. `dir` is from 0 up to (not including) 360. - The last note ends before the audio does. The package is under 30 MiB. +- A chart has at most 1,000,000 judged objects (see [JUDGEMENT.md](JUDGEMENT.md)), so a huge hold can't exhaust memory when its ticks are built. - `meta.json` follows the rules in its section above, and every chart's `difficulty` is listed in it. Warning (not an error): diff --git a/docs/JUDGEMENT.md b/docs/JUDGEMENT.md index d48f847..407213f 100644 --- a/docs/JUDGEMENT.md +++ b/docs/JUDGEMENT.md @@ -11,17 +11,19 @@ Judgements use CHUNITHM's names and windows: Justice Critical, Justice, Attack, | Ground hold ticks, sky slide ticks (input before the tick) | −50 to 0 | −100 to −50 | −150 to −100 | earlier than −150 | | Sky flick (adapted from CHUNITHM's flick swipe phase) | ≤ 83.33 | ≤ 166.67 | — | beyond 166.67 | +Limits are inclusive. For taps, sky taps and hold heads, the Miss window runs from 150 ms early up to the start of the Attack window: a press there uses up the note as a Miss. A press earlier than 150 ms does nothing. A note nobody pressed becomes a Miss once its Attack window has passed. + ## Rules per note -- **Tap and sky tap:** judged by |press time − target|. A sky tap also needs the crosshair inside the note's hit area at the moment of the click. A note's hit area is a circle whose radius is the base hit radius in `JudgementConfig` times the note's `size`. Hit radii are fractions of the screen's height. A press with no note in its Miss window does nothing (no penalty). -- **Ground hold:** the head is judged like a tap. The body has invisible ticks, one every 1/4 beat (fixed in `JudgementConfig`, not set per chart, at least one per hold). Each tick is judged on how long ago the key was last held. Releasing and pressing again inside the window keeps Justice Critical, like CHUNITHM. There's no tail judgement, and holding past the end is never penalised. -- **Sky slide:** no head or tail judgement. Ticks every 1/4 beat along the path (the same fixed rate as holds). A tick is "held" while the required button is down AND the crosshair is inside the path's hit radius (its `radius`, a fraction of the screen's height) at the path's current position. Tick windows as above. -- **Flick:** hit when the crosshair passes through the note's hit area between two frames, moving faster than a minimum speed (screen units per second), in the optional required direction. The judgement is the crossing time against the target. +- **Tap and sky tap:** judged by |press time − target|. A sky tap also needs the crosshair inside the note's hit area at the moment of the click. A note's hit area is a circle whose radius is the base hit radius in `JudgementConfig` (0.08) times the note's `size`. Hit radii are fractions of the screen's height, and circles are measured using the screen's 2:1 aspect, also in `JudgementConfig`. A press with no note in its Miss window does nothing (no penalty). A sky tap click outside the hit area, or with the wrong button, is ignored by that note, so the player can click again in time. The crosshair position is recorded with the click. +- **Ground hold:** the head is judged like a tap. The body has invisible ticks, one every 1/4 beat (fixed in `JudgementConfig`, not set per chart, at least one per hold). Ticks are counted from the hold's start and exclude its start and end. A hold too short for any tick gets one at its end. Each tick is judged at its own time, on how long ago the lane key was last down, even if it was pressed before the hold began. A press after the tick doesn't help it. Releasing and pressing again inside the window keeps Justice Critical, like CHUNITHM. There's no tail judgement, and holding past the end is never penalised. +- **Sky slide:** no head or tail judgement. Ticks every 1/4 beat along the path (the same fixed rate and placement as holds, from the first point to the last). A tick is "held" while the required button is down AND the crosshair is inside the path's hit radius (its `radius`, a fraction of the screen's height) at the path's current position. Each tick is judged on how long ago the last aim sample that was "held" came, with the tick windows above. +- **Flick:** hit when the crosshair passes through the note's hit area between two frames, moving faster than a minimum speed (screen units per second), in the optional required direction. The judgement is the crossing time against the target: the moment the swipe first enters the hit area, worked out along the line between the two samples. A swipe that starts inside uses the time of that first sample. The minimum speed is 1 screen height per second and the direction tolerance is ±45°, both in `JudgementConfig`. One swipe can hit several flicks. - A missed head doesn't auto-fail the hold's ticks. Each tick stands on its own. ## Score -Every judged object (tap, hold head, each tick, each flick) counts as one note out of N. Its accuracy weight is Justice Critical 101%, Justice 100%, Attack 50%, Miss 0%. Score = 1,000,000 × Σweight ÷ N, rounded down, so a perfect play is 1,010,000. Every judged object also adds to combo, and a Miss breaks it. +Every judged object (tap, hold head, each tick, each flick) counts as one note out of N. Its accuracy weight is Justice Critical 101%, Justice 100%, Attack 50%, Miss 0%. Score = 1,000,000 × Σweight ÷ N, rounded down, so a perfect play is 1,010,000. A chart with no judged objects scores 0 and has no lamp. Every judged object also adds to combo, and a Miss breaks it. Clear lamps: Full Combo (no Miss), All Justice (nothing below Justice), All Justice Critical. There's no life gauge or fail state in v1. Whether to add one later is an open question. From f4c10d120d616f179fbebb2bc27d2d5c184594b8 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Tue, 3 Nov 2026 20:07:22 +0800 Subject: [PATCH 07/34] Feature: Judge sky taps, slides and flicks, with fast swipes still hitting at low frame rates --- CHANGELOG.md | 5 + .../net/trilleo/hexium/core/chart/Chart.kt | 9 + .../trilleo/hexium/core/chart/SlidePath.kt | 31 +++ .../trilleo/hexium/core/chart/TimingMap.kt | 11 + .../net/trilleo/hexium/core/judge/Judge.kt | 222 +++++++++++++++- .../trilleo/hexium/core/judge/JudgeChart.kt | 96 ++++++- .../hexium/core/chart/SlidePathTest.kt | 66 +++++ .../hexium/core/chart/TimingMapTest.kt | 8 + .../hexium/core/judge/JudgeAllocationTest.kt | 41 +++ .../hexium/core/judge/JudgeFlickTest.kt | 246 ++++++++++++++++++ .../hexium/core/judge/JudgeSkyTapTest.kt | 163 ++++++++++++ .../hexium/core/judge/JudgeSlideTest.kt | 226 ++++++++++++++++ docs/JUDGEMENT.md | 2 +- 13 files changed, 1112 insertions(+), 14 deletions(-) create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/chart/SlidePath.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/chart/SlidePathTest.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeFlickTest.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeSkyTapTest.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeSlideTest.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index 83520e0..f47e7ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,11 @@ + Hold ticks are judged on how long ago the key was last down. + Added scoring up to 1,010,000, combo and clear lamps (Full Combo, All Justice, All Justice Critical). +#### Sky Notes + ++ Added judging for sky taps, slides and flicks. + + A swipe that jumps over a flick between two frames still hits it, so low frame rates stay fair. + ### Fixes #### Charts diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt index 9257c61..c823a1a 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt @@ -16,6 +16,15 @@ enum class Ease(val id: String) { IN("in"), OUT("out"), IN_OUT("inOut"), + ; + + /** Where the position is at [t], the progress from 0 to 1 along the segment. */ + fun progress(t: Double): Double = when (this) { + LINEAR -> t + IN -> t * t + OUT -> 1.0 - (1.0 - t) * (1.0 - t) + IN_OUT -> t * t * (3.0 - 2.0 * t) + } } /** One `.json` file. */ diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/SlidePath.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/SlidePath.kt new file mode 100644 index 0000000..49b19b0 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/SlidePath.kt @@ -0,0 +1,31 @@ +package net.trilleo.hexium.core.chart + +/** + * Where a slide is at any beat, shared by the judge and the renderer. Lookups don't allocate. + * Before the first point and after the last, the position stays on that point. Expects points + * that passed the validator. + */ +class SlidePath(points: List) { + private val beats = DoubleArray(points.size) { points[it].t.toDouble() } + private val xs = DoubleArray(points.size) { points[it].x } + private val ys = DoubleArray(points.size) { points[it].y } + private val eases = Array(points.size) { points[it].ease } + + fun x(beat: Double): Double = position(xs, beat) + + fun y(beat: Double): Double = position(ys, beat) + + private fun position(values: DoubleArray, beat: Double): Double { + if (beat <= beats[0]) return values[0] + val last = beats.size - 1 + if (beat >= beats[last]) return values[last] + var low = 0 + var high = last - 1 + while (low < high) { + val middle = (low + high + 1) ushr 1 + if (beats[middle] <= beat) low = middle else high = middle - 1 + } + val t = (beat - beats[low]) / (beats[low + 1] - beats[low]) + return values[low] + (values[low + 1] - values[low]) * eases[low].progress(t) + } +} diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/TimingMap.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/TimingMap.kt index 5481dd2..5a84f72 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/TimingMap.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/TimingMap.kt @@ -44,6 +44,17 @@ class TimingMap(offsetMs: Double, bpm: List) { return startMs[low] + (beat - startBeat[low]) * msPerBeat[low] } + /** The inverse of [beatToMs]. */ + fun msToBeat(ms: Double): Double { + var low = 0 + var high = startMs.size - 1 + while (low < high) { + val middle = (low + high + 1) ushr 1 + if (startMs[middle] <= ms) low = middle else high = middle - 1 + } + return startBeat[low] + (ms - startMs[low]) / msPerBeat[low] + } + internal companion object { private const val MS_PER_MINUTE = 60000.0 diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt b/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt index 7734df3..58476a7 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt @@ -1,12 +1,18 @@ package net.trilleo.hexium.core.judge +import net.trilleo.hexium.core.chart.SkyButton + /** * Judges one play of a chart from timestamped input, in song milliseconds. The mod calls this * every frame and the server calls it with a replay, through the same code, so both get the * same result. Nothing here allocates after construction. * * Results don't depend on how often [advanceTo] is called, only on the input. Time can't go - * backwards: an input older than the current time counts as happening now. + * backwards: an input older than the current time counts as happening now, so feed each frame's + * input before advancing to the frame's time. + * + * Crosshair positions are normalised screen coordinates, as in chart files, and may lie off the + * screen. They're floats so a replay can store exactly what the judge saw. */ class Judge(private val chart: JudgeChart) { private val config = chart.config @@ -24,6 +30,24 @@ class Judge(private val chart: JudgeChart) { private val laneLastDownMs = DoubleArray(chart.laneCount) { Double.NEGATIVE_INFINITY } private var nextTick = 0 + private val skyNext = IntArray(SkyButton.entries.size) + private val skyJudged = Array(SkyButton.entries.size) { BooleanArray(chart.skyMs[it].size) } + private val buttonDown = BooleanArray(SkyButton.entries.size) + + private val slideLastHeldMs = DoubleArray(chart.slideCount) { Double.NEGATIVE_INFINITY } + private val activeSlides = IntArray(chart.slideCount) + private var activeSlideCount = 0 + private var nextSlide = 0 + + private var nextFlick = 0 + private val flickJudged = BooleanArray(chart.flickMs.size) + /** A flick can't be given up on until a sample has passed its deadline: a swipe may still be under way. */ + private var flickSeenUntilMs = Double.NEGATIVE_INFINITY + private var hasAim = false + private var aimMs = 0.0 + private var aimX = 0.0 + private var aimY = 0.0 + private val judgedObject = IntArray(chart.objectCount) private val judgedResult = Array(chart.objectCount) { Judgement.MISS } private val judgedDelta = DoubleArray(chart.objectCount) @@ -75,9 +99,157 @@ class Judge(private val chart: JudgeChart) { /** Judges everything left, once the song is over. */ fun finish() { + flickSeenUntilMs = Double.POSITIVE_INFINITY settleBefore(Double.POSITIVE_INFINITY) } + /** Records where the crosshair is. Call once per frame: slides and flicks are judged from these samples. */ + fun aimSample(timeMs: Double, x: Float, y: Float) { + if (timeMs > now) now = timeMs + flickSeenUntilMs = now + val sampleX = x.toDouble() + val sampleY = y.toDouble() + if (hasAim && now > aimMs) judgeFlicksAlong(sampleX, sampleY) + settleBefore(now) + updateSlides(sampleX, sampleY) + hasAim = true + aimMs = now + aimX = sampleX + aimY = sampleY + } + + fun pressButton(button: SkyButton, timeMs: Double, x: Float, y: Float) { + val b = button.ordinal + if (buttonDown[b]) return + advanceTo(timeMs) + buttonDown[b] = true + val clickX = x.toDouble() + val clickY = y.toDouble() + updateSlides(clickX, clickY) + + val targets = chart.skyMs[b] + val judged = skyJudged[b] + var i = skyNext[b] + while (i < targets.size && targets[i] - now <= config.earlyMissMs) { + if (!judged[i] && isInside(clickX, clickY, chart.skyX[b][i], chart.skyY[b][i], chart.skyRadius[b][i])) { + judged[i] = true + val delta = now - targets[i] + record(chart.skyObject[b][i], pressJudgement(delta), delta) + advanceSkyNext(b) + return + } + i++ + } + } + + fun releaseButton(button: SkyButton, timeMs: Double) { + val b = button.ordinal + if (!buttonDown[b]) return + advanceTo(timeMs) + buttonDown[b] = false + } + + private fun advanceSkyNext(button: Int) { + val judged = skyJudged[button] + var i = skyNext[button] + while (i < judged.size && judged[i]) i++ + skyNext[button] = i + } + + private fun isInside(x: Double, y: Double, centreX: Double, centreY: Double, radius: Double): Boolean { + val dx = (x - centreX) * config.screenAspect + val dy = y - centreY + return dx * dx + dy * dy <= radius * radius + } + + /** Brings each slide being played up to date with a crosshair position at the current time. */ + private fun updateSlides(x: Double, y: Double) { + while (nextSlide < chart.slideCount && chart.slideStartMs[nextSlide] - config.tickAttackMs <= now) { + activeSlides[activeSlideCount++] = nextSlide++ + } + if (activeSlideCount == 0) return + val beat = chart.timing.msToBeat(now) + var i = 0 + while (i < activeSlideCount) { + val slide = activeSlides[i] + if (now > chart.slideEndMs[slide]) { + activeSlides[i] = activeSlides[--activeSlideCount] + continue + } + if (buttonDown[chart.slideButton[slide]]) { + val path = chart.slidePath[slide] + if (isInside(x, y, path.x(beat), path.y(beat), chart.slideRadius[slide])) { + slideLastHeldMs[slide] = now + } + } + i++ + } + } + + /** Judges flicks crossed by the swipe from the last sample to this one, in the order they're crossed. */ + private fun judgeFlicksAlong(toX: Double, toY: Double) { + val dt = now - aimMs + val dx = (toX - aimX) * config.screenAspect + val dy = toY - aimY + val length = Math.sqrt(dx * dx + dy * dy) + if (length * 1000.0 / dt <= config.flickMinSpeed) return + val angle = Math.toDegrees(Math.atan2(dy, dx)) + while (true) { + var crossed = -1 + var crossedAtMs = Double.POSITIVE_INFINITY + var i = nextFlick + while (i < flickJudged.size && chart.flickMs[i] - config.flickJusticeMs <= now) { + if (!flickJudged[i] && directionFits(i, angle)) { + val atMs = crossingMs(i, dx, dy, dt) + if (atMs < crossedAtMs && Math.abs(atMs - chart.flickMs[i]) <= config.flickJusticeMs) { + crossed = i + crossedAtMs = atMs + } + } + i++ + } + if (crossed < 0) return + settleBefore(crossedAtMs) + if (!flickJudged[crossed]) judgeFlick(crossed, crossedAtMs) + } + } + + private fun directionFits(flick: Int, angle: Double): Boolean { + val dir = chart.flickDir[flick] + if (dir.isNaN()) return true + val difference = Math.abs(angle - dir) % 360.0 + val shortest = if (difference > 180.0) 360.0 - difference else difference + return shortest <= config.flickDirectionToleranceDegrees + } + + /** When the swipe first enters a flick's hit area, or infinity if it doesn't. */ + private fun crossingMs(flick: Int, dx: Double, dy: Double, dt: Double): Double { + val fromX = (aimX - chart.flickX[flick]) * config.screenAspect + val fromY = aimY - chart.flickY[flick] + val radius = chart.flickRadius[flick] + val c = fromX * fromX + fromY * fromY - radius * radius + if (c <= 0.0) return aimMs + val a = dx * dx + dy * dy + val b = fromX * dx + fromY * dy + val discriminant = b * b - a * c + if (b >= 0.0 || discriminant < 0.0) return Double.POSITIVE_INFINITY + val u = (-b - Math.sqrt(discriminant)) / a + return if (u <= 1.0) aimMs + u * dt else Double.POSITIVE_INFINITY + } + + private fun judgeFlick(flick: Int, atMs: Double) { + flickJudged[flick] = true + val delta = atMs - chart.flickMs[flick] + val distance = Math.abs(delta) + val judgement = if (distance <= config.flickJusticeCriticalMs) Judgement.JUSTICE_CRITICAL else Judgement.JUSTICE + record(chart.flickObject[flick], judgement, delta) + advanceNextFlick() + } + + private fun advanceNextFlick() { + while (nextFlick < flickJudged.size && flickJudged[nextFlick]) nextFlick++ + } + fun pressLane(lane: Int, timeMs: Double) { if (lane < 0 || lane >= chart.laneCount || laneDown[lane]) return advanceTo(timeMs) @@ -99,10 +271,15 @@ class Judge(private val chart: JudgeChart) { laneLastDownMs[lane] = now } - /** Judges unpressed notes and ticks due before [limit], earliest first. At equal times, notes go before ticks. */ + /** + * Judges notes nobody hit and ticks due before [limit], earliest first. At equal times, ground + * notes go before sky taps, sky taps before flicks, and all of them before ticks. + */ private fun settleBefore(limit: Double) { while (true) { var lane = -1 + var button = -1 + var flickIsDue = false var dueMs = limit for (i in nextPress.indices) { if (nextPress[i] < chart.pressMs[i].size) { @@ -113,12 +290,39 @@ class Judge(private val chart: JudgeChart) { } } } - val tickIsDue = nextTick < chart.tickMs.size && chart.tickMs[nextTick] < dueMs - if (tickIsDue) { + for (i in skyNext.indices) { + if (skyNext[i] < chart.skyMs[i].size) { + val deadline = chart.skyMs[i][skyNext[i]] + chart.attackWindowMs + if (deadline < dueMs) { + dueMs = deadline + lane = -1 + button = i + } + } + } + if (nextFlick < flickJudged.size) { + val deadline = chart.flickMs[nextFlick] + config.flickJusticeMs + if (deadline < dueMs && deadline < flickSeenUntilMs) { + dueMs = deadline + lane = -1 + button = -1 + flickIsDue = true + } + } + if (nextTick < chart.tickMs.size && chart.tickMs[nextTick] < dueMs) { judgeTick() } else if (lane >= 0) { record(chart.pressObject[lane][nextPress[lane]], Judgement.MISS, Double.NaN) nextPress[lane]++ + } else if (button >= 0) { + val next = skyNext[button] + skyJudged[button][next] = true + record(chart.skyObject[button][next], Judgement.MISS, Double.NaN) + advanceSkyNext(button) + } else if (flickIsDue) { + flickJudged[nextFlick] = true + record(chart.flickObject[nextFlick], Judgement.MISS, Double.NaN) + advanceNextFlick() } else { return } @@ -127,10 +331,14 @@ class Judge(private val chart: JudgeChart) { private fun judgeTick() { val tick = nextTick++ - val lane = chart.tickLane[tick] val tickMs = chart.tickMs[tick] - val age = if (laneDown[lane]) 0.0 else tickMs - laneLastDownMs[lane] - record(chart.tickObject[tick], tickJudgement(age), -age) + val lane = chart.tickLane[tick] + val age = when { + lane < 0 -> tickMs - slideLastHeldMs[chart.tickSlide[tick]] + laneDown[lane] -> 0.0 + else -> tickMs - laneLastDownMs[lane] + } + record(chart.tickObject[tick], tickJudgement(age), if (age == Double.POSITIVE_INFINITY) Double.NaN else -age) } private fun pressJudgement(delta: Double): Judgement { diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgeChart.kt b/core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgeChart.kt index cb61a76..0a50cbf 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgeChart.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgeChart.kt @@ -6,13 +6,15 @@ import net.trilleo.hexium.core.chart.ChartLimits import net.trilleo.hexium.core.chart.Difficulty import net.trilleo.hexium.core.chart.DifficultyChart import net.trilleo.hexium.core.chart.Note +import net.trilleo.hexium.core.chart.SkyButton +import net.trilleo.hexium.core.chart.SlidePath import net.trilleo.hexium.core.chart.TimingMap /** * A chart turned into the flat arrays the judge walks, built once when a chart loads so that - * playing it doesn't allocate. Every judged object (tap, hold head, tick) has an id. + * playing it doesn't allocate. Every judged object (tap, hold head, sky tap, flick, tick) has an id. * - * Expects a chart that passed the validator. Only ground notes are judged so far. + * Expects a chart that passed the validator. */ class JudgeChart private constructor( val config: JudgementConfig, @@ -23,20 +25,52 @@ class JudgeChart private constructor( internal val pressMs: Array, internal val tickObject: IntArray, internal val tickMs: DoubleArray, + /** The tick's lane, or -1 for a slide tick. */ internal val tickLane: IntArray, + internal val tickSlide: IntArray, + internal val timing: TimingMap, + internal val skyObject: Array, + internal val skyMs: Array, + internal val skyX: Array, + internal val skyY: Array, + internal val skyRadius: Array, + internal val flickObject: IntArray, + internal val flickMs: DoubleArray, + internal val flickX: DoubleArray, + internal val flickY: DoubleArray, + internal val flickRadius: DoubleArray, + /** NaN accepts any direction. */ + internal val flickDir: DoubleArray, + internal val slideStartMs: DoubleArray, + internal val slideEndMs: DoubleArray, + internal val slideButton: IntArray, + internal val slideRadius: DoubleArray, + internal val slidePath: Array, ) { val laneCount: Int get() = pressMs.size + internal val slideCount: Int + get() = slideStartMs.size + private class Press(val ms: Double, val note: Int, val lane: Int) - private class Tick(val ms: Double, val note: Int, val lane: Int) + private class Tick(val ms: Double, val note: Int, val lane: Int, val slide: Int) + + private class Sky(val ms: Double, val note: Int, val tap: Note.SkyTap) + + private class Flick(val ms: Double, val note: Int, val flick: Note.Flick) + + private class Slide(val startMs: Double, val endMs: Double, val note: Int, val slide: Note.Slide) companion object { fun compile(chart: DifficultyChart, config: JudgementConfig = JudgementConfig.DEFAULT): JudgeChart { val timing = TimingMap(chart.offsetMs, chart.bpm) val presses = ArrayList() val ticks = ArrayList() + val skyTaps = ArrayList() + val flicks = ArrayList() + val slides = ArrayList() for (i in chart.notes.indices) { when (val note = chart.notes[i]) { is Note.Tap -> presses += Press(timing.beatToMs(note.t), i, note.lane) @@ -45,16 +79,32 @@ class JudgeChart private constructor( val count = tickCount(note.t, note.end, config.ticksPerBeat) require(presses.size + ticks.size + count <= ChartLimits.MAX_JUDGED_OBJECTS) { "Too many judged objects" } for (k in 0 until count.toInt()) { - ticks += Tick(timing.beatToMs(tickBeat(note.t, note.end, k, count, config.ticksPerBeat)), i, note.lane) + ticks += Tick(timing.beatToMs(tickBeat(note.t, note.end, k, count, config.ticksPerBeat)), i, note.lane, -1) } } - is Note.SkyTap, is Note.Slide, is Note.Flick -> {} + is Note.SkyTap -> skyTaps += Sky(timing.beatToMs(note.t), i, note) + is Note.Flick -> flicks += Flick(timing.beatToMs(note.t), i, note) + is Note.Slide -> slides += Slide(timing.beatToMs(note.points.first().t), timing.beatToMs(note.points.last().t), i, note) } } presses.sortWith(compareBy { it.ms }) + skyTaps.sortWith(compareBy { it.ms }) + flicks.sortWith(compareBy { it.ms }) + slides.sortWith(compareBy { it.startMs }) + for (s in slides.indices) { + val start = slides[s].slide.points.first().t + val end = slides[s].slide.points.last().t + val count = tickCount(start, end, config.ticksPerBeat) + require(presses.size + ticks.size + skyTaps.size + flicks.size + count <= ChartLimits.MAX_JUDGED_OBJECTS) { + "Too many judged objects" + } + for (k in 0 until count.toInt()) { + ticks += Tick(timing.beatToMs(tickBeat(start, end, k, count, config.ticksPerBeat)), slides[s].note, -1, s) + } + } ticks.sortWith(compareBy { it.ms }) - val objectCount = presses.size + ticks.size + val objectCount = presses.size + skyTaps.size + flicks.size + ticks.size val objectNote = IntArray(objectCount) var nextObject = 0 val pressObject = Array(chart.laneCount) { lane -> IntArray(presses.count { it.lane == lane }) } @@ -66,13 +116,29 @@ class JudgeChart private constructor( pressMs[press.lane][slot] = press.ms objectNote[nextObject++] = press.note } + val buttons = SkyButton.entries + val skyByButton = Array(buttons.size) { b -> skyTaps.filter { it.tap.button == buttons[b] } } + val skyObject = Array(buttons.size) { IntArray(skyByButton[it].size) } + for (b in buttons.indices) { + for (i in skyByButton[b].indices) { + skyObject[b][i] = nextObject + objectNote[nextObject++] = skyByButton[b][i].note + } + } + val flickObject = IntArray(flicks.size) + for (i in flicks.indices) { + flickObject[i] = nextObject + objectNote[nextObject++] = flicks[i].note + } val tickObject = IntArray(ticks.size) val tickMs = DoubleArray(ticks.size) val tickLane = IntArray(ticks.size) + val tickSlide = IntArray(ticks.size) for (i in ticks.indices) { tickObject[i] = nextObject tickMs[i] = ticks[i].ms tickLane[i] = ticks[i].lane + tickSlide[i] = ticks[i].slide objectNote[nextObject++] = ticks[i].note } val isEasy = chart.difficulty == Difficulty.BASIC || chart.difficulty == Difficulty.ADVANCED @@ -86,6 +152,24 @@ class JudgeChart private constructor( tickObject, tickMs, tickLane, + tickSlide, + timing, + skyObject, + Array(buttons.size) { b -> DoubleArray(skyByButton[b].size) { skyByButton[b][it].ms } }, + Array(buttons.size) { b -> DoubleArray(skyByButton[b].size) { skyByButton[b][it].tap.x } }, + Array(buttons.size) { b -> DoubleArray(skyByButton[b].size) { skyByButton[b][it].tap.y } }, + Array(buttons.size) { b -> DoubleArray(skyByButton[b].size) { skyByButton[b][it].tap.size * config.baseHitRadius } }, + flickObject, + DoubleArray(flicks.size) { flicks[it].ms }, + DoubleArray(flicks.size) { flicks[it].flick.x }, + DoubleArray(flicks.size) { flicks[it].flick.y }, + DoubleArray(flicks.size) { flicks[it].flick.size * config.baseHitRadius }, + DoubleArray(flicks.size) { flicks[it].flick.dir ?: Double.NaN }, + DoubleArray(slides.size) { slides[it].startMs }, + DoubleArray(slides.size) { slides[it].endMs }, + IntArray(slides.size) { slides[it].slide.button.ordinal }, + DoubleArray(slides.size) { slides[it].slide.radius }, + Array(slides.size) { SlidePath(slides[it].slide.points) }, ) } diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/SlidePathTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/SlidePathTest.kt new file mode 100644 index 0000000..fe8f866 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/SlidePathTest.kt @@ -0,0 +1,66 @@ +package net.trilleo.hexium.core.chart + +import kotlin.test.Test +import kotlin.test.assertEquals + +class SlidePathTest { + private val tolerance = 1e-9 + + @Test + fun easesFollowTheSpec() { + for (t in listOf(0.0, 0.25, 0.5, 0.75, 1.0)) { + assertEquals(t, Ease.LINEAR.progress(t), tolerance) + assertEquals(t * t, Ease.IN.progress(t), tolerance) + assertEquals(1 - (1 - t) * (1 - t), Ease.OUT.progress(t), tolerance) + assertEquals(3 * t * t - 2 * t * t * t, Ease.IN_OUT.progress(t), tolerance) + } + } + + private fun beat(whole: Int, num: Int = 0, den: Int = 1) = Beat(whole, num, den) + + private val path = SlidePath( + listOf( + SlidePoint(beat(1), 0.2, 0.4, Ease.LINEAR), + SlidePoint(beat(2), 0.6, 0.8, Ease.IN), + SlidePoint(beat(4), 1.0, 0.0, Ease.OUT), + ), + ) + + @Test + fun positionFollowsEachSegmentsEase() { + assertEquals(0.4, path.x(1.5), tolerance) + assertEquals(0.6, path.y(1.5), tolerance) + assertEquals(0.6 + 0.4 * 0.25, path.x(3.0), tolerance) + assertEquals(0.8 - 0.8 * 0.25, path.y(3.0), tolerance) + } + + @Test + fun pointsAreExact() { + assertEquals(0.2, path.x(1.0), tolerance) + assertEquals(0.6, path.x(2.0), tolerance) + assertEquals(1.0, path.x(4.0), tolerance) + } + + @Test + fun positionStopsAtBothEnds() { + assertEquals(0.2, path.x(0.0), tolerance) + assertEquals(0.4, path.y(-5.0), tolerance) + assertEquals(1.0, path.x(9.0), tolerance) + assertEquals(0.0, path.y(9.0), tolerance) + } + + @Test + fun lastPointsEaseIsIgnored() { + val a = SlidePath(listOf(SlidePoint(beat(0), 0.0, 0.0, Ease.LINEAR), SlidePoint(beat(1), 1.0, 1.0, Ease.IN))) + val b = SlidePath(listOf(SlidePoint(beat(0), 0.0, 0.0, Ease.LINEAR), SlidePoint(beat(1), 1.0, 1.0, Ease.OUT))) + assertEquals(a.x(0.5), b.x(0.5), tolerance) + } + + @Test + fun progressIsInBeatsSoABpmChangeDoesNotBendThePath() { + val straight = SlidePath(listOf(SlidePoint(beat(0), 0.0, 0.0, Ease.LINEAR), SlidePoint(beat(2), 1.0, 1.0, Ease.LINEAR))) + val timing = TimingMap(0.0, listOf(BpmChange(beat(0), 60.0), BpmChange(beat(1), 120.0))) + assertEquals(0.5, straight.x(timing.msToBeat(1000.0)), tolerance) + assertEquals(0.75, straight.x(timing.msToBeat(1250.0)), tolerance) + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt index 155aff7..e401756 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt @@ -75,6 +75,14 @@ class TimingMapTest { } @Test + fun msToBeatUndoesBeatToMs() { + val map = TimingMap(120.0, listOf(bpm(0, 174.0), bpm(64, 87.0), BpmChange(Beat(70, 1, 3), 200.0))) + for (beat in listOf(0.0, 0.5, 63.9, 64.0, 65.25, 70.0, 70.5, 500.0, -2.0)) { + assertEquals(beat, map.msToBeat(map.beatToMs(beat)), 1e-9) + } + } + + @Test fun doubleBeatMatchesExactBeat() { val map = TimingMap(120.0, listOf(bpm(0, 174.0), bpm(64, 87.0))) assertEquals(map.beatToMs(Beat(65, 1, 2)), map.beatToMs(65.5), tolerance) diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeAllocationTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeAllocationTest.kt index 0be2883..daa8369 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeAllocationTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeAllocationTest.kt @@ -3,7 +3,10 @@ package net.trilleo.hexium.core.judge import java.lang.management.ManagementFactory import kotlin.test.Test import kotlin.test.assertTrue +import net.trilleo.hexium.core.chart.Ease import net.trilleo.hexium.core.chart.Note +import net.trilleo.hexium.core.chart.SkyButton +import net.trilleo.hexium.core.chart.SlidePoint /** The judge runs every frame in the mod, so playing a chart must not allocate. */ class JudgeAllocationTest { @@ -34,4 +37,42 @@ class JudgeAllocationTest { assertTrue(allocated < 64 * 1024, "allocated $allocated bytes over ${notes.size} notes") assertTrue(judge.judgedCount == judge.objectCount) } + + @Test + fun playingSkyNotesDoesNotAllocate() { + val notes = Array(30_000) { + when (it % 3) { + 0 -> Note.SkyTap(beat(it + 1), 0.5, 0.5, SkyButton.L, 1.0) + 1 -> Note.Flick(beat(it + 1), 0.5, 0.5, 90.0, 1.0) + else -> Note.Slide( + SkyButton.R, + 0.1, + listOf(SlidePoint(beat(it + 1), 0.5, 0.5, Ease.IN_OUT), SlidePoint(beat(it + 1, 1, 2), 0.5, 0.5, Ease.LINEAR)), + ) + } + } + val judge = Judge(JudgeChart.compile(chartOf(*notes))) + val thread = Thread.currentThread().threadId() + val before = threads.getThreadAllocatedBytes(thread) + var i = 0 + while (i < notes.size) { + val time = (i + 1) * 1000.0 + judge.aimSample(time - 10.0, 0.5f, 0.4f) + judge.aimSample(time, 0.5f, 0.6f) + if (i % 3 == 0) { + judge.pressButton(SkyButton.L, time, 0.5f, 0.5f) + judge.releaseButton(SkyButton.L, time + 5.0) + } else if (i % 3 == 2) { + judge.pressButton(SkyButton.R, time, 0.5f, 0.5f) + judge.aimSample(time + 300.0, 0.5f, 0.5f) + judge.releaseButton(SkyButton.R, time + 600.0) + } + judge.advanceTo(time + 700.0) + i++ + } + judge.finish() + val allocated = threads.getThreadAllocatedBytes(thread) - before + assertTrue(allocated < 64 * 1024, "allocated $allocated bytes over ${notes.size} notes") + assertTrue(judge.judgedCount == judge.objectCount) + } } diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeFlickTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeFlickTest.kt new file mode 100644 index 0000000..0571f0f --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeFlickTest.kt @@ -0,0 +1,246 @@ +package net.trilleo.hexium.core.judge + +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertTrue +import net.trilleo.hexium.core.chart.Note +import net.trilleo.hexium.core.chart.SkyButton + +class JudgeFlickTest { + /** At time 0, so window limits are exact. */ + private fun flick(whole: Int = 0, x: Double = 0.5, y: Double = 0.5, dir: Double? = null, size: Double = 1.0) = + Note.Flick(beat(whole), x, y, dir, size) + + /** Starts inside the hit area at [ms] and leaves fast, so the crossing time is exactly [ms]. */ + private fun swipeFrom(ms: Double): List { + val judge = judgeOf(flick()) + judge.aimSample(ms, 0.5f, 0.5f) + judge.aimSample(ms + 10.0, 0.9f, 0.5f) + judge.finish() + return judge.judgements() + } + + private val jc = listOf(Judgement.JUSTICE_CRITICAL) + private val justice = listOf(Judgement.JUSTICE) + private val miss = listOf(Judgement.MISS) + + @Test + fun windowsAreOnTheCrossingTime() { + assertEquals(jc, swipeFrom(0.0)) + assertEquals(jc, swipeFrom(83.33)) + assertEquals(jc, swipeFrom(-83.33)) + assertEquals(justice, swipeFrom(83.34)) + assertEquals(justice, swipeFrom(-83.34)) + assertEquals(justice, swipeFrom(166.67)) + assertEquals(justice, swipeFrom(-166.67)) + assertEquals(miss, swipeFrom(166.68)) + assertEquals(miss, swipeFrom(-166.68)) + } + + @Test + fun noClickIsNeeded() { + val judge = judgeOf(flick()) + judge.pressButton(SkyButton.L, 0.0, 0.5f, 0.5f) + assertEquals(0, judge.judgedCount) + } + + @Test + fun fastSwipeThatJumpsOverTheNoteStillHits() { + val judge = judgeOf(flick(1)) + judge.aimSample(983.0, 0.1f, 0.5f) + judge.aimSample(1016.0, 0.9f, 0.5f) + assertEquals(jc, judge.judgements()) + } + + @Test + fun crossingTimeIsWhereTheSwipeFirstEntersTheHitArea() { + val judge = judgeOf(flick(1)) + judge.aimSample(1000.0, 0.26f, 0.5f) + judge.aimSample(1100.0, 0.56f, 0.5f) + assertEquals(jc, judge.judgements()) + assertEquals(200.0 / 3.0, judge.judgedDeltaMs(0), 0.01, "enters at x = 0.46, two thirds of the way along") + } + + @Test + fun swipeThatStartsInsideUsesItsFirstSample() { + val judge = judgeOf(flick(1)) + judge.aimSample(1020.0, 0.5f, 0.5f) + judge.aimSample(1030.0, 0.9f, 0.5f) + assertEquals(20.0, judge.judgedDeltaMs(0), 1e-9) + } + + @Test + fun swipeThatMissesTheHitAreaDoesNothing() { + val judge = judgeOf(flick(1)) + judge.aimSample(990.0, 0.1f, 0.7f) + judge.aimSample(1010.0, 0.9f, 0.7f) + assertEquals(0, judge.judgedCount) + judge.finish() + assertEquals(miss, judge.judgements()) + } + + @Test + fun swipeEndingBeforeTheHitAreaDoesNothing() { + val judge = judgeOf(flick(1)) + judge.aimSample(990.0, 0.1f, 0.5f) + judge.aimSample(1010.0, 0.3f, 0.5f) + assertEquals(0, judge.judgedCount) + } + + @Test + fun theSwipeMustBeFasterThanTheMinimumSpeed() { + // Across x, 0.5 of the width is 1 screen height because the screen is 2:1. + val tooSlow = judgeOf(flick()) + tooSlow.aimSample(-500.0, 0.25f, 0.5f) + tooSlow.aimSample(500.0, 0.75f, 0.5f) + assertEquals(miss, tooSlow.judgements(), "exactly 1 height per second isn't faster, and the sample passed the deadline") + assertTrue(tooSlow.judgedDeltaMs(0).isNaN()) + + val fastEnough = judgeOf(flick()) + fastEnough.aimSample(-500.0, 0.25f, 0.5f) + fastEnough.aimSample(490.0, 0.75f, 0.5f) + assertEquals(justice, fastEnough.judgements()) + } + + @Test + fun aParkedCrosshairDoesNotHit() { + val judge = judgeOf(flick()) + judge.aimSample(-10.0, 0.5f, 0.5f) + judge.aimSample(0.0, 0.5f, 0.5f) + judge.aimSample(10.0, 0.5f, 0.5f) + assertEquals(0, judge.judgedCount) + } + + @Test + fun tooSlowThenFastStillHitsInsideTheWindow() { + val judge = judgeOf(flick()) + judge.aimSample(-100.0, 0.5f, 0.5f) + judge.aimSample(-50.0, 0.5f, 0.5f) + judge.aimSample(-40.0, 0.9f, 0.5f) + assertEquals(jc, judge.judgements()) + assertEquals(-50.0, judge.judgedDeltaMs(0), 1e-9) + } + + /** Swipes through the note at [degrees], measured in screen heights. */ + private fun swipeAt(degrees: Double, requiredDir: Double?): Int { + val judge = judgeOf(flick(dir = requiredDir)) + val radians = Math.toRadians(degrees) + val dx = Math.cos(radians) * 0.2 / 2.0 + val dy = Math.sin(radians) * 0.2 + judge.aimSample(-5.0, (0.5 - dx).toFloat(), (0.5 - dy).toFloat()) + judge.aimSample(5.0, (0.5 + dx).toFloat(), (0.5 + dy).toFloat()) + return judge.judgedCount + } + + @Test + fun leavingOutTheDirectionAcceptsAny() { + for (degrees in listOf(0.0, 90.0, 180.0, 270.0, 33.0)) assertEquals(1, swipeAt(degrees, null)) + } + + @Test + fun theDirectionIsMeasuredWith0RightAnd90Up() { + assertEquals(1, swipeAt(0.0, 0.0)) + assertEquals(1, swipeAt(90.0, 90.0)) + assertEquals(1, swipeAt(180.0, 180.0)) + assertEquals(1, swipeAt(270.0, 270.0)) + assertEquals(0, swipeAt(180.0, 0.0)) + assertEquals(0, swipeAt(270.0, 90.0)) + } + + @Test + fun theDirectionHas45DegreesOfTolerance() { + assertEquals(1, swipeAt(134.0, 90.0)) + assertEquals(1, swipeAt(46.0, 90.0)) + assertEquals(0, swipeAt(136.0, 90.0)) + assertEquals(0, swipeAt(44.0, 90.0)) + } + + @Test + fun theToleranceWrapsAround360() { + assertEquals(1, swipeAt(10.0, 350.0)) + assertEquals(1, swipeAt(350.0, 10.0)) + assertEquals(0, swipeAt(60.0, 350.0)) + } + + @Test + fun wrongDirectionCanBeFollowedByARightOne() { + val judge = judgeOf(flick(dir = 0.0)) + judge.aimSample(-30.0, 0.7f, 0.5f) + judge.aimSample(-20.0, 0.3f, 0.5f) + assertEquals(0, judge.judgedCount) + judge.aimSample(-10.0, 0.7f, 0.5f) + assertEquals(jc, judge.judgements()) + } + + @Test + fun oneSwipeCanHitSeveralFlicks() { + val judge = judgeOf(flick(1, x = 0.3), flick(1, x = 0.7)) + judge.aimSample(990.0, 0.1f, 0.5f) + judge.aimSample(1010.0, 0.9f, 0.5f) + assertEquals(jc + jc, judge.judgements()) + assertEquals(0, judge.judgedNote(0), "the one crossed first is recorded first") + assertEquals(1, judge.judgedNote(1)) + } + + @Test + fun aCrossingBeforeTheDeadlineCountsEvenIfTheNextSampleIsAfterIt() { + val judge = judgeOf(flick()) + judge.aimSample(165.0, 0.5f, 0.5f) + judge.advanceTo(170.0) + assertEquals(0, judge.judgedCount, "a swipe may still be under way") + judge.aimSample(175.0, 0.9f, 0.5f) + assertEquals(justice, judge.judgements()) + } + + @Test + fun noSwipeMissesOnceASamplePassesTheDeadline() { + val judge = judgeOf(flick()) + judge.aimSample(166.0, 0.1f, 0.1f) + assertEquals(0, judge.judgedCount) + judge.aimSample(167.0, 0.1f, 0.1f) + assertEquals(miss, judge.judgements()) + assertTrue(judge.judgedDeltaMs(0).isNaN()) + } + + @Test + fun finishMissesAnUnswipedFlick() { + val judge = judgeOf(flick()) + judge.finish() + assertEquals(miss, judge.judgements()) + } + + @Test + fun sizeMultipliesTheHitArea() { + val judge = judgeOf(flick(size = 2.0)) + judge.aimSample(-5.0, 0.1f, 0.65f) + judge.aimSample(5.0, 0.9f, 0.65f) + assertEquals(1, judge.judgedCount) + } + + @Test + fun frameRateBarelyChangesTheCrossingTime() { + val deltas = ArrayList() + for (fps in listOf(60.0, 144.0, 360.0)) { + val judge = judgeOf(flick(1)) + val step = 1000.0 / fps + var time = 950.0 + while (judge.judgedCount == 0 && time < 1100.0) { + judge.aimSample(time, (0.2 + (time - 950.0) * 0.006).toFloat(), 0.5f) + time += step + } + deltas += judge.judgedDeltaMs(0) + } + assertTrue(deltas.max() - deltas.min() < 0.01, deltas.toString()) + } + + @Test + fun flicksCountTowardsScore() { + val judge = judgeOf(flick(1)) + assertEquals(1, judge.objectCount) + judge.aimSample(1000.0, 0.5f, 0.5f) + judge.aimSample(1010.0, 0.9f, 0.5f) + judge.finish() + assertEquals(1_010_000, judge.score) + assertEquals(ClearLamp.ALL_JUSTICE_CRITICAL, judge.clearLamp) + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeSkyTapTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeSkyTapTest.kt new file mode 100644 index 0000000..90b2814 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeSkyTapTest.kt @@ -0,0 +1,163 @@ +package net.trilleo.hexium.core.judge + +import kotlin.test.Test +import kotlin.test.assertEquals +import net.trilleo.hexium.core.chart.Difficulty +import net.trilleo.hexium.core.chart.Note +import net.trilleo.hexium.core.chart.SkyButton + +class JudgeSkyTapTest { + private val jc = listOf(Judgement.JUSTICE_CRITICAL) + private val justice = listOf(Judgement.JUSTICE) + private val attack = listOf(Judgement.ATTACK) + private val miss = listOf(Judgement.MISS) + + private fun tap(whole: Int = 0, x: Double = 0.5, y: Double = 0.5, button: SkyButton = SkyButton.L, size: Double = 1.0) = + Note.SkyTap(beat(whole), x, y, button, size) + + private fun clickAt(ms: Double, difficulty: Difficulty = Difficulty.EXPERT): List { + val judge = judgeOf(tap(), difficulty = difficulty) + judge.pressButton(SkyButton.L, ms, 0.5f, 0.5f) + judge.finish() + return judge.judgements() + } + + @Test + fun windowsMatchGroundTaps() { + assertEquals(jc, clickAt(33.33)) + assertEquals(jc, clickAt(-33.33)) + assertEquals(justice, clickAt(66.67)) + assertEquals(justice, clickAt(-66.67)) + assertEquals(attack, clickAt(83.33)) + assertEquals(attack, clickAt(-83.33)) + assertEquals(miss, clickAt(83.34)) + } + + @Test + fun easyChartsUseTheEasyAttackWindow() { + assertEquals(attack, clickAt(100.0, Difficulty.BASIC)) + assertEquals(attack, clickAt(-100.0, Difficulty.ADVANCED)) + assertEquals(miss, clickAt(100.01, Difficulty.BASIC)) + } + + @Test + fun earlyBeyondAttackUsesUpTheNoteUpTo150Ms() { + val judge = judgeOf(tap()) + judge.pressButton(SkyButton.L, -150.0, 0.5f, 0.5f) + assertEquals(miss, judge.judgements()) + + val tooEarly = judgeOf(tap()) + tooEarly.pressButton(SkyButton.L, -150.01, 0.5f, 0.5f) + assertEquals(0, tooEarly.judgedCount) + } + + @Test + fun unclickedNoteMissesOnceItsWindowHasPassed() { + val judge = judgeOf(tap()) + judge.advanceTo(83.33) + assertEquals(0, judge.judgedCount) + judge.advanceTo(83.34) + assertEquals(miss, judge.judgements()) + } + + @Test + fun wrongButtonIsIgnoredAndTheNoteStaysHittable() { + for ((note, wrong, right) in listOf( + Triple(tap(button = SkyButton.L), SkyButton.R, SkyButton.L), + Triple(tap(button = SkyButton.R), SkyButton.L, SkyButton.R), + )) { + val judge = judgeOf(note) + judge.pressButton(wrong, 0.0, 0.5f, 0.5f) + assertEquals(0, judge.judgedCount) + judge.pressButton(right, 10.0, 0.5f, 0.5f) + assertEquals(jc, judge.judgements()) + } + } + + @Test + fun clickOutsideTheHitAreaIsIgnoredAndCanTryAgain() { + val judge = judgeOf(tap()) + judge.pressButton(SkyButton.L, 0.0, 0.5f, 0.59f) + assertEquals(0, judge.judgedCount) + judge.releaseButton(SkyButton.L, 5.0) + judge.pressButton(SkyButton.L, 10.0, 0.5f, 0.5f) + assertEquals(jc, judge.judgements()) + } + + @Test + fun hitAreaIsACircleMeasuredInScreenHeights() { + fun hits(x: Float, y: Float, size: Double = 1.0): Boolean { + val judge = judgeOf(tap(size = size)) + judge.pressButton(SkyButton.L, 0.0, x, y) + return judge.judgedCount == 1 + } + assertEquals(true, hits(0.5f, 0.579f), "base radius is 0.08 of the height") + assertEquals(false, hits(0.5f, 0.581f)) + assertEquals(true, hits(0.539f, 0.5f), "x is half as far because the screen is 2:1") + assertEquals(false, hits(0.541f, 0.5f)) + assertEquals(false, hits(0.535f, 0.57f), "inside the box, outside the circle") + assertEquals(true, hits(0.5f, 0.65f, size = 2.0), "size multiplies the radius") + assertEquals(false, hits(0.5f, 0.55f, size = 0.5)) + } + + @Test + fun theEdgeOfTheHitAreaCounts() { + val config = JudgementConfig(baseHitRadius = 0.25) + fun judge() = Judge(JudgeChart.compile(chartOf(tap()), config)) + val inside = judge() + inside.pressButton(SkyButton.L, 0.0, 0.5f, 0.75f) + assertEquals(1, inside.judgedCount) + val outside = judge() + outside.pressButton(SkyButton.L, 0.0, 0.5f, 0.7501f) + assertEquals(0, outside.judgedCount) + } + + @Test + fun clickResolvesOnlyTheEarliestNoteUnderIt() { + val judge = judgeOf(Note.SkyTap(beat(1), 0.5, 0.5, SkyButton.L, 1.0), Note.SkyTap(beat(1, 1, 20), 0.5, 0.5, SkyButton.L, 1.0)) + judge.pressButton(SkyButton.L, 1000.0, 0.5f, 0.5f) + assertEquals(jc, judge.judgements()) + assertEquals(0, judge.judgedNote(0)) + judge.releaseButton(SkyButton.L, 1010.0) + judge.pressButton(SkyButton.L, 1050.0, 0.5f, 0.5f) + assertEquals(jc + jc, judge.judgements()) + } + + @Test + fun clickSkipsAnEarlierNoteElsewhereOnScreen() { + val judge = judgeOf(Note.SkyTap(beat(1), 0.1, 0.1, SkyButton.L, 1.0), Note.SkyTap(beat(1, 1, 20), 0.9, 0.9, SkyButton.L, 1.0)) + judge.pressButton(SkyButton.L, 1040.0, 0.9f, 0.9f) + assertEquals(1, judge.judgedCount) + assertEquals(1, judge.judgedNote(0)) + judge.releaseButton(SkyButton.L, 1041.0) + judge.pressButton(SkyButton.L, 1042.0, 0.1f, 0.1f) + assertEquals(0, judge.judgedNote(1)) + } + + @Test + fun eachButtonHasItsOwnNotes() { + val judge = judgeOf(tap(1, button = SkyButton.L), tap(1, button = SkyButton.R)) + judge.pressButton(SkyButton.R, 1000.0, 0.5f, 0.5f) + assertEquals(1, judge.judgedNote(0)) + judge.pressButton(SkyButton.L, 1000.0, 0.5f, 0.5f) + assertEquals(0, judge.judgedNote(1)) + } + + @Test + fun buttonAlreadyDownDoesNotClickAgain() { + val judge = judgeOf(tap(1)) + judge.pressButton(SkyButton.L, 500.0, 0.5f, 0.5f) + judge.pressButton(SkyButton.L, 1000.0, 0.5f, 0.5f) + assertEquals(0, judge.judgedCount) + } + + @Test + fun skyTapsCountTowardsScore() { + val judge = judgeOf(tap(1), Note.Tap(beat(2), 0)) + assertEquals(2, judge.objectCount) + judge.pressButton(SkyButton.L, 1000.0, 0.5f, 0.5f) + judge.pressLane(0, 2000.0) + judge.finish() + assertEquals(1_010_000, judge.score) + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeSlideTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeSlideTest.kt new file mode 100644 index 0000000..62c4210 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeSlideTest.kt @@ -0,0 +1,226 @@ +package net.trilleo.hexium.core.judge + +import kotlin.test.Test +import kotlin.test.assertEquals +import net.trilleo.hexium.core.chart.Ease +import net.trilleo.hexium.core.chart.Note +import net.trilleo.hexium.core.chart.SkyButton +import net.trilleo.hexium.core.chart.SlidePoint + +class JudgeSlideTest { + /** Beat 1 to 2 (1000 to 2000 ms), straight across the middle, with ticks at 1250, 1500 and 1750 ms. */ + private val slide = Note.Slide( + SkyButton.L, + 0.06, + listOf(SlidePoint(beat(1), 0.2, 0.5, Ease.LINEAR), SlidePoint(beat(2), 0.8, 0.5, Ease.LINEAR)), + ) + + private fun onPath(ms: Double) = (0.2 + 0.6 * (ms - 1000.0) / 1000.0).toFloat() + + private fun Judge.follow(fromMs: Double, toMs: Double, stepMs: Double = 8.0, offsetY: Float = 0f) { + var time = fromMs + while (time <= toMs) { + aimSample(time, onPath(time), 0.5f + offsetY) + time += stepMs + } + } + + private val allJc = List(3) { Judgement.JUSTICE_CRITICAL } + + @Test + fun ticksOnlyWithNoHeadOrTail() { + assertEquals(3, judgeOf(slide).objectCount) + val judge = judgeOf(slide) + judge.pressButton(SkyButton.L, 1000.0, onPath(1000.0), 0.5f) + assertEquals(0, judge.judgedCount, "the click isn't a head") + judge.follow(1000.0, 2000.0) + judge.finish() + assertEquals(allJc, judge.judgements()) + } + + @Test + fun slideTooShortForATickGetsOneAtItsEnd() { + val short = Note.Slide( + SkyButton.L, + 0.06, + listOf(SlidePoint(beat(1), 0.2, 0.5, Ease.LINEAR), SlidePoint(beat(1, 1, 8), 0.3, 0.5, Ease.LINEAR)), + ) + val chart = JudgeChart.compile(chartOf(short)) + assertEquals(1, chart.objectCount) + val judge = Judge(chart) + judge.advanceTo(1125.0) + assertEquals(0, judge.judgedCount) + judge.advanceTo(1125.01) + assertEquals(1, judge.judgedCount) + } + + @Test + fun neverClickedMissesEveryTick() { + val judge = judgeOf(slide) + judge.follow(1000.0, 2000.0) + judge.finish() + assertEquals(List(3) { Judgement.MISS }, judge.judgements()) + } + + @Test + fun wrongButtonMissesEveryTick() { + val judge = judgeOf(slide) + judge.pressButton(SkyButton.R, 1000.0, onPath(1000.0), 0.5f) + judge.follow(1000.0, 2000.0) + judge.finish() + assertEquals(List(3) { Judgement.MISS }, judge.judgements()) + } + + @Test + fun crosshairOutsideTheRadiusMissesThoseTicks() { + val judge = judgeOf(slide) + judge.pressButton(SkyButton.L, 1000.0, onPath(1000.0), 0.5f) + judge.follow(1000.0, 2000.0, offsetY = 0.07f) + judge.finish() + assertEquals(List(3) { Judgement.MISS }, judge.judgements()) + } + + @Test + fun crosshairInsideTheRadiusButOffCentreStillCounts() { + val judge = judgeOf(slide) + judge.pressButton(SkyButton.L, 1000.0, onPath(1000.0), 0.5f) + judge.follow(1000.0, 2000.0, offsetY = 0.05f) + judge.finish() + assertEquals(allJc, judge.judgements()) + } + + @Test + fun radiusIsAFractionOfTheHeightOnBothAxes() { + fun tick(offsetX: Float): Judgement { + val judge = judgeOf(slide) + judge.pressButton(SkyButton.L, 1000.0, onPath(1000.0), 0.5f) + var time = 1000.0 + while (time <= 2000.0) { + judge.aimSample(time, onPath(time) + offsetX, 0.5f) + time += 8.0 + } + judge.finish() + return judge.judgement(0) + } + assertEquals(Judgement.JUSTICE_CRITICAL, tick(0.029f), "x is half as far because the screen is 2:1") + assertEquals(Judgement.MISS, tick(0.031f)) + } + + /** Follows the path, then stops being held [age] ms before the 1500 ms tick. */ + private fun middleTickAfterRelease(age: Double): Judgement { + val judge = judgeOf(slide) + judge.pressButton(SkyButton.L, 1000.0, onPath(1000.0), 0.5f) + judge.follow(1000.0, 1250.0) + judge.aimSample(1500.0 - age, onPath(1500.0 - age), 0.5f) + judge.releaseButton(SkyButton.L, 1500.0 - age) + judge.aimSample(1500.0, onPath(1500.0), 0.5f) + judge.advanceTo(1500.01) + return judge.judgement(1) + } + + @Test + fun tickWindowsAreOnTheLastHeldSample() { + assertEquals(Judgement.JUSTICE_CRITICAL, middleTickAfterRelease(50.0)) + assertEquals(Judgement.JUSTICE, middleTickAfterRelease(50.5)) + assertEquals(Judgement.JUSTICE, middleTickAfterRelease(100.0)) + assertEquals(Judgement.ATTACK, middleTickAfterRelease(100.5)) + assertEquals(Judgement.ATTACK, middleTickAfterRelease(150.0)) + assertEquals(Judgement.MISS, middleTickAfterRelease(150.5)) + } + + @Test + fun leavingAndComingBackInsideTheWindowKeepsJusticeCritical() { + val judge = judgeOf(slide) + judge.pressButton(SkyButton.L, 1000.0, onPath(1000.0), 0.5f) + judge.follow(1000.0, 1480.0) + judge.aimSample(1490.0, onPath(1490.0), 0.9f) + judge.aimSample(1510.0, onPath(1510.0), 0.5f) + judge.follow(1518.0, 2000.0) + judge.finish() + assertEquals(allJc, judge.judgements()) + } + + @Test + fun comingBackAfterATickDoesNotHelpIt() { + val judge = judgeOf(slide) + judge.pressButton(SkyButton.L, 1000.0, onPath(1000.0), 0.5f) + judge.follow(1000.0, 1300.0, offsetY = 0.3f) + judge.follow(1304.0, 2000.0) + judge.finish() + assertEquals(listOf(Judgement.MISS, Judgement.JUSTICE_CRITICAL, Judgement.JUSTICE_CRITICAL), judge.judgements()) + } + + @Test + fun theClickItselfCountsAsAnAimSample() { + val judge = judgeOf(slide) + judge.pressButton(SkyButton.L, 1250.0, onPath(1250.0), 0.5f) + judge.advanceTo(1250.01) + assertEquals(listOf(Judgement.JUSTICE_CRITICAL), judge.judgements()) + } + + @Test + fun theCrosshairMustFollowAnEasedPath() { + val eased = Note.Slide( + SkyButton.L, + 0.03, + listOf(SlidePoint(beat(1), 0.0, 0.5, Ease.IN), SlidePoint(beat(2), 0.0, 1.0, Ease.LINEAR)), + ) + fun tick(y: Float): Judgement { + val judge = judgeOf(eased) + judge.pressButton(SkyButton.L, 1500.0, 0.0f, y) + judge.advanceTo(1500.01) + return judge.judgement(1) + } + assertEquals(Judgement.JUSTICE_CRITICAL, tick(0.625f), "eased in, the path is at 0.25 of the way at the halfway tick") + assertEquals(Judgement.MISS, tick(0.75f), "a linear path would be here") + } + + @Test + fun positionsBeforeTheFirstPointUseTheFirstPoint() { + val judge = judgeOf( + Note.Slide( + SkyButton.L, + 0.06, + listOf(SlidePoint(beat(1), 0.2, 0.5, Ease.LINEAR), SlidePoint(beat(1, 1, 8), 0.2, 0.5, Ease.LINEAR)), + ), + ) + judge.pressButton(SkyButton.L, 990.0, 0.2f, 0.5f) + judge.releaseButton(SkyButton.L, 1000.0) + judge.advanceTo(1125.01) + assertEquals(listOf(Judgement.ATTACK), judge.judgements(), "the click was on the first point, 135 ms before the tick") + } + + @Test + fun clickingASkyTapAlsoHoldsASlide() { + val judge = judgeOf(slide, Note.SkyTap(beat(1), 0.2, 0.5, SkyButton.L, 1.0)) + judge.pressButton(SkyButton.L, 1000.0, onPath(1000.0), 0.5f) + assertEquals(1, judge.judgedCount) + judge.follow(1000.0, 2000.0) + judge.finish() + assertEquals(4, judge.judgedCount) + assertEquals(0, judge.count(Judgement.MISS)) + } + + @Test + fun twoSlidesAreJudgedSeparately() { + val second = slide.copy(button = SkyButton.R, points = slide.points.map { it.copy(y = 0.9) }) + val judge = judgeOf(slide, second) + judge.pressButton(SkyButton.L, 1000.0, onPath(1000.0), 0.5f) + judge.pressButton(SkyButton.R, 1000.0, onPath(1000.0), 0.5f) + judge.follow(1000.0, 2000.0) + judge.finish() + assertEquals(3, judge.count(Judgement.JUSTICE_CRITICAL)) + assertEquals(3, judge.count(Judgement.MISS)) + } + + @Test + fun lowFrameRatesStillHoldASlide() { + for (step in listOf(1000.0 / 30, 1000.0 / 60, 1000.0 / 144, 1000.0 / 360)) { + val judge = judgeOf(slide) + judge.pressButton(SkyButton.L, 1000.0, onPath(1000.0), 0.5f) + judge.follow(1000.0, 2000.0, stepMs = step) + judge.finish() + assertEquals(allJc, judge.judgements(), "step $step") + } + } +} diff --git a/docs/JUDGEMENT.md b/docs/JUDGEMENT.md index 407213f..dd59fd1 100644 --- a/docs/JUDGEMENT.md +++ b/docs/JUDGEMENT.md @@ -17,7 +17,7 @@ Limits are inclusive. For taps, sky taps and hold heads, the Miss window runs fr - **Tap and sky tap:** judged by |press time − target|. A sky tap also needs the crosshair inside the note's hit area at the moment of the click. A note's hit area is a circle whose radius is the base hit radius in `JudgementConfig` (0.08) times the note's `size`. Hit radii are fractions of the screen's height, and circles are measured using the screen's 2:1 aspect, also in `JudgementConfig`. A press with no note in its Miss window does nothing (no penalty). A sky tap click outside the hit area, or with the wrong button, is ignored by that note, so the player can click again in time. The crosshair position is recorded with the click. - **Ground hold:** the head is judged like a tap. The body has invisible ticks, one every 1/4 beat (fixed in `JudgementConfig`, not set per chart, at least one per hold). Ticks are counted from the hold's start and exclude its start and end. A hold too short for any tick gets one at its end. Each tick is judged at its own time, on how long ago the lane key was last down, even if it was pressed before the hold began. A press after the tick doesn't help it. Releasing and pressing again inside the window keeps Justice Critical, like CHUNITHM. There's no tail judgement, and holding past the end is never penalised. -- **Sky slide:** no head or tail judgement. Ticks every 1/4 beat along the path (the same fixed rate and placement as holds, from the first point to the last). A tick is "held" while the required button is down AND the crosshair is inside the path's hit radius (its `radius`, a fraction of the screen's height) at the path's current position. Each tick is judged on how long ago the last aim sample that was "held" came, with the tick windows above. +- **Sky slide:** no head or tail judgement. Ticks every 1/4 beat along the path (the same fixed rate and placement as holds, from the first point to the last). A tick is "held" while the required button is down AND the crosshair is inside the path's hit radius (its `radius`, a fraction of the screen's height) at the path's current position. Before the first point, the position is the first point. Each tick is judged on how long ago the last aim sample that was "held" came, with the tick windows above. - **Flick:** hit when the crosshair passes through the note's hit area between two frames, moving faster than a minimum speed (screen units per second), in the optional required direction. The judgement is the crossing time against the target: the moment the swipe first enters the hit area, worked out along the line between the two samples. A swipe that starts inside uses the time of that first sample. The minimum speed is 1 screen height per second and the direction tolerance is ±45°, both in `JudgementConfig`. One swipe can hit several flicks. - A missed head doesn't auto-fail the hold's ticks. Each tick stands on its own. From dc2de5970b092ceacb76c95a0319012da405a650 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Tue, 3 Nov 2026 20:29:00 +0800 Subject: [PATCH 08/34] Feature: Record plays as replay files and re-judge them to exactly the same result --- .claude/agents/core-engineer.md | 5 +- .claude/agents/reviewer.md | 2 +- CHANGELOG.md | 5 + CLAUDE.md | 6 +- .../net/trilleo/hexium/core/judge/Judge.kt | 14 +- .../hexium/core/judge/JudgementConfig.kt | 3 + .../net/trilleo/hexium/core/replay/Replay.kt | 40 +++ .../trilleo/hexium/core/replay/ReplayFile.kt | 114 ++++++++ .../trilleo/hexium/core/replay/ReplayJudge.kt | 48 ++++ .../hexium/core/replay/ReplayRecorder.kt | 123 +++++++++ .../hexium/core/replay/ReplayFileTest.kt | 167 ++++++++++++ .../hexium/core/replay/ReplayPlayTest.kt | 251 ++++++++++++++++++ .../hexium/core/replay/ReplayTestSupport.kt | 41 +++ docs/ARCHITECTURE.md | 2 +- docs/REPLAY_FORMAT.md | 44 +++ 15 files changed, 854 insertions(+), 11 deletions(-) create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/replay/Replay.kt create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayFile.kt create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayJudge.kt create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayRecorder.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayFileTest.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayPlayTest.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayTestSupport.kt create mode 100644 docs/REPLAY_FORMAT.md diff --git a/.claude/agents/core-engineer.md b/.claude/agents/core-engineer.md index c535867..9f52a87 100644 --- a/.claude/agents/core-engineer.md +++ b/.claude/agents/core-engineer.md @@ -5,7 +5,7 @@ description: Implements game rules in core/ (chart model, parser, validator, tim You build Hexium's `core` and `tools` modules: plain Kotlin, no Minecraft imports. Rules: -1. Read docs/JUDGEMENT.md and docs/CHART_FORMAT.md before changing behaviour. If the +1. Read docs/JUDGEMENT.md, docs/CHART_FORMAT.md and docs/REPLAY_FORMAT.md before changing behaviour. If the task contradicts them, stop and ask; never change a spec silently. 2. Test-first: write or update tests in core/src/test before the code. Cover each rule with a passing and a failing case, plus edge cases at window boundaries. @@ -15,7 +15,8 @@ Rules: 5. Judge code runs every frame in the mod: no allocation in its per-frame paths (no lambdas, boxed collections, Pair, sequences); use primitive arrays and loops. 6. Golden replays in core/src/test/resources must stay identical unless the task is to - change them on purpose. + change them on purpose. A change that could alter a replay's result raises + JudgementConfig.JUDGE_VERSION. 7. Run `./gradlew :core:test` (and `./gradlew build` before finishing). Finish as CLAUDE.md says: changelog entry, docs check, summary, commit message. Never commit. diff --git a/.claude/agents/reviewer.md b/.claude/agents/reviewer.md index cb05eb5..c0aa041 100644 --- a/.claude/agents/reviewer.md +++ b/.claude/agents/reviewer.md @@ -11,7 +11,7 @@ Check, in order: 2. Judgement/scoring logic outside `core`, or constants not in JudgementConfig. 3. Mixins/hooks missing the HexiumSession.active() guard. 4. New `core` behaviour without tests; tests that only test the happy path. -5. Mismatch with docs/JUDGEMENT.md or docs/CHART_FORMAT.md. +5. Mismatch with docs/JUDGEMENT.md, docs/CHART_FORMAT.md or docs/REPLAY_FORMAT.md. 6. A proposed commit message not following docs/COMMIT_STRUCTURE.md, or a Feature, Improvement or Fix change without its CHANGELOG.md entry. 7. Docs the change affects but doesn't update (code, settings, commands, rules diff --git a/CHANGELOG.md b/CHANGELOG.md index f47e7ca..52e6ca5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,11 @@ + Added judging for sky taps, slides and flicks. + A swipe that jumps over a flick between two frames still hits it, so low frame rates stay fair. +#### Online + ++ Added replay files, which record every input of a play. + + Re-judging a replay gives exactly the result of the live play, so scores can be checked. + ### Fixes #### Charts diff --git a/CLAUDE.md b/CLAUDE.md index 9546e03..1181296 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,7 +12,8 @@ docs/DESIGN.md. - Keep changes scoped to one task. Summarize what changed and why at the end. ## Read first -- docs/DESIGN.md (what Hexium is), docs/JUDGEMENT.md, docs/CHART_FORMAT.md (the specs), +- docs/DESIGN.md (what Hexium is), docs/JUDGEMENT.md, docs/CHART_FORMAT.md, + docs/REPLAY_FORMAT.md (the specs), docs/ARCHITECTURE.md (how the code is built), docs/DEVELOPMENT.md (commands, workflow). - Files in docs/ have upper-case names (docs/COMMIT_STRUCTURE.md), as in TownyMenu. - README.md faces players (what Hexium is, install, how to play, charts). Never put @@ -48,7 +49,8 @@ docs/DESIGN.md. and Fix, as part of the change (format in docs/RELEASING.md). - After EVERY change, check which documents it affects and update them in the same change: this file, README.md (player-facing facts), CHANGELOG.md, - docs/DESIGN.md, docs/JUDGEMENT.md, docs/CHART_FORMAT.md, docs/DEVELOPMENT.md, + docs/DESIGN.md, docs/JUDGEMENT.md, docs/CHART_FORMAT.md, docs/REPLAY_FORMAT.md, + docs/DEVELOPMENT.md, docs/ARCHITECTURE.md, docs/API.md (server routes, once it exists), docs/RELEASING.md, docs/COMMIT_STRUCTURE.md, .claude/agents/*.md and .github/workflows/*.yml. diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt b/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt index 58476a7..f36c5f1 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt @@ -8,13 +8,15 @@ import net.trilleo.hexium.core.chart.SkyButton * same result. Nothing here allocates after construction. * * Results don't depend on how often [advanceTo] is called, only on the input. Time can't go - * backwards: an input older than the current time counts as happening now, so feed each frame's - * input before advancing to the frame's time. + * backwards: an input older than the current time counts as happening now. Live play goes + * through [net.trilleo.hexium.core.replay.ReplayRecorder], which records it that way too. + * + * All times passed in are raw song time: [judgementOffsetMs] (offset B) is subtracted from them. * * Crosshair positions are normalised screen coordinates, as in chart files, and may lie off the * screen. They're floats so a replay can store exactly what the judge saw. */ -class Judge(private val chart: JudgeChart) { +class Judge(private val chart: JudgeChart, private val judgementOffsetMs: Double = 0.0) { private val config = chart.config private val weights = intArrayOf( config.justiceCriticalWeightPercent, @@ -93,7 +95,8 @@ class Judge(private val chart: JudgeChart) { /** Judges everything due before [timeMs]. */ fun advanceTo(timeMs: Double) { - if (timeMs > now) now = timeMs + val time = timeMs - judgementOffsetMs + if (time > now) now = time settleBefore(now) } @@ -105,7 +108,8 @@ class Judge(private val chart: JudgeChart) { /** Records where the crosshair is. Call once per frame: slides and flicks are judged from these samples. */ fun aimSample(timeMs: Double, x: Float, y: Float) { - if (timeMs > now) now = timeMs + val time = timeMs - judgementOffsetMs + if (time > now) now = time flickSeenUntilMs = now val sampleX = x.toDouble() val sampleY = y.toDouble() diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgementConfig.kt b/core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgementConfig.kt index de11190..f3d27d0 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgementConfig.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/judge/JudgementConfig.kt @@ -34,5 +34,8 @@ data class JudgementConfig( ) { companion object { val DEFAULT = JudgementConfig() + + /** Raise this whenever a change could alter a replay's result (docs/REPLAY_FORMAT.md). */ + const val JUDGE_VERSION: Int = 1 } } diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/replay/Replay.kt b/core/src/main/kotlin/net/trilleo/hexium/core/replay/Replay.kt new file mode 100644 index 0000000..e517ac4 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/replay/Replay.kt @@ -0,0 +1,40 @@ +package net.trilleo.hexium.core.replay + +import java.security.MessageDigest + +enum class ReplayEvent { AIM, LANE_DOWN, LANE_UP, BUTTON_DOWN, BUTTON_UP } + +/** Every input of one play, in order (docs/REPLAY_FORMAT.md). */ +class Replay internal constructor( + val judgeVersion: Int, + val chartHash: ByteArray, + val judgementOffsetMs: Double, + val eventCount: Int, + private val events: ByteArray, + private val indexes: ByteArray, + private val times: DoubleArray, + private val xs: FloatArray, + private val ys: FloatArray, +) { + fun event(i: Int): ReplayEvent = EVENTS[events[i].toInt()] + + /** The lane, or the [net.trilleo.hexium.core.chart.SkyButton] ordinal. */ + fun index(i: Int): Int = indexes[i].toInt() + + fun timeMs(i: Int): Double = times[i] + + /** Only for [ReplayEvent.AIM] and [ReplayEvent.BUTTON_DOWN]. */ + fun x(i: Int): Float = xs[i] + + /** Only for [ReplayEvent.AIM] and [ReplayEvent.BUTTON_DOWN]. */ + fun y(i: Int): Float = ys[i] + + companion object { + const val MAX_EVENTS: Int = 2_000_000 + + internal val EVENTS = ReplayEvent.entries.toTypedArray() + + /** The hash a replay holds for a difficulty file's bytes. */ + fun hashOf(chartFile: ByteArray): ByteArray = MessageDigest.getInstance("SHA-256").digest(chartFile) + } +} diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayFile.kt b/core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayFile.kt new file mode 100644 index 0000000..5eac25e --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayFile.kt @@ -0,0 +1,114 @@ +package net.trilleo.hexium.core.replay + +import java.io.ByteArrayInputStream +import java.io.ByteArrayOutputStream +import java.io.IOException +import java.nio.BufferUnderflowException +import java.nio.ByteBuffer +import java.util.zip.GZIPInputStream +import java.util.zip.GZIPOutputStream + +/** [replay] is null when [error] says why the file was rejected. */ +class ReplayReadResult internal constructor(val replay: Replay?, val error: String?) + +/** Reads and writes replay files (docs/REPLAY_FORMAT.md). Reading never throws. */ +object ReplayFile { + private val MAGIC = byteArrayOf('H'.code.toByte(), 'X'.code.toByte(), 'R'.code.toByte(), 'P'.code.toByte()) + private const val FORMAT_VERSION = 1 + private const val HASH_BYTES = 32 + private const val HEADER_BYTES = 4 + 4 + 4 + HASH_BYTES + 8 + 4 + private const val PLAIN_EVENT_BYTES = 1 + 8 + private const val AIM_EVENT_BYTES = PLAIN_EVENT_BYTES + 4 + 4 + private const val MAX_UNPACKED_BYTES = HEADER_BYTES + Replay.MAX_EVENTS * AIM_EVENT_BYTES + + private fun hasPosition(event: Int) = event == ReplayEvent.AIM.ordinal || event == ReplayEvent.BUTTON_DOWN.ordinal + + private fun isButton(event: Int) = event == ReplayEvent.BUTTON_DOWN.ordinal || event == ReplayEvent.BUTTON_UP.ordinal + + fun write(replay: Replay): ByteArray { + var size = HEADER_BYTES + for (i in 0 until replay.eventCount) { + size += if (hasPosition(replay.event(i).ordinal)) AIM_EVENT_BYTES else PLAIN_EVENT_BYTES + } + val buffer = ByteBuffer.allocate(size) + buffer.put(MAGIC) + buffer.putInt(FORMAT_VERSION) + buffer.putInt(replay.judgeVersion) + buffer.put(replay.chartHash) + buffer.putDouble(replay.judgementOffsetMs) + buffer.putInt(replay.eventCount) + for (i in 0 until replay.eventCount) { + val event = replay.event(i).ordinal + buffer.put(((event shl 4) or replay.index(i)).toByte()) + buffer.putDouble(replay.timeMs(i)) + if (hasPosition(event)) { + buffer.putFloat(replay.x(i)) + buffer.putFloat(replay.y(i)) + } + } + val out = ByteArrayOutputStream() + GZIPOutputStream(out).use { it.write(buffer.array()) } + return out.toByteArray() + } + + fun read(file: ByteArray): ReplayReadResult { + val bytes = try { + GZIPInputStream(ByteArrayInputStream(file)).use { it.readNBytes(MAX_UNPACKED_BYTES + 1) } + } catch (e: IOException) { + return rejected("is not a compressed replay file: ${e.message}") + } + if (bytes.size > MAX_UNPACKED_BYTES) return rejected("is too large: it unpacks past $MAX_UNPACKED_BYTES bytes") + return try { + parse(ByteBuffer.wrap(bytes)) + } catch (e: BufferUnderflowException) { + rejected("is cut short") + } + } + + private fun parse(buffer: ByteBuffer): ReplayReadResult { + val magic = ByteArray(MAGIC.size) + buffer.get(magic) + if (!magic.contentEquals(MAGIC)) return rejected("is not a Hexium replay") + val formatVersion = buffer.getInt() + if (formatVersion != FORMAT_VERSION) return rejected("uses format version $formatVersion, this Hexium reads $FORMAT_VERSION") + val judgeVersion = buffer.getInt() + val hash = ByteArray(HASH_BYTES) + buffer.get(hash) + val offsetMs = buffer.getDouble() + if (!offsetMs.isFinite()) return rejected("has a judgement offset that isn't finite") + val count = buffer.getInt() + if (count < 0 || count > Replay.MAX_EVENTS) return rejected("claims $count events, the limit is ${Replay.MAX_EVENTS}") + if (count.toLong() * PLAIN_EVENT_BYTES > buffer.remaining()) return rejected("is cut short") + + val events = ByteArray(count) + val indexes = ByteArray(count) + val times = DoubleArray(count) + val xs = FloatArray(count) + val ys = FloatArray(count) + var previous = Double.NEGATIVE_INFINITY + for (i in 0 until count) { + val head = buffer.get().toInt() and 0xFF + val event = head ushr 4 + val index = head and 0x0F + if (event >= Replay.EVENTS.size) return rejected("event $i has unknown kind $event") + if (isButton(event) && index > 1) return rejected("event $i has unknown button $index") + if (event == ReplayEvent.AIM.ordinal && index != 0) return rejected("event $i is an aim sample with index $index") + val time = buffer.getDouble() + if (!time.isFinite()) return rejected("event $i has a time that isn't finite") + if (time < previous) return rejected("event $i goes back in time") + previous = time + events[i] = event.toByte() + indexes[i] = index.toByte() + times[i] = time + if (hasPosition(event)) { + xs[i] = buffer.getFloat() + ys[i] = buffer.getFloat() + if (!xs[i].isFinite() || !ys[i].isFinite()) return rejected("event $i has a position that isn't finite") + } + } + if (buffer.hasRemaining()) return rejected("has ${buffer.remaining()} bytes after the last event") + return ReplayReadResult(Replay(judgeVersion, hash, offsetMs, count, events, indexes, times, xs, ys), null) + } + + private fun rejected(why: String) = ReplayReadResult(null, "This replay $why") +} diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayJudge.kt b/core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayJudge.kt new file mode 100644 index 0000000..1cfe13d --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayJudge.kt @@ -0,0 +1,48 @@ +package net.trilleo.hexium.core.replay + +import net.trilleo.hexium.core.chart.ChartParser +import net.trilleo.hexium.core.chart.ChartValidator +import net.trilleo.hexium.core.chart.Severity +import net.trilleo.hexium.core.chart.SkyButton +import net.trilleo.hexium.core.judge.Judge +import net.trilleo.hexium.core.judge.JudgeChart +import net.trilleo.hexium.core.judge.JudgementConfig + +/** [judge] holds the finished play, and is null when [error] says why it couldn't be re-judged. */ +class RejudgeResult internal constructor(val judge: Judge?, val error: String?) + +/** Runs a replay through the same judge as live play. */ +object ReplayJudge { + private val BUTTONS = SkyButton.entries.toTypedArray() + + fun play(chart: JudgeChart, replay: Replay): Judge { + val judge = Judge(chart, replay.judgementOffsetMs) + for (i in 0 until replay.eventCount) { + val time = replay.timeMs(i) + when (replay.event(i)) { + ReplayEvent.AIM -> judge.aimSample(time, replay.x(i), replay.y(i)) + ReplayEvent.LANE_DOWN -> judge.pressLane(replay.index(i), time) + ReplayEvent.LANE_UP -> judge.releaseLane(replay.index(i), time) + ReplayEvent.BUTTON_DOWN -> judge.pressButton(BUTTONS[replay.index(i)], time, replay.x(i), replay.y(i)) + ReplayEvent.BUTTON_UP -> judge.releaseButton(BUTTONS[replay.index(i)], time) + } + } + judge.finish() + return judge + } + + /** Re-judges from the difficulty file's bytes, checking the replay belongs to it. Never throws on bad input. */ + fun rejudge(chartFile: ByteArray, replay: Replay): RejudgeResult { + if (!Replay.hashOf(chartFile).contentEquals(replay.chartHash)) return failed("This replay is of a different chart") + if (replay.judgeVersion != JudgementConfig.JUDGE_VERSION) { + return failed("This replay was played under judge version ${replay.judgeVersion}, this is ${JudgementConfig.JUDGE_VERSION}") + } + val parsed = ChartParser.parseDifficulty(String(chartFile, Charsets.UTF_8)) + val chart = parsed.value ?: return failed("The chart can't be read: ${parsed.issues.first { it.severity == Severity.ERROR }}") + val problem = ChartValidator.validateChart(chart).firstOrNull { it.severity == Severity.ERROR } + if (problem != null) return failed("The chart isn't valid: $problem") + return RejudgeResult(play(JudgeChart.compile(chart), replay), null) + } + + private fun failed(why: String) = RejudgeResult(null, why) +} diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayRecorder.kt b/core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayRecorder.kt new file mode 100644 index 0000000..9e889a1 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayRecorder.kt @@ -0,0 +1,123 @@ +package net.trilleo.hexium.core.replay + +import net.trilleo.hexium.core.chart.SkyButton +import net.trilleo.hexium.core.judge.Judge +import net.trilleo.hexium.core.judge.JudgementConfig + +/** + * Sends input to the judge and records it, so a replay holds exactly what the judge saw. An + * event older than the current time is recorded as happening now, which is how the judge + * treats it. Events with times or positions that aren't finite are dropped. + * + * Doesn't allocate until it passes [expectedEvents], so size that for the whole song. Past + * [Replay.MAX_EVENTS] it stops recording but keeps judging: check [isFull] before submitting. + */ +class ReplayRecorder( + val judge: Judge, + private val chartHash: ByteArray, + private val judgementOffsetMs: Double, + expectedEvents: Int, +) { + private var capacity = expectedEvents.coerceIn(1, Replay.MAX_EVENTS) + private var events = ByteArray(capacity) + private var indexes = ByteArray(capacity) + private var times = DoubleArray(capacity) + private var xs = FloatArray(capacity) + private var ys = FloatArray(capacity) + private var count = 0 + private var latestMs = Double.NEGATIVE_INFINITY + + /** True if events have been lost to the limit. */ + var isFull = false + private set + + fun pressLane(lane: Int, timeMs: Double) { + if (!timeMs.isFinite() || lane !in 0..MAX_INDEX) return + val time = latest(timeMs) + record(ReplayEvent.LANE_DOWN, lane, time, 0f, 0f) + judge.pressLane(lane, time) + } + + fun releaseLane(lane: Int, timeMs: Double) { + if (!timeMs.isFinite() || lane !in 0..MAX_INDEX) return + val time = latest(timeMs) + record(ReplayEvent.LANE_UP, lane, time, 0f, 0f) + judge.releaseLane(lane, time) + } + + fun pressButton(button: SkyButton, timeMs: Double, x: Float, y: Float) { + if (!timeMs.isFinite() || !x.isFinite() || !y.isFinite()) return + val time = latest(timeMs) + record(ReplayEvent.BUTTON_DOWN, button.ordinal, time, x, y) + judge.pressButton(button, time, x, y) + } + + fun releaseButton(button: SkyButton, timeMs: Double) { + if (!timeMs.isFinite()) return + val time = latest(timeMs) + record(ReplayEvent.BUTTON_UP, button.ordinal, time, 0f, 0f) + judge.releaseButton(button, time) + } + + fun aimSample(timeMs: Double, x: Float, y: Float) { + if (!timeMs.isFinite() || !x.isFinite() || !y.isFinite()) return + val time = latest(timeMs) + record(ReplayEvent.AIM, 0, time, x, y) + judge.aimSample(time, x, y) + } + + fun advanceTo(timeMs: Double) { + if (!timeMs.isFinite()) return + judge.advanceTo(latest(timeMs)) + } + + fun finish() { + judge.finish() + } + + fun toReplay(): Replay = Replay( + JudgementConfig.JUDGE_VERSION, + chartHash, + judgementOffsetMs, + count, + events.copyOf(count), + indexes.copyOf(count), + times.copyOf(count), + xs.copyOf(count), + ys.copyOf(count), + ) + + private fun latest(timeMs: Double): Double { + if (timeMs > latestMs) latestMs = timeMs + return latestMs + } + + private fun record(event: ReplayEvent, index: Int, timeMs: Double, x: Float, y: Float) { + if (count == capacity && !grow()) { + isFull = true + return + } + events[count] = event.ordinal.toByte() + indexes[count] = index.toByte() + times[count] = timeMs + xs[count] = x + ys[count] = y + count++ + } + + private fun grow(): Boolean { + if (capacity >= Replay.MAX_EVENTS) return false + capacity = minOf(capacity.toLong() * 2, Replay.MAX_EVENTS.toLong()).toInt() + events = events.copyOf(capacity) + indexes = indexes.copyOf(capacity) + times = times.copyOf(capacity) + xs = xs.copyOf(capacity) + ys = ys.copyOf(capacity) + return true + } + + private companion object { + /** An event's index has 4 bits in the file. */ + const val MAX_INDEX = 15 + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayFileTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayFileTest.kt new file mode 100644 index 0000000..537ddbd --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayFileTest.kt @@ -0,0 +1,167 @@ +package net.trilleo.hexium.core.replay + +import java.io.ByteArrayInputStream +import java.util.zip.GZIPInputStream +import kotlin.test.Test +import kotlin.test.assertContentEquals +import kotlin.test.assertEquals +import kotlin.test.assertNotNull +import kotlin.test.assertNull +import kotlin.test.assertTrue +import net.trilleo.hexium.core.chart.SkyButton + +class ReplayFileTest { + private val allKinds = listOf( + aimEvent(0, 0, 1.5, 0.25f, -0.5f), + event(1, 3, 2.0), + event(2, 3, 2.0), + aimEvent(3, 1, 3.0, 1.5f, 0.75f), + event(4, 1, 4.0), + ) + + private fun assertRejected(bytes: ByteArray, expectedInMessage: String) { + val result = ReplayFile.read(bytes) + assertNull(result.replay) + val error = assertNotNull(result.error) + assertTrue(expectedInMessage in error, error) + } + + private fun read(bytes: ByteArray): Replay { + val result = ReplayFile.read(gzip(bytes)) + assertEquals(null, result.error) + return assertNotNull(result.replay) + } + + @Test + fun readsEveryFieldFromAHandBuiltFile() { + val replay = read(fileBytes(judgeVersion = 7, offsetMs = -3.25, events = allKinds)) + assertEquals(7, replay.judgeVersion) + assertContentEquals(HASH, replay.chartHash) + assertEquals(-3.25, replay.judgementOffsetMs) + assertEquals(5, replay.eventCount) + assertEquals( + listOf(ReplayEvent.AIM, ReplayEvent.LANE_DOWN, ReplayEvent.LANE_UP, ReplayEvent.BUTTON_DOWN, ReplayEvent.BUTTON_UP), + List(5) { replay.event(it) }, + ) + assertEquals(listOf(0, 3, 3, 1, 1), List(5) { replay.index(it) }) + assertEquals(listOf(1.5, 2.0, 2.0, 3.0, 4.0), List(5) { replay.timeMs(it) }) + assertEquals(0.25f, replay.x(0)) + assertEquals(-0.5f, replay.y(0)) + assertEquals(1.5f, replay.x(3)) + assertEquals(0.75f, replay.y(3)) + } + + @Test + fun writesExactlyTheDocumentedBytes() { + val written = ReplayFile.write(read(fileBytes(events = allKinds))) + val unpacked = GZIPInputStream(ByteArrayInputStream(written)).readAllBytes() + assertContentEquals(fileBytes(events = allKinds), unpacked) + } + + @Test + fun writingIsStable() { + val replay = read(fileBytes(events = allKinds)) + assertContentEquals(ReplayFile.write(replay), ReplayFile.write(replay)) + } + + @Test + fun emptyReplayIsValid() { + assertEquals(0, read(fileBytes()).eventCount) + } + + @Test + fun numbersKeepTheirExactBits() { + val time = Math.nextUp(1234.5678) + val x = Math.nextUp(0.3f) + val once = read(fileBytes(events = listOf(aimEvent(0, 0, time, x, 0f)))) + val replay = assertNotNull(ReplayFile.read(ReplayFile.write(once)).replay) + assertEquals(time, replay.timeMs(0)) + assertEquals(x, replay.x(0)) + } + + @Test + fun notGzipIsRejected() { + assertRejected(byteArrayOf(1, 2, 3, 4), "compressed") + assertRejected(ByteArray(0), "compressed") + } + + @Test + fun truncatedGzipIsRejected() { + val bytes = gzip(fileBytes(events = allKinds)) + assertRejected(bytes.copyOf(bytes.size - 12), "compressed") + } + + @Test + fun wrongMagicIsRejected() { + assertRejected(gzip(fileBytes(magic = "HXRQ")), "not a Hexium replay") + } + + @Test + fun unknownFormatVersionIsRejected() { + assertRejected(gzip(fileBytes(formatVersion = 2)), "format version 2") + } + + @Test + fun everyTruncationIsRejected() { + val whole = fileBytes(events = allKinds) + for (length in 0 until whole.size) { + val result = ReplayFile.read(gzip(whole.copyOf(length))) + assertNull(result.replay, "cut to $length bytes") + assertNotNull(result.error) + } + } + + @Test + fun bytesAfterTheLastEventAreRejected() { + assertRejected(gzip(fileBytes(events = allKinds) + 0), "after the last event") + assertRejected(gzip(fileBytes(eventCount = 4, events = allKinds)), "after the last event") + } + + @Test + fun unknownEventKindIsRejected() { + assertRejected(gzip(fileBytes(events = listOf(event(5, 0, 1.0)))), "kind 5") + } + + @Test + fun badIndexIsRejected() { + assertRejected(gzip(fileBytes(events = listOf(aimEvent(3, 2, 1.0, 0f, 0f)))), "button") + assertRejected(gzip(fileBytes(events = listOf(event(4, 2, 1.0)))), "button") + assertRejected(gzip(fileBytes(events = listOf(aimEvent(0, 1, 1.0, 0f, 0f)))), "index") + } + + @Test + fun timesGoingDownAreRejected() { + assertRejected(gzip(fileBytes(events = listOf(event(1, 0, 2.0), event(2, 0, 1.0)))), "event 1") + assertEquals(2, read(fileBytes(events = listOf(event(1, 0, 2.0), event(2, 0, 2.0)))).eventCount) + } + + @Test + fun numbersThatAreNotFiniteAreRejected() { + assertRejected(gzip(fileBytes(events = listOf(event(1, 0, Double.NaN)))), "event 0") + assertRejected(gzip(fileBytes(events = listOf(event(1, 0, Double.POSITIVE_INFINITY)))), "event 0") + assertRejected(gzip(fileBytes(events = listOf(aimEvent(0, 0, 1.0, Float.NaN, 0f)))), "event 0") + assertRejected(gzip(fileBytes(events = listOf(aimEvent(3, 0, 1.0, 0f, Float.POSITIVE_INFINITY)))), "event 0") + assertRejected(gzip(fileBytes(offsetMs = Double.NaN)), "offset") + } + + @Test + fun aHugeClaimedEventCountIsRejectedWithoutAllocatingForIt() { + assertRejected(gzip(fileBytes(eventCount = Int.MAX_VALUE)), "events") + assertRejected(gzip(fileBytes(eventCount = -1)), "events") + assertRejected(gzip(fileBytes(eventCount = Replay.MAX_EVENTS + 1)), "events") + assertRejected(gzip(fileBytes(eventCount = Replay.MAX_EVENTS)), "cut short") + } + + @Test + fun aSmallFileThatUnpacksIntoSomethingHugeIsRejected() { + val bomb = gzip(ByteArray(200 * 1024 * 1024)) + assertTrue(bomb.size < 1024 * 1024) + assertRejected(bomb, "too large") + } + + @Test + fun buttonIndexesMatchSkyButton() { + assertEquals(0, SkyButton.L.ordinal) + assertEquals(1, SkyButton.R.ordinal) + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayPlayTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayPlayTest.kt new file mode 100644 index 0000000..aec6c5a --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayPlayTest.kt @@ -0,0 +1,251 @@ +package net.trilleo.hexium.core.replay + +import java.lang.management.ManagementFactory +import kotlin.test.Test +import kotlin.test.assertContentEquals +import kotlin.test.assertEquals +import kotlin.test.assertNotNull +import kotlin.test.assertNull +import kotlin.test.assertTrue +import net.trilleo.hexium.core.chart.ChartParser +import net.trilleo.hexium.core.chart.ChartWriter +import net.trilleo.hexium.core.chart.DifficultyChart +import net.trilleo.hexium.core.chart.Ease +import net.trilleo.hexium.core.chart.Note +import net.trilleo.hexium.core.chart.SkyButton +import net.trilleo.hexium.core.chart.SlidePoint +import net.trilleo.hexium.core.judge.ClearLamp +import net.trilleo.hexium.core.judge.Judge +import net.trilleo.hexium.core.judge.JudgeChart +import net.trilleo.hexium.core.judge.Judgement +import net.trilleo.hexium.core.judge.JudgementConfig +import net.trilleo.hexium.core.judge.beat +import net.trilleo.hexium.core.judge.chartOf + +class ReplayPlayTest { + private val chart: DifficultyChart = chartOf( + Note.Tap(beat(1), 0), + Note.Hold(beat(2), beat(3), 1), + Note.SkyTap(beat(3), 0.25, 0.5, SkyButton.R, 1.0), + Note.Slide( + SkyButton.L, + 0.1, + listOf(SlidePoint(beat(4), 0.2, 0.5, Ease.IN_OUT), SlidePoint(beat(5), 0.8, 0.5, Ease.LINEAR)), + ), + Note.Flick(beat(6), 0.5, 0.5, 0.0, 1.0), + Note.Tap(beat(7), 3), + ) + private val chartFile = ChartWriter.writeDifficulty(chart).toByteArray() + + private fun results(judge: Judge) = List(judge.judgedCount) { + Triple(judge.judgedNote(it), judge.judgement(it), judge.judgedDeltaMs(it)) + } + + /** Plays the chart at a frame rate, a little off perfect, with [offsetMs] of input lag. */ + private fun play(recorder: ReplayRecorder, offsetMs: Double, stepMs: Double) { + fun aim(ms: Double): Float = when { + ms < 4000.0 -> 0.2f + ms < 5000.0 -> { + val t = (ms - 4000.0) / 1000.0 + (0.2 + 0.6 * t * t * (3 - 2 * t)).toFloat() + } + else -> (0.1 + (ms - 5900.0) * 0.004).toFloat() + } + val inputs = sortedMapOf( + 1010.0 to 0, 1050.0 to 1, 2000.0 to 2, 3000.0 to 3, 3050.0 to 4, + 3990.0 to 5, 5000.0 to 6, 7070.0 to 7, + ) + var time = 900.0 + while (time < 7400.0) { + val raw = time + offsetMs + for ((inputMs, id) in inputs.subMap(time, time + stepMs)) { + val at = inputMs + offsetMs + when (id) { + 0 -> recorder.pressLane(0, at) + 1 -> recorder.releaseLane(0, at) + 2 -> recorder.pressLane(1, at) + 3 -> { + recorder.releaseLane(1, at) + recorder.pressButton(SkyButton.R, at, 0.25f, 0.5f) + } + 4 -> recorder.releaseButton(SkyButton.R, at) + 5 -> recorder.pressButton(SkyButton.L, at, 0.2f, 0.5f) + 6 -> recorder.releaseButton(SkyButton.L, at) + 7 -> recorder.pressLane(3, at) + } + } + recorder.aimSample(raw, aim(time), 0.5f) + recorder.advanceTo(raw) + time += stepMs + } + recorder.finish() + } + + private fun recorded(offsetMs: Double = 0.0, stepMs: Double = 1000.0 / 240): ReplayRecorder { + val judge = Judge(JudgeChart.compile(chart), offsetMs) + val recorder = ReplayRecorder(judge, Replay.hashOf(chartFile), offsetMs, 2_000) + play(recorder, offsetMs, stepMs) + return recorder + } + + @Test + fun theScriptedPlayIsAFairTest() { + val judge = recorded().judge + assertEquals(judge.objectCount, judge.judgedCount) + assertEquals(0, judge.count(Judgement.MISS), results(judge).toString()) + assertEquals(1, judge.count(Judgement.ATTACK), "the last tap is 70 ms late") + assertEquals(ClearLamp.FULL_COMBO, judge.clearLamp) + } + + @Test + fun rePlayingGivesExactlyTheSameResults() { + val recorder = recorded() + val replayed = ReplayJudge.play(JudgeChart.compile(chart), recorder.toReplay()) + assertEquals(results(recorder.judge), results(replayed)) + assertEquals(recorder.judge.score, replayed.score) + assertEquals(recorder.judge.maxCombo, replayed.maxCombo) + assertEquals(recorder.judge.clearLamp, replayed.clearLamp) + } + + @Test + fun aReplayThroughTheFileGivesExactlyTheSameResults() { + val recorder = recorded(offsetMs = 17.25) + val read = assertNotNull(ReplayFile.read(ReplayFile.write(recorder.toReplay())).replay) + val replayed = ReplayJudge.play(JudgeChart.compile(chart), read) + assertEquals(results(recorder.judge), results(replayed)) + } + + @Test + fun offsetBShiftsEveryInputAndLeavesTheResultAlone() { + val plain = recorded().judge + val shifted = recorded(offsetMs = 40.0).judge + assertEquals(plain.score, shifted.score) + assertEquals(plain.judgements(), shifted.judgements()) + val replayed = ReplayJudge.play(JudgeChart.compile(chart), recorded(offsetMs = 40.0).toReplay()) + assertEquals(plain.score, replayed.score) + } + + private fun Judge.judgements() = List(judgedCount) { judgement(it) } + + @Test + fun offsetBAppliesToTapsDirectly() { + val judge = Judge(JudgeChart.compile(chartOf(Note.Tap(beat(1), 0))), 30.0) + judge.pressLane(0, 1030.0) + assertEquals(0.0, judge.judgedDeltaMs(0)) + val expiring = Judge(JudgeChart.compile(chartOf(Note.Tap(beat(1), 0))), 30.0) + expiring.advanceTo(1113.0) + assertEquals(0, expiring.judgedCount) + expiring.advanceTo(1114.0) + assertEquals(1, expiring.judgedCount) + } + + @Test + fun recorderKeepsHeaderFields() { + val replay = recorded(offsetMs = 5.0).toReplay() + assertEquals(JudgementConfig.JUDGE_VERSION, replay.judgeVersion) + assertContentEquals(Replay.hashOf(chartFile), replay.chartHash) + assertEquals(5.0, replay.judgementOffsetMs) + assertTrue(replay.eventCount > 1000) + } + + @Test + fun anEventOlderThanTheCurrentTimeIsRecordedAsNow() { + val chart = chartOf(Note.Tap(beat(1), 0)) + val recorder = ReplayRecorder(Judge(JudgeChart.compile(chart)), Replay.hashOf(ByteArray(0)), 0.0, 4) + recorder.advanceTo(1020.0) + recorder.pressLane(0, 1000.0) + recorder.aimSample(900.0, 0f, 0f) + val replay = recorder.toReplay() + assertEquals(1020.0, replay.timeMs(0)) + assertEquals(1020.0, replay.timeMs(1)) + val replayed = ReplayJudge.play(JudgeChart.compile(chart), replay) + assertEquals(recorder.judge.judgedDeltaMs(0), replayed.judgedDeltaMs(0)) + } + + @Test + fun theRecorderGrowsPastItsExpectedSize() { + val recorder = ReplayRecorder(Judge(JudgeChart.compile(chartOf())), Replay.hashOf(ByteArray(0)), 0.0, 1) + for (i in 0 until 1000) recorder.aimSample(i.toDouble(), 0f, 0f) + assertEquals(1000, recorder.toReplay().eventCount) + assertEquals(999.0, recorder.toReplay().timeMs(999)) + } + + @Test + fun theRecorderStopsAtTheEventLimitAndStillJudges() { + val chart = chartOf(Note.Tap(beat(1), 0)) + val recorder = ReplayRecorder(Judge(JudgeChart.compile(chart)), Replay.hashOf(ByteArray(0)), 0.0, 4) + for (i in 0 until Replay.MAX_EVENTS + 5) recorder.aimSample(0.0, 0f, 0f) + assertEquals(true, recorder.isFull) + recorder.pressLane(0, 1000.0) + assertEquals(1, recorder.judge.judgedCount) + assertEquals(Replay.MAX_EVENTS, recorder.toReplay().eventCount) + } + + @Test + fun recordingWithinItsExpectedSizeDoesNotAllocate() { + val threads = ManagementFactory.getThreadMXBean() as com.sun.management.ThreadMXBean + val chart = chartOf(Note.Tap(beat(1), 0)) + val recorder = ReplayRecorder(Judge(JudgeChart.compile(chart)), Replay.hashOf(ByteArray(0)), 0.0, 400_000) + val thread = Thread.currentThread().threadId() + val before = threads.getThreadAllocatedBytes(thread) + var i = 0 + while (i < 100_000) { + val time = i.toDouble() + recorder.pressLane(0, time) + recorder.aimSample(time, 0.5f, 0.5f) + recorder.releaseLane(0, time) + recorder.advanceTo(time) + i++ + } + val allocated = threads.getThreadAllocatedBytes(thread) - before + assertTrue(allocated < 64 * 1024, "allocated $allocated bytes") + } + + // Re-judging from the files the server would hold. + + @Test + fun rejudgeGivesTheRecordedResult() { + val recorder = recorded() + val result = ReplayJudge.rejudge(chartFile, recorder.toReplay()) + assertNull(result.error) + val judge = assertNotNull(result.judge) + assertEquals(recorder.judge.score, judge.score) + assertEquals(results(recorder.judge), results(judge)) + } + + @Test + fun rejudgeRejectsAReplayOfADifferentChart() { + val other = ChartWriter.writeDifficulty(chart.copy(level = 2)).toByteArray() + val result = ReplayJudge.rejudge(other, recorded().toReplay()) + assertNull(result.judge) + assertTrue("different chart" in result.error.orEmpty(), result.error) + } + + @Test + fun rejudgeRejectsAnotherJudgeVersion() { + val bytes = fileBytes(judgeVersion = JudgementConfig.JUDGE_VERSION + 1, hash = Replay.hashOf(chartFile)) + val replay = assertNotNull(ReplayFile.read(gzip(bytes)).replay) + val result = ReplayJudge.rejudge(chartFile, replay) + assertNull(result.judge) + assertTrue("judge version" in result.error.orEmpty(), result.error) + } + + @Test + fun rejudgeRejectsABrokenChartFile() { + val broken = "{ not json".toByteArray() + val replay = assertNotNull(ReplayFile.read(gzip(fileBytes(hash = Replay.hashOf(broken), judgeVersion = JudgementConfig.JUDGE_VERSION))).replay) + val result = ReplayJudge.rejudge(broken, replay) + assertNull(result.judge) + assertTrue("chart" in result.error.orEmpty(), result.error) + } + + @Test + fun rejudgeRejectsAChartTheValidatorRejects() { + val invalid = ChartWriter.writeDifficulty(chart.copy(level = 0)).toByteArray() + assertNotNull(ChartParser.parseDifficulty(String(invalid)).value) + val replay = assertNotNull(ReplayFile.read(gzip(fileBytes(hash = Replay.hashOf(invalid), judgeVersion = JudgementConfig.JUDGE_VERSION))).replay) + val result = ReplayJudge.rejudge(invalid, replay) + assertNull(result.judge) + assertTrue("level" in result.error.orEmpty(), result.error) + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayTestSupport.kt b/core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayTestSupport.kt new file mode 100644 index 0000000..c5be3e8 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayTestSupport.kt @@ -0,0 +1,41 @@ +package net.trilleo.hexium.core.replay + +import java.io.ByteArrayOutputStream +import java.nio.ByteBuffer +import java.util.zip.GZIPOutputStream + +internal val HASH = ByteArray(32) { it.toByte() } + +internal fun gzip(bytes: ByteArray): ByteArray { + val out = ByteArrayOutputStream() + GZIPOutputStream(out).use { it.write(bytes) } + return out.toByteArray() +} + +/** Builds a file's contents by hand, separately from the writer, so these tests pin the format itself. */ +internal fun fileBytes( + magic: String = "HXRP", + formatVersion: Int = 1, + judgeVersion: Int = 1, + hash: ByteArray = HASH, + offsetMs: Double = 12.5, + eventCount: Int? = null, + events: List = emptyList(), +): ByteArray { + val size = events.sumOf { it.size } + val buffer = ByteBuffer.allocate(magic.length + 4 + 4 + hash.size + 8 + 4 + size) + buffer.put(magic.toByteArray(Charsets.US_ASCII)) + buffer.putInt(formatVersion) + buffer.putInt(judgeVersion) + buffer.put(hash) + buffer.putDouble(offsetMs) + buffer.putInt(eventCount ?: events.size) + for (event in events) buffer.put(event) + return buffer.array() +} + +internal fun event(kind: Int, index: Int, timeMs: Double): ByteArray = + ByteBuffer.allocate(9).put(((kind shl 4) or index).toByte()).putDouble(timeMs).array() + +internal fun aimEvent(kind: Int, index: Int, timeMs: Double, x: Float, y: Float): ByteArray = + ByteBuffer.allocate(17).put(((kind shl 4) or index).toByte()).putDouble(timeMs).putFloat(x).putFloat(y).array() diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index a3e83d2..384112e 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -49,7 +49,7 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl - Hook the keyboard and mouse callbacks (Minecraft's keyboard and mouse handlers). Stamp each event with `glfwGetTime()` when it arrives and convert it to song time with the clock's mapping. - GLFW delivers events once per frame, so timestamp error is at most one frame. Tell players to run uncapped or at 240+ FPS during play (about 4 ms of error). Keep rendering fast so this holds. - Every frame, record an aim sample (song time, yaw, pitch → crosshair point on the screen plane). Slides and flicks are judged from these samples. Flicks test the line between two samples, so fast swipes at low FPS still register. -- Events go into a queue that the judge drains every frame. Every input event and aim sample is also appended to the replay. +- Events go into a queue that the judge drains every frame. Every input event and aim sample is also appended to the replay: the mod sends input through `ReplayRecorder`, which records it and passes it to the judge ([REPLAY_FORMAT.md](REPLAY_FORMAT.md)). ## Rendering diff --git a/docs/REPLAY_FORMAT.md b/docs/REPLAY_FORMAT.md new file mode 100644 index 0000000..8635ca8 --- /dev/null +++ b/docs/REPLAY_FORMAT.md @@ -0,0 +1,44 @@ +# Replay format v1 + +A replay is every input of one play, in order, so the same judge that ran live can run again and give the same result. The server re-judges replays this way, so it never trusts a score sent by a client. The rules the judge applies are in [JUDGEMENT.md](JUDGEMENT.md). + +## File (extension `.hexreplay`) + +The file is gzip-compressed. Inside, all numbers are big-endian. + +| Field | Size | Content | +| --- | --- | --- | +| Magic | 4 bytes | The text `HXRP` | +| Format version | 4 bytes, integer | `1` | +| Judge version | 4 bytes, integer | The judge rules the play ran under, see below | +| Chart hash | 32 bytes | SHA-256 of the difficulty file's bytes | +| Judgement offset B | 8 bytes, double | In ms. The judge subtracts it from every event time | +| Event count | 4 bytes, integer | How many events follow | +| Events | see below | In the order they happened | + +Each event starts with one byte, the kind in the high 4 bits and the index in the low 4 bits, followed by an 8-byte double time in song milliseconds. Times are raw, before offset B is subtracted. + +| Kind | Event | Index | Then | +| --- | --- | --- | --- | +| 0 | Aim sample | 0 | `x`, `y` as 4-byte floats | +| 1 | Lane key down | Lane | | +| 2 | Lane key up | Lane | | +| 3 | Sky button down | 0 = L, 1 = R | `x`, `y` as 4-byte floats | +| 4 | Sky button up | 0 = L, 1 = R | | + +`x` and `y` are normalised screen coordinates, as in chart files, and may lie off the screen. + +## Rules + +- Times never go down, so a replay always runs forward. When a player resumes from pause and the notes rewind, input isn't judged or recorded until play passes the point where it paused. +- Times, `x`, `y` and offset B are finite. +- A file holds at most 2,000,000 events, about 2 hours at 240 FPS. Reading stops at that size once decompressed, so a small file can't unpack into something huge. +- A file with anything else wrong, including bytes left over after the last event, is rejected with a message. Reading never throws. + +## Judge version + +The judge version is `JudgementConfig.JUDGE_VERSION`. Raise it whenever a change to the windows, weights or judge rules could change a replay's result. A replay only re-judges under the version it was played with, so old scores are never silently changed. Leaderboards are per chart hash, and what happens to old versions' scores is decided when the server is built (Milestone 7). + +## Recording + +The mod sends input through `ReplayRecorder`, which records each event and passes it to the judge, so a replay holds exactly what the judge saw. An event older than the current time is recorded as happening now, which is also how the judge treats it. From d030ed884b5a68bb32fe61287e593cc89006d764 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Tue, 3 Nov 2026 21:33:33 +0800 Subject: [PATCH 09/34] Feature: Add chart lint, replay re-judge and dump commands, guard the judge with golden replays and property tests, and fix flick windows holding back other notes --- .claude/agents/core-engineer.md | 2 +- .gitattributes | 3 + .github/workflows/build.yml | 2 + .gitignore | 3 + CHANGELOG.md | 14 ++ CLAUDE.md | 2 +- core/build.gradle.kts | 4 + .../net/trilleo/hexium/core/chart/Chart.kt | 4 +- .../trilleo/hexium/core/chart/ChartIssue.kt | 2 + .../hexium/core/chart/ChartValidator.kt | 35 ++- .../net/trilleo/hexium/core/judge/Judge.kt | 64 +++-- .../hexium/core/replay/ReplayRecorder.kt | 5 +- .../core/chart/ChartPackageValidatorTest.kt | 15 ++ .../hexium/core/chart/ChartValidatorTest.kt | 19 ++ .../hexium/core/golden/GoldenReplayTest.kt | 129 +++++++++++ .../hexium/core/golden/JudgeProperties.kt | 151 ++++++++++++ .../hexium/core/golden/ScriptedPlayer.kt | 157 +++++++++++++ .../hexium/core/judge/JudgeFlickTest.kt | 204 +++++++++++++++- .../hexium/core/judge/JudgeGroundTest.kt | 30 +++ .../hexium/core/judge/JudgeSlideTest.kt | 50 ++++ .../hexium/core/replay/ReplayPlayTest.kt | 11 +- .../resources/golden/attack_advanced.expected | 32 +++ .../golden/attack_advanced.hexreplay | Bin 0 -> 2216 bytes .../golden/ground_only_expert.expected | 56 +++++ .../golden/ground_only_expert.hexreplay | Bin 0 -> 3162 bytes .../test/resources/golden/late_basic.expected | 32 +++ .../resources/golden/late_basic.hexreplay | Bin 0 -> 3191 bytes .../resources/golden/none_advanced.expected | 32 +++ .../resources/golden/none_advanced.hexreplay | Bin 0 -> 1621 bytes .../golden/perfect_advanced.expected | 32 +++ .../golden/perfect_advanced.hexreplay | Bin 0 -> 2211 bytes .../resources/golden/perfect_basic.expected | 32 +++ .../resources/golden/perfect_basic.hexreplay | Bin 0 -> 3176 bytes .../resources/golden/perfect_expert.expected | 56 +++++ .../resources/golden/perfect_expert.hexreplay | Bin 0 -> 4198 bytes .../resources/golden/sloppy_expert.expected | 56 +++++ .../resources/golden/sloppy_expert.hexreplay | Bin 0 -> 4217 bytes docs/ARCHITECTURE.md | 2 +- docs/CHART_FORMAT.md | 1 + docs/DESIGN.md | 2 +- docs/DEVELOPMENT.md | 11 +- docs/JUDGEMENT.md | 8 +- docs/RELEASING.md | 4 +- docs/REPLAY_FORMAT.md | 2 +- gradle.properties | 3 + tools/build.gradle.kts | 12 +- .../kotlin/net/trilleo/hexium/tools/Lint.kt | 125 ++++++++++ .../kotlin/net/trilleo/hexium/tools/Main.kt | 36 ++- .../net/trilleo/hexium/tools/Replays.kt | 63 +++++ .../net/trilleo/hexium/tools/ToolsTest.kt | 219 ++++++++++++++++++ 50 files changed, 1673 insertions(+), 49 deletions(-) create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/golden/GoldenReplayTest.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/golden/JudgeProperties.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/golden/ScriptedPlayer.kt create mode 100644 core/src/test/resources/golden/attack_advanced.expected create mode 100644 core/src/test/resources/golden/attack_advanced.hexreplay create mode 100644 core/src/test/resources/golden/ground_only_expert.expected create mode 100644 core/src/test/resources/golden/ground_only_expert.hexreplay create mode 100644 core/src/test/resources/golden/late_basic.expected create mode 100644 core/src/test/resources/golden/late_basic.hexreplay create mode 100644 core/src/test/resources/golden/none_advanced.expected create mode 100644 core/src/test/resources/golden/none_advanced.hexreplay create mode 100644 core/src/test/resources/golden/perfect_advanced.expected create mode 100644 core/src/test/resources/golden/perfect_advanced.hexreplay create mode 100644 core/src/test/resources/golden/perfect_basic.expected create mode 100644 core/src/test/resources/golden/perfect_basic.hexreplay create mode 100644 core/src/test/resources/golden/perfect_expert.expected create mode 100644 core/src/test/resources/golden/perfect_expert.hexreplay create mode 100644 core/src/test/resources/golden/sloppy_expert.expected create mode 100644 core/src/test/resources/golden/sloppy_expert.hexreplay create mode 100644 tools/src/main/kotlin/net/trilleo/hexium/tools/Lint.kt create mode 100644 tools/src/main/kotlin/net/trilleo/hexium/tools/Replays.kt create mode 100644 tools/src/test/kotlin/net/trilleo/hexium/tools/ToolsTest.kt diff --git a/.claude/agents/core-engineer.md b/.claude/agents/core-engineer.md index 9f52a87..13c13a1 100644 --- a/.claude/agents/core-engineer.md +++ b/.claude/agents/core-engineer.md @@ -10,7 +10,7 @@ Rules: 2. Test-first: write or update tests in core/src/test before the code. Cover each rule with a passing and a failing case, plus edge cases at window boundaries. 3. Deterministic: the same chart and replay must give the same judgements and score on - every machine and frame rate. No wall-clock time, randomness or hash-order iteration. + every machine. No wall-clock time, randomness or hash-order iteration. 4. Judgement windows and score weights live only in JudgementConfig. 5. Judge code runs every frame in the mod: no allocation in its per-frame paths (no lambdas, boxed collections, Pair, sequences); use primitive arrays and loops. diff --git a/.gitattributes b/.gitattributes index 206e6b0..ae566f5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,5 @@ # The example chart tests compare text exactly, and the spec holds examples they read. docs/** text eol=lf + +# Golden replays and their results must stay byte for byte. +core/src/test/resources/golden/** -text diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f14e32d..d27984a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,8 @@ jobs: run: chmod +x ./gradlew - name: build and test run: ./gradlew build + - name: lint example charts + run: ./gradlew :tools:run --args="lint docs/examples" - name: capture mod jar uses: actions/upload-artifact@v7 with: diff --git a/.gitignore b/.gitignore index d4a664a..0f02cd3 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,6 @@ crash-reports/ # Claude Code: shared settings are committed, personal ones are not .claude/settings.local.json + +# jqwik's record of failed property tests +.jqwik-database diff --git a/CHANGELOG.md b/CHANGELOG.md index 52e6ca5..2ea6989 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ + Checks charts and packages against every rule in the chart format. + Warns when a moment is too dense to play with one hand on the keys. + Added basic, advanced and expert example charts for charters to learn the format from. ++ Added a command-line chart linter, `lint`, that checks chart files and folders against the format. #### Gameplay @@ -43,7 +44,20 @@ + Chart files are limited to 2 MiB, and reading one lists at most 100 problems. + Fixed whole-number fields accepting forms like `1e0`. + Fixed charts with a huge hold being able to run out of memory when their ticks are built. ++ Fixed charts with notes too far away to have a time passing validation. ++ Fixed difficulty files named for another difficulty passing the linter. + +#### Sky Notes + ++ Fixed an open flick window holding back other notes, so a press could count for a hold tick that had already passed. ++ Fixed a swipe already inside a flick when its window opens missing at some frame rates: it now counts as crossing at that moment. #### Misc + Hexium now requires Fabric Language Kotlin 1.14.2 or newer, instead of failing at the first chart load on older versions. + +### Technical Details + ++ Added `rejudge` and `dump` to the command-line tools. ++ Added golden replays and property tests that guard the judge. ++ The build now lints the example charts. diff --git a/CLAUDE.md b/CLAUDE.md index 1181296..fa878f3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -26,7 +26,7 @@ docs/DESIGN.md. mixins in src/client/java/net/trilleo/hexium/client/mixin. src/main holds only shared constants (net.trilleo.hexium). - `server/` online server (Milestone 7), net.trilleo.hexium.server. -- `tools/` CLI: chart lint, replay re-judge, net.trilleo.hexium.tools. +- `tools/` CLI: chart lint, replay re-judge and dump, net.trilleo.hexium.tools. - Versions live in gradle.properties; `mod_version` is the mod's version. ## Hard rules diff --git a/core/build.gradle.kts b/core/build.gradle.kts index bee7d60..dd5f010 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -9,10 +9,14 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:${providers.gradleProperty("kotlinx_serialization_version").get()}") testImplementation(kotlin("test")) + testImplementation("net.jqwik:jqwik:${providers.gradleProperty("jqwik_version").get()}") } tasks.test { // The tests read the example charts and the spec's examples. inputs.dir(rootProject.file("docs/examples")) inputs.file(rootProject.file("docs/CHART_FORMAT.md")) + + // Regenerates the golden replays after a deliberate change (docs/DEVELOPMENT.md). + systemProperty("hexium.updateGolden", providers.systemProperty("hexium.updateGolden").getOrElse("false")) } diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt index c823a1a..dd88748 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt @@ -96,7 +96,7 @@ enum class LicenseType(val id: String) { /** * The chart data of a `.hexium` package: its `meta.json` and every difficulty file. * - * It keeps no file names, so the zip reader must check that each `.json` holds - * that difficulty. + * It keeps no file names, so whoever reads the files must also call + * [ChartValidator.validateFileName]. */ data class ChartPackage(val meta: ChartMeta, val charts: List) diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt index 04f892a..ee0d151 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt @@ -36,6 +36,8 @@ enum class IssueCode { DIR_OUT_OF_RANGE, NOTE_AFTER_AUDIO, TOO_MANY_JUDGED_OBJECTS, + TIME_NOT_FINITE, + FILE_NAME_MISMATCH, TOO_DENSE, BAD_ID, diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt index 7b41d54..597faa7 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartValidator.kt @@ -129,7 +129,17 @@ object ChartValidator { return true } - private fun fileName(difficulty: Difficulty) = "${difficulty.name.lowercase()}.json" + /** The name a difficulty's file must have in a package. */ + fun fileName(difficulty: Difficulty): String = "${difficulty.name.lowercase()}.json" + + /** Whoever reads the files checks this, since [ChartPackage] keeps no file names. */ + fun validateFileName(chart: DifficultyChart, fileName: String): List { + val expected = fileName(chart.difficulty) + if (fileName == expected) return emptyList() + return listOf( + error(IssueCode.FILE_NAME_MISMATCH, "$", "holds ${chart.difficulty}, so it must be named $expected, not $fileName"), + ) + } private const val META_FILE = "meta.json" } @@ -160,7 +170,7 @@ private class ChartChecker(private val chart: DifficultyChart, private val audio checkMeter() for (i in chart.notes.indices) checkNote(chart.notes[i], "notes[$i]") for (lane in groundByLane.values) checkLaneOverlaps(lane) - if (bpmIsUsable && offsetIsUsable) checkAudioEnd() + if (bpmIsUsable && offsetIsUsable) checkTimes() if (judgedObjects > ChartLimits.MAX_JUDGED_OBJECTS) { report(IssueCode.TOO_MANY_JUDGED_OBJECTS, "notes", "has $judgedObjects judged objects, the limit is ${ChartLimits.MAX_JUDGED_OBJECTS}") } @@ -407,11 +417,22 @@ private class ChartChecker(private val chart: DifficultyChart, private val audio } } - private fun checkAudioEnd() { - val end = lastEnd - if (audioDurationMs == null || end == null) return - val endMs = TimingMap(chart.offsetMs, chart.bpm).beatToMs(end) - if (!(endMs < audioDurationMs)) { + /** Times must stay finite, or a note could never be judged. */ + private fun checkTimes() { + val timing = TimingMap(chart.offsetMs, chart.bpm) + for (i in chart.bpm.indices) { + if (!timing.beatToMs(chart.bpm[i].t).isFinite()) { + report(IssueCode.TIME_NOT_FINITE, "bpm[$i].t", "is ${text(chart.bpm[i].t)}, too far away to have a time at this BPM") + return + } + } + val end = lastEnd ?: return + val endMs = timing.beatToMs(end) + if (!endMs.isFinite()) { + report(IssueCode.TIME_NOT_FINITE, lastEndPath, "ends at beat ${text(end)}, too far away to have a time at this BPM") + return + } + if (audioDurationMs != null && !(endMs < audioDurationMs)) { report(IssueCode.NOTE_AFTER_AUDIO, lastEndPath, "ends at $endMs ms, but the audio ends at $audioDurationMs ms") } } diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt b/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt index f36c5f1..d7f719a 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt @@ -97,13 +97,20 @@ class Judge(private val chart: JudgeChart, private val judgementOffsetMs: Double fun advanceTo(timeMs: Double) { val time = timeMs - judgementOffsetMs if (time > now) now = time - settleBefore(now) + settleBefore(now, waitForFlicks = true) + } + + /** An input changes what's held, so everything due before it must be judged first. */ + private fun settleForInput(timeMs: Double) { + val time = timeMs - judgementOffsetMs + if (time > now) now = time + settleBefore(now, waitForFlicks = false) } /** Judges everything left, once the song is over. */ fun finish() { flickSeenUntilMs = Double.POSITIVE_INFINITY - settleBefore(Double.POSITIVE_INFINITY) + settleBefore(Double.POSITIVE_INFINITY, waitForFlicks = false) } /** Records where the crosshair is. Call once per frame: slides and flicks are judged from these samples. */ @@ -114,7 +121,7 @@ class Judge(private val chart: JudgeChart, private val judgementOffsetMs: Double val sampleX = x.toDouble() val sampleY = y.toDouble() if (hasAim && now > aimMs) judgeFlicksAlong(sampleX, sampleY) - settleBefore(now) + settleBefore(now, waitForFlicks = false) updateSlides(sampleX, sampleY) hasAim = true aimMs = now @@ -125,7 +132,7 @@ class Judge(private val chart: JudgeChart, private val judgementOffsetMs: Double fun pressButton(button: SkyButton, timeMs: Double, x: Float, y: Float) { val b = button.ordinal if (buttonDown[b]) return - advanceTo(timeMs) + settleForInput(timeMs) buttonDown[b] = true val clickX = x.toDouble() val clickY = y.toDouble() @@ -149,7 +156,7 @@ class Judge(private val chart: JudgeChart, private val judgementOffsetMs: Double fun releaseButton(button: SkyButton, timeMs: Double) { val b = button.ordinal if (!buttonDown[b]) return - advanceTo(timeMs) + settleForInput(timeMs) buttonDown[b] = false } @@ -197,15 +204,15 @@ class Judge(private val chart: JudgeChart, private val judgementOffsetMs: Double val dy = toY - aimY val length = Math.sqrt(dx * dx + dy * dy) if (length * 1000.0 / dt <= config.flickMinSpeed) return - val angle = Math.toDegrees(Math.atan2(dy, dx)) + val angle = Math.toDegrees(StrictMath.atan2(dy, dx)) while (true) { var crossed = -1 var crossedAtMs = Double.POSITIVE_INFINITY var i = nextFlick while (i < flickJudged.size && chart.flickMs[i] - config.flickJusticeMs <= now) { if (!flickJudged[i] && directionFits(i, angle)) { - val atMs = crossingMs(i, dx, dy, dt) - if (atMs < crossedAtMs && Math.abs(atMs - chart.flickMs[i]) <= config.flickJusticeMs) { + val atMs = crossingInWindowMs(i, dx, dy, dt) + if (atMs < crossedAtMs && atMs - chart.flickMs[i] <= config.flickJusticeMs) { crossed = i crossedAtMs = atMs } @@ -213,8 +220,8 @@ class Judge(private val chart: JudgeChart, private val judgementOffsetMs: Double i++ } if (crossed < 0) return - settleBefore(crossedAtMs) - if (!flickJudged[crossed]) judgeFlick(crossed, crossedAtMs) + settleBefore(crossedAtMs, waitForFlicks = false) + judgeFlick(crossed, crossedAtMs) } } @@ -226,6 +233,21 @@ class Judge(private val chart: JudgeChart, private val judgementOffsetMs: Double return shortest <= config.flickDirectionToleranceDegrees } + /** + * When the swipe crosses a flick inside its window, or infinity if it doesn't. A swipe that entered + * earlier and is still inside when the window opens counts as crossing at that moment. + */ + private fun crossingInWindowMs(flick: Int, dx: Double, dy: Double, dt: Double): Double { + val enteredMs = crossingMs(flick, dx, dy, dt) + val opensMs = chart.flickMs[flick] - config.flickJusticeMs + if (enteredMs >= opensMs || enteredMs == Double.POSITIVE_INFINITY) return enteredMs + val u = (opensMs - aimMs) / dt + val fromX = (aimX - chart.flickX[flick]) * config.screenAspect + dx * u + val fromY = aimY - chart.flickY[flick] + dy * u + val radius = chart.flickRadius[flick] + return if (fromX * fromX + fromY * fromY <= radius * radius) opensMs else Double.POSITIVE_INFINITY + } + /** When the swipe first enters a flick's hit area, or infinity if it doesn't. */ private fun crossingMs(flick: Int, dx: Double, dy: Double, dt: Double): Double { val fromX = (aimX - chart.flickX[flick]) * config.screenAspect @@ -256,7 +278,7 @@ class Judge(private val chart: JudgeChart, private val judgementOffsetMs: Double fun pressLane(lane: Int, timeMs: Double) { if (lane < 0 || lane >= chart.laneCount || laneDown[lane]) return - advanceTo(timeMs) + settleForInput(timeMs) laneDown[lane] = true laneLastDownMs[lane] = now val next = nextPress[lane] @@ -270,17 +292,27 @@ class Judge(private val chart: JudgeChart, private val judgementOffsetMs: Double fun releaseLane(lane: Int, timeMs: Double) { if (lane < 0 || lane >= chart.laneCount || !laneDown[lane]) return - advanceTo(timeMs) + settleForInput(timeMs) laneDown[lane] = false laneLastDownMs[lane] = now } /** - * Judges notes nobody hit and ticks due before [limit], earliest first. At equal times, ground - * notes go before sky taps, sky taps before flicks, and all of them before ticks. + * Judges notes nobody hit and ticks due before [requestedLimit], earliest first. At equal times, + * ground notes go before sky taps, sky taps before flicks, and all of them before ticks. + * + * With [waitForFlicks], it stops at the last sample once a flick's window has opened: a swipe may + * still be under way, and judging past it would make the order of results depend on how often + * [advanceTo] is called. A flick's own Miss always waits for a sample past its deadline. */ - private fun settleBefore(limit: Double) { + private fun settleBefore(requestedLimit: Double, waitForFlicks: Boolean) { while (true) { + var limit = requestedLimit + if (waitForFlicks && nextFlick < flickJudged.size) { + val opens = chart.flickMs[nextFlick] - config.flickJusticeMs + val canSettleTo = if (flickSeenUntilMs > opens) flickSeenUntilMs else opens + if (canSettleTo < limit) limit = canSettleTo + } var lane = -1 var button = -1 var flickIsDue = false @@ -342,7 +374,7 @@ class Judge(private val chart: JudgeChart, private val judgementOffsetMs: Double laneDown[lane] -> 0.0 else -> tickMs - laneLastDownMs[lane] } - record(chart.tickObject[tick], tickJudgement(age), if (age == Double.POSITIVE_INFINITY) Double.NaN else -age) + record(chart.tickObject[tick], tickJudgement(age), if (age == Double.POSITIVE_INFINITY) Double.NaN else 0.0 - age) } private fun pressJudgement(delta: Double): Judgement { diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayRecorder.kt b/core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayRecorder.kt index 9e889a1..8a85ba7 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayRecorder.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/replay/ReplayRecorder.kt @@ -2,6 +2,7 @@ package net.trilleo.hexium.core.replay import net.trilleo.hexium.core.chart.SkyButton import net.trilleo.hexium.core.judge.Judge +import net.trilleo.hexium.core.judge.JudgeChart import net.trilleo.hexium.core.judge.JudgementConfig /** @@ -13,11 +14,13 @@ import net.trilleo.hexium.core.judge.JudgementConfig * [Replay.MAX_EVENTS] it stops recording but keeps judging: check [isFull] before submitting. */ class ReplayRecorder( - val judge: Judge, + chart: JudgeChart, private val chartHash: ByteArray, private val judgementOffsetMs: Double, expectedEvents: Int, ) { + val judge = Judge(chart, judgementOffsetMs) + private var capacity = expectedEvents.coerceIn(1, Replay.MAX_EVENTS) private var events = ByteArray(capacity) private var indexes = ByteArray(capacity) diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartPackageValidatorTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartPackageValidatorTest.kt index e0502e3..9d3c5d2 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartPackageValidatorTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartPackageValidatorTest.kt @@ -71,6 +71,21 @@ class ChartPackageValidatorTest { assertTrue(issue.message.length < ChartLimits.MAX_ISSUE_TEXT_CHARS * 2, issue.message.length.toString()) } + @Test + fun fileNamedAfterItsDifficultyPasses() { + assertEquals(emptyList(), ChartValidator.validateFileName(chart(Difficulty.BASIC), "basic.json")) + assertEquals("master.json", ChartValidator.fileName(Difficulty.MASTER)) + } + + @Test + fun fileNamedForAnotherDifficultyFails() { + assertOnlyError( + ChartValidator.validateFileName(chart(Difficulty.BASIC), "expert.json"), + IssueCode.FILE_NAME_MISMATCH, + "$", + ) + } + @Test fun blankTextFails() { assertMetaError(meta.copy(title = ""), IssueCode.BLANK_TEXT, "title") diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt index 59cac5f..75b8495 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartValidatorTest.kt @@ -466,6 +466,25 @@ class ChartValidatorTest { ) } + // Times must stay finite, or a note could never be judged. + + @Test + fun noteTimesThatOverflowFail() { + val slow = chart.copy(bpm = listOf(BpmChange(b(0), 1e-300))) + assertOnlyError(slow.copy(notes = listOf(Note.Tap(b(2_000_000_000), 0))), IssueCode.TIME_NOT_FINITE, "notes[0]") + } + + @Test + fun bpmChangesThatOverflowFail() { + val slow = chart.copy(bpm = listOf(BpmChange(b(0), 1e-300), BpmChange(b(2_000_000_000), 120.0))) + assertOnlyError(slow, IssueCode.TIME_NOT_FINITE, "bpm[1].t") + } + + @Test + fun verySlowChartsWithFiniteTimesPass() { + assertValid(chart.copy(bpm = listOf(BpmChange(b(0), 1e-300)), notes = listOf(Note.Tap(b(1), 0)))) + } + // The density warning private fun fourLanes(t: Beat) = arrayOf(Note.Tap(t, 0), Note.Tap(t, 1), Note.Tap(t, 2), Note.Tap(t, 3)) diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/golden/GoldenReplayTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/golden/GoldenReplayTest.kt new file mode 100644 index 0000000..65e5dd8 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/golden/GoldenReplayTest.kt @@ -0,0 +1,129 @@ +package net.trilleo.hexium.core.golden + +import java.io.File +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertNotNull +import kotlin.test.assertNull +import net.trilleo.hexium.core.judge.ClearLamp +import net.trilleo.hexium.core.judge.Judge +import net.trilleo.hexium.core.judge.Judgement +import net.trilleo.hexium.core.replay.ReplayFile +import net.trilleo.hexium.core.replay.ReplayJudge + +/** + * Stored replays of scripted players must keep giving the same results. Every summary below was + * worked out by hand from the example charts, not copied from the judge (see the comments). + * Each `.expected` file also locks every object's result, so any change to the judge shows up. + * + * After a deliberate change, regenerate them: ./gradlew :core:test --rerun -Dhexium.updateGolden=true + */ +class GoldenReplayTest { + private class Golden( + val name: String, + val chart: String, + val style: PlayStyle, + val score: Int, + val lamp: ClearLamp, + val maxCombo: Int, + val justiceCritical: Int, + val justice: Int, + val attack: Int, + val miss: Int, + ) + + /* + * Objects in each chart, counting a hold as its head plus 7 ticks per 2 beats (ticks every 1/4 beat, no ends): + * - basic: 13 taps, 2 two-beat holds (8 each) = 29. 15 presses, 14 ticks. + * - advanced: 11 taps, 3 sky taps, 1 two-beat hold (8), 1 two-beat slide (7 ticks) = 29. + * 15 presses (taps, head, sky taps), 14 ticks. + * - expert: 18 taps, holds of 8, 6 and 8, so 40 ground objects. 3 sky taps, a two-beat slide (7), 3 flicks = 53. + * + * Score is 10,000 x (sum of weight percent) / objects, rounded down: + * - late_basic: 15 x 100 + 14 x 101 = 2914. 29,140,000 / 29 = 1,004,827. + * - attack_advanced: 15 x 50 + 14 x 101 = 2164. 21,640,000 / 29 = 746,206. 90 ms late is Attack only on easy charts. + * - ground_only_expert: 40 x 101 = 4040. 40,400,000 / 53 = 762,264. + * - sloppy_expert: presses 70 ms late are Attack on Expert (24: 18 taps, 3 heads, 3 sky taps). Flicks swiped 150 ms + * late are Justice (3): beat 10's, with no required direction, is crossed a little earlier, on the jump from + * rest to the start of its swipe, at about +111 ms, which is still Justice. The 26 ticks stay Justice Critical. 24 x 50 + 3 x 100 + 26 x 101 = 4126. + * 41,260,000 / 53 = 778,490. + * - ground_only_expert best combo: it's 10, between the hold head at 10.5 and the sky tap at 12 (missed at 12.24): 5 ticks, + * the taps at 11, 11.25 and 11.5, and two taps at 12. By time alone it would be 11, but the flick at beat 10 + * is only known to be missed at the first aim sample after its deadline. That's 5.74 ms before the head at + * 10.5, and at 120 FPS the sample lands after the head, so the Miss splits the head off (docs/JUDGEMENT.md). + */ + private val goldens = listOf( + Golden("perfect_basic", "basic", PlayStyle(), 1_010_000, ClearLamp.ALL_JUSTICE_CRITICAL, 29, 29, 0, 0, 0), + Golden("late_basic", "basic", PlayStyle(lateMs = 50.0), 1_004_827, ClearLamp.ALL_JUSTICE, 29, 14, 15, 0, 0), + Golden("perfect_advanced", "advanced", PlayStyle(), 1_010_000, ClearLamp.ALL_JUSTICE_CRITICAL, 29, 29, 0, 0, 0), + Golden("attack_advanced", "advanced", PlayStyle(lateMs = 90.0), 746_206, ClearLamp.FULL_COMBO, 29, 14, 0, 15, 0), + Golden("none_advanced", "advanced", PlayStyle(playGround = false, playSky = false), 0, ClearLamp.NONE, 0, 0, 0, 0, 29), + Golden("perfect_expert", "expert", PlayStyle(judgementOffsetMs = 25.0), 1_010_000, ClearLamp.ALL_JUSTICE_CRITICAL, 53, 53, 0, 0, 0), + Golden( + "sloppy_expert", + "expert", + PlayStyle(lateMs = 70.0, swipeLateMs = 150.0), + 778_490, + ClearLamp.FULL_COMBO, + 53, + 26, + 3, + 24, + 0, + ), + Golden("ground_only_expert", "expert", PlayStyle(playSky = false), 762_264, ClearLamp.NONE, 10, 40, 0, 0, 13), + ) + + private val folder = File("src/test/resources/golden") + + init { + if (System.getProperty("hexium.updateGolden") == "true") regenerate() + } + + private fun chartFile(name: String) = File("../docs/examples/$name.json").readBytes() + + private fun log(judge: Judge) = buildString { + append("score ").append(judge.score).append('\n') + append("lamp ").append(judge.clearLamp).append('\n') + append("maxCombo ").append(judge.maxCombo).append('\n') + for (i in 0 until judge.judgedCount) { + append(judge.judgedNote(i)).append(' ').append(judge.judgement(i)).append(' ').append(judge.judgedDeltaMs(i)).append('\n') + } + } + + @Test + fun storedReplaysGiveTheirHandWorkedResults() { + for (golden in goldens) { + val read = ReplayFile.read(File(folder, "${golden.name}.hexreplay").readBytes()) + assertNull(read.error, golden.name) + val result = ReplayJudge.rejudge(chartFile(golden.chart), assertNotNull(read.replay)) + assertNull(result.error, golden.name) + val judge = assertNotNull(result.judge) + assertEquals(golden.score, judge.score, golden.name) + assertEquals(golden.lamp, judge.clearLamp, golden.name) + assertEquals(golden.maxCombo, judge.maxCombo, golden.name) + assertEquals(golden.justiceCritical, judge.count(Judgement.JUSTICE_CRITICAL), golden.name) + assertEquals(golden.justice, judge.count(Judgement.JUSTICE), golden.name) + assertEquals(golden.attack, judge.count(Judgement.ATTACK), golden.name) + assertEquals(golden.miss, judge.count(Judgement.MISS), golden.name) + assertEquals(File(folder, "${golden.name}.expected").readText(), log(judge), golden.name) + } + } + + @Test + fun scriptedPlayersStillProduceTheStoredResults() { + for (golden in goldens) { + val judge = ScriptedPlayer(chartFile(golden.chart)).play(golden.style).judge + assertEquals(File(folder, "${golden.name}.expected").readText(), log(judge), golden.name) + } + } + + private fun regenerate() { + folder.mkdirs() + for (golden in goldens) { + val recorder = ScriptedPlayer(chartFile(golden.chart)).play(golden.style) + File(folder, "${golden.name}.hexreplay").writeBytes(ReplayFile.write(recorder.toReplay())) + File(folder, "${golden.name}.expected").writeText(log(recorder.judge)) + } + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/golden/JudgeProperties.kt b/core/src/test/kotlin/net/trilleo/hexium/core/golden/JudgeProperties.kt new file mode 100644 index 0000000..abaea69 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/golden/JudgeProperties.kt @@ -0,0 +1,151 @@ +package net.trilleo.hexium.core.golden + +import java.io.File +import kotlin.math.abs +import net.jqwik.api.Arbitraries +import net.jqwik.api.Arbitrary +import net.jqwik.api.ForAll +import net.jqwik.api.Property +import net.jqwik.api.Provide +import net.jqwik.api.RandomDistribution +import net.jqwik.api.constraints.DoubleRange +import net.jqwik.api.constraints.IntRange +import net.trilleo.hexium.core.chart.SkyButton +import net.trilleo.hexium.core.chart.ChartParser +import net.trilleo.hexium.core.judge.Judge +import net.trilleo.hexium.core.chart.Note +import net.trilleo.hexium.core.judge.JudgeChart +import net.trilleo.hexium.core.judge.Judgement +import net.trilleo.hexium.core.judge.beat +import net.trilleo.hexium.core.judge.chartOf +import net.trilleo.hexium.core.replay.Replay +import net.trilleo.hexium.core.replay.ReplayFile +import net.trilleo.hexium.core.replay.ReplayJudge +import net.trilleo.hexium.core.replay.ReplayRecorder + +/** Whatever the input, these stay true (docs/DEVELOPMENT.md, test strategy). */ +class JudgeProperties { + private val names = listOf("basic", "advanced", "expert") + + private fun chartFile(which: Int) = File("../docs/examples/${names[which]}.json").readBytes() + + /** A play with a different small timing error on each press, the same for the same seed. */ + private fun jitter(seed: Int, spreadMs: Double): (Int) -> Double = { note -> + val mixed = (note + 1) * 2654435761L xor seed.toLong() + val whole = java.util.Random(mixed).nextDouble() * 2 - 1 + Math.round(whole * spreadMs * 1024.0) / 1024.0 + } + + private fun results(judge: Judge) = List(judge.judgedCount) { judge.judgedNote(it) to judge.judgement(it) } + + @Property(tries = 60) + fun shiftingEveryInputByOffsetBLeavesTheResultUnchanged( + @ForAll @IntRange(min = 0, max = 2) chart: Int, + @ForAll seed: Int, + @ForAll @IntRange(min = -3200, max = 3200) sixteenths: Int, + ): Boolean { + val player = ScriptedPlayer(chartFile(chart)) + val spread = jitter(seed, 120.0) + val plain = player.play(PlayStyle(jitterMs = spread)).judge + val shifted = player.play(PlayStyle(jitterMs = spread, judgementOffsetMs = sixteenths / 16.0)).judge + return plain.score == shifted.score && results(plain) == results(shifted) + } + + @Provide + fun swipeTimes(): Arbitrary = Arbitraries.doubles().between(-220.0, 230.0).withDistribution(RandomDistribution.uniform()) + + @Provide + fun angles(): Arbitrary = Arbitraries.doubles().between(0.0, 360.0).withDistribution(RandomDistribution.uniform()) + + @Property(tries = 300) + fun aSteadySwipeGetsTheSameJudgementAtEveryFrameRate( + @ForAll("swipeTimes") lateMs: Double, + @ForAll("angles") degrees: Double, + @ForAll @DoubleRange(min = 0.0, max = 1.0) framePhase: Double, + ): Boolean { + // 6 heights per second through a flick at 1000 ms, so it's inside the hit area for 13.33 ms either side of lateMs. + val speed = 0.006 + val insideMs = 0.08 / speed + val opens = -166.67 + val closes = 166.67 + val leavesAtMs = lateMs + insideMs + val crossesAtMs = maxOf(lateMs - insideMs, opens) + // Floats round positions, so stay clear of the very edge of each limit. + val clearOfLimits = abs(abs(crossesAtMs) - 83.33) > 0.01 && abs(leavesAtMs - opens) > 0.01 && abs(crossesAtMs - closes) > 0.01 + if (!clearOfLimits) return true + val dx = Math.cos(Math.toRadians(degrees)) * speed / 2.0 + val dy = Math.sin(Math.toRadians(degrees)) * speed + val chart = JudgeChart.compile(chartOf(Note.Flick(beat(1), 0.5, 0.5, null, 1.0))) + val judgements = listOf(30.0, 60.0, 120.0, 144.0, 240.0, 360.0).map { fps -> + val judge = Judge(chart) + val frame = 1000.0 / fps + var time = 600.0 + framePhase * frame + while (time < 1400.0) { + val moved = time - 1000.0 - lateMs + judge.aimSample(time, (0.5 + dx * moved).toFloat(), (0.5 + dy * moved).toFloat()) + time += frame + } + judge.finish() + judge.judgement(0) + } + val expected = when { + leavesAtMs < opens || crossesAtMs > closes -> Judgement.MISS + abs(crossesAtMs) <= 83.33 -> Judgement.JUSTICE_CRITICAL + else -> Judgement.JUSTICE + } + return judgements.all { it == expected } + } + + @Provide + fun actions(): Arbitrary> = Arbitraries.integers().between(0, 5).list().ofMinSize(50).ofMaxSize(400) + + @Property(tries = 200) + fun randomInputNeverBreaksTheJudgeAndReplaysMatch( + @ForAll @IntRange(min = 0, max = 2) chart: Int, + @ForAll("actions") actions: List, + @ForAll seed: Long, + ): Boolean { + val file = chartFile(chart) + val compiled = JudgeChart.compile(ChartParser.parseDifficulty(String(file)).value!!) + val recorder = ReplayRecorder(compiled, Replay.hashOf(file), 0.0, actions.size) + val random = java.util.Random(seed) + val chartNotes = ChartParser.parseDifficulty(String(file)).value!!.notes + val spots = chartNotes.mapNotNull { note -> + when (note) { + is Note.SkyTap -> note.x to note.y + is Note.Flick -> note.x to note.y + is Note.Slide -> note.points[0].x to note.points[0].y + else -> null + } + } + var time = 0.0 + for (action in actions) { + time += random.nextDouble() * 90.0 - 10.0 + // Half the time, somewhere a note really is, so that plays hit things as well as miss them. + val spot = if (spots.isNotEmpty() && random.nextBoolean()) spots[random.nextInt(spots.size)] else null + val x = spot?.first?.toFloat() ?: (random.nextFloat() * 1.4f - 0.2f) + val y = spot?.second?.toFloat() ?: (random.nextFloat() * 1.4f - 0.2f) + val lane = random.nextInt(5) + val button = if (random.nextBoolean()) SkyButton.L else SkyButton.R + when (action) { + 0 -> recorder.pressLane(lane, time) + 1 -> recorder.releaseLane(lane, time) + 2 -> recorder.pressButton(button, time, x, y) + 3 -> recorder.releaseButton(button, time) + 4 -> recorder.aimSample(time, x, y) + else -> recorder.advanceTo(time) + } + } + recorder.finish() + val judge = recorder.judge + val written = ReplayFile.write(recorder.toReplay()) + val replayed = ReplayJudge.play(compiled, ReplayFile.read(written).replay!!) + return judge.judgedCount == judge.objectCount && + judge.score in 0..1_010_000 && + judge.maxCombo <= judge.objectCount && + results(judge) == results(replayed) && + List(judge.judgedCount) { judge.judgedDeltaMs(it) } == List(replayed.judgedCount) { replayed.judgedDeltaMs(it) } && + judge.score == replayed.score && + judge.maxCombo == replayed.maxCombo + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/golden/ScriptedPlayer.kt b/core/src/test/kotlin/net/trilleo/hexium/core/golden/ScriptedPlayer.kt new file mode 100644 index 0000000..f978610 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/golden/ScriptedPlayer.kt @@ -0,0 +1,157 @@ +package net.trilleo.hexium.core.golden + +import net.trilleo.hexium.core.chart.ChartParser +import net.trilleo.hexium.core.chart.DifficultyChart +import net.trilleo.hexium.core.chart.Note +import net.trilleo.hexium.core.chart.SkyButton +import net.trilleo.hexium.core.chart.SlidePath +import net.trilleo.hexium.core.chart.TimingMap +import net.trilleo.hexium.core.judge.JudgeChart +import net.trilleo.hexium.core.judge.JudgementConfig +import net.trilleo.hexium.core.replay.Replay +import net.trilleo.hexium.core.replay.ReplayRecorder + +/** How a scripted player plays a chart. Plays one is built from are recorded as golden replays. */ +internal data class PlayStyle( + val playGround: Boolean = true, + val playSky: Boolean = true, + /** Added to every press that hits a tap, hold head or sky tap. */ + val lateMs: Double = 0.0, + val framesPerSecond: Double = 120.0, + /** Input lag: every time is this much later, which offset B then cancels. */ + val judgementOffsetMs: Double = 0.0, + /** A different extra offset for each press, from its note's index. Used by the property tests. */ + val jitterMs: (Int) -> Double = { 0.0 }, + /** Added to the moment a swipe passes through a flick. */ + val swipeLateMs: Double = 0.0, +) + +/** + * Plays a chart from what it says, without looking at the judge's results, and records it. + * The crosshair follows slides, swipes through flicks and otherwise rests in the middle. + */ +internal class ScriptedPlayer(private val chartFile: ByteArray) { + private val chart: DifficultyChart = ChartParser.parseDifficulty(String(chartFile)).value!! + private val timing = TimingMap(chart.offsetMs, chart.bpm) + + private class Input(val ms: Double, val apply: (ReplayRecorder, Double) -> Unit) + + private class SlideRun(val startMs: Double, val endMs: Double, val path: SlidePath) + + private class Swipe(val ms: Double, val x: Double, val y: Double, val radians: Double) + + fun play(style: PlayStyle): ReplayRecorder { + val inputs = ArrayList() + val slides = ArrayList() + val swipes = ArrayList() + var lastMs = 0.0 + var firstMs = Double.POSITIVE_INFINITY + + for (i in chart.notes.indices) { + val lag = style.lateMs + style.jitterMs(i) + when (val note = chart.notes[i]) { + is Note.Tap -> { + val at = timing.beatToMs(note.t) + firstMs = minOf(firstMs, at) + lastMs = maxOf(lastMs, at) + if (style.playGround) { + inputs += Input(at + lag) { r, t -> r.pressLane(note.lane, t) } + inputs += Input(at + lag + TAP_LENGTH_MS) { r, t -> r.releaseLane(note.lane, t) } + } + } + is Note.Hold -> { + val at = timing.beatToMs(note.t) + val end = timing.beatToMs(note.end) + firstMs = minOf(firstMs, at) + lastMs = maxOf(lastMs, end) + if (style.playGround) { + inputs += Input(at + lag) { r, t -> r.pressLane(note.lane, t) } + inputs += Input(end - 1.0) { r, t -> r.releaseLane(note.lane, t) } + } + } + is Note.SkyTap -> { + val at = timing.beatToMs(note.t) + firstMs = minOf(firstMs, at) + lastMs = maxOf(lastMs, at) + if (style.playSky) { + inputs += Input(at + lag) { r, t -> r.pressButton(note.button, t, note.x.toFloat(), note.y.toFloat()) } + inputs += Input(at + lag + TAP_LENGTH_MS) { r, t -> r.releaseButton(note.button, t) } + } + } + is Note.Slide -> { + val start = timing.beatToMs(note.points.first().t) + val end = timing.beatToMs(note.points.last().t) + firstMs = minOf(firstMs, start) + lastMs = maxOf(lastMs, end) + if (style.playSky) { + val first = note.points.first() + inputs += Input(start) { r, t -> r.pressButton(note.button, t, first.x.toFloat(), first.y.toFloat()) } + inputs += Input(end) { r, t -> r.releaseButton(note.button, t) } + slides += SlideRun(start, end, SlidePath(note.points)) + } + } + is Note.Flick -> { + val at = timing.beatToMs(note.t) + firstMs = minOf(firstMs, at) + lastMs = maxOf(lastMs, at) + if (style.playSky) swipes += Swipe(at + style.swipeLateMs, note.x, note.y, Math.toRadians(note.dir ?: 0.0)) + } + } + } + inputs.sortBy { it.ms } + + val offset = style.judgementOffsetMs + val frame = 1000.0 / style.framesPerSecond + val frames = ((lastMs - firstMs + 2 * MARGIN_MS) / frame).toInt() + 1 + val recorder = ReplayRecorder(JudgeChart.compile(chart), Replay.hashOf(chartFile), offset, frames + inputs.size) + var next = 0 + for (f in 0 until frames) { + val frameMs = firstMs - MARGIN_MS + f * frame + while (next < inputs.size && inputs[next].ms <= frameMs) { + inputs[next].apply(recorder, inputs[next].ms + offset) + next++ + } + recorder.aimSample(frameMs + offset, aimX(frameMs, slides, swipes), aimY(frameMs, slides, swipes)) + } + while (next < inputs.size) { + inputs[next].apply(recorder, inputs[next].ms + offset) + next++ + } + recorder.finish() + return recorder + } + + private fun aimX(ms: Double, slides: List, swipes: List): Float { + for (swipe in swipes) { + if (Math.abs(ms - swipe.ms) <= SWIPE_HALF_MS) { + return (swipe.x + Math.cos(swipe.radians) * SWIPE_SPEED * (ms - swipe.ms) / JudgementConfig.DEFAULT.screenAspect).toFloat() + } + } + for (slide in slides) { + if (ms >= slide.startMs && ms <= slide.endMs) return slide.path.x(timing.msToBeat(ms)).toFloat() + } + return REST + } + + private fun aimY(ms: Double, slides: List, swipes: List): Float { + for (swipe in swipes) { + if (Math.abs(ms - swipe.ms) <= SWIPE_HALF_MS) { + return (swipe.y + Math.sin(swipe.radians) * SWIPE_SPEED * (ms - swipe.ms)).toFloat() + } + } + for (slide in slides) { + if (ms >= slide.startMs && ms <= slide.endMs) return slide.path.y(timing.msToBeat(ms)).toFloat() + } + return REST + } + + private companion object { + const val TAP_LENGTH_MS = 30.0 + const val MARGIN_MS = 500.0 + const val REST = 0.5f + + /** In screen heights per millisecond, well above the minimum speed. */ + const val SWIPE_SPEED = 0.006 + const val SWIPE_HALF_MS = 40.0 + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeFlickTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeFlickTest.kt index 0571f0f..6e4c8d9 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeFlickTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeFlickTest.kt @@ -3,8 +3,10 @@ package net.trilleo.hexium.core.judge import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertTrue +import net.trilleo.hexium.core.chart.Ease import net.trilleo.hexium.core.chart.Note import net.trilleo.hexium.core.chart.SkyButton +import net.trilleo.hexium.core.chart.SlidePoint class JudgeFlickTest { /** At time 0, so window limits are exact. */ @@ -34,7 +36,102 @@ class JudgeFlickTest { assertEquals(justice, swipeFrom(166.67)) assertEquals(justice, swipeFrom(-166.67)) assertEquals(miss, swipeFrom(166.68)) - assertEquals(miss, swipeFrom(-166.68)) + } + + @Test + fun aSwipeStillInsideWhenTheWindowOpensCountsAsCrossingThen() { + for (fps in listOf(30.0, 60.0, 120.0, 144.0, 240.0, 360.0)) { + val judge = judgeOf(flick()) + val frame = 1000.0 / fps + var time = -400.0 + while (time < 100.0) { + // 6 heights per second, inside the hit area from 13.33 ms before -175 ms to 13.33 ms after it. + judge.aimSample(time, (0.5 + 0.003 * (time + 175.0)).toFloat(), 0.5f) + time += frame + } + judge.finish() + assertEquals(justice, judge.judgements(), "$fps FPS") + assertTrue(judge.judgedDeltaMs(0) >= -166.68, "${judge.judgedDeltaMs(0)} at $fps FPS") + } + } + + @Test + fun theCrossingIsExactlyTheOpeningWhenASingleStepSpansIt() { + val judge = judgeOf(flick()) + judge.aimSample(-170.0, 0.5f, 0.5f) + judge.aimSample(-160.0, 0.52f, 0.5f) + assertEquals(justice, judge.judgements()) + assertEquals(-166.67, judge.judgedDeltaMs(0), 1e-9) + } + + @Test + fun aSwipeThatLeavesBeforeTheWindowOpensDoesNothing() { + for (fps in listOf(30.0, 60.0, 120.0, 360.0)) { + val judge = judgeOf(flick()) + val frame = 1000.0 / fps + var time = -400.0 + while (time < -100.0) { + judge.aimSample(time, (0.5 + 0.003 * (time + 200.0)).toFloat(), 0.5f) + time += frame + } + assertEquals(0, judge.judgedCount, "$fps FPS") + judge.finish() + assertEquals(miss, judge.judgements(), "$fps FPS") + } + val oneStep = judgeOf(flick()) + oneStep.aimSample(-200.0, 0.5f, 0.5f) + oneStep.aimSample(-190.0, 0.9f, 0.5f) + assertEquals(0, oneStep.judgedCount) + } + + @Test + fun aPressPastTheDeadlineDoesNotMissAFlickTheNextSampleShowsWasCrossed() { + val judge = judgeOf(flick(1)) + judge.aimSample(1100.0, 0.3f, 0.5f) + judge.pressLane(0, 1170.0) + assertEquals(0, judge.judgedCount) + judge.aimSample(1180.0, 0.7f, 0.5f) + assertEquals(justice, judge.judgements()) + } + + @Test + fun flicksAreRecordedInTheOrderTheyAreCrossed() { + val judge = judgeOf(flick(1, x = 0.7), Note.Flick(beat(1, 1, 20), 0.3, 0.5, null, 1.0)) + judge.aimSample(1000.0, 0.1f, 0.5f) + judge.aimSample(1010.0, 0.9f, 0.5f) + assertEquals(listOf(1, 0), List(judge.judgedCount) { judge.judgedNote(it) }) + } + + /** A step from 10 ms before the window opens to 4 ms after, passing the given point exactly as it opens. */ + private fun stepThroughOpening(x: Double, y: Double, alongX: Boolean): Int { + val judge = judgeOf(flick()) + val before = 0.15 + val after = 0.06 + if (alongX) { + judge.aimSample(-176.67, (x - before / 2).toFloat(), y.toFloat()) + judge.aimSample(-162.67, (x + after / 2).toFloat(), y.toFloat()) + } else { + judge.aimSample(-176.67, x.toFloat(), (y - before).toFloat()) + judge.aimSample(-162.67, x.toFloat(), (y + after).toFloat()) + } + return judge.judgedCount + } + + @Test + fun theOpeningRuleMeasuresTheHitAreaWhereTheSwipeIsAsItOpens() { + assertEquals(1, stepThroughOpening(0.5 + 0.075 / 2, 0.5, alongX = false), "0.075 heights to the side") + assertEquals(0, stepThroughOpening(0.5 + 0.085 / 2, 0.5, alongX = false), "0.085 heights to the side") + assertEquals(0, stepThroughOpening(0.575, 0.5, alongX = false), "0.075 of the width is 0.15 heights") + assertEquals(1, stepThroughOpening(0.5, 0.575, alongX = true), "0.075 heights above") + assertEquals(0, stepThroughOpening(0.5, 0.585, alongX = true), "0.085 heights above") + } + + @Test + fun aSlowSwipeInsideWhenTheWindowOpensStillDoesNothing() { + val judge = judgeOf(flick()) + judge.aimSample(-200.0, 0.5f, 0.5f) + judge.aimSample(-100.0, 0.5f, 0.5f) + assertEquals(0, judge.judgedCount) } @Test @@ -192,6 +289,111 @@ class JudgeFlickTest { assertEquals(justice, judge.judgements()) } + @Test + fun advancingBetweenSamplesDoesNotChangeTheOrderOfResults() { + fun play(advance: Boolean): List { + val judge = judgeOf(flick(1), Note.Tap(beat(1, 1, 20), 0)) + judge.aimSample(900.0, 0.1f, 0.5f) + if (advance) judge.advanceTo(1140.0) + judge.aimSample(1150.0, 0.9f, 0.5f) + judge.finish() + return List(judge.judgedCount) { judge.judgedNote(it) } + } + assertEquals(listOf(0, 1), play(advance = false), "crossed at about 1012 ms, before the tap's deadline") + assertEquals(play(advance = false), play(advance = true)) + } + + @Test + fun notesWaitForTheNextSampleOnlyOnceAFlickWindowHasOpened() { + val judge = judgeOf(flick(1), Note.Tap(beat(0), 0)) + judge.advanceTo(833.0) + assertEquals(1, judge.judgedCount, "the flick's window hasn't opened, so the tap's Miss needn't wait") + } + + // An open flick window must not hold back other notes when an input arrives. + + @Test + fun aPressDuringAFlickWindowDoesNotHelpATickThatAlreadyPassed() { + fun play(samples: List): Judge { + val judge = judgeOf(flick(1), Note.Hold(beat(0, 1, 2), beat(1, 1, 2), 0)) + judge.pressLane(0, 500.0) + judge.releaseLane(0, 700.0) + for (ms in samples.filter { it < 1005.0 }) judge.aimSample(ms, 0.1f, 0.1f) + judge.pressLane(0, 1005.0) + for (ms in samples.filter { it >= 1005.0 }) judge.aimSample(ms, 0.1f, 0.1f) + judge.finish() + return judge + } + for (samples in listOf(listOf(995.0, 1011.0), List(600) { 500.0 + it * 2.0 })) { + val judge = play(samples) + assertEquals(3, judge.count(Judgement.JUSTICE_CRITICAL), "head, tick at 750, tick at 1250") + assertEquals(2, judge.count(Judgement.MISS), "the tick at 1000 and the flick") + assertEquals(606_000, judge.score) + } + } + + @Test + fun aPressDuringAFlickWindowGoesToTheRightTap() { + val judge = judgeOf(flick(1), Note.Tap(beat(1), 0), Note.Tap(beat(1, 1, 10), 0)) + judge.aimSample(1080.0, 0.1f, 0.1f) + judge.pressLane(0, 1090.0) + judge.aimSample(1096.0, 0.1f, 0.1f) + judge.finish() + assertEquals(1, judge.count(Judgement.JUSTICE_CRITICAL), "the second tap, 10 ms early") + assertEquals(2, judge.count(Judgement.MISS), "the first tap and the flick") + assertEquals(336_666, judge.score) + } + + @Test + fun aClickDuringAFlickWindowGoesToTheRightSkyTap() { + val judge = judgeOf( + flick(1, x = 0.9), + Note.SkyTap(beat(1), 0.5, 0.5, SkyButton.L, 1.0), + Note.SkyTap(beat(1, 1, 10), 0.5, 0.5, SkyButton.L, 1.0), + ) + judge.aimSample(1080.0, 0.1f, 0.1f) + judge.pressButton(SkyButton.L, 1090.0, 0.5f, 0.5f) + judge.finish() + assertEquals(1, judge.count(Judgement.JUSTICE_CRITICAL)) + assertEquals(2, judge.count(Judgement.MISS)) + } + + @Test + fun aClickDuringAFlickWindowDoesNotHelpASlideTickThatAlreadyPassed() { + val slide = Note.Slide( + SkyButton.L, + 0.1, + listOf(SlidePoint(beat(0), 0.5, 0.5, Ease.LINEAR), SlidePoint(beat(1, 1, 8), 0.5, 0.5, Ease.LINEAR)), + ) + val judge = judgeOf(flick(1, x = 0.9), slide) + judge.aimSample(995.0, 0.5f, 0.5f) + judge.pressButton(SkyButton.L, 1005.0, 0.5f, 0.5f) + judge.finish() + assertEquals(5, judge.count(Judgement.MISS), "the flick and every tick up to 1000 ms") + } + + @Test + fun aReplayWithNoAimSamplesGetsNoFreeTicks() { + val judge = judgeOf(flick(1), Note.Hold(beat(2), beat(10), 0)) + judge.pressLane(0, 500_000.0) + judge.finish() + assertEquals(0, judge.score) + assertEquals(judge.objectCount, judge.count(Judgement.MISS)) + } + + @Test + fun minimumSpeedAppliesOnTheYAxisToo() { + val tooSlow = judgeOf(flick()) + tooSlow.aimSample(-500.0, 0.5f, 0f) + tooSlow.aimSample(500.0, 0.5f, 1f) + assertEquals(miss, tooSlow.judgements(), "exactly 1 height per second isn't faster") + + val fastEnough = judgeOf(flick()) + fastEnough.aimSample(-500.0, 0.5f, 0f) + fastEnough.aimSample(490.0, 0.5f, 1f) + assertEquals(justice, fastEnough.judgements()) + } + @Test fun noSwipeMissesOnceASamplePassesTheDeadline() { val judge = judgeOf(flick()) diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeGroundTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeGroundTest.kt index 8692b60..e7d525f 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeGroundTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeGroundTest.kt @@ -195,6 +195,36 @@ class JudgeGroundTest { assertEquals(jc + jc + jc + jc, judge.judgements()) } + @Test + fun ticksFromAnOffGridStartAreCountedFromIt() { + val judge = judgeOf(Note.Hold(beat(1, 1, 3), beat(2), 0)) + judge.pressLane(0, 1000.0 + 1000.0 / 3.0) + judge.advanceTo(1583.33) + assertEquals(1, judge.judgedCount, "first tick at 1583.33...") + judge.advanceTo(1583.34) + assertEquals(2, judge.judgedCount) + judge.advanceTo(1833.34) + assertEquals(3, judge.judgedCount) + judge.finish() + assertEquals(3, judge.judgedCount, "the next would be past the end") + } + + @Test + fun holdHeadsUseTheEasyWindowsAndTheEarlyMissToo() { + fun head(pressMs: Double, difficulty: Difficulty): Judgement { + val judge = judgeOf(Note.Hold(beat(0), beat(1), 0), difficulty = difficulty) + judge.pressLane(0, pressMs) + return judge.judgement(0) + } + assertEquals(Judgement.ATTACK, head(100.0, Difficulty.BASIC)) + assertEquals(Judgement.MISS, head(100.01, Difficulty.BASIC)) + assertEquals(Judgement.MISS, head(83.34, Difficulty.EXPERT)) + assertEquals(Judgement.MISS, head(-150.0, Difficulty.EXPERT)) + val tooEarly = judgeOf(Note.Hold(beat(0), beat(1), 0)) + tooEarly.pressLane(0, -150.01) + assertEquals(0, tooEarly.judgedCount) + } + @Test fun tickOnAnExactFractionOfTheEndIsLeftOut() { val chart = JudgeChart.compile(chartOf(Note.Hold(beat(0, 1, 3), beat(0, 5, 6), 0))) diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeSlideTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeSlideTest.kt index 62c4210..628b89e 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeSlideTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgeSlideTest.kt @@ -54,6 +54,48 @@ class JudgeSlideTest { assertEquals(1, judge.judgedCount) } + private fun tickTimes(note: Note.Slide, chart: net.trilleo.hexium.core.chart.DifficultyChart): List { + val judge = Judge(JudgeChart.compile(chart.copy(notes = listOf(note)))) + val times = ArrayList() + for (ms in 0..6000) { + val before = judge.judgedCount + judge.advanceTo(ms + 0.5) + repeat(judge.judgedCount - before) { times += ms } + } + return times + } + + @Test + fun ticksRunAcrossEveryPointOfALongerSlide() { + val long = Note.Slide( + SkyButton.L, + 0.1, + listOf( + SlidePoint(beat(1), 0.2, 0.5, Ease.LINEAR), + SlidePoint(beat(1, 3, 8), 0.3, 0.5, Ease.IN), + SlidePoint(beat(2), 0.4, 0.5, Ease.OUT), + ), + ) + assertEquals(listOf(1250, 1500, 1750), tickTimes(long, chartOf())) + } + + @Test + fun ticksFromAnOffGridStartAreCountedFromIt() { + val off = Note.Slide( + SkyButton.L, + 0.1, + listOf(SlidePoint(beat(1, 1, 8), 0.2, 0.5, Ease.LINEAR), SlidePoint(beat(1, 5, 8), 0.3, 0.5, Ease.LINEAR)), + ) + assertEquals(listOf(1375), tickTimes(off, chartOf())) + } + + @Test + fun ticksFollowBpmChanges() { + val plain = chartOf() + val changing = plain.copy(bpm = plain.bpm + net.trilleo.hexium.core.chart.BpmChange(beat(1, 1, 2), 120.0)) + assertEquals(listOf(1250, 1500, 1625), tickTimes(slide, changing)) + } + @Test fun neverClickedMissesEveryTick() { val judge = judgeOf(slide) @@ -150,6 +192,14 @@ class JudgeSlideTest { assertEquals(listOf(Judgement.MISS, Judgement.JUSTICE_CRITICAL, Judgement.JUSTICE_CRITICAL), judge.judgements()) } + @Test + fun aSampleAfterATickDoesNotHelpIt() { + val judge = judgeOf(slide) + judge.pressButton(SkyButton.L, 1000.0, 0.9f, 0.9f) + judge.aimSample(1260.0, onPath(1260.0), 0.5f) + assertEquals(listOf(Judgement.MISS), judge.judgements()) + } + @Test fun theClickItselfCountsAsAnAimSample() { val judge = judgeOf(slide) diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayPlayTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayPlayTest.kt index aec6c5a..d58d32b 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayPlayTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/replay/ReplayPlayTest.kt @@ -82,8 +82,7 @@ class ReplayPlayTest { } private fun recorded(offsetMs: Double = 0.0, stepMs: Double = 1000.0 / 240): ReplayRecorder { - val judge = Judge(JudgeChart.compile(chart), offsetMs) - val recorder = ReplayRecorder(judge, Replay.hashOf(chartFile), offsetMs, 2_000) + val recorder = ReplayRecorder(JudgeChart.compile(chart), Replay.hashOf(chartFile), offsetMs, 2_000) play(recorder, offsetMs, stepMs) return recorder } @@ -151,7 +150,7 @@ class ReplayPlayTest { @Test fun anEventOlderThanTheCurrentTimeIsRecordedAsNow() { val chart = chartOf(Note.Tap(beat(1), 0)) - val recorder = ReplayRecorder(Judge(JudgeChart.compile(chart)), Replay.hashOf(ByteArray(0)), 0.0, 4) + val recorder = ReplayRecorder(JudgeChart.compile(chart), Replay.hashOf(ByteArray(0)), 0.0, 4) recorder.advanceTo(1020.0) recorder.pressLane(0, 1000.0) recorder.aimSample(900.0, 0f, 0f) @@ -164,7 +163,7 @@ class ReplayPlayTest { @Test fun theRecorderGrowsPastItsExpectedSize() { - val recorder = ReplayRecorder(Judge(JudgeChart.compile(chartOf())), Replay.hashOf(ByteArray(0)), 0.0, 1) + val recorder = ReplayRecorder(JudgeChart.compile(chartOf()), Replay.hashOf(ByteArray(0)), 0.0, 1) for (i in 0 until 1000) recorder.aimSample(i.toDouble(), 0f, 0f) assertEquals(1000, recorder.toReplay().eventCount) assertEquals(999.0, recorder.toReplay().timeMs(999)) @@ -173,7 +172,7 @@ class ReplayPlayTest { @Test fun theRecorderStopsAtTheEventLimitAndStillJudges() { val chart = chartOf(Note.Tap(beat(1), 0)) - val recorder = ReplayRecorder(Judge(JudgeChart.compile(chart)), Replay.hashOf(ByteArray(0)), 0.0, 4) + val recorder = ReplayRecorder(JudgeChart.compile(chart), Replay.hashOf(ByteArray(0)), 0.0, 4) for (i in 0 until Replay.MAX_EVENTS + 5) recorder.aimSample(0.0, 0f, 0f) assertEquals(true, recorder.isFull) recorder.pressLane(0, 1000.0) @@ -185,7 +184,7 @@ class ReplayPlayTest { fun recordingWithinItsExpectedSizeDoesNotAllocate() { val threads = ManagementFactory.getThreadMXBean() as com.sun.management.ThreadMXBean val chart = chartOf(Note.Tap(beat(1), 0)) - val recorder = ReplayRecorder(Judge(JudgeChart.compile(chart)), Replay.hashOf(ByteArray(0)), 0.0, 400_000) + val recorder = ReplayRecorder(JudgeChart.compile(chart), Replay.hashOf(ByteArray(0)), 0.0, 400_000) val thread = Thread.currentThread().threadId() val before = threads.getThreadAllocatedBytes(thread) var i = 0 diff --git a/core/src/test/resources/golden/attack_advanced.expected b/core/src/test/resources/golden/attack_advanced.expected new file mode 100644 index 0000000..885bf12 --- /dev/null +++ b/core/src/test/resources/golden/attack_advanced.expected @@ -0,0 +1,32 @@ +score 746206 +lamp FULL_COMBO +maxCombo 29 +0 ATTACK 90.0 +1 ATTACK 90.0 +2 ATTACK 90.0 +3 ATTACK 90.0 +4 ATTACK 90.0 +5 ATTACK 90.0 +6 ATTACK 90.0 +6 JUSTICE_CRITICAL 0.0 +6 JUSTICE_CRITICAL 0.0 +7 ATTACK 90.0 +6 JUSTICE_CRITICAL 0.0 +6 JUSTICE_CRITICAL 0.0 +8 ATTACK 90.0 +6 JUSTICE_CRITICAL 0.0 +6 JUSTICE_CRITICAL 0.0 +9 ATTACK 90.0 +6 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +11 ATTACK 90.0 +12 ATTACK 90.0 +13 ATTACK 90.0 +14 ATTACK 90.0 +15 ATTACK 90.0 diff --git a/core/src/test/resources/golden/attack_advanced.hexreplay b/core/src/test/resources/golden/attack_advanced.hexreplay new file mode 100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d00001 diff --git a/core/src/test/resources/golden/late_basic.expected b/core/src/test/resources/golden/late_basic.expected new file mode 100644 index 0000000..cfea757 --- /dev/null +++ b/core/src/test/resources/golden/late_basic.expected @@ -0,0 +1,32 @@ +score 1004827 +lamp ALL_JUSTICE +maxCombo 29 +0 JUSTICE 50.0 +1 JUSTICE 50.0 +2 JUSTICE 50.0 +3 JUSTICE 50.0 +4 JUSTICE 50.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +5 JUSTICE 50.0 +6 JUSTICE 50.0 +7 JUSTICE 50.0 +8 JUSTICE 50.0 +9 JUSTICE 50.0 +10 JUSTICE 50.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +11 JUSTICE 50.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +12 JUSTICE 50.0 +13 JUSTICE 50.0 +14 JUSTICE 50.0 diff --git a/core/src/test/resources/golden/late_basic.hexreplay b/core/src/test/resources/golden/late_basic.hexreplay new file mode 100644 index 0000000000000000000000000000000000000000..38343ee9f74197671d03be4e35e84cdc9cbb68e4 GIT binary patch literal 3191 zcmV--42bg|iwFP!00000|6ST=l$>=P1>gY#(n$!R3TzUZQK~dSU;u?6(mSFQX(CM! z0RaJNBA^mb((5MM%k)0`mJu{`rKnV;2};!J0P?7gUmi%a)V^C9ulNspu~St@z5jf_h!`o{{AXntt<>Ic})wTbK8 zyp2puc5eIWFYDZ1yRY^L;yO>2d|&bt$u!9#NmkO3JSKTb@(yJ2XCaF>f-K%v@@2`_ zB_~O~C%H;;n`Dk;P*RsXBzaEqCS=JNcSsgWd^vQ*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qC z`ah=Arf{ioZk@v4`?qua6#m(iXH9wD6z5Ul-%W8Z75>u{2UOt)q(m;NqA{dIPOPG} zNQvBBMH5VMgcWUOimR+>D^r|lMcbR=ZY$c&6o*{VKBl@_<4ti4 z7M*H}>#*n?Q=E%M7n$OIEV{xJ2W8Q9rnoSRZZXBlSv1WQH)zpJQyis53r%sQ7WJ9p zY%R)|;*Kqi>e<$6=x8OFDn;_xuO%M_Q0@oXLl z@#r*heDg!1`Ju%uHrMrHJkXZgk&H(h!O6`J%fI5lG0yq-b@3S2&2<79-{aqRsVNVd z;z%-n!W37N@w28lql{lR#a(6mrYR0B<9AJQdD%#i(r}8|Se=xH+swu|QW}mm8ylPA zdb2Uf6z80cDWu9*B5j;uinG$j d`KGutZCq-K!_&sqrnE0n{|i^nMPd(0000;lP22zg literal 0 HcmV?d00001 diff --git a/core/src/test/resources/golden/none_advanced.expected b/core/src/test/resources/golden/none_advanced.expected new file mode 100644 index 0000000..f34a909 --- /dev/null +++ b/core/src/test/resources/golden/none_advanced.expected @@ -0,0 +1,32 @@ +score 0 +lamp NONE +maxCombo 0 +0 MISS NaN +1 MISS NaN +2 MISS NaN +3 MISS NaN +4 MISS NaN +5 MISS NaN +6 MISS NaN +6 MISS NaN +6 MISS NaN +7 MISS NaN +6 MISS NaN +6 MISS NaN +8 MISS NaN +6 MISS NaN +6 MISS NaN +9 MISS NaN +6 MISS NaN +10 MISS NaN +10 MISS NaN +10 MISS NaN +10 MISS NaN +10 MISS NaN +10 MISS NaN +10 MISS NaN +11 MISS NaN +12 MISS NaN +13 MISS NaN +14 MISS NaN +15 MISS NaN diff --git a/core/src/test/resources/golden/none_advanced.hexreplay b/core/src/test/resources/golden/none_advanced.hexreplay new file mode 100644 index 0000000000000000000000000000000000000000..cdc4e74a2605d8317a1b3d11d21b0e0eef42540e GIT binary patch literal 1621 zcmV-b2CDfViwFP!00000|6SO5kd}1;2k-?=@f>f_6g52YAW03V1g}E8P-ElpKtn69 zz!41_x+BWbk2mD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mlw0@GzR&GW`be(baK?l+ zc7<)sfNdOz?HWguTu+iuQb2Ma$>Ss?B()^lNM0s+m*hCf8IY!nK$wU6Z3O>4cd4YUzjm)q?md5h#I$tjTL3qYFtgES8!8AmdWWG=~F zBr8eQl2nj1kvvE8nvZ1J&GM!(!frm&xv*yJdBxoNe-}=4hFQ0c8YLH6(dhDsx_3N`d@A;lUh6~QXi&)C|kf&>cb&8Y;cR+Nz8VXzM^B2Q^gMjdesruNLxG4VAiM z9o5k5g&fmR=|9$S4b2yFLPMnxS)XX=&xM@QP-#fk7aDq>kTV*(s*{|1)>=_YQ>uDs=r$oeHPn==UK;vmA-y%!w5>D^eOE}jhMM}7 zp`pix^wm()$NFjLS3>%Gp>3w14e&zSE)sI77useT+hty8Tc(gqFSN~6xGW7FE+kt+ zO{dG%&Ntvt`?G~p-&1K zrJ;pFMr){Pj$<@5B4n(FnkqR?LtP=)XsGFy*J|jCLM#n6Wz*Ksw}ed8P}4pqY3NZQ zlQq=T(Hk`Mb0JeS)b!J-UZ`_{km(X?+m000bZ^neTLiqt1pVr9`s16&NLD>WM>`;E3B+g++ycbBE(~tP&BpiptzeB?LNZcafz$AV%2`4D=pOSE-5?@Th8B6>j z5)NJB&ya8m6AzQrkvJrr)5KpO;ov5|kA#z)_y;5$?ZiJL;jAao4J5(gPvT;dD@eZW zBWZR*ra~FsBH%4j%vgqSaFm$pBUyGrUP*JkMaM0iEhXkKWC8cRlY~R3!~-OpLM47j z!m(7MoP=|#L?cO@;Ou|`L;@>13ekB7SNlwF(=_DMFC9_F5FH4Rj z;Q%c;iG&liv&x{{VE{(YawM005EC9*zJ2 literal 0 HcmV?d00001 diff --git a/core/src/test/resources/golden/perfect_basic.expected b/core/src/test/resources/golden/perfect_basic.expected new file mode 100644 index 0000000..504c4c8 --- /dev/null +++ b/core/src/test/resources/golden/perfect_basic.expected @@ -0,0 +1,32 @@ +score 1010000 +lamp ALL_JUSTICE_CRITICAL +maxCombo 29 +0 JUSTICE_CRITICAL 0.0 +1 JUSTICE_CRITICAL 0.0 +2 JUSTICE_CRITICAL 0.0 +3 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +5 JUSTICE_CRITICAL 0.0 +6 JUSTICE_CRITICAL 0.0 +7 JUSTICE_CRITICAL 0.0 +8 JUSTICE_CRITICAL 0.0 +9 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +11 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +12 JUSTICE_CRITICAL 0.0 +13 JUSTICE_CRITICAL 0.0 +14 JUSTICE_CRITICAL 0.0 diff --git a/core/src/test/resources/golden/perfect_basic.hexreplay b/core/src/test/resources/golden/perfect_basic.hexreplay new file mode 100644 index 0000000000000000000000000000000000000000..26cbce8db8152acfb7b5b07220cfeb80a90a9928 GIT binary patch literal 3176 zcmV-u443mCiwFP!00000|6SU5klb}02H*uFO@xFH5owo%8mb70)CHvX-USh9f*?o- z=_0*DdcEZO-S)nFzp{b`1XP*=f+D@Dgf18o*13H$!>|+X*>~ zeEH9ui4SeL;^_5v@7Vl;+wNYo^YACm{q)MNMWfyep50)heWuNRIPw2KqmE7_A2@Hx z$6derXYpU$b>x?SM*Kylck!RT5r6T7WD#WYw;+?ZhfF?Ja+zehq%QdzWJ&@uWjtic z?vhg_H%JypekXYyGIb@$)XgAM50v~|a;GFM`IF>*$h2{gY1=`j9V5B)OL5eQznChi zNuHN{4w>EonZ6r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{GurR}lEiCil9e=EbucI6EJG|_XF+nBwisUw>Hxxrig PS2r=UQ^wRh)~xw2==Qse literal 0 HcmV?d00001 diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 384112e..c3021d3 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -15,7 +15,7 @@ Minecraft 26.3 is unobfuscated, so no mappings are needed. The project uses Grad | `core` | only kotlinx-serialization-json (plain Kotlin/JVM, Java 25) | Chart model, parser, validator, timing map (BPM changes → ms), judge engine, scoring, replay format | | `mod` | `core`, Fabric API, Fabric Language Kotlin | Menu, session, stage loading, audio clock, input capture, rendering, HUD, screens, editor, network client | | `server` | `core` | Backend API, auth, chart storage, leaderboards, replay verifier | -| `tools` | `core` | CLI: chart lint, chart convert, replay re-judge (used by CI and developers) | +| `tools` | `core` | CLI: chart lint, replay re-judge, replay dump (used by CI and developers) | Only `core` knows the rules. The mod, the server and the `tools` CLI all depend on it. diff --git a/docs/CHART_FORMAT.md b/docs/CHART_FORMAT.md index 4d6ffb0..e211f30 100644 --- a/docs/CHART_FORMAT.md +++ b/docs/CHART_FORMAT.md @@ -93,6 +93,7 @@ Errors: - Slide points rise strictly in time, with at least 2 points. All x and y values are in \[0, 1\]. - `size` and `radius` are finite and above 0. `dir` is from 0 up to (not including) 360. - The last note ends before the audio does. The package is under 30 MiB. +- Every note and BPM entry has a finite time, so a note can always be judged. A difficulty file's name matches its `difficulty` (checked by whatever reads the files). - A chart has at most 1,000,000 judged objects (see [JUDGEMENT.md](JUDGEMENT.md)), so a huge hold can't exhaust memory when its ticks are built. - `meta.json` follows the rules in its section above, and every chart's `difficulty` is listed in it. diff --git a/docs/DESIGN.md b/docs/DESIGN.md index f19bace..347cf3f 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -156,7 +156,7 @@ Gameplay runs along the top row and content and release along the bottom row. On 1. **M0 Foundations.** Repo, CI, `CLAUDE.md`, subagents, `docs/JUDGEMENT.md`, `docs/CHART_FORMAT.md`. - Gate: you've read and approved both specs. -2. **M1 Core engine** (`core-engineer`). Chart model, parser and validator; three hand-written example charts; timing map; judge for all five note types; scoring; replay format; `tools` CLI (lint, re-judge). +2. **M1 Core engine** (`core-engineer`). Chart model, parser and validator; three hand-written example charts; timing map; judge for all five note types; scoring; replay format; `tools` CLI (lint, re-judge, dump). - Gate: every rule in the judgement spec has a test; golden replays pass. 3. **M2 Ground prototype** (`fabric-client`). Title button and menu; session gating; stage world loading; player lock; audio clock; ground tap and hold rendering; key input; combo and judgement HUD; results screen; offset calibration; debug overlay. - Gate: playtest. Timing feels tight, nothing drifts over a 3-minute song, and vanilla worlds are untouched. diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index cf77a46..08f64b6 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -17,7 +17,7 @@ The Gradle wrapper downloads the right Gradle version, and Loom downloads Minecr | `core/` | Plain Kotlin: chart model, timing, judge, scoring, replays. No Minecraft code. | | `mod/` | The Fabric mod. `src/client` holds almost everything (Hexium is client-only); mixins are Java in `src/client/java`. | | `server/` | The online server (from Milestone 7). | -| `tools/` | Command-line tools: chart lint, replay re-judge. | +| `tools/` | Command-line tools: chart lint, replay re-judge, replay dump. | | `docs/` | Design, specs and developer docs (upper-case file names). | | `docs/examples/` | Hand-written example charts in the writer's layout, used as test fixtures. | | `CHANGELOG.md` | Player-facing change log, see [RELEASING.md](RELEASING.md). | @@ -29,7 +29,10 @@ The Gradle wrapper downloads the right Gradle version, and Loom downloads Minecr | `./gradlew build` | Builds every module and runs all tests | | `./gradlew :mod:runClient` | Starts Minecraft with Hexium in a dev environment | | `./gradlew :core:test` | Runs only the judge and chart tests (fast) | -| `./gradlew :tools:run --args="lint docs/examples"` | Lints example charts (once the linter exists) | +| `./gradlew :tools:run --args="lint docs/examples"` | Lints chart files or folders. A folder with a `meta.json` is also checked as a package | +| `./gradlew :tools:run --args="rejudge docs/examples/basic.json play.hexreplay"` | Runs a replay through the judge and prints the result | +| `./gradlew :tools:run --args="dump play.hexreplay"` | Prints a replay as text | +| `./gradlew :core:test --rerun -Dhexium.updateGolden=true` | Regenerates the golden replays, after a deliberate change to the judge | | `./gradlew :server:run` | Runs the server locally (from Milestone 7) | The built mod is `mod/build/libs/hexium-.jar`. The version comes only from `mod_version` in `gradle.properties`. @@ -63,8 +66,8 @@ Parallel lanes that work well: after Milestone 1, `server` can build auth and ch ### Test strategy - **`core` unit tests:** one file of synthetic input per rule in `docs/JUDGEMENT.md`. For example: "tap 20 ms late → Justice Critical", "hold released 120 ms before a tick → Attack on that tick", "slide with crosshair outside radius → Miss on those ticks", "flick too slow → no hit". -- **Golden replays:** recorded replays with their known scores live in `core/src/test/resources`. Any change to the judge must keep them identical, or update them on purpose in the same PR. -- **Property tests (jqwik):** shifting every input by the judgement offset B leaves the score unchanged when B is set to match. Results never depend on frame rate (re-sample aim at 60 / 144 / 360 FPS and get the same score within tolerance). +- **Golden replays:** replays with their known scores live in `core/src/test/resources/golden`. Any change to the judge must keep them identical, or update them on purpose in the same PR (and raise `JudgementConfig.JUDGE_VERSION`). So far they come from scripted players, with scores worked out by hand in `GoldenReplayTest`. Real recorded plays join them from Milestone 2. Editing an example chart changes its hash, so its golden replays must be regenerated too. +- **Property tests (jqwik):** shifting every input by the judgement offset B leaves the score unchanged when B is set to match. A steady straight swipe gets the same judgement at every frame rate (other results can differ by what one frame's sampling can, see [JUDGEMENT.md](JUDGEMENT.md)). Random input never breaks the judge, and its replay always gives the same results. - **Fabric client game tests:** the title button opens the menu; the menu loads the stage; joining a normal singleplayer world creates no session; a short chart plays to the results screen with autoplay. - **Human playtest checklist per milestone:** offset calibration feels right; no drift after a 3-minute song; ground track readable while aiming at the corners; hold, slide and flick feel fair. diff --git a/docs/JUDGEMENT.md b/docs/JUDGEMENT.md index dd59fd1..db3d8d1 100644 --- a/docs/JUDGEMENT.md +++ b/docs/JUDGEMENT.md @@ -17,13 +17,15 @@ Limits are inclusive. For taps, sky taps and hold heads, the Miss window runs fr - **Tap and sky tap:** judged by |press time − target|. A sky tap also needs the crosshair inside the note's hit area at the moment of the click. A note's hit area is a circle whose radius is the base hit radius in `JudgementConfig` (0.08) times the note's `size`. Hit radii are fractions of the screen's height, and circles are measured using the screen's 2:1 aspect, also in `JudgementConfig`. A press with no note in its Miss window does nothing (no penalty). A sky tap click outside the hit area, or with the wrong button, is ignored by that note, so the player can click again in time. The crosshair position is recorded with the click. - **Ground hold:** the head is judged like a tap. The body has invisible ticks, one every 1/4 beat (fixed in `JudgementConfig`, not set per chart, at least one per hold). Ticks are counted from the hold's start and exclude its start and end. A hold too short for any tick gets one at its end. Each tick is judged at its own time, on how long ago the lane key was last down, even if it was pressed before the hold began. A press after the tick doesn't help it. Releasing and pressing again inside the window keeps Justice Critical, like CHUNITHM. There's no tail judgement, and holding past the end is never penalised. -- **Sky slide:** no head or tail judgement. Ticks every 1/4 beat along the path (the same fixed rate and placement as holds, from the first point to the last). A tick is "held" while the required button is down AND the crosshair is inside the path's hit radius (its `radius`, a fraction of the screen's height) at the path's current position. Before the first point, the position is the first point. Each tick is judged on how long ago the last aim sample that was "held" came, with the tick windows above. -- **Flick:** hit when the crosshair passes through the note's hit area between two frames, moving faster than a minimum speed (screen units per second), in the optional required direction. The judgement is the crossing time against the target: the moment the swipe first enters the hit area, worked out along the line between the two samples. A swipe that starts inside uses the time of that first sample. The minimum speed is 1 screen height per second and the direction tolerance is ±45°, both in `JudgementConfig`. One swipe can hit several flicks. +- **Sky slide:** no head or tail judgement. Ticks every 1/4 beat along the path (the same fixed rate and placement as holds, from the first point to the last). A tick is "held" while the required button is down AND the crosshair is inside the path's hit radius (its `radius`, a fraction of the screen's height) at the path's current position. Before the first point, the position is the first point. Each tick is judged on how long ago the last aim sample that was "held" came, with the tick windows above. A click counts as an aim sample at its own position. +- **Flick:** hit when the crosshair passes through the note's hit area between two frames, moving faster than a minimum speed (screen units per second), in the optional required direction. The judgement is the crossing time against the target: the moment the swipe first enters the hit area, worked out along the line between the two samples. A swipe that starts inside uses the time of that first sample. A swipe that entered before the window opened and is still inside when it opens counts as crossing at that moment. The minimum speed is 1 screen height per second and the direction tolerance is ±45°, both in `JudgementConfig`. One swipe can hit several flicks. - A missed head doesn't auto-fail the hold's ticks. Each tick stands on its own. ## Score -Every judged object (tap, hold head, each tick, each flick) counts as one note out of N. Its accuracy weight is Justice Critical 101%, Justice 100%, Attack 50%, Miss 0%. Score = 1,000,000 × Σweight ÷ N, rounded down, so a perfect play is 1,010,000. A chart with no judged objects scores 0 and has no lamp. Every judged object also adds to combo, and a Miss breaks it. +Every judged object (tap, hold head, each tick, each flick) counts as one note out of N. Its accuracy weight is Justice Critical 101%, Justice 100%, Attack 50%, Miss 0%. Score = 1,000,000 × Σweight ÷ N, rounded down, so a perfect play is 1,010,000. A chart with no judged objects scores 0 and has no lamp. Every judged object also adds to combo, and a Miss breaks it. A flick is only judged at an aim sample: a crossing at the next sample, and a Miss at the first sample after its window, since a swipe may still be under way. So an input landing just before that sample is counted first. This can move the best combo a little between frame rates. + +Frame rate can also change a score, by what one frame's sampling can. Slides and flicks are judged from aim samples, so a crosshair resting on a flick is dated by its last sample there, a curved swipe is measured along the straight lines between samples, and a slide tick uses the last sample that was held. A straight swipe that keeps a steady speed through the samples around the crossing gets the same judgement at every frame rate, apart from rounding right at a limit. A swipe that starts or stops within one frame of the note is measured by that frame's average, so it can land differently, even as a Miss if that average is under the minimum speed. Re-judging a replay always gives exactly the live result, since it holds the same samples. Clear lamps: Full Combo (no Miss), All Justice (nothing below Justice), All Justice Critical. There's no life gauge or fail state in v1. Whether to add one later is an open question. diff --git a/docs/RELEASING.md b/docs/RELEASING.md index f675e5d..8a0d4db 100644 --- a/docs/RELEASING.md +++ b/docs/RELEASING.md @@ -1,6 +1,6 @@ # Releasing -Two GitHub workflows, based on TownyMenu's, do all builds and releases (listed under Workflows below). `build.yml` builds and tests every push and PR and keeps the jar as a downloadable artifact. `release.yml` publishes a GitHub Release, and optionally a Modrinth version, whenever a commit that changes `mod_version` lands on `main` in TriBinary/Hexium. Forks never release, so pushing to your fork is always safe. +Two GitHub workflows, based on TownyMenu's, do all builds and releases (listed under Workflows below). `build.yml` builds and tests every push and PR, lints the example charts and keeps the jar as a downloadable artifact. `release.yml` publishes a GitHub Release, and optionally a Modrinth version, whenever a commit that changes `mod_version` lands on `main` in TriBinary/Hexium. Forks never release, so pushing to your fork is always safe. ## Changelog format @@ -48,7 +48,7 @@ Two GitHub workflows, based on TownyMenu's, do all builds and releases (listed u ## Workflows -- [`.github/workflows/build.yml`](../.github/workflows/build.yml) builds and tests every push and pull request with JDK 25, and uploads `mod/build/libs/` as the `hexium-dev-build` artifact. A commented-out job runs client game tests under a virtual display; turn it on in Milestone 2 once those tests exist (check Loom's task name first). +- [`.github/workflows/build.yml`](../.github/workflows/build.yml) builds and tests every push and pull request with JDK 25, lints the example charts, and uploads `mod/build/libs/` as the `hexium-dev-build` artifact. A commented-out job runs client game tests under a virtual display; turn it on in Milestone 2 once those tests exist (check Loom's task name first). - [`.github/workflows/release.yml`](../.github/workflows/release.yml) runs when `gradle.properties` changes on `main` (or by hand). It skips forks, reads `mod_version`, and does nothing if the tag `v` already exists. Otherwise it takes the matching `## Version X.Y.Z` section of `CHANGELOG.md` as release notes (and fails if there isn't one), builds, and creates the GitHub Release with `hexium-.jar` attached. - Modrinth publishing is part of `release.yml` but stays off until the repository variable `MODRINTH_PROJECT_ID` and the secret `MODRINTH_TOKEN` are set. It lists Fabric API and Fabric Language Kotlin as required dependencies. Check the publishing action's current version and inputs before turning it on. diff --git a/docs/REPLAY_FORMAT.md b/docs/REPLAY_FORMAT.md index 8635ca8..0e792b0 100644 --- a/docs/REPLAY_FORMAT.md +++ b/docs/REPLAY_FORMAT.md @@ -33,7 +33,7 @@ Each event starts with one byte, the kind in the high 4 bits and the index in th - Times never go down, so a replay always runs forward. When a player resumes from pause and the notes rewind, input isn't judged or recorded until play passes the point where it paused. - Times, `x`, `y` and offset B are finite. - A file holds at most 2,000,000 events, about 2 hours at 240 FPS. Reading stops at that size once decompressed, so a small file can't unpack into something huge. -- A file with anything else wrong, including bytes left over after the last event, is rejected with a message. Reading never throws. +- A file whose contents have anything else wrong, including bytes left over after the last event, is rejected with a message. Reading never throws. Only the unpacked contents are checked, so bytes outside the gzip data are ignored. ## Judge version diff --git a/gradle.properties b/gradle.properties index 358778f..3b7b078 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,3 +23,6 @@ fabric_kotlin_version=1.14.2+kotlin.2.4.21 # Must stay on the version Fabric Language Kotlin bundles: the mod doesn't ship its own. # When bumping fabric_kotlin_version, also raise its minimum in fabric.mod.json. kotlinx_serialization_version=1.11.0 + +# Tests +jqwik_version=1.9.3 diff --git a/tools/build.gradle.kts b/tools/build.gradle.kts index 072f976..2880a13 100644 --- a/tools/build.gradle.kts +++ b/tools/build.gradle.kts @@ -1,4 +1,4 @@ -// Command-line tools: chart lint, chart convert, replay re-judge. +// Command-line tools: chart lint, replay re-judge, replay dump. plugins { id("org.jetbrains.kotlin.jvm") application @@ -12,3 +12,13 @@ dependencies { application { mainClass = "net.trilleo.hexium.tools.MainKt" } + +tasks.named("run") { + // So paths in --args are relative to the repository, as the docs show them. + workingDir = rootProject.projectDir +} + +tasks.test { + // The tests lint the example charts. + inputs.dir(rootProject.file("docs/examples")) +} diff --git a/tools/src/main/kotlin/net/trilleo/hexium/tools/Lint.kt b/tools/src/main/kotlin/net/trilleo/hexium/tools/Lint.kt new file mode 100644 index 0000000..31af806 --- /dev/null +++ b/tools/src/main/kotlin/net/trilleo/hexium/tools/Lint.kt @@ -0,0 +1,125 @@ +package net.trilleo.hexium.tools + +import java.io.File +import java.io.IOException +import java.io.PrintStream +import net.trilleo.hexium.core.chart.ChartIssue +import net.trilleo.hexium.core.chart.ChartLimits +import net.trilleo.hexium.core.chart.ChartMeta +import net.trilleo.hexium.core.chart.ChartPackage +import net.trilleo.hexium.core.chart.ChartParser +import net.trilleo.hexium.core.chart.ChartValidator +import net.trilleo.hexium.core.chart.DifficultyChart +import net.trilleo.hexium.core.chart.IssueCode +import net.trilleo.hexium.core.chart.Severity + +private const val META_FILE = "meta.json" + +/** The package rules a folder adds on top of checking each file. */ +private val PACKAGE_CODES = setOf( + IssueCode.MISSING_DIFFICULTY_FILE, + IssueCode.UNLISTED_DIFFICULTY_FILE, + IssueCode.DUPLICATE_DIFFICULTY_FILE, +) + +private class Tally(val out: PrintStream) { + var files = 0 + var errors = 0 + var warnings = 0 + + fun report(file: File, issues: List) { + for (issue in issues) { + if (issue.severity == Severity.ERROR) errors++ else warnings++ + out.println("${file.path}: $issue") + } + } + + fun error(file: File, message: String) { + errors++ + out.println("${file.path}: ${Severity.ERROR} $message") + } +} + +internal fun lint(paths: List, out: PrintStream): Int { + val tally = Tally(out) + var badPath = false + for (path in paths) { + val file = File(path) + when { + file.isDirectory -> { + val charts = file.listFiles { f -> f.isFile && f.name.endsWith(".json") }.orEmpty().sortedBy { it.name } + if (charts.isEmpty()) { + out.println("$path: no .json files here") + badPath = true + } else { + lintFolder(file, charts, tally) + } + } + file.isFile -> lintFile(file, tally) + else -> { + out.println("$path: no such file or folder") + badPath = true + } + } + } + if (tally.files > 0) out.println("${tally.files} file(s) checked: ${tally.errors} errors, ${tally.warnings} warnings") + return when { + badPath -> EXIT_USAGE + tally.errors > 0 -> EXIT_PROBLEMS + else -> EXIT_OK + } +} + +private fun lintFolder(folder: File, files: List, tally: Tally) { + var meta: ChartMeta? = null + val charts = ArrayList() + var allRead = true + for (file in files) { + when (val value = lintFile(file, tally)) { + is ChartMeta -> meta = value + is DifficultyChart -> charts += value + else -> allRead = false + } + } + // A file that couldn't be read has been reported already, and isn't missing. + val listed = meta ?: return + if (!allRead) return + val issues = ChartValidator.validatePackage(ChartPackage(listed, charts)).filter { it.code in PACKAGE_CODES } + tally.report(folder, issues) +} + +/** Returns what the file holds, if it could be read. */ +private fun lintFile(file: File, tally: Tally): Any? { + tally.files++ + val problemsBefore = tally.errors + tally.warnings + val value = readAndCheck(file, tally) + if (tally.errors + tally.warnings == problemsBefore) tally.out.println("${file.path}: ok") + return value +} + +private fun readAndCheck(file: File, tally: Tally): Any? { + // A character is at most 4 bytes, so a longer file can't be within the limit. Don't try to read it. + if (file.length() > ChartLimits.MAX_JSON_FILE_CHARS * 4L) { + tally.error(file, "is ${file.length()} bytes, far over the limit of ${ChartLimits.MAX_JSON_FILE_CHARS} characters") + return null + } + val text = try { + file.readText() + } catch (e: IOException) { + tally.error(file, "can't be read: ${e.message}") + return null + } + if (file.name == META_FILE) { + val parsed = ChartParser.parseMeta(text) + tally.report(file, parsed.issues) + val meta = parsed.value ?: return null + tally.report(file, ChartValidator.validateMeta(meta)) + return meta + } + val parsed = ChartParser.parseDifficulty(text) + tally.report(file, parsed.issues) + val chart = parsed.value ?: return null + tally.report(file, ChartValidator.validateChart(chart)) + tally.report(file, ChartValidator.validateFileName(chart, file.name)) + return chart +} diff --git a/tools/src/main/kotlin/net/trilleo/hexium/tools/Main.kt b/tools/src/main/kotlin/net/trilleo/hexium/tools/Main.kt index 7006fdc..a03c6e3 100644 --- a/tools/src/main/kotlin/net/trilleo/hexium/tools/Main.kt +++ b/tools/src/main/kotlin/net/trilleo/hexium/tools/Main.kt @@ -1,5 +1,39 @@ package net.trilleo.hexium.tools +import java.io.IOException +import java.io.PrintStream +import kotlin.system.exitProcess + +internal const val EXIT_OK = 0 +internal const val EXIT_PROBLEMS = 1 +internal const val EXIT_USAGE = 2 + +private const val USAGE = """Hexium tools + lint ... Check chart files against the chart format + rejudge Run a replay through the judge and print the result + dump Print a replay as text""" + fun main(args: Array) { - println("Hexium tools: no commands yet (Milestone 1). Arguments: ${args.joinToString(" ")}") + exitProcess(runTool(args.toList(), System.out)) +} + +/** Returns the exit code: 0 for fine, 1 for problems in the files, 2 for a wrong command or missing file. */ +internal fun runTool(args: List, out: PrintStream): Int { + val rest = args.drop(1) + return try { + when (args.firstOrNull()) { + "lint" -> if (rest.isEmpty()) usage(out) else lint(rest, out) + "rejudge" -> if (rest.size != 2) usage(out) else rejudge(rest[0], rest[1], out) + "dump" -> if (rest.size != 1) usage(out) else dump(rest[0], out) + else -> usage(out) + } + } catch (e: IOException) { + out.println("Can't read a file: ${e.message}") + EXIT_PROBLEMS + } +} + +private fun usage(out: PrintStream): Int { + out.println(USAGE) + return EXIT_USAGE } diff --git a/tools/src/main/kotlin/net/trilleo/hexium/tools/Replays.kt b/tools/src/main/kotlin/net/trilleo/hexium/tools/Replays.kt new file mode 100644 index 0000000..4857c7d --- /dev/null +++ b/tools/src/main/kotlin/net/trilleo/hexium/tools/Replays.kt @@ -0,0 +1,63 @@ +package net.trilleo.hexium.tools + +import java.io.File +import java.io.PrintStream +import net.trilleo.hexium.core.judge.Judgement +import net.trilleo.hexium.core.replay.Replay +import net.trilleo.hexium.core.replay.ReplayEvent +import net.trilleo.hexium.core.replay.ReplayFile +import net.trilleo.hexium.core.replay.ReplayJudge + +internal fun rejudge(chartPath: String, replayPath: String, out: PrintStream): Int { + val chartFile = File(chartPath) + val replayFile = File(replayPath) + for (file in listOf(chartFile, replayFile)) { + if (!file.isFile) { + out.println("${file.path}: no such file") + return EXIT_USAGE + } + } + val read = ReplayFile.read(replayFile.readBytes()) + val replay = read.replay + if (replay == null) { + out.println("${replayFile.path}: ${read.error}") + return EXIT_PROBLEMS + } + val result = ReplayJudge.rejudge(chartFile.readBytes(), replay) + val judge = result.judge + if (judge == null) { + out.println("${replayFile.path}: ${result.error}") + return EXIT_PROBLEMS + } + out.println("Score: ${judge.score}") + out.println("Lamp: ${judge.clearLamp}") + out.println("Max combo: ${judge.maxCombo} of ${judge.objectCount} objects") + for (judgement in Judgement.entries) out.println("$judgement: ${judge.count(judgement)}") + return EXIT_OK +} + +internal fun dump(replayPath: String, out: PrintStream): Int { + val file = File(replayPath) + if (!file.isFile) { + out.println("$replayPath: no such file") + return EXIT_USAGE + } + val read = ReplayFile.read(file.readBytes()) + val replay = read.replay + if (replay == null) { + out.println("$replayPath: ${read.error}") + return EXIT_PROBLEMS + } + out.println("Judge version: ${replay.judgeVersion}") + out.println("Chart hash: ${replay.chartHash.joinToString("") { "%02x".format(it) }}") + out.println("Judgement offset: ${replay.judgementOffsetMs} ms") + out.println("${replay.eventCount} events:") + for (i in 0 until replay.eventCount) out.println(eventLine(replay, i)) + return EXIT_OK +} + +private fun eventLine(replay: Replay, i: Int): String { + val event = replay.event(i) + val position = if (event == ReplayEvent.AIM || event == ReplayEvent.BUTTON_DOWN) " ${replay.x(i)} ${replay.y(i)}" else "" + return "${replay.timeMs(i)} $event ${replay.index(i)}$position" +} diff --git a/tools/src/test/kotlin/net/trilleo/hexium/tools/ToolsTest.kt b/tools/src/test/kotlin/net/trilleo/hexium/tools/ToolsTest.kt new file mode 100644 index 0000000..dd6fd40 --- /dev/null +++ b/tools/src/test/kotlin/net/trilleo/hexium/tools/ToolsTest.kt @@ -0,0 +1,219 @@ +package net.trilleo.hexium.tools + +import java.io.ByteArrayOutputStream +import java.io.File +import java.io.PrintStream +import java.io.RandomAccessFile +import kotlin.io.path.createTempDirectory +import kotlin.test.AfterTest +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFalse +import kotlin.test.assertTrue +import net.trilleo.hexium.core.chart.SkyButton +import net.trilleo.hexium.core.judge.JudgeChart +import net.trilleo.hexium.core.chart.ChartParser +import net.trilleo.hexium.core.replay.Replay +import net.trilleo.hexium.core.replay.ReplayFile +import net.trilleo.hexium.core.replay.ReplayRecorder + +class ToolsTest { + private val dir = createTempDirectory("hexium-tools").toFile() + private val examples = File("../docs/examples") + + @AfterTest + fun cleanUp() { + dir.deleteRecursively() + } + + private fun run(vararg args: String): Pair { + val bytes = ByteArrayOutputStream() + val code = runTool(args.toList(), PrintStream(bytes)) + return code to bytes.toString() + } + + private val goodChart = """ + { + "formatVersion": 1, "difficulty": "BASIC", "level": 1, "laneCount": 4, "offsetMs": 0, + "bpm": [ { "t": [0,0,1], "bpm": 60 } ], + "meter": [ { "t": [0,0,1], "num": 4, "den": 4 } ], + "notes": [ { "type": "tap", "t": [1,0,1], "lane": 0 } ] + } + """.trimIndent() + + private val goodMeta = """ + { + "formatVersion": 1, "id": "song", "title": "T", "artist": "A", "charter": "C", + "previewStartMs": 0, "license": { "type": "original" }, "difficulties": [ "BASIC" ] + } + """.trimIndent() + + private fun write(name: String, text: String) = File(dir, name).also { it.writeText(text) } + + @Test + fun noArgumentsPrintsUsage() { + val (code, output) = run() + assertEquals(2, code) + assertTrue("lint" in output && "rejudge" in output && "dump" in output) + } + + @Test + fun unknownCommandPrintsUsage() { + assertEquals(2, run("convert", "x").first) + } + + @Test + fun lintPassesTheExampleCharts() { + val (code, output) = run("lint", examples.path) + assertEquals(0, code, output) + assertTrue("basic.json: ok" in output && "advanced.json: ok" in output && "expert.json: ok" in output, output) + assertTrue("0 errors, 0 warnings" in output, output) + } + + @Test + fun lintPassesASingleFile() { + val (code, output) = run("lint", write("basic.json", goodChart).path) + assertEquals(0, code, output) + assertTrue("1 file" in output, output) + } + + @Test + fun lintReportsParseErrorsWithTheirPath() { + val (code, output) = run("lint", write("basic.json", goodChart.replace(""""lane": 0""", """"lane": "x"""")).path) + assertEquals(1, code) + assertTrue("notes[0].lane" in output, output) + assertTrue("1 errors" in output, output) + } + + @Test + fun lintReportsValidatorErrors() { + val (code, output) = run("lint", write("basic.json", goodChart.replace(""""lane": 0""", """"lane": 9""")).path) + assertEquals(1, code) + assertTrue("notes[0].lane" in output, output) + } + + @Test + fun lintWarningsDoNotFail() { + val (code, output) = run("lint", write("basic.json", goodChart.replace(""""level": 1,""", """"level": 1, "mood": "calm",""")).path) + assertEquals(0, code, output) + assertTrue("mood" in output && "1 warnings" in output, output) + } + + @Test + fun lintRejectsAFileNamedForAnotherDifficulty() { + val (code, output) = run("lint", write("expert.json", goodChart).path) + assertEquals(1, code) + assertTrue("basic.json" in output, output) + } + + @Test + fun lintChecksMetaFiles() { + assertEquals(0, run("lint", write("meta.json", goodMeta).path).first) + val (code, output) = run("lint", write("meta.json", goodMeta.replace(""""song"""", """"Bad Id"""")).path) + assertEquals(1, code) + assertTrue("id" in output, output) + } + + @Test + fun lintChecksAFolderWithMetaAsAPackage() { + write("meta.json", goodMeta) + write("basic.json", goodChart) + assertEquals(0, run("lint", dir.path).first) + + write("meta.json", goodMeta.replace(""""BASIC"""", """"BASIC", "EXPERT"""")) + val (code, output) = run("lint", dir.path) + assertEquals(1, code) + assertTrue("expert.json" in output, output) + } + + @Test + fun lintDoesNotCallABrokenFileMissing() { + write("meta.json", goodMeta) + write("basic.json", "{ not json") + val (code, output) = run("lint", dir.path) + assertEquals(1, code) + assertFalse("has no basic.json" in output, output) + } + + @Test + fun lintKeepsGoingPastABadPath() { + val good = write("basic.json", goodChart) + val (code, output) = run("lint", File(dir, "nothing").path, good.path) + assertEquals(2, code) + assertTrue("basic.json: ok" in output && "1 file(s) checked" in output, output) + } + + @Test + fun lintDoesNotTryToReadAHugeFile() { + val huge = File(dir, "basic.json") + RandomAccessFile(huge, "rw").use { it.setLength(3L * 1024 * 1024 * 1024) } + val good = write("expert.json", goodChart.replace("BASIC", "EXPERT")) + val (code, output) = run("lint", huge.path, good.path) + assertEquals(1, code) + assertTrue("over the limit" in output && "expert.json: ok" in output, output) + } + + @Test + fun lintFailsOnAMissingPathOrEmptyFolder() { + assertEquals(2, run("lint", File(dir, "nothing").path).first) + assertEquals(2, run("lint", dir.path).first) + assertEquals(2, run("lint").first) + } + + private fun replayOf(chartText: String): File { + val bytes = chartText.toByteArray() + val chart = JudgeChart.compile(ChartParser.parseDifficulty(chartText).value!!) + val recorder = ReplayRecorder(chart, Replay.hashOf(bytes), 0.0, 8) + recorder.aimSample(990.0, 0.5f, 0.5f) + recorder.pressLane(0, 1050.0) + recorder.pressButton(SkyButton.L, 1060.0, 0.25f, 0.75f) + recorder.finish() + return File(dir, "play.hexreplay").also { it.writeBytes(ReplayFile.write(recorder.toReplay())) } + } + + @Test + fun rejudgePrintsTheResult() { + val replay = replayOf(goodChart) + val (code, output) = run("rejudge", write("basic.json", goodChart).path, replay.path) + assertEquals(0, code, output) + assertTrue("1000000" in output, output) + assertTrue("ALL_JUSTICE" in output, output) + } + + @Test + fun rejudgeRefusesAReplayOfAnotherChart() { + val replay = replayOf(goodChart) + val (code, output) = run("rejudge", write("basic.json", goodChart.replace(""""level": 1""", """"level": 2""")).path, replay.path) + assertEquals(1, code) + assertTrue("different chart" in output, output) + } + + @Test + fun rejudgeRefusesABrokenReplayFile() { + val (code, output) = run("rejudge", write("basic.json", goodChart).path, write("x.hexreplay", "nope").path) + assertEquals(1, code) + assertTrue("compressed" in output, output) + } + + @Test + fun rejudgeNeedsBothFiles() { + assertEquals(2, run("rejudge", "only-one").first) + assertEquals(2, run("rejudge", File(dir, "a").path, File(dir, "b").path).first) + } + + @Test + fun dumpPrintsAReplayAsText() { + val (code, output) = run("dump", replayOf(goodChart).path) + assertEquals(0, code, output) + assertTrue("3 events" in output, output) + assertTrue("AIM" in output && "LANE_DOWN" in output && "BUTTON_DOWN" in output, output) + assertTrue("0.25" in output, output) + assertFalse("Exception" in output) + } + + @Test + fun dumpRefusesABrokenFile() { + assertEquals(1, run("dump", write("x.hexreplay", "nope").path).first) + assertEquals(2, run("dump").first) + } +} From 384f9512e14c8e8f9cba9b4f2c6f46da670d20ab Mon Sep 17 00:00:00 2001 From: Trilleo Date: Wed, 4 Nov 2026 09:02:12 +0800 Subject: [PATCH 10/34] Internal: Move the project status to Milestone 2 after passing the core engine gate --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index fa878f3..42ddb63 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,7 +2,7 @@ Hexium is a Fabric rhythm game mod for Minecraft 26.3 (Kotlin, Java 25): a 4-lane keyboard track plus a mouse-aimed sky screen, with an in-game editor and online charts. -It is client-only. The project is at Milestone 1 (core engine); see the roadmap in +It is client-only. The project is at Milestone 2 (ground prototype); see the roadmap in docs/DESIGN.md. ## Working with me From 691f22579cad3a19e8ff7cea3ad4f859af9458c9 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Wed, 4 Nov 2026 09:24:55 +0800 Subject: [PATCH 11/34] Feature: Add the title screen button and a menu that lists chart folders and a built-in test pack --- .gitattributes | 4 + CHANGELOG.md | 7 + core/build.gradle.kts | 3 +- .../net/trilleo/hexium/core/chart/Chart.kt | 6 +- .../trilleo/hexium/core/chart/ChartFolder.kt | 92 +++++ .../trilleo/hexium/core/chart/ChartIssue.kt | 2 + .../hexium/core/chart/ChartFolderTest.kt | 98 ++++++ .../trilleo/hexium/core/chart/TestPackTest.kt | 92 +++++ docs/ARCHITECTURE.md | 4 +- docs/CHART_FORMAT.md | 1 + docs/DEVELOPMENT.md | 9 +- .../net/trilleo/hexium/client/HexiumClient.kt | 2 + .../hexium/client/chart/ChartLibrary.kt | 103 ++++++ .../hexium/client/screen/HexiumMenuScreen.kt | 104 ++++++ .../hexium/client/screen/TitleScreenButton.kt | 33 ++ .../hexium/client/session/HexiumSession.kt | 11 + .../resources/assets/hexium/lang/en_us.json | 12 + .../resources/assets/hexium/lang/zh_cn.json | 12 + .../hexium_packs/test-pattern/advanced.json | 329 ++++++++++++++++++ .../hexium_packs/test-pattern/audio.ogg | Bin 0 -> 552472 bytes .../hexium_packs/test-pattern/basic.json | 30 ++ .../hexium_packs/test-pattern/meta.json | 10 + .../kotlin/net/trilleo/hexium/tools/Lint.kt | 38 +- .../net/trilleo/hexium/tools/ToolsTest.kt | 10 + 24 files changed, 977 insertions(+), 35 deletions(-) create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartFolder.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartFolderTest.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/chart/TestPackTest.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/chart/ChartLibrary.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/screen/TitleScreenButton.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt create mode 100644 mod/src/client/resources/assets/hexium/lang/en_us.json create mode 100644 mod/src/client/resources/assets/hexium/lang/zh_cn.json create mode 100644 mod/src/client/resources/hexium_packs/test-pattern/advanced.json create mode 100644 mod/src/client/resources/hexium_packs/test-pattern/audio.ogg create mode 100644 mod/src/client/resources/hexium_packs/test-pattern/basic.json create mode 100644 mod/src/client/resources/hexium_packs/test-pattern/meta.json diff --git a/.gitattributes b/.gitattributes index ae566f5..abe0fce 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,9 @@ # The example chart tests compare text exactly, and the spec holds examples they read. docs/** text eol=lf +# The test pack's basic.json must match docs/examples/basic.json byte for byte. +mod/src/client/resources/hexium_packs/**/*.json text eol=lf +mod/src/client/resources/hexium_packs/**/*.ogg binary + # Golden replays and their results must stay byte for byte. core/src/test/resources/golden/** -text diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ea6989..d237617 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ ### New Features +#### Menus + ++ Added a Hexium button on the title screen that opens Hexium's menu. + + The menu lists every chart it finds, including a built-in Test Pattern and any folders in `.minecraft/hexium/charts`. + + Broken charts are marked and show their first problem, and the full list goes to the log. + + Charts with sky notes are shown but can't be selected yet. + #### Charts + Defined chart format v1. diff --git a/core/build.gradle.kts b/core/build.gradle.kts index dd5f010..0fc3201 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -13,9 +13,10 @@ dependencies { } tasks.test { - // The tests read the example charts and the spec's examples. + // The tests read the example charts, the spec's examples and the mod's test pack. inputs.dir(rootProject.file("docs/examples")) inputs.file(rootProject.file("docs/CHART_FORMAT.md")) + inputs.dir(rootProject.file("mod/src/client/resources/hexium_packs")) // Regenerates the golden replays after a deliberate change (docs/DEVELOPMENT.md). systemProperty("hexium.updateGolden", providers.systemProperty("hexium.updateGolden").getOrElse("false")) diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt index dd88748..f04404e 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt @@ -37,7 +37,11 @@ data class DifficultyChart( val bpm: List, val meter: List, val notes: List, -) +) { + /** True if every note is on the ground track: no sky taps, slides or flicks. */ + val isGroundOnly: Boolean + get() = notes.all { it is Note.Tap || it is Note.Hold } +} data class BpmChange(val t: Beat, val bpm: Double) diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartFolder.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartFolder.kt new file mode 100644 index 0000000..2f03b41 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartFolder.kt @@ -0,0 +1,92 @@ +package net.trilleo.hexium.core.chart + +/** + * The rules for a folder of chart files, so everything that reads one treats it the same. The + * caller does the file access and passes in what it found. Never throws. + */ +object ChartFolder { + const val META_FILE: String = "meta.json" + const val AUDIO_FILE: String = "audio.ogg" + + /** What a folder's own files add on top of checking each file. */ + private val FOLDER_CODES = setOf( + IssueCode.MISSING_DIFFICULTY_FILE, + IssueCode.UNLISTED_DIFFICULTY_FILE, + IssueCode.DUPLICATE_DIFFICULTY_FILE, + IssueCode.PACKAGE_TOO_LARGE, + ) + + /** [text] is null if it couldn't be read. The caller reports why. */ + class File(val name: String, val text: String?) + + /** One file's contents, if it could be read, and its problems. */ + class FileResult(val meta: ChartMeta?, val chart: DifficultyChart?, val issues: List) + + /** A problem in [file], or in the folder itself if [file] is null. */ + data class Issue(val file: String?, val issue: ChartIssue) + + class Result(val meta: ChartMeta?, val charts: List, val issues: List) + + /** Hidden files like the `._basic.json` that macOS leaves in archives aren't charts. */ + fun isChartFile(name: String): Boolean = name.endsWith(".json") && !name.startsWith(".") + + /** A character is at most 4 bytes, so a longer file can't be within the limit. Don't try to read it. */ + fun isTooLargeToRead(sizeBytes: Long): Boolean = sizeBytes > ChartLimits.MAX_JSON_FILE_CHARS * 4L + + fun readFile(name: String, text: String): FileResult { + if (name == META_FILE) { + val parsed = ChartParser.parseMeta(text) + val meta = parsed.value ?: return FileResult(null, null, parsed.issues) + return FileResult(meta, null, parsed.issues + ChartValidator.validateMeta(meta)) + } + val parsed = ChartParser.parseDifficulty(text) + val chart = parsed.value ?: return FileResult(null, null, parsed.issues) + val issues = parsed.issues + ChartValidator.validateChart(chart) + ChartValidator.validateFileName(chart, name) + return FileResult(null, chart, issues) + } + + /** What's wrong with the folder as a whole. Only meaningful once every file in it could be read. */ + fun folderIssues( + meta: ChartMeta, + charts: List, + fileNames: List, + packageSizeBytes: Long? = null, + ): List { + val issues = ArrayList() + for (issue in ChartValidator.validatePackage(ChartPackage(meta, charts), packageSizeBytes = packageSizeBytes)) { + if (issue.code in FOLDER_CODES) issues += issue + } + if (AUDIO_FILE !in fileNames) { + issues += ChartIssue(Severity.ERROR, IssueCode.MISSING_AUDIO_FILE, "$", "has no $AUDIO_FILE") + } + return issues + } + + /** Reads a whole folder: [files] are its chart files, and [fileNames] names everything in it. */ + fun read(files: List, fileNames: List, packageSizeBytes: Long? = null): Result { + var meta: ChartMeta? = null + val charts = ArrayList() + val issues = ArrayList() + var allRead = true + for (file in files) { + val text = file.text + if (text == null) { + allRead = false + continue + } + val result = readFile(file.name, text) + for (issue in result.issues) issues += Issue(file.name, issue) + if (result.meta == null && result.chart == null) allRead = false + if (result.meta != null) meta = result.meta + if (result.chart != null) charts += result.chart + } + if (META_FILE !in fileNames) { + issues += Issue(null, ChartIssue(Severity.ERROR, IssueCode.MISSING_META_FILE, "$", "has no $META_FILE")) + } + val listed = meta + if (listed != null && allRead) { + for (issue in folderIssues(listed, charts, fileNames, packageSizeBytes)) issues += Issue(null, issue) + } + return Result(listed, charts, issues) + } +} diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt index ee0d151..3cb2989 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/ChartIssue.kt @@ -49,6 +49,8 @@ enum class IssueCode { UNLISTED_DIFFICULTY_FILE, DUPLICATE_DIFFICULTY_FILE, PACKAGE_TOO_LARGE, + MISSING_META_FILE, + MISSING_AUDIO_FILE, } /** A problem in a chart file. [path] points at it, for example `notes[3].lane`, or `$` for the whole file. */ diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartFolderTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartFolderTest.kt new file mode 100644 index 0000000..96d6965 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartFolderTest.kt @@ -0,0 +1,98 @@ +package net.trilleo.hexium.core.chart + +import java.io.File +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFalse +import kotlin.test.assertNotNull +import kotlin.test.assertTrue + +class ChartFolderTest { + private val meta = File("../mod/src/client/resources/hexium_packs/test-pattern/meta.json").readText() + .replace("""[ "BASIC", "ADVANCED" ]""", """[ "BASIC" ]""") + private val basic = File("../docs/examples/basic.json").readText() + + private val audio = ChartFolder.AUDIO_FILE + private val metaFile = ChartFolder.META_FILE + + private fun codes(result: ChartFolder.Result) = result.issues.map { it.issue.code } + + @Test + fun aGoodFolderHasNoIssues() { + val result = ChartFolder.read( + listOf(ChartFolder.File(metaFile, meta), ChartFolder.File("basic.json", basic)), + listOf(metaFile, "basic.json", audio), + ) + assertEquals(emptyList(), result.issues) + assertNotNull(result.meta) + assertEquals(listOf(Difficulty.BASIC), result.charts.map { it.difficulty }) + } + + @Test + fun missingMetaIsReportedEvenWithABrokenChart() { + val result = ChartFolder.read(listOf(ChartFolder.File("basic.json", "{")), listOf("basic.json", audio)) + assertTrue(IssueCode.MISSING_META_FILE in codes(result)) + assertTrue(IssueCode.INVALID_JSON in codes(result)) + } + + @Test + fun brokenMetaIsNotAlsoCalledMissing() { + val result = ChartFolder.read(listOf(ChartFolder.File(metaFile, "{")), listOf(metaFile, audio)) + assertEquals(listOf(IssueCode.INVALID_JSON), codes(result)) + } + + @Test + fun missingAudioIsAnError() { + val result = ChartFolder.read( + listOf(ChartFolder.File(metaFile, meta), ChartFolder.File("basic.json", basic)), + listOf(metaFile, "basic.json"), + ) + assertEquals(listOf(IssueCode.MISSING_AUDIO_FILE), codes(result)) + } + + /** The chart that failed already has an issue. Calling it missing too would be wrong. */ + @Test + fun aChartThatCantBeReadIsNotAlsoCalledMissing() { + for (text in listOf("{", null)) { + val result = ChartFolder.read( + listOf(ChartFolder.File(metaFile, meta), ChartFolder.File("basic.json", text)), + listOf(metaFile, "basic.json", audio), + ) + assertFalse(IssueCode.MISSING_DIFFICULTY_FILE in codes(result), "text $text") + } + } + + @Test + fun aFileNamedForAnotherDifficultyIsAnError() { + val result = ChartFolder.read( + listOf(ChartFolder.File(metaFile, meta), ChartFolder.File("expert.json", basic)), + listOf(metaFile, "expert.json", audio), + ) + assertTrue(IssueCode.FILE_NAME_MISMATCH in codes(result)) + } + + @Test + fun anOversizedPackageIsAnError() { + val result = ChartFolder.read( + listOf(ChartFolder.File(metaFile, meta), ChartFolder.File("basic.json", basic)), + listOf(metaFile, "basic.json", audio), + packageSizeBytes = ChartLimits.MAX_PACKAGE_BYTES, + ) + assertEquals(listOf(IssueCode.PACKAGE_TOO_LARGE), codes(result)) + } + + @Test + fun onlyJsonFilesThatArentHiddenAreChartFiles() { + assertTrue(ChartFolder.isChartFile("basic.json")) + assertTrue(ChartFolder.isChartFile(metaFile)) + assertFalse(ChartFolder.isChartFile("._basic.json")) + assertFalse(ChartFolder.isChartFile(audio)) + } + + @Test + fun aFileIsTooLargeToReadOnlyPastTheLimitInBytes() { + val limit = ChartLimits.MAX_JSON_FILE_CHARS * 4L + assertFalse(ChartFolder.isTooLargeToRead(limit)) + assertTrue(ChartFolder.isTooLargeToRead(limit + 1)) + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/TestPackTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/TestPackTest.kt new file mode 100644 index 0000000..0f528ce --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/TestPackTest.kt @@ -0,0 +1,92 @@ +package net.trilleo.hexium.core.chart + +import java.io.File +import kotlin.test.Test +import kotlin.test.assertContentEquals +import kotlin.test.assertEquals +import kotlin.test.assertFalse +import kotlin.test.assertNotNull +import kotlin.test.assertTrue + +/** The pack bundled in the mod, used to play and test before there's song select. */ +class TestPackTest { + private val pack = File("../mod/src/client/resources/hexium_packs/test-pattern") + + private fun chart(name: String): DifficultyChart { + val result = ChartParser.parseDifficulty(File(pack, "$name.json").readText()) + assertEquals(emptyList(), result.issues, name) + return assertNotNull(result.value, name) + } + + private fun meta(): ChartMeta { + val result = ChartParser.parseMeta(File(pack, "meta.json").readText()) + assertEquals(emptyList(), result.issues) + return assertNotNull(result.value) + } + + @Test + fun packPassesTheValidatorWithoutWarnings() { + val pkg = ChartPackage(meta(), listOf(chart("basic"), chart("advanced"))) + assertEquals(emptyList(), ChartValidator.validatePackage(pkg, audioDurationMs = AUDIO_MS, packageSizeBytes = packBytes())) + } + + @Test + fun theSongIsOurOwn() { + assertEquals(LicenseType.ORIGINAL, meta().license.type) + assertTrue(File(pack, "audio.ogg").length() > 0) + } + + /** Golden replays of real plays use this chart, and a replay is tied to its file's exact bytes. */ + @Test + fun basicIsTheExampleChartByteForByte() { + assertContentEquals(File("../docs/examples/basic.json").readBytes(), File(pack, "basic.json").readBytes()) + } + + /** The milestone's gate is no drift over a 3-minute song. */ + @Test + fun advancedLastsThreeMinutes() { + val chart = chart("advanced") + val timing = TimingMap(chart.offsetMs, chart.bpm) + val last = chart.notes.maxOf { note -> + when (note) { + is Note.Tap -> note.t + is Note.Hold -> note.end + else -> error("Sky note in the test pack") + }.let(timing::beatToMs) + } + assertTrue(last >= 180_000.0, "ends at $last ms") + } + + @Test + fun theChartIsWrittenInTheWritersLayout() { + assertEquals(File(pack, "advanced.json").readText(), ChartWriter.writeDifficulty(chart("advanced"))) + } + + @Test + fun groundOnlyTellsChartsWithSkyNotesApart() { + assertTrue(chart("basic").isGroundOnly) + assertTrue(chart("advanced").isGroundOnly) + val sky = ChartParser.parseDifficulty(File("../docs/examples/expert.json").readText()).value + assertFalse(assertNotNull(sky).isGroundOnly) + } + + @Test + fun anySkyNoteMakesAChartNotGroundOnly() { + val empty = chart("basic").copy(notes = emptyList()) + assertTrue(empty.isGroundOnly) + val beat = Beat(4, 0, 1) + val point = SlidePoint(beat, 0.5, 0.5, Ease.LINEAR) + val skyNotes = listOf( + Note.SkyTap(beat, 0.5, 0.5, SkyButton.L, 1.0), + Note.Slide(SkyButton.L, 0.06, listOf(point, point)), + Note.Flick(beat, 0.5, 0.5, null, 1.0), + ) + for (note in skyNotes) assertFalse(empty.copy(notes = listOf(note)).isGroundOnly, note.toString()) + } + + private fun packBytes(): Long = pack.listFiles().orEmpty().sumOf { it.length() } + + private companion object { + const val AUDIO_MS = 185_000.0 + } +} diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index c3021d3..bcc9bc3 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -34,7 +34,7 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl ## Session gating ("normal worlds are untouched") - The title screen gets one extra button that opens the mod's menu. That menu is the only place a `HexiumSession` is ever created. -- Every mixin and event hook starts with `if (!HexiumSession.active()) return;`. Joining a normal world or server means no session, so vanilla behaviour stays as it was. +- Every mixin and event hook starts with `if (!HexiumSession.active()) return;`, except the title screen button, which only adds that button. Joining a normal world or server means no session, so vanilla behaviour stays as it was. - The stage is a template world bundled in the mod. It's copied into the mod's own folder (for example `.minecraft/hexium/stages/`), not `saves/`, so it never shows up in the vanilla world list. It's loaded on the integrated server with frozen game rules: no daylight cycle, no mobs, no random ticks, no weather. - The player entity is placed on the stand spot and locked. Gameplay never depends on the server; the world is just scenery. @@ -60,4 +60,4 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl ## Local data -`.minecraft/hexium/` holds `charts/` (one folder per chart package), `replays/`, `scores.json` (best scores per chart) and `settings.json`. That's enough for v1. A real database only lives on the server. +`.minecraft/hexium/` holds `charts/` (one folder per chart package; the mod also bundles a test pack in `hexium_packs/`), `replays/`, `scores.json` (best scores per chart) and `settings.json`. That's enough for v1. A real database only lives on the server. diff --git a/docs/CHART_FORMAT.md b/docs/CHART_FORMAT.md index e211f30..7187970 100644 --- a/docs/CHART_FORMAT.md +++ b/docs/CHART_FORMAT.md @@ -96,6 +96,7 @@ Errors: - Every note and BPM entry has a finite time, so a note can always be judged. A difficulty file's name matches its `difficulty` (checked by whatever reads the files). - A chart has at most 1,000,000 judged objects (see [JUDGEMENT.md](JUDGEMENT.md)), so a huge hold can't exhaust memory when its ticks are built. - `meta.json` follows the rules in its section above, and every chart's `difficulty` is listed in it. +- A chart folder has a `meta.json` and an `audio.ogg`. Hidden files, such as the `._basic.json` that macOS leaves in archives, aren't read as charts. Warning (not an error): diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 08f64b6..1b27562 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -20,6 +20,7 @@ The Gradle wrapper downloads the right Gradle version, and Loom downloads Minecr | `tools/` | Command-line tools: chart lint, replay re-judge, replay dump. | | `docs/` | Design, specs and developer docs (upper-case file names). | | `docs/examples/` | Hand-written example charts in the writer's layout, used as test fixtures. | +| `mod/src/client/resources/hexium_packs/test-pattern/` | The chart pack bundled in the mod: a click track, `basic.json` (an exact copy of the example chart) and a 3-minute `advanced.json` for drift tests. | | `CHANGELOG.md` | Player-facing change log, see [RELEASING.md](RELEASING.md). | ## Commands @@ -29,12 +30,18 @@ The Gradle wrapper downloads the right Gradle version, and Loom downloads Minecr | `./gradlew build` | Builds every module and runs all tests | | `./gradlew :mod:runClient` | Starts Minecraft with Hexium in a dev environment | | `./gradlew :core:test` | Runs only the judge and chart tests (fast) | -| `./gradlew :tools:run --args="lint docs/examples"` | Lints chart files or folders. A folder with a `meta.json` is also checked as a package | +| `./gradlew :tools:run --args="lint docs/examples"` | Lints chart files or folders. A folder with a `meta.json` is also checked as a package, including that it has its `audio.ogg` | | `./gradlew :tools:run --args="rejudge docs/examples/basic.json play.hexreplay"` | Runs a replay through the judge and prints the result | | `./gradlew :tools:run --args="dump play.hexreplay"` | Prints a replay as text | | `./gradlew :core:test --rerun -Dhexium.updateGolden=true` | Regenerates the golden replays, after a deliberate change to the judge | | `./gradlew :server:run` | Runs the server locally (from Milestone 7) | +The test pack's `audio.ogg` is a 185-second click track at 120 BPM with an accent on every fourth beat, so beats land exactly on the chart's grid. It was made with: + +```bash +ffmpeg -f lavfi -i "aevalsrc='sin(2*PI*if(eq(mod(floor(t*2),4),0),1760,880)*t)*exp(-60*mod(t,0.5))':s=44100:d=185" -ac 2 -c:a vorbis -strict -2 audio.ogg +``` + The built mod is `mod/build/libs/hexium-.jar`. The version comes only from `mod_version` in `gradle.properties`. ## Making changes diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt index 8f38150..c3cc453 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt @@ -2,12 +2,14 @@ package net.trilleo.hexium.client import net.fabricmc.api.ClientModInitializer import net.trilleo.hexium.Hexium +import net.trilleo.hexium.client.screen.TitleScreenButton import org.slf4j.LoggerFactory object HexiumClient : ClientModInitializer { private val LOGGER = LoggerFactory.getLogger(Hexium.MOD_ID) override fun onInitializeClient() { + TitleScreenButton.register() LOGGER.info("Hexium loaded") } } diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/chart/ChartLibrary.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/chart/ChartLibrary.kt new file mode 100644 index 0000000..798ef7b --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/chart/ChartLibrary.kt @@ -0,0 +1,103 @@ +package net.trilleo.hexium.client.chart + +import java.io.IOException +import java.io.UncheckedIOException +import java.nio.file.Files +import java.nio.file.Path +import net.fabricmc.loader.api.FabricLoader +import net.trilleo.hexium.Hexium +import net.trilleo.hexium.core.chart.ChartFolder +import net.trilleo.hexium.core.chart.ChartMeta +import net.trilleo.hexium.core.chart.DifficultyChart +import net.trilleo.hexium.core.chart.Severity +import org.slf4j.LoggerFactory + +/** A chart folder. A pack with [errors] can't be played, and [meta] is null if its `meta.json` couldn't be read. */ +class ChartPack( + val folder: Path, + val meta: ChartMeta?, + val charts: List, + val errors: List, +) + +/** + * Finds chart folders: the pack bundled in the mod, then each folder in `.minecraft/hexium/charts`. + * This only reads the files. The rules come from [ChartFolder]. A bad folder comes back with its + * errors and never stops the others. + */ +object ChartLibrary { + private val LOGGER = LoggerFactory.getLogger(Hexium.MOD_ID) + private const val BUNDLED_PACK = "hexium_packs/test-pattern" + + fun scan(): List { + val packs = ArrayList() + val bundled = FabricLoader.getInstance().getModContainer(Hexium.MOD_ID).flatMap { it.findPath(BUNDLED_PACK) } + if (bundled.isPresent) packs += readPack(bundled.get()) else LOGGER.warn("The bundled chart pack is missing") + for (folder in chartFolders()) packs += readPack(folder) + for (pack in packs) { + for (error in pack.errors) LOGGER.warn("Chart folder {}: {}", pack.folder, error) + } + return packs + } + + private fun chartFolders(): List { + val root = FabricLoader.getInstance().gameDir.resolve("hexium").resolve("charts") + return try { + Files.createDirectories(root) + Files.list(root).use { files -> files.filter { Files.isDirectory(it) }.sorted().toList() } + } catch (e: IOException) { + LOGGER.warn("Can't read the charts folder {}", root, e) + emptyList() + } catch (e: UncheckedIOException) { + LOGGER.warn("Can't read the charts folder {}", root, e) + emptyList() + } + } + + private fun readPack(folder: Path): ChartPack { + return try { + readFiles(folder) + } catch (e: IOException) { + brokenPack(folder, e) + } catch (e: RuntimeException) { + // Includes the UncheckedIOException a directory listing throws when it fails part way through. + brokenPack(folder, e) + } + } + + private fun brokenPack(folder: Path, cause: Exception) = + ChartPack(folder, null, emptyList(), listOf("can't be read: ${cause.message}")) + + private fun readFiles(folder: Path): ChartPack { + val paths = Files.list(folder).use { list -> list.filter { Files.isRegularFile(it) }.sorted().toList() } + val errors = ArrayList() + val names = paths.map { it.fileName.toString() } + val files = ArrayList() + var sizeBytes = 0L + for (path in paths) { + val size = Files.size(path) + sizeBytes += size + val name = path.fileName.toString() + if (ChartFolder.isChartFile(name)) files += ChartFolder.File(name, readText(path, name, size, errors)) + } + val result = ChartFolder.read(files, names, sizeBytes) + for (found in result.issues) { + if (found.issue.severity != Severity.ERROR) continue + errors += if (found.file == null) found.issue.toString() else "${found.file}: ${found.issue}" + } + return ChartPack(folder, result.meta, result.charts.sortedBy { it.difficulty }, errors) + } + + private fun readText(path: Path, name: String, size: Long, errors: MutableList): String? { + if (ChartFolder.isTooLargeToRead(size)) { + errors += "$name is too large" + return null + } + return try { + Files.readString(path) + } catch (e: IOException) { + errors += "$name can't be read: ${e.message}" + null + } + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt new file mode 100644 index 0000000..9820932 --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt @@ -0,0 +1,104 @@ +package net.trilleo.hexium.client.screen + +import net.minecraft.client.gui.GuiGraphicsExtractor +import net.minecraft.client.gui.components.Button +import net.minecraft.client.gui.components.StringWidget +import net.minecraft.client.gui.components.Tooltip +import net.minecraft.client.gui.layouts.HeaderAndFooterLayout +import net.minecraft.client.gui.layouts.LinearLayout +import net.minecraft.client.gui.screens.Screen +import net.minecraft.network.chat.CommonComponents +import net.minecraft.network.chat.Component +import net.trilleo.hexium.client.chart.ChartLibrary +import net.trilleo.hexium.client.chart.ChartPack +import net.trilleo.hexium.core.chart.DifficultyChart + +/** Hexium's menu, opened from the title screen. A plain list of charts until song select exists. */ +class HexiumMenuScreen(private val lastScreen: Screen) : Screen(TITLE) { + private val packs: List = ChartLibrary.scan() + private var page = 0 + private var status: Component = CommonComponents.EMPTY + + override fun init() { + val layout = HeaderAndFooterLayout(this) + layout.addTitleHeader(TITLE, font) + + val perPage = ((layout.contentHeight - CONTENT_TOP_MARGIN - STATUS_HEIGHT + ROW_SPACING) / ROW_HEIGHT).coerceAtLeast(1) + val pages = ((packs.size + perPage - 1) / perPage).coerceAtLeast(1) + page = page.coerceIn(0, pages - 1) + + val content = layout.addToContents(LinearLayout.vertical().spacing(ROW_SPACING)) + content.defaultCellSetting().alignHorizontallyCenter() + if (packs.isEmpty()) content.addChild(StringWidget(Component.translatable("hexium.menu.no_charts"), font)) + for (i in page * perPage until minOf((page + 1) * perPage, packs.size)) { + content.addChild(row(packs[i])) + } + + val footer = layout.addToFooter(LinearLayout.horizontal().spacing(ROW_SPACING)) + val previous = footer.addChild(pageButton("<", -1)) + footer.addChild(Button.builder(CommonComponents.GUI_BACK) { onClose() }.width(BACK_WIDTH).build()) + val next = footer.addChild(pageButton(">", 1)) + previous.active = page > 0 + next.active = page < pages - 1 + + layout.arrangeElements() + layout.visitWidgets { addRenderableWidget(it) } + } + + private fun pageButton(label: String, step: Int): Button = + Button.builder(Component.literal(label)) { + page += step + rebuildWidgets() + }.width(PAGE_BUTTON_WIDTH).build() + + private fun row(pack: ChartPack): LinearLayout { + val row = LinearLayout.horizontal().spacing(ROW_SPACING) + row.defaultCellSetting().alignVerticallyMiddle() + val title = pack.meta?.title ?: pack.folder.fileName.toString() + row.addChild(StringWidget(Component.literal(title), font).setMaxWidth(TITLE_WIDTH)) + if (pack.errors.isNotEmpty()) { + val broken = Button.builder(Component.translatable("hexium.menu.broken")) {} + .width(DIFFICULTY_WIDTH) + .tooltip(Tooltip.create(Component.literal(pack.errors.first()))) + .build() + broken.active = false + row.addChild(broken) + return row + } + for (chart in pack.charts) row.addChild(difficultyButton(title, chart)) + return row + } + + private fun difficultyButton(title: String, chart: DifficultyChart): Button { + val difficulty = Component.translatable("hexium.difficulty.${chart.difficulty.name.lowercase()}") + val button = Button.builder(difficulty) { + status = Component.translatable("hexium.menu.selected", title, difficulty, chart.notes.size) + }.width(DIFFICULTY_WIDTH) + if (!chart.isGroundOnly) button.tooltip(Tooltip.create(Component.translatable("hexium.menu.sky_notes"))) + return button.build().also { it.active = chart.isGroundOnly } + } + + override fun extractRenderState(graphics: GuiGraphicsExtractor, mouseX: Int, mouseY: Int, a: Float) { + super.extractRenderState(graphics, mouseX, mouseY, a) + graphics.centeredText(font, status, width / 2, height - STATUS_FROM_BOTTOM, STATUS_COLOR) + } + + override fun onClose() { + minecraft.gui.setScreen(lastScreen) + } + + private companion object { + val TITLE: Component = Component.translatable("hexium.menu.title") + /** How far HeaderAndFooterLayout keeps its contents below the header. */ + const val CONTENT_TOP_MARGIN = 30 + const val ROW_HEIGHT = 24 + const val ROW_SPACING = 4 + const val STATUS_HEIGHT = 14 + const val STATUS_FROM_BOTTOM = 45 + const val STATUS_COLOR = -1 + const val TITLE_WIDTH = 140 + const val DIFFICULTY_WIDTH = 64 + const val BACK_WIDTH = 150 + const val PAGE_BUTTON_WIDTH = 20 + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/TitleScreenButton.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/TitleScreenButton.kt new file mode 100644 index 0000000..095d25d --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/TitleScreenButton.kt @@ -0,0 +1,33 @@ +package net.trilleo.hexium.client.screen + +import net.fabricmc.fabric.api.client.screen.v1.ScreenEvents +import net.fabricmc.fabric.api.client.screen.v1.Screens +import net.minecraft.client.gui.components.Button +import net.minecraft.client.gui.screens.TitleScreen +import net.minecraft.network.chat.Component + +/** + * The way into Hexium: one button left of Singleplayer. It's the only hook that doesn't check for a + * session, since a session can only start from the menu it opens. + */ +object TitleScreenButton { + private const val WIDTH = 56 + private const val HEIGHT = 20 + private const val GAP = 2 + + fun register() { + ScreenEvents.AFTER_INIT.register { client, screen, _, _ -> + if (screen is TitleScreen) { + val widgets = Screens.getWidgets(screen) + val singleplayer = Component.translatable("menu.singleplayer") + // Demo mode has no Singleplayer button: line up with the first button instead. + val anchor = widgets.firstOrNull { it.message == singleplayer } ?: widgets.firstOrNull() + val x = screen.width / 2 - 100 - GAP - WIDTH + val y = anchor?.y ?: (screen.height / 4 + 48) + widgets += Button.builder(Component.translatable("hexium.title_button")) { + client.gui.setScreen(HexiumMenuScreen(screen)) + }.bounds(x, y, WIDTH, HEIGHT).build() + } + } + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt new file mode 100644 index 0000000..04e85a4 --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt @@ -0,0 +1,11 @@ +package net.trilleo.hexium.client.session + +/** + * The one switch between Hexium and vanilla. Every mixin and event hook returns early unless + * [active], so normal worlds and servers are untouched. The title screen button is the one + * exception, since it opens the menu. Only that menu may start a session, and nothing does yet. + */ +object HexiumSession { + @JvmStatic + fun active(): Boolean = false +} diff --git a/mod/src/client/resources/assets/hexium/lang/en_us.json b/mod/src/client/resources/assets/hexium/lang/en_us.json new file mode 100644 index 0000000..310c5f3 --- /dev/null +++ b/mod/src/client/resources/assets/hexium/lang/en_us.json @@ -0,0 +1,12 @@ +{ + "hexium.title_button": "Hexium", + "hexium.menu.title": "Hexium", + "hexium.menu.no_charts": "No charts found. Put chart folders in .minecraft/hexium/charts.", + "hexium.menu.broken": "Broken", + "hexium.menu.sky_notes": "This chart has sky notes, which can't be played yet.", + "hexium.menu.selected": "%s, %s: %s notes. Playing comes in a later update.", + "hexium.difficulty.basic": "Basic", + "hexium.difficulty.advanced": "Advanced", + "hexium.difficulty.expert": "Expert", + "hexium.difficulty.master": "Master" +} diff --git a/mod/src/client/resources/assets/hexium/lang/zh_cn.json b/mod/src/client/resources/assets/hexium/lang/zh_cn.json new file mode 100644 index 0000000..5a92717 --- /dev/null +++ b/mod/src/client/resources/assets/hexium/lang/zh_cn.json @@ -0,0 +1,12 @@ +{ + "hexium.title_button": "Hexium", + "hexium.menu.title": "Hexium", + "hexium.menu.no_charts": "没有找到谱面。请把谱面文件夹放到 .minecraft/hexium/charts。", + "hexium.menu.broken": "已损坏", + "hexium.menu.sky_notes": "此谱面包含天空音符,目前还无法游玩。", + "hexium.menu.selected": "%s,%s:%s 个音符。游玩功能将在后续更新中加入。", + "hexium.difficulty.basic": "Basic", + "hexium.difficulty.advanced": "Advanced", + "hexium.difficulty.expert": "Expert", + "hexium.difficulty.master": "Master" +} diff --git a/mod/src/client/resources/hexium_packs/test-pattern/advanced.json b/mod/src/client/resources/hexium_packs/test-pattern/advanced.json new file mode 100644 index 0000000..453f668 --- /dev/null +++ b/mod/src/client/resources/hexium_packs/test-pattern/advanced.json @@ -0,0 +1,329 @@ +{ + "formatVersion": 1, + "difficulty": "ADVANCED", + "level": 3, + "laneCount": 4, + "offsetMs": 0, + "bpm": [ + { "t": [0,0,1], "bpm": 120 } + ], + "meter": [ + { "t": [0,0,1], "num": 4, "den": 4 } + ], + "notes": [ + { "type": "tap", "t": [4,0,1], "lane": 0 }, + { "type": "tap", "t": [5,0,1], "lane": 1 }, + { "type": "tap", "t": [6,0,1], "lane": 2 }, + { "type": "tap", "t": [7,0,1], "lane": 3 }, + { "type": "tap", "t": [8,0,1], "lane": 2 }, + { "type": "tap", "t": [9,0,1], "lane": 1 }, + { "type": "tap", "t": [10,0,1], "lane": 0 }, + { "type": "tap", "t": [11,0,1], "lane": 1 }, + { "type": "tap", "t": [12,0,1], "lane": 2 }, + { "type": "tap", "t": [13,0,1], "lane": 3 }, + { "type": "tap", "t": [14,0,1], "lane": 2 }, + { "type": "tap", "t": [15,0,1], "lane": 1 }, + { "type": "hold", "t": [16,0,1], "end": [18,0,1], "lane": 0 }, + { "type": "tap", "t": [19,0,1], "lane": 1 }, + { "type": "tap", "t": [20,0,1], "lane": 2 }, + { "type": "tap", "t": [21,0,1], "lane": 3 }, + { "type": "tap", "t": [22,0,1], "lane": 2 }, + { "type": "tap", "t": [23,0,1], "lane": 1 }, + { "type": "tap", "t": [24,0,1], "lane": 0 }, + { "type": "tap", "t": [25,0,1], "lane": 1 }, + { "type": "tap", "t": [26,0,1], "lane": 2 }, + { "type": "tap", "t": [27,0,1], "lane": 3 }, + { "type": "tap", "t": [28,0,1], "lane": 2 }, + { "type": "tap", "t": [29,0,1], "lane": 1 }, + { "type": "tap", "t": [30,0,1], "lane": 0 }, + { "type": "tap", "t": [31,0,1], "lane": 1 }, + { "type": "hold", "t": [32,0,1], "end": [34,0,1], "lane": 2 }, + { "type": "tap", "t": [35,0,1], "lane": 3 }, + { "type": "tap", "t": [36,0,1], "lane": 2 }, + { "type": "tap", "t": [37,0,1], "lane": 1 }, + { "type": "tap", "t": [38,0,1], "lane": 0 }, + { "type": "tap", "t": [39,0,1], "lane": 1 }, + { "type": "tap", "t": [40,0,1], "lane": 2 }, + { "type": "tap", "t": [41,0,1], "lane": 3 }, + { "type": "tap", "t": [42,0,1], "lane": 2 }, + { "type": "tap", "t": [43,0,1], "lane": 1 }, + { "type": "tap", "t": [44,0,1], "lane": 0 }, + { "type": "tap", "t": [45,0,1], "lane": 1 }, + { "type": "tap", "t": [46,0,1], "lane": 2 }, + { "type": "tap", "t": [47,0,1], "lane": 3 }, + { "type": "hold", "t": [48,0,1], "end": [50,0,1], "lane": 2 }, + { "type": "tap", "t": [51,0,1], "lane": 1 }, + { "type": "tap", "t": [52,0,1], "lane": 0 }, + { "type": "tap", "t": [53,0,1], "lane": 1 }, + { "type": "tap", "t": [54,0,1], "lane": 2 }, + { "type": "tap", "t": [55,0,1], "lane": 3 }, + { "type": "tap", "t": [56,0,1], "lane": 2 }, + { "type": "tap", "t": [57,0,1], "lane": 1 }, + { "type": "tap", "t": [58,0,1], "lane": 0 }, + { "type": "tap", "t": [59,0,1], "lane": 1 }, + { "type": "tap", "t": [60,0,1], "lane": 2 }, + { "type": "tap", "t": [61,0,1], "lane": 3 }, + { "type": "tap", "t": [62,0,1], "lane": 2 }, + { "type": "tap", "t": [63,0,1], "lane": 1 }, + { "type": "hold", "t": [64,0,1], "end": [66,0,1], "lane": 0 }, + { "type": "tap", "t": [67,0,1], "lane": 1 }, + { "type": "tap", "t": [68,0,1], "lane": 2 }, + { "type": "tap", "t": [69,0,1], "lane": 3 }, + { "type": "tap", "t": [70,0,1], "lane": 2 }, + { "type": "tap", "t": [71,0,1], "lane": 1 }, + { "type": "tap", "t": [72,0,1], "lane": 0 }, + { "type": "tap", "t": [73,0,1], "lane": 1 }, + { "type": "tap", "t": [74,0,1], "lane": 2 }, + { "type": "tap", "t": [75,0,1], "lane": 3 }, + { "type": "tap", "t": [76,0,1], "lane": 2 }, + { "type": "tap", "t": [77,0,1], "lane": 1 }, + { "type": "tap", "t": [78,0,1], "lane": 0 }, + { "type": "tap", "t": [79,0,1], "lane": 1 }, + { "type": "hold", "t": [80,0,1], "end": [82,0,1], "lane": 2 }, + { "type": "tap", "t": [83,0,1], "lane": 3 }, + { "type": "tap", "t": [84,0,1], "lane": 2 }, + { "type": "tap", "t": [85,0,1], "lane": 1 }, + { "type": "tap", "t": [86,0,1], "lane": 0 }, + { "type": "tap", "t": [87,0,1], "lane": 1 }, + { "type": "tap", "t": [88,0,1], "lane": 2 }, + { "type": "tap", "t": [89,0,1], "lane": 3 }, + { "type": "tap", "t": [90,0,1], "lane": 2 }, + { "type": "tap", "t": [91,0,1], "lane": 1 }, + { "type": "tap", "t": [92,0,1], "lane": 0 }, + { "type": "tap", "t": [93,0,1], "lane": 1 }, + { "type": "tap", "t": [94,0,1], "lane": 2 }, + { "type": "tap", "t": [95,0,1], "lane": 3 }, + { "type": "hold", "t": [96,0,1], "end": [98,0,1], "lane": 2 }, + { "type": "tap", "t": [99,0,1], "lane": 1 }, + { "type": "tap", "t": [100,0,1], "lane": 0 }, + { "type": "tap", "t": [101,0,1], "lane": 1 }, + { "type": "tap", "t": [102,0,1], "lane": 2 }, + { "type": "tap", "t": [103,0,1], "lane": 3 }, + { "type": "tap", "t": [104,0,1], "lane": 2 }, + { "type": "tap", "t": [105,0,1], "lane": 1 }, + { "type": "tap", "t": [106,0,1], "lane": 0 }, + { "type": "tap", "t": [107,0,1], "lane": 1 }, + { "type": "tap", "t": [108,0,1], "lane": 2 }, + { "type": "tap", "t": [109,0,1], "lane": 3 }, + { "type": "tap", "t": [110,0,1], "lane": 2 }, + { "type": "tap", "t": [111,0,1], "lane": 1 }, + { "type": "hold", "t": [112,0,1], "end": [114,0,1], "lane": 0 }, + { "type": "tap", "t": [115,0,1], "lane": 1 }, + { "type": "tap", "t": [116,0,1], "lane": 2 }, + { "type": "tap", "t": [117,0,1], "lane": 3 }, + { "type": "tap", "t": [118,0,1], "lane": 2 }, + { "type": "tap", "t": [119,0,1], "lane": 1 }, + { "type": "tap", "t": [120,0,1], "lane": 0 }, + { "type": "tap", "t": [121,0,1], "lane": 1 }, + { "type": "tap", "t": [122,0,1], "lane": 2 }, + { "type": "tap", "t": [123,0,1], "lane": 3 }, + { "type": "tap", "t": [124,0,1], "lane": 2 }, + { "type": "tap", "t": [125,0,1], "lane": 1 }, + { "type": "tap", "t": [126,0,1], "lane": 0 }, + { "type": "tap", "t": [127,0,1], "lane": 1 }, + { "type": "hold", "t": [128,0,1], "end": [130,0,1], "lane": 2 }, + { "type": "tap", "t": [131,0,1], "lane": 3 }, + { "type": "tap", "t": [132,0,1], "lane": 2 }, + { "type": "tap", "t": [133,0,1], "lane": 1 }, + { "type": "tap", "t": [134,0,1], "lane": 0 }, + { "type": "tap", "t": [135,0,1], "lane": 1 }, + { "type": "tap", "t": [136,0,1], "lane": 2 }, + { "type": "tap", "t": [137,0,1], "lane": 3 }, + { "type": "tap", "t": [138,0,1], "lane": 2 }, + { "type": "tap", "t": [139,0,1], "lane": 1 }, + { "type": "tap", "t": [140,0,1], "lane": 0 }, + { "type": "tap", "t": [141,0,1], "lane": 1 }, + { "type": "tap", "t": [142,0,1], "lane": 2 }, + { "type": "tap", "t": [143,0,1], "lane": 3 }, + { "type": "hold", "t": [144,0,1], "end": [146,0,1], "lane": 2 }, + { "type": "tap", "t": [147,0,1], "lane": 1 }, + { "type": "tap", "t": [148,0,1], "lane": 0 }, + { "type": "tap", "t": [149,0,1], "lane": 1 }, + { "type": "tap", "t": [150,0,1], "lane": 2 }, + { "type": "tap", "t": [151,0,1], "lane": 3 }, + { "type": "tap", "t": [152,0,1], "lane": 2 }, + { "type": "tap", "t": [153,0,1], "lane": 1 }, + { "type": "tap", "t": [154,0,1], "lane": 0 }, + { "type": "tap", "t": [155,0,1], "lane": 1 }, + { "type": "tap", "t": [156,0,1], "lane": 2 }, + { "type": "tap", "t": [157,0,1], "lane": 3 }, + { "type": "tap", "t": [158,0,1], "lane": 2 }, + { "type": "tap", "t": [159,0,1], "lane": 1 }, + { "type": "hold", "t": [160,0,1], "end": [162,0,1], "lane": 0 }, + { "type": "tap", "t": [163,0,1], "lane": 1 }, + { "type": "tap", "t": [164,0,1], "lane": 2 }, + { "type": "tap", "t": [165,0,1], "lane": 3 }, + { "type": "tap", "t": [166,0,1], "lane": 2 }, + { "type": "tap", "t": [167,0,1], "lane": 1 }, + { "type": "tap", "t": [168,0,1], "lane": 0 }, + { "type": "tap", "t": [169,0,1], "lane": 1 }, + { "type": "tap", "t": [170,0,1], "lane": 2 }, + { "type": "tap", "t": [171,0,1], "lane": 3 }, + { "type": "tap", "t": [172,0,1], "lane": 2 }, + { "type": "tap", "t": [173,0,1], "lane": 1 }, + { "type": "tap", "t": [174,0,1], "lane": 0 }, + { "type": "tap", "t": [175,0,1], "lane": 1 }, + { "type": "hold", "t": [176,0,1], "end": [178,0,1], "lane": 2 }, + { "type": "tap", "t": [179,0,1], "lane": 3 }, + { "type": "tap", "t": [180,0,1], "lane": 2 }, + { "type": "tap", "t": [181,0,1], "lane": 1 }, + { "type": "tap", "t": [182,0,1], "lane": 0 }, + { "type": "tap", "t": [183,0,1], "lane": 1 }, + { "type": "tap", "t": [184,0,1], "lane": 2 }, + { "type": "tap", "t": [185,0,1], "lane": 3 }, + { "type": "tap", "t": [186,0,1], "lane": 2 }, + { "type": "tap", "t": [187,0,1], "lane": 1 }, + { "type": "tap", "t": [188,0,1], "lane": 0 }, + { "type": "tap", "t": [189,0,1], "lane": 1 }, + { "type": "tap", "t": [190,0,1], "lane": 2 }, + { "type": "tap", "t": [191,0,1], "lane": 3 }, + { "type": "hold", "t": [192,0,1], "end": [194,0,1], "lane": 2 }, + { "type": "tap", "t": [195,0,1], "lane": 1 }, + { "type": "tap", "t": [196,0,1], "lane": 0 }, + { "type": "tap", "t": [197,0,1], "lane": 1 }, + { "type": "tap", "t": [198,0,1], "lane": 2 }, + { "type": "tap", "t": [199,0,1], "lane": 3 }, + { "type": "tap", "t": [200,0,1], "lane": 2 }, + { "type": "tap", "t": [201,0,1], "lane": 1 }, + { "type": "tap", "t": [202,0,1], "lane": 0 }, + { "type": "tap", "t": [203,0,1], "lane": 1 }, + { "type": "tap", "t": [204,0,1], "lane": 2 }, + { "type": "tap", "t": [205,0,1], "lane": 3 }, + { "type": "tap", "t": [206,0,1], "lane": 2 }, + { "type": "tap", "t": [207,0,1], "lane": 1 }, + { "type": "hold", "t": [208,0,1], "end": [210,0,1], "lane": 0 }, + { "type": "tap", "t": [211,0,1], "lane": 1 }, + { "type": "tap", "t": [212,0,1], "lane": 2 }, + { "type": "tap", "t": [213,0,1], "lane": 3 }, + { "type": "tap", "t": [214,0,1], "lane": 2 }, + { "type": "tap", "t": [215,0,1], "lane": 1 }, + { "type": "tap", "t": [216,0,1], "lane": 0 }, + { "type": "tap", "t": [217,0,1], "lane": 1 }, + { "type": "tap", "t": [218,0,1], "lane": 2 }, + { "type": "tap", "t": [219,0,1], "lane": 3 }, + { "type": "tap", "t": [220,0,1], "lane": 2 }, + { "type": "tap", "t": [221,0,1], "lane": 1 }, + { "type": "tap", "t": [222,0,1], "lane": 0 }, + { "type": "tap", "t": [223,0,1], "lane": 1 }, + { "type": "hold", "t": [224,0,1], "end": [226,0,1], "lane": 2 }, + { "type": "tap", "t": [227,0,1], "lane": 3 }, + { "type": "tap", "t": [228,0,1], "lane": 2 }, + { "type": "tap", "t": [229,0,1], "lane": 1 }, + { "type": "tap", "t": [230,0,1], "lane": 0 }, + { "type": "tap", "t": [231,0,1], "lane": 1 }, + { "type": "tap", "t": [232,0,1], "lane": 2 }, + { "type": "tap", "t": [233,0,1], "lane": 3 }, + { "type": "tap", "t": [234,0,1], "lane": 2 }, + { "type": "tap", "t": [235,0,1], "lane": 1 }, + { "type": "tap", "t": [236,0,1], "lane": 0 }, + { "type": "tap", "t": [237,0,1], "lane": 1 }, + { "type": "tap", "t": [238,0,1], "lane": 2 }, + { "type": "tap", "t": [239,0,1], "lane": 3 }, + { "type": "hold", "t": [240,0,1], "end": [242,0,1], "lane": 2 }, + { "type": "tap", "t": [243,0,1], "lane": 1 }, + { "type": "tap", "t": [244,0,1], "lane": 0 }, + { "type": "tap", "t": [245,0,1], "lane": 1 }, + { "type": "tap", "t": [246,0,1], "lane": 2 }, + { "type": "tap", "t": [247,0,1], "lane": 3 }, + { "type": "tap", "t": [248,0,1], "lane": 2 }, + { "type": "tap", "t": [249,0,1], "lane": 1 }, + { "type": "tap", "t": [250,0,1], "lane": 0 }, + { "type": "tap", "t": [251,0,1], "lane": 1 }, + { "type": "tap", "t": [252,0,1], "lane": 2 }, + { "type": "tap", "t": [253,0,1], "lane": 3 }, + { "type": "tap", "t": [254,0,1], "lane": 2 }, + { "type": "tap", "t": [255,0,1], "lane": 1 }, + { "type": "hold", "t": [256,0,1], "end": [258,0,1], "lane": 0 }, + { "type": "tap", "t": [259,0,1], "lane": 1 }, + { "type": "tap", "t": [260,0,1], "lane": 2 }, + { "type": "tap", "t": [261,0,1], "lane": 3 }, + { "type": "tap", "t": [262,0,1], "lane": 2 }, + { "type": "tap", "t": [263,0,1], "lane": 1 }, + { "type": "tap", "t": [264,0,1], "lane": 0 }, + { "type": "tap", "t": [265,0,1], "lane": 1 }, + { "type": "tap", "t": [266,0,1], "lane": 2 }, + { "type": "tap", "t": [267,0,1], "lane": 3 }, + { "type": "tap", "t": [268,0,1], "lane": 2 }, + { "type": "tap", "t": [269,0,1], "lane": 1 }, + { "type": "tap", "t": [270,0,1], "lane": 0 }, + { "type": "tap", "t": [271,0,1], "lane": 1 }, + { "type": "hold", "t": [272,0,1], "end": [274,0,1], "lane": 2 }, + { "type": "tap", "t": [275,0,1], "lane": 3 }, + { "type": "tap", "t": [276,0,1], "lane": 2 }, + { "type": "tap", "t": [277,0,1], "lane": 1 }, + { "type": "tap", "t": [278,0,1], "lane": 0 }, + { "type": "tap", "t": [279,0,1], "lane": 1 }, + { "type": "tap", "t": [280,0,1], "lane": 2 }, + { "type": "tap", "t": [281,0,1], "lane": 3 }, + { "type": "tap", "t": [282,0,1], "lane": 2 }, + { "type": "tap", "t": [283,0,1], "lane": 1 }, + { "type": "tap", "t": [284,0,1], "lane": 0 }, + { "type": "tap", "t": [285,0,1], "lane": 1 }, + { "type": "tap", "t": [286,0,1], "lane": 2 }, + { "type": "tap", "t": [287,0,1], "lane": 3 }, + { "type": "hold", "t": [288,0,1], "end": [290,0,1], "lane": 2 }, + { "type": "tap", "t": [291,0,1], "lane": 1 }, + { "type": "tap", "t": [292,0,1], "lane": 0 }, + { "type": "tap", "t": [293,0,1], "lane": 1 }, + { "type": "tap", "t": [294,0,1], "lane": 2 }, + { "type": "tap", "t": [295,0,1], "lane": 3 }, + { "type": "tap", "t": [296,0,1], "lane": 2 }, + { "type": "tap", "t": [297,0,1], "lane": 1 }, + { "type": "tap", "t": [298,0,1], "lane": 0 }, + { "type": "tap", "t": [299,0,1], "lane": 1 }, + { "type": "tap", "t": [300,0,1], "lane": 2 }, + { "type": "tap", "t": [301,0,1], "lane": 3 }, + { "type": "tap", "t": [302,0,1], "lane": 2 }, + { "type": "tap", "t": [303,0,1], "lane": 1 }, + { "type": "hold", "t": [304,0,1], "end": [306,0,1], "lane": 0 }, + { "type": "tap", "t": [307,0,1], "lane": 1 }, + { "type": "tap", "t": [308,0,1], "lane": 2 }, + { "type": "tap", "t": [309,0,1], "lane": 3 }, + { "type": "tap", "t": [310,0,1], "lane": 2 }, + { "type": "tap", "t": [311,0,1], "lane": 1 }, + { "type": "tap", "t": [312,0,1], "lane": 0 }, + { "type": "tap", "t": [313,0,1], "lane": 1 }, + { "type": "tap", "t": [314,0,1], "lane": 2 }, + { "type": "tap", "t": [315,0,1], "lane": 3 }, + { "type": "tap", "t": [316,0,1], "lane": 2 }, + { "type": "tap", "t": [317,0,1], "lane": 1 }, + { "type": "tap", "t": [318,0,1], "lane": 0 }, + { "type": "tap", "t": [319,0,1], "lane": 1 }, + { "type": "hold", "t": [320,0,1], "end": [322,0,1], "lane": 2 }, + { "type": "tap", "t": [323,0,1], "lane": 3 }, + { "type": "tap", "t": [324,0,1], "lane": 2 }, + { "type": "tap", "t": [325,0,1], "lane": 1 }, + { "type": "tap", "t": [326,0,1], "lane": 0 }, + { "type": "tap", "t": [327,0,1], "lane": 1 }, + { "type": "tap", "t": [328,0,1], "lane": 2 }, + { "type": "tap", "t": [329,0,1], "lane": 3 }, + { "type": "tap", "t": [330,0,1], "lane": 2 }, + { "type": "tap", "t": [331,0,1], "lane": 1 }, + { "type": "tap", "t": [332,0,1], "lane": 0 }, + { "type": "tap", "t": [333,0,1], "lane": 1 }, + { "type": "tap", "t": [334,0,1], "lane": 2 }, + { "type": "tap", "t": [335,0,1], "lane": 3 }, + { "type": "hold", "t": [336,0,1], "end": [338,0,1], "lane": 2 }, + { "type": "tap", "t": [339,0,1], "lane": 1 }, + { "type": "tap", "t": [340,0,1], "lane": 0 }, + { "type": "tap", "t": [341,0,1], "lane": 1 }, + { "type": "tap", "t": [342,0,1], "lane": 2 }, + { "type": "tap", "t": [343,0,1], "lane": 3 }, + { "type": "tap", "t": [344,0,1], "lane": 2 }, + { "type": "tap", "t": [345,0,1], "lane": 1 }, + { "type": "tap", "t": [346,0,1], "lane": 0 }, + { "type": "tap", "t": [347,0,1], "lane": 1 }, + { "type": "tap", "t": [348,0,1], "lane": 2 }, + { "type": "tap", "t": [349,0,1], "lane": 3 }, + { "type": "tap", "t": [350,0,1], "lane": 2 }, + { "type": "tap", "t": [351,0,1], "lane": 1 }, + { "type": "hold", "t": [352,0,1], "end": [354,0,1], "lane": 0 }, + { "type": "tap", "t": [355,0,1], "lane": 1 }, + { "type": "tap", "t": [356,0,1], "lane": 2 }, + { "type": "tap", "t": [357,0,1], "lane": 3 }, + { "type": "tap", "t": [358,0,1], "lane": 2 }, + { "type": "tap", "t": [359,0,1], "lane": 1 }, + { "type": "tap", "t": [360,0,1], "lane": 0 }, + { "type": "tap", "t": [361,0,1], "lane": 1 } + ] +} diff --git a/mod/src/client/resources/hexium_packs/test-pattern/audio.ogg b/mod/src/client/resources/hexium_packs/test-pattern/audio.ogg new file mode 100644 index 0000000000000000000000000000000000000000..e112fb590fc0dd4601b758b07383962cf5096e06 GIT binary patch literal 552472 zcmeEvc|26#|Nphb*au_DI+ld&4N2K1dv-Hok{HRDQYm?tiish{5{0A`GhqyhLZy;~ zw38+Arrxxmyn8F!r1_mY=v|}t_w#xDzW;r`pOfaEd(U$3J#+8#yw2-9&vQJ&!h9fJ zXf9OR@^{10yIqs+JSsfV+jkPfcfkjE?JD5S-{A_62VC-dfJ^d#z4FJsIPq2NAHo&B z*=j^Vs%vocX0zo6#s7?a9I!(L{%3xMq@TDf#3}2q$3F=?3M>BUYV0}6H2_dx(hD#jyUza zgt+a&%2y|MonIN2w(G&lQtdF=gv}t|%B9An+;~pxmGf4Wni3aqEbQbi3;8f=B*^Ey zMdi%qkO*+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}MI?Y!`U zFt@G0sRGGXNLAeX9#ogI+W9V=WE#)ur5V6&pMzJ#D;zNu6;x(xNc@^4qb!GA&q^2o zT|skMv^r0p;Gc(bGcSX)Srs{(2PX5`I&lw@(w9;(onA?OlbQ14IRVzm!@<}+Law63 z-iUFjG89PJ*o>~J?=&Qq^!nLQQhq+hXHo>z66pjf>;)`-QcZp+r^RdAg2p*c-7dZ# zztS!~NHEEEltrqwWF>svSHS(gt$k$ElN6?$5-a6?=SH%c&WUUNh!P?#&s;#bZ{EgM z&3SwkbeCz@|IE&JS_%x7jC8)m@@sB|6tW7Ku!Qk!|2)hV`J@j`oHFuL%p;iM12{x^ zp@Q8YA9E!zt!6ITi_#Je(wcb(Fw~h7il8EjiA*v$q{Aa4(}Tqh=~>ioNgWD1T24^V zZVS_8*>Q*l!v6^WNL-oDBH*~$NMUqX`dm8}TXO!8)HdS~QOn7a9EfMk2=cc{4#g7N n_}_`M70wo9o#H>u7OLTcJ)6(znIq~B6@A73?Q?*Cd|>-KzErt% literal 0 HcmV?d00001 diff --git a/mod/src/client/resources/hexium_packs/test-pattern/basic.json b/mod/src/client/resources/hexium_packs/test-pattern/basic.json new file mode 100644 index 0000000..8f8c9d0 --- /dev/null +++ b/mod/src/client/resources/hexium_packs/test-pattern/basic.json @@ -0,0 +1,30 @@ +{ + "formatVersion": 1, + "difficulty": "BASIC", + "level": 2, + "laneCount": 4, + "offsetMs": 0, + "bpm": [ + { "t": [0,0,1], "bpm": 120 } + ], + "meter": [ + { "t": [0,0,1], "num": 4, "den": 4 } + ], + "notes": [ + { "type": "tap", "t": [4,0,1], "lane": 0 }, + { "type": "tap", "t": [5,0,1], "lane": 1 }, + { "type": "tap", "t": [6,0,1], "lane": 2 }, + { "type": "tap", "t": [7,0,1], "lane": 3 }, + { "type": "hold", "t": [8,0,1], "end": [10,0,1], "lane": 1 }, + { "type": "tap", "t": [11,0,1], "lane": 2 }, + { "type": "tap", "t": [12,0,1], "lane": 3 }, + { "type": "tap", "t": [13,0,1], "lane": 2 }, + { "type": "tap", "t": [14,0,1], "lane": 1 }, + { "type": "tap", "t": [15,0,1], "lane": 0 }, + { "type": "hold", "t": [16,0,1], "end": [18,0,1], "lane": 3 }, + { "type": "tap", "t": [17,0,1], "lane": 0 }, + { "type": "tap", "t": [18,0,1], "lane": 3 }, + { "type": "tap", "t": [20,0,1], "lane": 0 }, + { "type": "tap", "t": [20,0,1], "lane": 3 } + ] +} diff --git a/mod/src/client/resources/hexium_packs/test-pattern/meta.json b/mod/src/client/resources/hexium_packs/test-pattern/meta.json new file mode 100644 index 0000000..0640646 --- /dev/null +++ b/mod/src/client/resources/hexium_packs/test-pattern/meta.json @@ -0,0 +1,10 @@ +{ + "formatVersion": 1, + "id": "test-pattern", + "title": "Test Pattern", + "artist": "Hexium", + "charter": "Hexium", + "previewStartMs": 0, + "license": { "type": "original", "source": "A click track generated for Hexium" }, + "difficulties": [ "BASIC", "ADVANCED" ] +} diff --git a/tools/src/main/kotlin/net/trilleo/hexium/tools/Lint.kt b/tools/src/main/kotlin/net/trilleo/hexium/tools/Lint.kt index 31af806..6551b5c 100644 --- a/tools/src/main/kotlin/net/trilleo/hexium/tools/Lint.kt +++ b/tools/src/main/kotlin/net/trilleo/hexium/tools/Lint.kt @@ -3,25 +3,13 @@ package net.trilleo.hexium.tools import java.io.File import java.io.IOException import java.io.PrintStream +import net.trilleo.hexium.core.chart.ChartFolder import net.trilleo.hexium.core.chart.ChartIssue import net.trilleo.hexium.core.chart.ChartLimits import net.trilleo.hexium.core.chart.ChartMeta -import net.trilleo.hexium.core.chart.ChartPackage -import net.trilleo.hexium.core.chart.ChartParser -import net.trilleo.hexium.core.chart.ChartValidator import net.trilleo.hexium.core.chart.DifficultyChart -import net.trilleo.hexium.core.chart.IssueCode import net.trilleo.hexium.core.chart.Severity -private const val META_FILE = "meta.json" - -/** The package rules a folder adds on top of checking each file. */ -private val PACKAGE_CODES = setOf( - IssueCode.MISSING_DIFFICULTY_FILE, - IssueCode.UNLISTED_DIFFICULTY_FILE, - IssueCode.DUPLICATE_DIFFICULTY_FILE, -) - private class Tally(val out: PrintStream) { var files = 0 var errors = 0 @@ -47,7 +35,7 @@ internal fun lint(paths: List, out: PrintStream): Int { val file = File(path) when { file.isDirectory -> { - val charts = file.listFiles { f -> f.isFile && f.name.endsWith(".json") }.orEmpty().sortedBy { it.name } + val charts = file.listFiles { f -> f.isFile && ChartFolder.isChartFile(f.name) }.orEmpty().sortedBy { it.name } if (charts.isEmpty()) { out.println("$path: no .json files here") badPath = true @@ -84,7 +72,8 @@ private fun lintFolder(folder: File, files: List, tally: Tally) { // A file that couldn't be read has been reported already, and isn't missing. val listed = meta ?: return if (!allRead) return - val issues = ChartValidator.validatePackage(ChartPackage(listed, charts)).filter { it.code in PACKAGE_CODES } + val everything = folder.listFiles { f -> f.isFile }.orEmpty() + val issues = ChartFolder.folderIssues(listed, charts, everything.map { it.name }, everything.sumOf { it.length() }) tally.report(folder, issues) } @@ -98,8 +87,7 @@ private fun lintFile(file: File, tally: Tally): Any? { } private fun readAndCheck(file: File, tally: Tally): Any? { - // A character is at most 4 bytes, so a longer file can't be within the limit. Don't try to read it. - if (file.length() > ChartLimits.MAX_JSON_FILE_CHARS * 4L) { + if (ChartFolder.isTooLargeToRead(file.length())) { tally.error(file, "is ${file.length()} bytes, far over the limit of ${ChartLimits.MAX_JSON_FILE_CHARS} characters") return null } @@ -109,17 +97,7 @@ private fun readAndCheck(file: File, tally: Tally): Any? { tally.error(file, "can't be read: ${e.message}") return null } - if (file.name == META_FILE) { - val parsed = ChartParser.parseMeta(text) - tally.report(file, parsed.issues) - val meta = parsed.value ?: return null - tally.report(file, ChartValidator.validateMeta(meta)) - return meta - } - val parsed = ChartParser.parseDifficulty(text) - tally.report(file, parsed.issues) - val chart = parsed.value ?: return null - tally.report(file, ChartValidator.validateChart(chart)) - tally.report(file, ChartValidator.validateFileName(chart, file.name)) - return chart + val result = ChartFolder.readFile(file.name, text) + tally.report(file, result.issues) + return result.meta ?: result.chart } diff --git a/tools/src/test/kotlin/net/trilleo/hexium/tools/ToolsTest.kt b/tools/src/test/kotlin/net/trilleo/hexium/tools/ToolsTest.kt index dd6fd40..31fdd9e 100644 --- a/tools/src/test/kotlin/net/trilleo/hexium/tools/ToolsTest.kt +++ b/tools/src/test/kotlin/net/trilleo/hexium/tools/ToolsTest.kt @@ -118,6 +118,7 @@ class ToolsTest { fun lintChecksAFolderWithMetaAsAPackage() { write("meta.json", goodMeta) write("basic.json", goodChart) + write("audio.ogg", "") assertEquals(0, run("lint", dir.path).first) write("meta.json", goodMeta.replace(""""BASIC"""", """"BASIC", "EXPERT"""")) @@ -126,6 +127,15 @@ class ToolsTest { assertTrue("expert.json" in output, output) } + @Test + fun lintReportsAFolderWithoutAudio() { + write("meta.json", goodMeta) + write("basic.json", goodChart) + val (code, output) = run("lint", dir.path) + assertEquals(1, code) + assertTrue("audio.ogg" in output, output) + } + @Test fun lintDoesNotCallABrokenFileMissing() { write("meta.json", goodMeta) From 53f5d224429b5eeb46a71f7ebf2fabaf401a1086 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Wed, 4 Nov 2026 09:27:34 +0800 Subject: [PATCH 12/34] Improvement: Change the main button to be full width --- .../hexium/client/screen/TitleScreenButton.kt | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/TitleScreenButton.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/TitleScreenButton.kt index 095d25d..a77a983 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/TitleScreenButton.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/TitleScreenButton.kt @@ -7,26 +7,32 @@ import net.minecraft.client.gui.screens.TitleScreen import net.minecraft.network.chat.Component /** - * The way into Hexium: one button left of Singleplayer. It's the only hook that doesn't check for a - * session, since a session can only start from the menu it opens. + * The way into Hexium: a full-width button under Multiplayer. The rows from Multiplayer up move up + * one to make room, which keeps Options and Quit on small windows and Realms' icons on their button. + * + * It's the only hook that doesn't check for a session, since a session can only start from the menu + * it opens. */ object TitleScreenButton { - private const val WIDTH = 56 + private const val WIDTH = 200 private const val HEIGHT = 20 - private const val GAP = 2 + private const val ROW = 24 fun register() { ScreenEvents.AFTER_INIT.register { client, screen, _, _ -> if (screen is TitleScreen) { val widgets = Screens.getWidgets(screen) - val singleplayer = Component.translatable("menu.singleplayer") - // Demo mode has no Singleplayer button: line up with the first button instead. - val anchor = widgets.firstOrNull { it.message == singleplayer } ?: widgets.firstOrNull() - val x = screen.width / 2 - 100 - GAP - WIDTH - val y = anchor?.y ?: (screen.height / 4 + 48) + val multiplayer = Component.translatable("menu.multiplayer") + // Demo mode has Reset Demo World in that row instead. + val resetDemo = Component.translatable("menu.resetdemo") + val anchor = widgets.firstOrNull { it.message == multiplayer || it.message == resetDemo } + val y = anchor?.y ?: (screen.height / 4 + 48 + ROW) + for (widget in widgets) { + if (widget.y <= y) widget.y -= ROW + } widgets += Button.builder(Component.translatable("hexium.title_button")) { client.gui.setScreen(HexiumMenuScreen(screen)) - }.bounds(x, y, WIDTH, HEIGHT).build() + }.bounds(screen.width / 2 - WIDTH / 2, y, WIDTH, HEIGHT).build() } } } From 115d323151efefc4f47405f89b80e0b39392f09f Mon Sep 17 00:00:00 2001 From: Trilleo Date: Wed, 4 Nov 2026 12:27:53 +0800 Subject: [PATCH 13/34] Feature: Add song playback on Hexium's own audio clock, a debug overlay and an Audio Test screen --- CHANGELOG.md | 3 + .../trilleo/hexium/core/clock/SongClock.kt | 101 +++++ .../hexium/core/clock/SongClockTest.kt | 222 +++++++++++ docs/ARCHITECTURE.md | 9 +- docs/DEVELOPMENT.md | 4 + .../client/mixin/MusicManagerMixin.java | 18 + .../client/mixin/SoundLibraryMixin.java | 19 + .../trilleo/hexium/client/audio/SongStream.kt | 371 ++++++++++++++++++ .../trilleo/hexium/client/clock/AudioClock.kt | 41 ++ .../hexium/client/debug/DebugOverlay.kt | 64 +++ .../hexium/client/screen/AudioTestScreen.kt | 155 ++++++++ .../hexium/client/screen/HexiumMenuScreen.kt | 18 +- .../hexium/client/session/HexiumSession.kt | 14 +- .../resources/assets/hexium/lang/en_us.json | 7 +- .../resources/assets/hexium/lang/zh_cn.json | 7 +- .../resources/hexium.client.mixins.json | 5 +- 16 files changed, 1047 insertions(+), 11 deletions(-) create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/clock/SongClock.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/clock/SongClockTest.kt create mode 100644 mod/src/client/java/net/trilleo/hexium/client/mixin/MusicManagerMixin.java create mode 100644 mod/src/client/java/net/trilleo/hexium/client/mixin/SoundLibraryMixin.java create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/audio/SongStream.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/clock/AudioClock.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/debug/DebugOverlay.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/screen/AudioTestScreen.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index d237617..474cf84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,9 @@ ### Technical Details ++ Added song playback through Hexium's own OpenAL source and an audio clock that follows it. + + When the audio device changes or sounds reload, the song returns at the right place once the game has reloaded. ++ Added an Audio Test screen with a debug overlay, for checking that the clock stays with the music over a whole song. + Added `rejudge` and `dump` to the command-line tools. + Added golden replays and property tests that guard the judge. + The build now lints the example charts. diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/clock/SongClock.kt b/core/src/main/kotlin/net/trilleo/hexium/core/clock/SongClock.kt new file mode 100644 index 0000000..fff4f65 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/clock/SongClock.kt @@ -0,0 +1,101 @@ +package net.trilleo.hexium.core.clock + +import kotlin.math.abs + +/** + * Song time from a steady wall clock, gently pulled toward the audio position. The raw position + * only moves in steps, so it can't place notes itself, but over a song it decides where the music + * is. Knows nothing about where its numbers come from, so the mod feeds it and tests can too. + * + * Doesn't allocate. + */ +class SongClock { + private var baseSongMs = 0.0 + private var baseWallNs = 0L + private var lastObservedNs = 0L + /** [nowMs] never returns less than this, except after [start]. */ + private var floorMs = Double.NEGATIVE_INFINITY + + var running = false + private set + + /** The audio position minus the clock, at the last [observe]. Positive means the music is ahead. */ + var driftMs = 0.0 + private set + + /** The largest [driftMs] either way since [start]. */ + var maxDriftMs = 0.0 + private set + + /** How many times the audio was too far away to pull toward, since this clock was made. */ + var resyncCount = 0 + private set + + /** Starts running from [songMs]. */ + fun start(songMs: Double, wallNs: Long) { + seek(songMs, wallNs) + running = true + } + + /** Moves to [songMs], running or paused as it was. Starting and seeking are the only ways time can go backwards. */ + fun seek(songMs: Double, wallNs: Long) { + baseSongMs = songMs + baseWallNs = wallNs + lastObservedNs = wallNs + floorMs = Double.NEGATIVE_INFINITY + driftMs = 0.0 + maxDriftMs = 0.0 + } + + fun pause(wallNs: Long) { + if (!running) return + baseSongMs = nowMs(wallNs) + baseWallNs = wallNs + running = false + } + + /** Tells the clock where the audio is. Call once per frame. A position that isn't finite is ignored. */ + fun observe(audioMs: Double, wallNs: Long) { + if (!running || !audioMs.isFinite()) return + val sinceLastNs = wallNs - lastObservedNs + if (sinceLastNs <= 0L) return + lastObservedNs = wallNs + + val error = audioMs - mapMs(wallNs) + driftMs = error + if (abs(error) > maxDriftMs) maxDriftMs = abs(error) + if (abs(error) > RESYNC_MS) { + baseSongMs = audioMs + baseWallNs = wallNs + resyncCount++ + return + } + // This is a share of the time passed, so it's the same at any frame rate. Since the error is + // under RESYNC_MS, the pull is always less than the time passed, so time never reverses. + val share = sinceLastNs / NANOS_PER_MS / PULL_TIME_MS + baseSongMs += error * (if (share < 1.0) share else 1.0) + } + + /** Song time at [wallNs], for an input timestamp. May be earlier than [nowMs] has already returned. */ + fun mapMs(wallNs: Long): Double { + if (!running) return baseSongMs + return baseSongMs + (wallNs - baseWallNs) / NANOS_PER_MS + } + + /** Song time for this frame. Never goes backwards. */ + fun nowMs(wallNs: Long): Double { + val time = mapMs(wallNs) + if (time > floorMs) floorMs = time + return floorMs + } + + private companion object { + const val NANOS_PER_MS = 1_000_000.0 + + /** Longer smooths out the steps better. Shorter follows a sound card's own speed more closely. */ + const val PULL_TIME_MS = 1000.0 + + /** Past this, something has happened, such as an audio stall. Pulling would take too long. */ + const val RESYNC_MS = 100.0 + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/clock/SongClockTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/clock/SongClockTest.kt new file mode 100644 index 0000000..388e43a --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/clock/SongClockTest.kt @@ -0,0 +1,222 @@ +package net.trilleo.hexium.core.clock + +import kotlin.math.abs +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertTrue + +class SongClockTest { + private val frameNs = 4_000_000L + + private fun ms(ns: Long) = ns / 1_000_000.0 + + @Test + fun runsOnWallTimeBetweenAudioUpdates() { + val clock = SongClock() + clock.start(1000.0, 5_000_000_000L) + assertEquals(1000.0, clock.nowMs(5_000_000_000L), 1e-6) + assertEquals(1250.0, clock.nowMs(5_250_000_000L), 1e-6) + } + + @Test + fun doesNotMoveWhilePaused() { + val clock = SongClock() + clock.start(0.0, 0L) + clock.pause(1_000_000_000L) + assertEquals(1000.0, clock.nowMs(2_000_000_000L), 1e-6) + clock.observe(500.0, 3_000_000_000L) + assertEquals(1000.0, clock.nowMs(3_000_000_000L), 1e-6) + assertEquals(false, clock.running) + } + + @Test + fun stepsInTheAudioPositionDontShowInTheClock() { + val clock = SongClock() + clock.start(0.0, 0L) + var wall = 0L + var last = 0.0 + var biggestStep = 0.0 + repeat(60_000 / 4) { + wall += frameNs + // The raw position only moves every 20 ms. + clock.observe(Math.floor(ms(wall) / 20.0) * 20.0, wall) + val now = clock.nowMs(wall) + biggestStep = maxOf(biggestStep, now - last) + last = now + } + assertTrue(biggestStep < 4.5, "biggest step $biggestStep ms for a 4 ms frame") + assertTrue(abs(last - ms(wall)) < 25.0, "clock $last at ${ms(wall)}") + } + + /** A sound card whose clock is 0.1% fast must not pull the notes away from the music. */ + @Test + fun followsAudioThatRunsAtADifferentRateOverThreeMinutes() { + val clock = SongClock() + clock.start(0.0, 0L) + var wall = 0L + repeat(180_000 / 4) { + wall += frameNs + clock.observe(ms(wall) * 1.001, wall) + } + assertEquals(0, clock.resyncCount) + assertEquals(ms(wall) * 1.001, clock.nowMs(wall), 2.0) + } + + @Test + fun theResultDoesNotDependOnTheFrameRate() { + fun errorAt(frame: Long): Double { + val clock = SongClock() + clock.start(0.0, 0L) + var wall = 0L + // One pull time in, while the error is still shrinking, so a pull per frame would show. + while (wall < 1_000_000_000L) { + wall += frame + clock.observe(ms(wall) + 30.0, wall) + } + return ms(wall) + 30.0 - clock.nowMs(wall) + } + assertEquals(errorAt(4_000_000L), errorAt(16_000_000L), 0.5) + assertEquals(11.0, errorAt(4_000_000L), 1.0) + } + + @Test + fun jumpsForwardWhenAudioIsFarAhead() { + val clock = SongClock() + clock.start(0.0, 0L) + clock.observe(1500.0, 1_000_000_000L) + assertEquals(1500.0, clock.nowMs(1_000_000_000L), 1e-6) + assertEquals(1, clock.resyncCount) + } + + @Test + fun neverRunsBackwardsEvenWhenAudioFallsFarBehind() { + val clock = SongClock() + clock.start(0.0, 0L) + assertEquals(1000.0, clock.nowMs(1_000_000_000L), 1e-6) + clock.observe(500.0, 1_000_000_000L) + assertEquals(1, clock.resyncCount) + assertEquals(1000.0, clock.nowMs(1_000_000_000L), 1e-6) + // Holds still until the music catches up, then moves on. + assertEquals(1000.0, clock.nowMs(1_200_000_000L), 1e-6) + assertEquals(1100.0, clock.nowMs(1_600_000_000L), 1e-6) + } + + @Test + fun neverRunsBackwardsWithNoisyAudio() { + val clock = SongClock() + clock.start(0.0, 0L) + val random = java.util.Random(42) + var wall = 0L + var last = Double.NEGATIVE_INFINITY + repeat(50_000) { + wall += 1_000_000L + random.nextInt(8_000_000) + clock.observe(ms(wall) + (random.nextDouble() - 0.5) * 80.0, wall) + // Not nowMs: its floor would hide a pull that reversed time. + val now = clock.mapMs(wall) + assertTrue(now >= last, "went from $last to $now") + last = now + } + } + + /** Input stamped before this frame's time keeps its real time. The judge decides what to do with it. */ + @Test + fun mapsOlderTimestampsWithoutHoldingThemToNow() { + val clock = SongClock() + clock.start(0.0, 0L) + assertEquals(1000.0, clock.nowMs(1_000_000_000L), 1e-6) + assertEquals(990.0, clock.mapMs(990_000_000L), 1e-6) + } + + @Test + fun aSeekMayGoBackwards() { + val clock = SongClock() + clock.start(0.0, 0L) + assertEquals(5000.0, clock.nowMs(5_000_000_000L), 1e-6) + clock.start(2000.0, 5_000_000_000L) + assertEquals(2000.0, clock.nowMs(5_000_000_000L), 1e-6) + assertEquals(0, clock.resyncCount) + } + + @Test + fun reportsDrift() { + val clock = SongClock() + clock.start(0.0, 0L) + clock.observe(1010.0, 1_000_000_000L) + assertEquals(10.0, clock.driftMs, 1e-6) + clock.observe(1990.0, 2_000_000_000L) + assertTrue(clock.driftMs < 0.0) + assertTrue(clock.maxDriftMs >= 10.0) + } + + @Test + fun ignoresAudioPositionsThatArentNumbers() { + val clock = SongClock() + clock.start(0.0, 0L) + clock.observe(Double.NaN, 1_000_000_000L) + assertEquals(1000.0, clock.nowMs(1_000_000_000L), 1e-6) + assertEquals(0, clock.resyncCount) + } + + @Test + fun resumesFromWherePauseLeftIt() { + val clock = SongClock() + clock.start(0.0, 0L) + clock.pause(1_000_000_000L) + clock.start(clock.nowMs(5_000_000_000L), 5_000_000_000L) + assertEquals(1500.0, clock.nowMs(5_500_000_000L), 1e-6) + assertEquals(0, clock.resyncCount) + } + + @Test + fun seekingWhilePausedStaysPausedAtTheNewTime() { + val clock = SongClock() + clock.start(0.0, 0L) + clock.pause(5_000_000_000L) + clock.seek(2000.0, 6_000_000_000L) + assertEquals(false, clock.running) + assertEquals(2000.0, clock.nowMs(7_000_000_000L), 1e-6) + clock.start(clock.nowMs(8_000_000_000L), 8_000_000_000L) + assertEquals(2500.0, clock.nowMs(8_500_000_000L), 1e-6) + } + + @Test + fun seekingWhileRunningKeepsRunningAndMayGoBackwards() { + val clock = SongClock() + clock.start(0.0, 0L) + assertEquals(5000.0, clock.nowMs(5_000_000_000L), 1e-6) + clock.seek(2000.0, 5_000_000_000L) + assertEquals(true, clock.running) + assertEquals(2500.0, clock.nowMs(5_500_000_000L), 1e-6) + assertEquals(0, clock.resyncCount) + } + + @Test + fun aLongGapPullsNoFurtherThanTheWholeError() { + val clock = SongClock() + clock.start(0.0, 0L) + clock.observe(5050.0, 5_000_000_000L) + assertEquals(5050.0, clock.mapMs(5_000_000_000L), 1e-6) + } + + @Test + fun aValidPositionWorksAfterOneThatIsNot() { + val clock = SongClock() + clock.start(0.0, 0L) + clock.observe(Double.NaN, 500_000_000L) + clock.observe(1010.0, 1_000_000_000L) + assertEquals(10.0, clock.driftMs, 1e-6) + assertEquals(1010.0, clock.mapMs(1_000_000_000L), 1e-6) + } + + @Test + fun startClearsDriftButKeepsCountingResyncs() { + val clock = SongClock() + clock.start(0.0, 0L) + clock.observe(2000.0, 1_000_000_000L) + assertEquals(1, clock.resyncCount) + clock.start(0.0, 1_000_000_000L) + assertEquals(0.0, clock.driftMs) + assertEquals(0.0, clock.maxDriftMs) + assertEquals(1, clock.resyncCount) + } +} diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index bcc9bc3..ae868ad 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -40,14 +40,15 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl ## Audio and clock -- Songs are not played through Minecraft's sound manager. The mod decodes OGG with stb_vorbis (bundled with LWJGL) and streams it into its own OpenAL source on the game's existing OpenAL context. -- Song position comes from `AL_SAMPLE_OFFSET`, plus the OpenAL Soft latency extension if it's there. This raw value updates in steps, so the clock runs on `System.nanoTime()` and is gently nudged toward the audio position. It never jumps backwards. +- Songs are not played through Minecraft's sound manager. The mod decodes OGG with stb_vorbis (bundled with LWJGL) on a background thread and streams it into its own OpenAL source on the game's existing OpenAL context (`SongStream`). Minecraft destroys that context when the audio device changes or sounds reload, so a mixin stops the stream first, and it rebuilds its source on the new one at the clock's current time. The song is silent while Minecraft's loading screen covers the game. +- Song position comes from `AL_SEC_OFFSET_LATENCY_SOFT` (the OpenAL Soft latency extension), or `AL_SAMPLE_OFFSET` if it isn't there. This raw value updates in steps, so the clock runs on SDL's tick counter, the clock input events are stamped with, and is gently pulled toward the audio position. It only jumps if the audio is over 100 ms away, and never runs backwards: it holds still until the music catches up. The logic is `SongClock` in `core`, which has no time source of its own, so it can be tested. `AudioClock` in `mod` feeds it. +- Vanilla music is held for the length of a session. - Draw time = song time − visual offset (A). Judgement time = input song time − judgement offset (B). ## Input timing -- Hook the keyboard and mouse callbacks (Minecraft's keyboard and mouse handlers). Stamp each event with `glfwGetTime()` when it arrives and convert it to song time with the clock's mapping. -- GLFW delivers events once per frame, so timestamp error is at most one frame. Tell players to run uncapped or at 240+ FPS during play (about 4 ms of error). Keep rendering fast so this holds. +- Minecraft 26.3 uses SDL3, not GLFW. Read input in `SDLEventHandler`, since it hands keys on to the keyboard handler later in the frame. Each SDL event carries a `timestamp` from SDL's tick counter (`SDL_GetTicksNS`), the same clock the song clock runs on, so convert that to song time with the clock's mapping. +- Events are polled once per frame, so without a real timestamp from the OS the error is at most one frame. The debug overlay measures this. Tell players to run uncapped or at 240+ FPS during play (about 4 ms of error). Keep rendering fast so this holds. - Every frame, record an aim sample (song time, yaw, pitch → crosshair point on the screen plane). Slides and flicks are judged from these samples. Flicks test the line between two samples, so fast swipes at low FPS still register. - Events go into a queue that the judge drains every frame. Every input event and aim sample is also appended to the replay: the mod sends input through `ReplayRecorder`, which records it and passes it to the judge ([REPLAY_FORMAT.md](REPLAY_FORMAT.md)). diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 1b27562..b10be70 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -78,6 +78,10 @@ Parallel lanes that work well: after Milestone 1, `server` can build auth and ch - **Fabric client game tests:** the title button opens the menu; the menu loads the stage; joining a normal singleplayer world creates no session; a short chart plays to the results screen with autoplay. - **Human playtest checklist per milestone:** offset calibration feels right; no drift after a 3-minute song; ground track readable while aiming at the corners; hold, slide and flick feel fair. +### Checking the clock + +The Hexium menu has an Audio Test button. It plays the bundled click track with a flash on every beat and the debug overlay on screen. Let the whole song play: the flash and the click should still line up at the end, and `resyncs` and `underruns` should stay at 0. After the first couple of seconds `drift` should stay small: it peaked at 8.5 ms over the whole song on a Mac outside the game, so anything over about 20 ms needs a look. `max` includes the start of playback, when the audio is still behind by the sound card's latency. Back 3 s tests seeking. Changing the audio device or pressing F3+T tests recovery: the song goes quiet under the loading screen, then comes back at the right place. + ### Example task prompts - *"Read docs/CHART_FORMAT.md. Implement the chart model, JSON parser and validator in `core`, test-first. Cover every validator rule with a passing and a failing example. No Minecraft code."* diff --git a/mod/src/client/java/net/trilleo/hexium/client/mixin/MusicManagerMixin.java b/mod/src/client/java/net/trilleo/hexium/client/mixin/MusicManagerMixin.java new file mode 100644 index 0000000..cff4f3d --- /dev/null +++ b/mod/src/client/java/net/trilleo/hexium/client/mixin/MusicManagerMixin.java @@ -0,0 +1,18 @@ +package net.trilleo.hexium.client.mixin; + +import net.minecraft.client.sounds.MusicManager; +import net.trilleo.hexium.client.session.HexiumSession; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +/** Vanilla music must not start over a song. */ +@Mixin(MusicManager.class) +abstract class MusicManagerMixin { + @Inject(method = "tick", at = @At("HEAD"), cancellable = true) + private void hexium$holdMusic(CallbackInfo ci) { + if (!HexiumSession.active()) return; + ci.cancel(); + } +} diff --git a/mod/src/client/java/net/trilleo/hexium/client/mixin/SoundLibraryMixin.java b/mod/src/client/java/net/trilleo/hexium/client/mixin/SoundLibraryMixin.java new file mode 100644 index 0000000..15ae315 --- /dev/null +++ b/mod/src/client/java/net/trilleo/hexium/client/mixin/SoundLibraryMixin.java @@ -0,0 +1,19 @@ +package net.trilleo.hexium.client.mixin; + +import com.mojang.blaze3d.audio.Library; +import net.trilleo.hexium.client.audio.SongStream; +import net.trilleo.hexium.client.session.HexiumSession; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +/** The song's source dies with this context, so the stream must stop using it first. */ +@Mixin(Library.class) +abstract class SoundLibraryMixin { + @Inject(method = "cleanup", at = @At("HEAD")) + private void hexium$songSourceEnds(CallbackInfo ci) { + if (!HexiumSession.active()) return; + SongStream.onContextLost(); + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/audio/SongStream.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/audio/SongStream.kt new file mode 100644 index 0000000..3db6c63 --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/audio/SongStream.kt @@ -0,0 +1,371 @@ +package net.trilleo.hexium.client.audio + +import java.io.IOException +import java.nio.ByteBuffer +import java.nio.ShortBuffer +import java.nio.file.Files +import java.nio.file.Path +import java.util.concurrent.locks.LockSupport +import java.util.concurrent.locks.ReentrantLock +import kotlin.concurrent.withLock +import net.trilleo.hexium.Hexium +import org.lwjgl.openal.AL +import org.lwjgl.openal.AL10 +import org.lwjgl.openal.AL11 +import org.lwjgl.openal.ALC10 +import org.lwjgl.openal.SOFTSourceLatency +import org.lwjgl.stb.STBVorbis +import org.lwjgl.stb.STBVorbisInfo +import org.lwjgl.system.MemoryUtil +import org.slf4j.LoggerFactory + +/** + * Plays one OGG file through its own OpenAL source on the game's OpenAL context, never through + * Minecraft's sound manager. A background thread decodes and queues the audio, so a frame only ever + * asks for the position. + * + * Minecraft destroys its context when the audio device changes or sounds reload, which takes this + * source with it. [onContextLost] stops using it, and [recoverIfLost] rebuilds it on the new context. + */ +class SongStream private constructor( + private val ogg: ByteBuffer, + private val decoder: Long, + private val sampleRate: Int, + private val channels: Int, + val lengthMs: Double, +) : AutoCloseable { + /** Held for the whole of a refill, so a seek can't mix old audio into the queue. Taken before [lock]. */ + private val decoderLock = ReentrantLock() + + /** Guards the source and its queue. The pump never holds it during a decode, so a frame doesn't wait on one. */ + private val lock = ReentrantLock() + + private val format = if (channels == 1) AL10.AL_FORMAT_MONO16 else AL10.AL_FORMAT_STEREO16 + private val pcm: ShortBuffer = MemoryUtil.memAllocShort(BUFFER_FRAMES * channels) + private val buffers = IntArray(BUFFER_COUNT) + private val free = IntArray(BUFFER_COUNT) + private var freeCount = 0 + private val oneBuffer = IntArray(1) + + /** How many frames each queued buffer holds, oldest first, as a ring. */ + private val queuedFrames = IntArray(BUFFER_COUNT) + private var queuedHead = 0 + private var queuedCount = 0 + + /** Frames before the start of the queue. AL's own position only counts from there. */ + private var baseFrames = 0L + private val offsetAndLatency = DoubleArray(2) + private val oneInt = IntArray(1) + private var hasLatencyExtension = false + + /** 0 while there's no context to use. */ + @Volatile + private var context = 0L + private var source = 0 + private var gain = 1f + private var playing = false + private var ranDry = false + private var recoveryFailed = false + private var pumpFailed = false + + @Volatile + private var decoderFinished = false + private var lastPositionMs = 0.0 + + @Volatile + private var closed = false + private val thread = Thread(::pumpUntilClosed, "Hexium song stream") + + /** How many times the queue ran dry, so the music stopped until it was refilled. */ + @Volatile + var underruns = 0 + private set + + /** True if the sound card's own latency is taken off the position. */ + val usesLatency: Boolean + get() = hasLatencyExtension + + /** True once the last sample has been played. */ + val finished: Boolean + get() = lock.withLock { decoderFinished && queuedCount == 0 } + + init { + try { + createSource(ALC10.alcGetCurrentContext()) + } catch (e: Exception) { + MemoryUtil.memFree(pcm) + throw e + } + thread.isDaemon = true + thread.start() + } + + private fun createSource(onContext: Long) { + hasLatencyExtension = AL.getCapabilities().AL_SOFT_source_latency + source = AL10.alGenSources() + if (!AL10.alIsSource(source)) throw IOException("OpenAL has no free source") + AL10.alGenBuffers(buffers) + AL10.alSourcei(source, AL10.AL_SOURCE_RELATIVE, AL10.AL_TRUE) + AL10.alSourcei(source, AL11.AL_DISTANCE_MODEL, AL10.AL_NONE) + AL10.alSourcef(source, AL10.AL_GAIN, gain) + resetQueue() + context = onContext + } + + private fun resetQueue() { + for (i in buffers.indices) free[i] = buffers[i] + freeCount = buffers.size + queuedHead = 0 + queuedCount = 0 + ranDry = false + } + + /** Starts or resumes from the current position. */ + fun play() { + lock.withLock { playing = true } + fill() + lock.withLock { + if (contextIsCurrent() && sourceState() != AL10.AL_PLAYING) AL10.alSourcePlay(source) + } + } + + fun pause() { + lock.withLock { + playing = false + if (contextIsCurrent()) AL10.alSourcePause(source) + } + } + + /** Moves to [ms], keeping whether it's playing. */ + fun seek(ms: Double) { + decoderLock.withLock { + lock.withLock { + if (contextIsCurrent()) { + // Rewind, not stop: buffers queued on a stopped source count as played straight away. + AL10.alSourceRewind(source) + AL10.alSourcei(source, AL10.AL_BUFFER, AL10.AL_NONE) + } + resetQueue() + moveDecoderTo(ms) + } + } + if (playing) play() else fill() + } + + private fun moveDecoderTo(ms: Double) { + val frame = (ms.coerceAtLeast(0.0) / 1000.0 * sampleRate).toLong().coerceAtMost(Int.MAX_VALUE.toLong()) + if (!STBVorbis.stb_vorbis_seek(decoder, frame.toInt())) LOGGER.warn("Can't seek the song to frame {}", frame) + baseFrames = frame + decoderFinished = false + lastPositionMs = frame * 1000.0 / sampleRate + } + + fun setGain(value: Float) { + if (value == gain) return + lock.withLock { + gain = value + if (contextIsCurrent()) AL10.alSourcef(source, AL10.AL_GAIN, value) + } + } + + /** Where the listener is in the song, or NaN if the music isn't sounding right now. Doesn't allocate. */ + fun positionMs(): Double { + lock.lock() + try { + if (!contextIsCurrent() || sourceState() != AL10.AL_PLAYING) return Double.NaN + val seconds = if (hasLatencyExtension) { + SOFTSourceLatency.alGetSourcedvSOFT(source, SOFTSourceLatency.AL_SEC_OFFSET_LATENCY_SOFT, offsetAndLatency) + offsetAndLatency[0] - offsetAndLatency[1] + } else { + AL10.alGetSourcei(source, AL11.AL_SAMPLE_OFFSET, oneInt) + oneInt[0].toDouble() / sampleRate + } + lastPositionMs = baseFrames * 1000.0 / sampleRate + seconds * 1000.0 + return lastPositionMs + } finally { + lock.unlock() + } + } + + private fun sourceState(): Int { + AL10.alGetSourcei(source, AL10.AL_SOURCE_STATE, oneInt) + return oneInt[0] + } + + /** Minecraft is about to destroy the context. Called from a mixin, before it does. */ + private fun contextLost() { + decoderLock.withLock { + lock.withLock { context = 0L } + } + } + + /** + * Call once per frame. If the source was lost, rebuilds it at [songMs] once Minecraft has a new + * context. Doesn't allocate unless that happens. + */ + fun recoverIfLost(songMs: Double) { + if (context != 0L) return + val current = ALC10.alcGetCurrentContext() + if (current == 0L) return + try { + decoderLock.withLock { + lock.withLock { + createSource(current) + moveDecoderTo(songMs) + } + } + } catch (e: IOException) { + // Tried again next frame. Sounds playing in the world may free up a source. + if (!recoveryFailed) LOGGER.warn("Can't restart the song", e) + recoveryFailed = true + return + } + recoveryFailed = false + if (playing) play() else fill() + } + + private fun contextIsCurrent(): Boolean = context != 0L && ALC10.alcGetCurrentContext() == context + + private fun pumpUntilClosed() { + while (!closed) { + try { + fill() + } catch (e: RuntimeException) { + if (!pumpFailed) LOGGER.warn("The song stream failed", e) + pumpFailed = true + } + LockSupport.parkNanos(PUMP_INTERVAL_NS) + } + } + + /** Takes back the buffers that have played and refills them. */ + private fun fill() { + decoderLock.withLock { + if (closed || !contextIsCurrent()) return + lock.withLock { + // OpenAL can report buffers as played when they haven't been: on a source that hasn't started, + // and on one that stopped and got more. So only ask once it has started, and not while paused. + val state = sourceState() + if (!playing && state != AL10.AL_INITIAL) return + if (state != AL10.AL_INITIAL) reclaim() + } + while (freeCount > 0 && !decoderFinished) { + pcm.clear() + val frames = STBVorbis.stb_vorbis_get_samples_short_interleaved(decoder, channels, pcm) + if (frames == 0) { + decoderFinished = true + break + } + pcm.limit(frames * channels) + lock.withLock { queue(frames) } + } + lock.withLock { restartAfterRunningDry() } + } + } + + private fun reclaim() { + AL10.alGetSourcei(source, AL10.AL_BUFFERS_PROCESSED, oneInt) + val processed = oneInt[0] + for (i in 0 until processed) { + AL10.alSourceUnqueueBuffers(source, oneBuffer) + free[freeCount++] = oneBuffer[0] + baseFrames += queuedFrames[queuedHead] + queuedHead = (queuedHead + 1) % BUFFER_COUNT + queuedCount-- + } + } + + private fun queue(frames: Int) { + // Buffers queued on a stopped source count as played straight away, so it must be rewound first. + if (sourceState() == AL10.AL_STOPPED) { + reclaim() + AL10.alSourceRewind(source) + ranDry = true + } + val buffer = free[--freeCount] + AL10.alBufferData(buffer, format, pcm, sampleRate) + oneBuffer[0] = buffer + AL10.alSourceQueueBuffers(source, oneBuffer) + queuedFrames[(queuedHead + queuedCount) % BUFFER_COUNT] = frames + queuedCount++ + } + + private fun restartAfterRunningDry() { + if (!ranDry || !playing || queuedCount == 0) return + ranDry = false + underruns++ + AL10.alSourcePlay(source) + } + + override fun close() { + if (closed) return + closed = true + thread.join(CLOSE_WAIT_MS) + decoderLock.withLock { + lock.withLock { + if (contextIsCurrent()) { + AL10.alSourceStop(source) + AL10.alDeleteSources(source) + AL10.alDeleteBuffers(buffers) + } + STBVorbis.stb_vorbis_close(decoder) + MemoryUtil.memFree(pcm) + MemoryUtil.memFree(ogg) + } + } + if (current === this) current = null + } + + companion object { + private val LOGGER = LoggerFactory.getLogger(Hexium.MOD_ID) + + /** A queue of about 0.75 seconds at 44.1 kHz: long enough to survive a stall, quick to refill. */ + private const val BUFFER_FRAMES = 8192 + private const val BUFFER_COUNT = 4 + private const val PUMP_INTERVAL_NS = 10_000_000L + private const val CLOSE_WAIT_MS = 1000L + + /** The open stream. There's only ever one. */ + @Volatile + private var current: SongStream? = null + + /** Minecraft is about to destroy its OpenAL context. */ + @JvmStatic + fun onContextLost() { + current?.contextLost() + } + + /** Opens [path], which may be inside the mod's jar. Throws [IOException] with a message for the player's log. */ + fun open(path: Path): SongStream { + if (ALC10.alcGetCurrentContext() == 0L) throw IOException("there's no audio device") + val bytes = Files.readAllBytes(path) + val ogg = MemoryUtil.memAlloc(bytes.size) + ogg.put(bytes).flip() + val error = IntArray(1) + val decoder = STBVorbis.stb_vorbis_open_memory(ogg, error, null) + if (decoder == 0L) { + MemoryUtil.memFree(ogg) + throw IOException("$path isn't an OGG Vorbis file (stb_vorbis error ${error[0]})") + } + try { + STBVorbisInfo.malloc().use { info -> + STBVorbis.stb_vorbis_get_info(decoder, info) + val rate = info.sample_rate() + val channels = if (info.channels() == 1) 1 else 2 + val lengthMs = STBVorbis.stb_vorbis_stream_length_in_samples(decoder) * 1000.0 / rate + val stream = SongStream(ogg, decoder, rate, channels, lengthMs) + current = stream + return stream + } + } catch (e: IOException) { + STBVorbis.stb_vorbis_close(decoder) + MemoryUtil.memFree(ogg) + throw e + } catch (e: RuntimeException) { + STBVorbis.stb_vorbis_close(decoder) + MemoryUtil.memFree(ogg) + throw IOException("$path can't be played: ${e.message}", e) + } + } + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/clock/AudioClock.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/clock/AudioClock.kt new file mode 100644 index 0000000..c49d900 --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/clock/AudioClock.kt @@ -0,0 +1,41 @@ +package net.trilleo.hexium.client.clock + +import net.trilleo.hexium.client.audio.SongStream +import net.trilleo.hexium.core.clock.SongClock +import org.lwjgl.sdl.SDLTimer + +/** + * The only source of gameplay time: a [SongClock] fed by the playing song. Wall time is SDL's tick + * counter, the clock SDL stamps input events with. + */ +class AudioClock(private val stream: SongStream) { + val clock = SongClock() + + /** Song time for this frame, in milliseconds. */ + var songTimeMs = 0.0 + private set + + fun play() { + stream.play() + clock.start(songTimeMs, SDLTimer.SDL_GetTicksNS()) + } + + fun pause() { + stream.pause() + clock.pause(SDLTimer.SDL_GetTicksNS()) + } + + fun seek(ms: Double) { + stream.seek(ms) + songTimeMs = ms + clock.seek(ms, SDLTimer.SDL_GetTicksNS()) + } + + /** Call once per frame, before anything reads the time. Doesn't allocate. */ + fun update() { + val now = SDLTimer.SDL_GetTicksNS() + stream.recoverIfLost(clock.nowMs(now)) + clock.observe(stream.positionMs(), now) + songTimeMs = clock.nowMs(now) + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/debug/DebugOverlay.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/debug/DebugOverlay.kt new file mode 100644 index 0000000..664c014 --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/debug/DebugOverlay.kt @@ -0,0 +1,64 @@ +package net.trilleo.hexium.client.debug + +import java.util.Locale +import net.minecraft.client.gui.Font +import net.minecraft.client.gui.GuiGraphicsExtractor +import net.trilleo.hexium.client.audio.SongStream +import net.trilleo.hexium.client.clock.AudioClock +import org.lwjgl.sdl.SDLTimer + +/** + * Timing numbers for development, in English only. The text is rebuilt a few times a second, so + * measuring doesn't allocate every frame. + */ +class DebugOverlay(private val clock: AudioClock, private val stream: SongStream) { + private val lines = Array(LINE_COUNT) { "" } + private var lastFrameNs = 0L + private var lastRefreshNs = 0L + private var framesSinceRefresh = 0 + private var worstFrameNs = 0L + + fun update() { + val now = SDLTimer.SDL_GetTicksNS() + if (lastFrameNs != 0L) { + val frame = now - lastFrameNs + if (frame > worstFrameNs) worstFrameNs = frame + framesSinceRefresh++ + } + lastFrameNs = now + if (now - lastRefreshNs >= REFRESH_NS) { + refresh(now) + } + } + + private fun refresh(now: Long) { + val songClock = clock.clock + val averageMs = if (framesSinceRefresh == 0) 0.0 else (now - lastRefreshNs) / 1e6 / framesSinceRefresh + lines[0] = String.format(Locale.ROOT, "song %.1f s / %.1f s", clock.songTimeMs / 1000.0, stream.lengthMs / 1000.0) + lines[1] = String.format(Locale.ROOT, "drift %+.1f ms, max %.1f ms", songClock.driftMs, songClock.maxDriftMs) + lines[2] = String.format(Locale.ROOT, "frame %.1f ms, worst %.1f ms", averageMs, worstFrameNs / 1e6) + lines[3] = String.format( + Locale.ROOT, + "resyncs %d, underruns %d, latency %s", + songClock.resyncCount, + stream.underruns, + if (stream.usesLatency) "known" else "unknown", + ) + lastRefreshNs = now + framesSinceRefresh = 0 + worstFrameNs = 0L + } + + fun draw(graphics: GuiGraphicsExtractor, font: Font, x: Int, y: Int) { + for (i in lines.indices) { + graphics.text(font, lines[i], x, y + i * LINE_HEIGHT, TEXT_COLOR) + } + } + + private companion object { + const val LINE_COUNT = 4 + const val LINE_HEIGHT = 10 + const val REFRESH_NS = 250_000_000L + const val TEXT_COLOR = -1 + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/AudioTestScreen.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/AudioTestScreen.kt new file mode 100644 index 0000000..b0f3e31 --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/AudioTestScreen.kt @@ -0,0 +1,155 @@ +package net.trilleo.hexium.client.screen + +import java.io.IOException +import net.minecraft.client.gui.GuiGraphicsExtractor +import net.minecraft.client.gui.components.Button +import net.minecraft.client.gui.screens.Screen +import net.minecraft.network.chat.CommonComponents +import net.minecraft.network.chat.Component +import net.minecraft.sounds.SoundSource +import net.trilleo.hexium.Hexium +import net.trilleo.hexium.client.audio.SongStream +import net.trilleo.hexium.client.chart.ChartPack +import net.trilleo.hexium.client.clock.AudioClock +import net.trilleo.hexium.client.debug.DebugOverlay +import net.trilleo.hexium.client.session.HexiumSession +import net.trilleo.hexium.core.chart.ChartFolder +import net.trilleo.hexium.core.chart.TimingMap +import org.slf4j.LoggerFactory + +/** + * Plays a pack's song with a flash on every beat and the clock's numbers on screen, for checking + * that the music and the clock stay together over a whole song. Holds a session from the menu that + * opened it until it closes. + */ +class AudioTestScreen(private val lastScreen: Screen, private val pack: ChartPack) : Screen(TITLE) { + private val timing = pack.charts.first().let { TimingMap(it.offsetMs, it.bpm) } + private var stream: SongStream? = null + private var clock: AudioClock? = null + private var overlay: DebugOverlay? = null + private var error: Component? = null + private var paused = false + private var opened = false + + override fun init() { + if (!opened) { + opened = true + open() + } + val y = height - BUTTONS_FROM_BOTTOM + val centre = width / 2 + val pause = addRenderableWidget( + Button.builder(pauseLabel()) { button -> + togglePause() + button.message = pauseLabel() + }.bounds(centre - BUTTON_WIDTH - BUTTON_WIDTH / 2 - GAP, y, BUTTON_WIDTH, BUTTON_HEIGHT).build(), + ) + val back = addRenderableWidget( + Button.builder(Component.translatable("hexium.audio_test.rewind")) { + clock?.let { it.seek((it.songTimeMs - REWIND_MS).coerceAtLeast(0.0)) } + }.bounds(centre - BUTTON_WIDTH / 2, y, BUTTON_WIDTH, BUTTON_HEIGHT).build(), + ) + pause.active = stream != null + back.active = stream != null + addRenderableWidget( + Button.builder(CommonComponents.GUI_BACK) { onClose() } + .bounds(centre + BUTTON_WIDTH / 2 + GAP, y, BUTTON_WIDTH, BUTTON_HEIGHT).build(), + ) + } + + private fun open() { + minecraft.musicManager.stopPlaying() + try { + val song = SongStream.open(pack.folder.resolve(ChartFolder.AUDIO_FILE)) + stream = song + val audioClock = AudioClock(song) + audioClock.play() + clock = audioClock + overlay = DebugOverlay(audioClock, song) + } catch (e: IOException) { + failed(e) + } catch (e: RuntimeException) { + failed(e) + } + } + + private fun failed(cause: Exception) { + LOGGER.warn("Can't play the song in {}", pack.folder, cause) + error = Component.translatable("hexium.audio_test.failed", cause.message.orEmpty()) + stream?.close() + stream = null + } + + private fun pauseLabel(): Component = + Component.translatable(if (paused) "hexium.audio_test.resume" else "hexium.audio_test.pause") + + private fun togglePause() { + val audioClock = clock ?: return + paused = !paused + if (paused) audioClock.pause() else audioClock.play() + } + + override fun extractRenderState(graphics: GuiGraphicsExtractor, mouseX: Int, mouseY: Int, a: Float) { + super.extractRenderState(graphics, mouseX, mouseY, a) + graphics.centeredText(font, title, width / 2, TITLE_Y, TEXT_COLOR) + val problem = error + if (problem != null) { + graphics.centeredText(font, problem, width / 2, height / 2, TEXT_COLOR) + return + } + val audioClock = clock ?: return + val song = stream ?: return + song.setGain(minecraft.options.getFinalSoundSourceVolume(SoundSource.MUSIC)) + audioClock.update() + overlay?.update() + overlay?.draw(graphics, font, TEXT_X, OVERLAY_Y) + + val beat = timing.msToBeat(audioClock.songTimeMs) + val sinceBeat = beat - Math.floor(beat) + if (sinceBeat < FLASH_BEATS) { + val accent = Math.floorMod(Math.floor(beat).toLong(), BEATS_PER_BAR) == 0L + val half = FLASH_SIZE / 2 + graphics.fill( + width / 2 - half, + height / 2 - half, + width / 2 + half, + height / 2 + half, + if (accent) ACCENT_COLOR else BEAT_COLOR, + ) + } + } + + override fun onClose() { + minecraft.gui.setScreen(lastScreen) + } + + override fun removed() { + try { + stream?.close() + } finally { + stream = null + clock = null + overlay = null + HexiumSession.end() + } + } + + private companion object { + val LOGGER = LoggerFactory.getLogger(Hexium.MOD_ID) + val TITLE: Component = Component.translatable("hexium.audio_test.title") + const val TITLE_Y = 15 + const val TEXT_X = 10 + const val OVERLAY_Y = 30 + const val TEXT_COLOR = -1 + const val BUTTONS_FROM_BOTTOM = 30 + const val BUTTON_WIDTH = 90 + const val BUTTON_HEIGHT = 20 + const val GAP = 4 + const val REWIND_MS = 3000.0 + const val FLASH_BEATS = 0.2 + const val FLASH_SIZE = 40 + const val BEATS_PER_BAR = 4L + const val BEAT_COLOR = -1 + const val ACCENT_COLOR = -43691 + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt index 9820932..51b6422 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt @@ -11,6 +11,7 @@ import net.minecraft.network.chat.CommonComponents import net.minecraft.network.chat.Component import net.trilleo.hexium.client.chart.ChartLibrary import net.trilleo.hexium.client.chart.ChartPack +import net.trilleo.hexium.client.session.HexiumSession import net.trilleo.hexium.core.chart.DifficultyChart /** Hexium's menu, opened from the title screen. A plain list of charts until song select exists. */ @@ -36,7 +37,11 @@ class HexiumMenuScreen(private val lastScreen: Screen) : Screen(TITLE) { val footer = layout.addToFooter(LinearLayout.horizontal().spacing(ROW_SPACING)) val previous = footer.addChild(pageButton("<", -1)) - footer.addChild(Button.builder(CommonComponents.GUI_BACK) { onClose() }.width(BACK_WIDTH).build()) + val audioTest = footer.addChild( + Button.builder(Component.translatable("hexium.audio_test.title")) { openAudioTest() }.width(FOOTER_BUTTON_WIDTH).build(), + ) + audioTest.active = audioTestPack() != null + footer.addChild(Button.builder(CommonComponents.GUI_BACK) { onClose() }.width(FOOTER_BUTTON_WIDTH).build()) val next = footer.addChild(pageButton(">", 1)) previous.active = page > 0 next.active = page < pages - 1 @@ -45,6 +50,15 @@ class HexiumMenuScreen(private val lastScreen: Screen) : Screen(TITLE) { layout.visitWidgets { addRenderableWidget(it) } } + private fun audioTestPack(): ChartPack? = packs.firstOrNull { it.errors.isEmpty() && it.charts.isNotEmpty() } + + private fun openAudioTest() { + val pack = audioTestPack() ?: return + val screen = AudioTestScreen(this, pack) + HexiumSession.start() + minecraft.gui.setScreen(screen) + } + private fun pageButton(label: String, step: Int): Button = Button.builder(Component.literal(label)) { page += step @@ -98,7 +112,7 @@ class HexiumMenuScreen(private val lastScreen: Screen) : Screen(TITLE) { const val STATUS_COLOR = -1 const val TITLE_WIDTH = 140 const val DIFFICULTY_WIDTH = 64 - const val BACK_WIDTH = 150 + const val FOOTER_BUTTON_WIDTH = 100 const val PAGE_BUTTON_WIDTH = 20 } } diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt index 04e85a4..7114217 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt @@ -3,9 +3,19 @@ package net.trilleo.hexium.client.session /** * The one switch between Hexium and vanilla. Every mixin and event hook returns early unless * [active], so normal worlds and servers are untouched. The title screen button is the one - * exception, since it opens the menu. Only that menu may start a session, and nothing does yet. + * exception, since it opens the menu. Only that menu may start a session. */ object HexiumSession { + private var active = false + @JvmStatic - fun active(): Boolean = false + fun active(): Boolean = active + + fun start() { + active = true + } + + fun end() { + active = false + } } diff --git a/mod/src/client/resources/assets/hexium/lang/en_us.json b/mod/src/client/resources/assets/hexium/lang/en_us.json index 310c5f3..799f4ea 100644 --- a/mod/src/client/resources/assets/hexium/lang/en_us.json +++ b/mod/src/client/resources/assets/hexium/lang/en_us.json @@ -8,5 +8,10 @@ "hexium.difficulty.basic": "Basic", "hexium.difficulty.advanced": "Advanced", "hexium.difficulty.expert": "Expert", - "hexium.difficulty.master": "Master" + "hexium.difficulty.master": "Master", + "hexium.audio_test.title": "Audio Test", + "hexium.audio_test.pause": "Pause", + "hexium.audio_test.resume": "Resume", + "hexium.audio_test.rewind": "Back 3 s", + "hexium.audio_test.failed": "Can't play the song: %s" } diff --git a/mod/src/client/resources/assets/hexium/lang/zh_cn.json b/mod/src/client/resources/assets/hexium/lang/zh_cn.json index 5a92717..e3de59f 100644 --- a/mod/src/client/resources/assets/hexium/lang/zh_cn.json +++ b/mod/src/client/resources/assets/hexium/lang/zh_cn.json @@ -8,5 +8,10 @@ "hexium.difficulty.basic": "Basic", "hexium.difficulty.advanced": "Advanced", "hexium.difficulty.expert": "Expert", - "hexium.difficulty.master": "Master" + "hexium.difficulty.master": "Master", + "hexium.audio_test.title": "音频测试", + "hexium.audio_test.pause": "暂停", + "hexium.audio_test.resume": "继续", + "hexium.audio_test.rewind": "后退 3 秒", + "hexium.audio_test.failed": "无法播放歌曲:%s" } diff --git a/mod/src/client/resources/hexium.client.mixins.json b/mod/src/client/resources/hexium.client.mixins.json index 756b4ea..8144f3f 100644 --- a/mod/src/client/resources/hexium.client.mixins.json +++ b/mod/src/client/resources/hexium.client.mixins.json @@ -2,7 +2,10 @@ "required": true, "package": "net.trilleo.hexium.client.mixin", "compatibilityLevel": "JAVA_25", - "client": [], + "client": [ + "MusicManagerMixin", + "SoundLibraryMixin" + ], "injectors": { "defaultRequire": 1 }, From c8565e748e4bfad63622d38a32b45f5fc13ef240 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Wed, 4 Nov 2026 12:51:34 +0800 Subject: [PATCH 14/34] Feature: Add the stage world with a locked player, its own pause screen and client game tests --- CHANGELOG.md | 6 + CLAUDE.md | 1 + docs/ARCHITECTURE.md | 6 +- docs/DESIGN.md | 2 +- docs/DEVELOPMENT.md | 3 +- mod/build.gradle.kts | 16 ++ .../client/mixin/KeyboardInputMixin.java | 22 +++ .../hexium/client/mixin/MinecraftMixin.java | 26 +++ .../client/mixin/MouseHandlerMixin.java | 18 ++ .../hexium/client/mixin/TutorialMixin.java | 18 ++ .../net/trilleo/hexium/client/HexiumClient.kt | 4 + .../hexium/client/screen/HexiumMenuScreen.kt | 23 +-- .../hexium/client/screen/StageMenuScreen.kt | 36 ++++ .../hexium/client/screen/TitleScreenButton.kt | 3 + .../hexium/client/session/HexiumSession.kt | 17 ++ .../hexium/client/session/StageGeometry.kt | 16 ++ .../trilleo/hexium/client/session/StageHud.kt | 16 ++ .../hexium/client/session/StageWorld.kt | 170 ++++++++++++++++++ .../resources/assets/hexium/lang/en_us.json | 4 +- .../resources/assets/hexium/lang/zh_cn.json | 4 +- .../resources/hexium.client.mixins.json | 6 +- .../hexium/gametest/HexiumClientGameTest.kt | 155 ++++++++++++++++ mod/src/gametest/resources/fabric.mod.json | 11 ++ 23 files changed, 558 insertions(+), 25 deletions(-) create mode 100644 mod/src/client/java/net/trilleo/hexium/client/mixin/KeyboardInputMixin.java create mode 100644 mod/src/client/java/net/trilleo/hexium/client/mixin/MinecraftMixin.java create mode 100644 mod/src/client/java/net/trilleo/hexium/client/mixin/MouseHandlerMixin.java create mode 100644 mod/src/client/java/net/trilleo/hexium/client/mixin/TutorialMixin.java create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/screen/StageMenuScreen.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/session/StageHud.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/session/StageWorld.kt create mode 100644 mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt create mode 100644 mod/src/gametest/resources/fabric.mod.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 474cf84..831b1f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ + The menu lists every chart it finds, including a built-in Test Pattern and any folders in `.minecraft/hexium/charts`. + Broken charts are marked and show their first problem, and the full list goes to the log. + Charts with sky notes are shown but can't be selected yet. ++ Choosing a difficulty now takes you to the stage, and Esc offers a way back to the menu. + + Notes aren't there yet: the stage is empty for now. #### Charts @@ -26,6 +28,9 @@ #### Gameplay ++ Added the stage: a plain floor you stand on, kept apart from your normal worlds. + + You can look around, but moving, jumping and action keys are off while you're on it. + + The hunger bar is hidden. + Added judging for ground taps and holds, with CHUNITHM's windows. + Hold ticks are judged on how long ago the key was last down. + Added scoring up to 1,010,000, combo and clear lamps (Full Combo, All Justice, All Justice Critical). @@ -67,6 +72,7 @@ + Added song playback through Hexium's own OpenAL source and an audio clock that follows it. + When the audio device changes or sounds reload, the song returns at the right place once the game has reloaded. ++ Added client game tests that load the stage in the real game and check that normal worlds are untouched. + Added an Audio Test screen with a debug overlay, for checking that the clock stays with the music over a whole song. + Added `rejudge` and `dump` to the command-line tools. + Added golden replays and property tests that guard the judge. diff --git a/CLAUDE.md b/CLAUDE.md index 42ddb63..619f606 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -80,4 +80,5 @@ docs/DESIGN.md. - Build + all tests: ./gradlew build - Core tests only: ./gradlew :core:test - Run client: ./gradlew :mod:runClient +- Client game tests (opens a game window; tests are in mod/src/gametest): ./gradlew :mod:runClientGameTest - Lint charts (from Milestone 1): ./gradlew :tools:run --args="lint docs/examples" diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index ae868ad..50ce398 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -35,8 +35,10 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl - The title screen gets one extra button that opens the mod's menu. That menu is the only place a `HexiumSession` is ever created. - Every mixin and event hook starts with `if (!HexiumSession.active()) return;`, except the title screen button, which only adds that button. Joining a normal world or server means no session, so vanilla behaviour stays as it was. -- The stage is a template world bundled in the mod. It's copied into the mod's own folder (for example `.minecraft/hexium/stages/`), not `saves/`, so it never shows up in the vanilla world list. It's loaded on the integrated server with frozen game rules: no daylight cycle, no mobs, no random ticks, no weather. -- The player entity is placed on the stand spot and locked. Gameplay never depends on the server; the world is just scenery. +- The stage is a flat black floor made in code (`StageWorld`) and created fresh for each session in the mod's own folder, `.minecraft/hexium/stages/`, not `saves/`, so it never shows up in the vanilla world list. Making it in code means a Minecraft update can't ask to upgrade it. Chart-authored stages may bring template worlds in Milestone 8. It runs on the integrated server, with its rules frozen once the player joins: no daylight cycle, mobs, random ticks or weather. +- The player is in adventure mode on Peaceful, placed on the stand spot. Gameplay never depends on the server; the world is just scenery. +- While a session is active, mixins hold the player still (`KeyboardInput`), stop every key that method handles (`Minecraft.handleKeybinds`: attack, items, hotbar, inventory, chat, F1, F5 and so on) and hotbar scrolling, keep vanilla's tutorial from starting, since it would end itself for good outside survival, and replace vanilla's pause menu. The camera turns freely until Milestone 3 adds its limits. The HUD stays vanilla apart from the hunger bar, which is hidden. A player arriving in third person or with the HUD hidden gets the normal view, and their own comes back afterwards. +- A session ends when the connection closes, and also whenever the title screen or the Hexium menu opens, so a failed load can't leave one running. ## Audio and clock diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 347cf3f..8b08130 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -33,7 +33,7 @@ Everything is judged on one plane: the transparent screen in front of the player ### Stage geometry (starting values, all tunable) -- The player is locked on the stand spot (the red circle). Movement, jumping, sneaking, hotbar and inventory keys are suppressed during play. +- The player is locked on the stand spot (the red circle), in adventure mode. Movement, jumping, sneaking, hotbar and inventory keys are suppressed during play. The hunger bar is hidden. - Screen plane: 8 blocks in front of the player's eyes, about 12 blocks wide and 6 tall, with its bottom edge on the floor. - Ground lanes: 4 lanes lie on the floor and run away from the player past the screen into the distance. Notes spawn far down the lanes and slide toward the bottom edge of the screen. - Sky notes: they fly straight toward the screen along the depth axis, visible through it, and are judged when they reach their (x, y) spot on the screen. diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index b10be70..b671be7 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -29,6 +29,7 @@ The Gradle wrapper downloads the right Gradle version, and Loom downloads Minecr | --- | --- | | `./gradlew build` | Builds every module and runs all tests | | `./gradlew :mod:runClient` | Starts Minecraft with Hexium in a dev environment | +| `./gradlew :mod:runClientGameTest` | Runs the client game tests in `mod/src/gametest`. Opens a game window, and writes screenshots to `mod/build/run/clientGameTest/screenshots` | | `./gradlew :core:test` | Runs only the judge and chart tests (fast) | | `./gradlew :tools:run --args="lint docs/examples"` | Lints chart files or folders. A folder with a `meta.json` is also checked as a package, including that it has its `audio.ogg` | | `./gradlew :tools:run --args="rejudge docs/examples/basic.json play.hexreplay"` | Runs a replay through the judge and prints the result | @@ -75,7 +76,7 @@ Parallel lanes that work well: after Milestone 1, `server` can build auth and ch - **`core` unit tests:** one file of synthetic input per rule in `docs/JUDGEMENT.md`. For example: "tap 20 ms late → Justice Critical", "hold released 120 ms before a tick → Attack on that tick", "slide with crosshair outside radius → Miss on those ticks", "flick too slow → no hit". - **Golden replays:** replays with their known scores live in `core/src/test/resources/golden`. Any change to the judge must keep them identical, or update them on purpose in the same PR (and raise `JudgementConfig.JUDGE_VERSION`). So far they come from scripted players, with scores worked out by hand in `GoldenReplayTest`. Real recorded plays join them from Milestone 2. Editing an example chart changes its hash, so its golden replays must be regenerated too. - **Property tests (jqwik):** shifting every input by the judgement offset B leaves the score unchanged when B is set to match. A steady straight swipe gets the same judgement at every frame rate (other results can differ by what one frame's sampling can, see [JUDGEMENT.md](JUDGEMENT.md)). Random input never breaks the judge, and its replay always gives the same results. -- **Fabric client game tests:** the title button opens the menu; the menu loads the stage; joining a normal singleplayer world creates no session; a short chart plays to the results screen with autoplay. +- **Fabric client game tests:** the title button opens the menu; the menu loads the stage; the stage holds the player still and blocks action keys while the camera still turns; leaving ends the session; joining a normal singleplayer world creates no session and the player can move. Still to come: a short chart plays to the results screen with autoplay. A button that disconnects must do it through the task queue (`StageWorld.leave` shows how): the test framework defers a disconnect made while handling a click, so the test would see a different order of events from the real game. - **Human playtest checklist per milestone:** offset calibration feels right; no drift after a 3-minute song; ground track readable while aiming at the corners; hold, slide and flick feel fair. ### Checking the clock diff --git a/mod/build.gradle.kts b/mod/build.gradle.kts index 0ae339e..e00b117 100644 --- a/mod/build.gradle.kts +++ b/mod/build.gradle.kts @@ -21,6 +21,17 @@ loom { } } +fabricApi { + // Client game tests: ./gradlew :mod:runClientGameTest + configureTests { + createSourceSet = true + modId = "hexium_gametest" + enableGameTests = false + enableClientGameTests = true + eula = true + } +} + dependencies { // To change the versions see the gradle.properties file minecraft("com.mojang:minecraft:${providers.gradleProperty("minecraft_version").get()}") @@ -33,6 +44,11 @@ dependencies { include(project(":core")) } +// The tests need a game window to run, but a build must at least keep them compiling. +tasks.check { + dependsOn("gametestClasses") +} + tasks.processResources { val version = project.version inputs.property("version", version) diff --git a/mod/src/client/java/net/trilleo/hexium/client/mixin/KeyboardInputMixin.java b/mod/src/client/java/net/trilleo/hexium/client/mixin/KeyboardInputMixin.java new file mode 100644 index 0000000..6c30bed --- /dev/null +++ b/mod/src/client/java/net/trilleo/hexium/client/mixin/KeyboardInputMixin.java @@ -0,0 +1,22 @@ +package net.trilleo.hexium.client.mixin; + +import net.minecraft.client.player.ClientInput; +import net.minecraft.client.player.KeyboardInput; +import net.minecraft.world.entity.player.Input; +import net.minecraft.world.phys.Vec2; +import net.trilleo.hexium.client.session.HexiumSession; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +/** No moving, jumping or sneaking on the stage, whatever keys are down. */ +@Mixin(KeyboardInput.class) +abstract class KeyboardInputMixin extends ClientInput { + @Inject(method = "tick", at = @At("RETURN")) + private void hexium$holdStill(CallbackInfo ci) { + if (!HexiumSession.active()) return; + this.keyPresses = Input.EMPTY; + this.moveVector = Vec2.ZERO; + } +} diff --git a/mod/src/client/java/net/trilleo/hexium/client/mixin/MinecraftMixin.java b/mod/src/client/java/net/trilleo/hexium/client/mixin/MinecraftMixin.java new file mode 100644 index 0000000..395b9c4 --- /dev/null +++ b/mod/src/client/java/net/trilleo/hexium/client/mixin/MinecraftMixin.java @@ -0,0 +1,26 @@ +package net.trilleo.hexium.client.mixin; + +import net.minecraft.client.Minecraft; +import net.trilleo.hexium.client.session.HexiumSession; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(Minecraft.class) +abstract class MinecraftMixin { + /** No action keys on the stage: attacking, items, hotbar, inventory, chat, F1, F5 and the rest of this method. */ + @Inject(method = "handleKeybinds", at = @At("HEAD"), cancellable = true) + private void hexium$noActions(CallbackInfo ci) { + if (!HexiumSession.active()) return; + ci.cancel(); + } + + /** Vanilla's pause menu could leave the stage without going through Hexium. */ + @Inject(method = "pauseGame", at = @At("HEAD"), cancellable = true) + private void hexium$ownPauseMenu(boolean suppressPauseMenu, CallbackInfo ci) { + if (!HexiumSession.active()) return; + HexiumSession.requestPause(); + ci.cancel(); + } +} diff --git a/mod/src/client/java/net/trilleo/hexium/client/mixin/MouseHandlerMixin.java b/mod/src/client/java/net/trilleo/hexium/client/mixin/MouseHandlerMixin.java new file mode 100644 index 0000000..8831068 --- /dev/null +++ b/mod/src/client/java/net/trilleo/hexium/client/mixin/MouseHandlerMixin.java @@ -0,0 +1,18 @@ +package net.trilleo.hexium.client.mixin; + +import net.minecraft.client.MouseHandler; +import net.trilleo.hexium.client.session.HexiumSession; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +/** The wheel changes the hotbar slot directly. Screens still get it. */ +@Mixin(MouseHandler.class) +abstract class MouseHandlerMixin { + @Inject(method = "onScroll", at = @At("HEAD"), cancellable = true) + private void hexium$noHotbarScroll(long handle, double xoffset, double yoffset, CallbackInfo ci) { + if (!HexiumSession.active()) return; + if (HexiumSession.noScreenOpen()) ci.cancel(); + } +} diff --git a/mod/src/client/java/net/trilleo/hexium/client/mixin/TutorialMixin.java b/mod/src/client/java/net/trilleo/hexium/client/mixin/TutorialMixin.java new file mode 100644 index 0000000..16e87e4 --- /dev/null +++ b/mod/src/client/java/net/trilleo/hexium/client/mixin/TutorialMixin.java @@ -0,0 +1,18 @@ +package net.trilleo.hexium.client.mixin; + +import net.minecraft.client.tutorial.Tutorial; +import net.trilleo.hexium.client.session.HexiumSession; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +/** Outside survival, vanilla's tutorial ends itself for good, and its "move" hint could never be done here. */ +@Mixin(Tutorial.class) +abstract class TutorialMixin { + @Inject(method = "start", at = @At("HEAD"), cancellable = true) + private void hexium$noTutorial(CallbackInfo ci) { + if (!HexiumSession.active()) return; + ci.cancel(); + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt index c3cc453..048b2c9 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt @@ -3,6 +3,8 @@ package net.trilleo.hexium.client import net.fabricmc.api.ClientModInitializer import net.trilleo.hexium.Hexium import net.trilleo.hexium.client.screen.TitleScreenButton +import net.trilleo.hexium.client.session.StageHud +import net.trilleo.hexium.client.session.StageWorld import org.slf4j.LoggerFactory object HexiumClient : ClientModInitializer { @@ -10,6 +12,8 @@ object HexiumClient : ClientModInitializer { override fun onInitializeClient() { TitleScreenButton.register() + StageWorld.registerEvents() + StageHud.register() LOGGER.info("Hexium loaded") } } diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt index 51b6422..bf1d847 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt @@ -1,6 +1,5 @@ package net.trilleo.hexium.client.screen -import net.minecraft.client.gui.GuiGraphicsExtractor import net.minecraft.client.gui.components.Button import net.minecraft.client.gui.components.StringWidget import net.minecraft.client.gui.components.Tooltip @@ -12,19 +11,21 @@ import net.minecraft.network.chat.Component import net.trilleo.hexium.client.chart.ChartLibrary import net.trilleo.hexium.client.chart.ChartPack import net.trilleo.hexium.client.session.HexiumSession +import net.trilleo.hexium.client.session.StageWorld import net.trilleo.hexium.core.chart.DifficultyChart /** Hexium's menu, opened from the title screen. A plain list of charts until song select exists. */ class HexiumMenuScreen(private val lastScreen: Screen) : Screen(TITLE) { private val packs: List = ChartLibrary.scan() private var page = 0 - private var status: Component = CommonComponents.EMPTY override fun init() { + // Back here means any session is over, including a stage that failed to load. + HexiumSession.end() val layout = HeaderAndFooterLayout(this) layout.addTitleHeader(TITLE, font) - val perPage = ((layout.contentHeight - CONTENT_TOP_MARGIN - STATUS_HEIGHT + ROW_SPACING) / ROW_HEIGHT).coerceAtLeast(1) + val perPage = ((layout.contentHeight - CONTENT_TOP_MARGIN + ROW_SPACING) / ROW_HEIGHT).coerceAtLeast(1) val pages = ((packs.size + perPage - 1) / perPage).coerceAtLeast(1) page = page.coerceIn(0, pages - 1) @@ -79,24 +80,17 @@ class HexiumMenuScreen(private val lastScreen: Screen) : Screen(TITLE) { row.addChild(broken) return row } - for (chart in pack.charts) row.addChild(difficultyButton(title, chart)) + for (chart in pack.charts) row.addChild(difficultyButton(chart)) return row } - private fun difficultyButton(title: String, chart: DifficultyChart): Button { + private fun difficultyButton(chart: DifficultyChart): Button { val difficulty = Component.translatable("hexium.difficulty.${chart.difficulty.name.lowercase()}") - val button = Button.builder(difficulty) { - status = Component.translatable("hexium.menu.selected", title, difficulty, chart.notes.size) - }.width(DIFFICULTY_WIDTH) + val button = Button.builder(difficulty) { StageWorld.enter(minecraft, this) }.width(DIFFICULTY_WIDTH) if (!chart.isGroundOnly) button.tooltip(Tooltip.create(Component.translatable("hexium.menu.sky_notes"))) return button.build().also { it.active = chart.isGroundOnly } } - override fun extractRenderState(graphics: GuiGraphicsExtractor, mouseX: Int, mouseY: Int, a: Float) { - super.extractRenderState(graphics, mouseX, mouseY, a) - graphics.centeredText(font, status, width / 2, height - STATUS_FROM_BOTTOM, STATUS_COLOR) - } - override fun onClose() { minecraft.gui.setScreen(lastScreen) } @@ -107,9 +101,6 @@ class HexiumMenuScreen(private val lastScreen: Screen) : Screen(TITLE) { const val CONTENT_TOP_MARGIN = 30 const val ROW_HEIGHT = 24 const val ROW_SPACING = 4 - const val STATUS_HEIGHT = 14 - const val STATUS_FROM_BOTTOM = 45 - const val STATUS_COLOR = -1 const val TITLE_WIDTH = 140 const val DIFFICULTY_WIDTH = 64 const val FOOTER_BUTTON_WIDTH = 100 diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/StageMenuScreen.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/StageMenuScreen.kt new file mode 100644 index 0000000..89d16cb --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/StageMenuScreen.kt @@ -0,0 +1,36 @@ +package net.trilleo.hexium.client.screen + +import net.minecraft.client.gui.GuiGraphicsExtractor +import net.minecraft.client.gui.components.Button +import net.minecraft.client.gui.screens.Screen +import net.minecraft.network.chat.Component +import net.trilleo.hexium.client.session.StageWorld + +/** What Esc opens on the stage, in place of vanilla's pause menu. */ +class StageMenuScreen : Screen(Component.translatable("menu.paused")) { + override fun init() { + val x = width / 2 - BUTTON_WIDTH / 2 + val y = height / 2 - BUTTON_HEIGHT + addRenderableWidget( + Button.builder(Component.translatable("menu.returnToGame")) { onClose() } + .bounds(x, y, BUTTON_WIDTH, BUTTON_HEIGHT).build(), + ) + addRenderableWidget( + Button.builder(Component.translatable("hexium.stage.leave")) { StageWorld.leave(minecraft) } + .bounds(x, y + BUTTON_HEIGHT + GAP, BUTTON_WIDTH, BUTTON_HEIGHT).build(), + ) + } + + override fun extractRenderState(graphics: GuiGraphicsExtractor, mouseX: Int, mouseY: Int, a: Float) { + super.extractRenderState(graphics, mouseX, mouseY, a) + graphics.centeredText(font, title, width / 2, height / 2 - BUTTON_HEIGHT - TITLE_ABOVE, TEXT_COLOR) + } + + private companion object { + const val BUTTON_WIDTH = 200 + const val BUTTON_HEIGHT = 20 + const val GAP = 4 + const val TITLE_ABOVE = 20 + const val TEXT_COLOR = -1 + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/TitleScreenButton.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/TitleScreenButton.kt index a77a983..7ab45dd 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/TitleScreenButton.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/TitleScreenButton.kt @@ -5,6 +5,7 @@ import net.fabricmc.fabric.api.client.screen.v1.Screens import net.minecraft.client.gui.components.Button import net.minecraft.client.gui.screens.TitleScreen import net.minecraft.network.chat.Component +import net.trilleo.hexium.client.session.HexiumSession /** * The way into Hexium: a full-width button under Multiplayer. The rows from Multiplayer up move up @@ -21,6 +22,8 @@ object TitleScreenButton { fun register() { ScreenEvents.AFTER_INIT.register { client, screen, _, _ -> if (screen is TitleScreen) { + // No session outlives a return to the title screen, however it got here. + HexiumSession.end() val widgets = Screens.getWidgets(screen) val multiplayer = Component.translatable("menu.multiplayer") // Demo mode has Reset Demo World in that row instead. diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt index 7114217..ce21de7 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt @@ -1,11 +1,15 @@ package net.trilleo.hexium.client.session +import net.minecraft.client.Minecraft +import net.trilleo.hexium.client.screen.StageMenuScreen + /** * The one switch between Hexium and vanilla. Every mixin and event hook returns early unless * [active], so normal worlds and servers are untouched. The title screen button is the one * exception, since it opens the menu. Only that menu may start a session. */ object HexiumSession { + @Volatile private var active = false @JvmStatic @@ -15,7 +19,20 @@ object HexiumSession { active = true } + /** Render thread only. */ fun end() { + if (!active) return active = false + StageWorld.restoreView() + } + + /** True if input is going to the game rather than a screen. */ + @JvmStatic + fun noScreenOpen(): Boolean = Minecraft.getInstance().gui.screen() == null + + /** Esc, or the window losing focus. A screen that's open handles Esc itself. */ + @JvmStatic + fun requestPause() { + if (noScreenOpen()) Minecraft.getInstance().gui.setScreen(StageMenuScreen()) } } diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt new file mode 100644 index 0000000..199d759 --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt @@ -0,0 +1,16 @@ +package net.trilleo.hexium.client.session + +/** Where things stand on the stage. Starting values from docs/DESIGN.md, all tunable. */ +object StageGeometry { + const val FLOOR_THICKNESS = 1 + + /** The middle of a block, so the lanes can sit evenly either side of the player. */ + const val STAND_X = 0.5 + const val STAND_Z = 0.5 + + /** Facing +Z, down the lanes. */ + const val REST_YAW = 0f + + /** Looking at the middle of the screen, 3 blocks up and 8 away, from eyes 1.62 up. */ + const val REST_PITCH = -9.8f +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageHud.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageHud.kt new file mode 100644 index 0000000..4e3d72e --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageHud.kt @@ -0,0 +1,16 @@ +package net.trilleo.hexium.client.session + +import net.fabricmc.fabric.api.client.rendering.v1.hud.HudElement +import net.fabricmc.fabric.api.client.rendering.v1.hud.HudElementRegistry +import net.fabricmc.fabric.api.client.rendering.v1.hud.VanillaHudElements + +/** Hides what doesn't apply on the stage. Everything else in the HUD stays vanilla. */ +object StageHud { + fun register() { + HudElementRegistry.replaceElement(VanillaHudElements.FOOD_BAR) { vanilla -> + HudElement { graphics, deltaTracker -> + if (!HexiumSession.active()) vanilla.extractRenderState(graphics, deltaTracker) + } + } + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageWorld.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageWorld.kt new file mode 100644 index 0000000..33d8e41 --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageWorld.kt @@ -0,0 +1,170 @@ +package net.trilleo.hexium.client.session + +import java.io.IOException +import java.io.UncheckedIOException +import java.nio.file.Files +import java.nio.file.LinkOption +import java.nio.file.Path +import java.util.Optional +import net.fabricmc.fabric.api.client.networking.v1.ClientPlayConnectionEvents +import net.fabricmc.loader.api.FabricLoader +import net.minecraft.client.CameraType +import net.minecraft.client.Minecraft +import net.minecraft.client.gui.components.toasts.SystemToast +import net.minecraft.client.gui.screens.Screen +import net.minecraft.client.gui.screens.TitleScreen +import net.minecraft.client.gui.screens.worldselection.WorldOpenFlows +import net.minecraft.client.multiplayer.ClientLevel +import net.minecraft.core.HolderLookup +import net.minecraft.core.HolderSet +import net.minecraft.core.registries.Registries +import net.minecraft.server.MinecraftServer +import net.minecraft.world.Difficulty +import net.minecraft.world.item.DyeColor +import net.minecraft.world.level.GameType +import net.minecraft.world.level.LevelSettings +import net.minecraft.world.level.WorldDataConfiguration +import net.minecraft.world.level.biome.Biomes +import net.minecraft.world.level.block.Blocks +import net.minecraft.world.level.gamerules.GameRules +import net.minecraft.world.level.levelgen.FlatLevelSource +import net.minecraft.world.level.levelgen.WorldDimensions +import net.minecraft.world.level.levelgen.WorldOptions +import net.minecraft.world.level.levelgen.flat.FlatLayerInfo +import net.minecraft.world.level.levelgen.flat.FlatLevelGeneratorSettings +import net.minecraft.world.level.levelgen.presets.WorldPresets +import net.minecraft.world.level.storage.LevelStorageSource +import net.trilleo.hexium.Hexium +import net.trilleo.hexium.client.screen.HexiumMenuScreen +import org.slf4j.LoggerFactory + +/** + * The stage: a flat floor with nothing else, made fresh for each session in Hexium's own folder, so + * it never shows up in the vanilla world list. Gameplay never depends on the server: the world is + * just scenery. Made in code rather than bundled, so a Minecraft update can't ask to upgrade it. + */ +object StageWorld { + private val LOGGER = LoggerFactory.getLogger(Hexium.MOD_ID) + private const val LEVEL_ID = "arena" + private const val NOON_TICKS = 6000L + + /** What the player had set before the stage, since the keys that change these are off on it. */ + private var savedCamera: CameraType? = null + private var savedSmoothCamera = false + private var savedHudHidden = false + + /** + * Only the Hexium menu may call this. If the world can't be made, the player ends up on [parent] or, + * if Minecraft can't open its folder, the title screen. Either of those ends the session. + */ + fun enter(minecraft: Minecraft, parent: Screen) { + val folder = FabricLoader.getInstance().gameDir.resolve("hexium").resolve("stages") + if (!deleteOldStage(folder.resolve(LEVEL_ID))) { + SystemToast.onWorldAccessFailure(minecraft, LEVEL_ID) + return + } + HexiumSession.start() + minecraft.musicManager.stopPlaying() + setView(minecraft) + val settings = LevelSettings( + "Hexium Stage", + GameType.ADVENTURE, + LevelSettings.DifficultySettings(Difficulty.PEACEFUL, false, true), + false, + WorldDataConfiguration.DEFAULT, + ) + WorldOpenFlows(minecraft, LevelStorageSource.createDefault(folder)) + .createFreshLevel(LEVEL_ID, settings, WorldOptions(0L, false, false), ::flatFloor, parent) + } + + private fun setView(minecraft: Minecraft) { + val options = minecraft.options + savedCamera = options.cameraType + savedSmoothCamera = options.smoothCamera + savedHudHidden = minecraft.gui.hud.isHidden + options.cameraType = CameraType.FIRST_PERSON + options.smoothCamera = false + if (savedHudHidden) minecraft.gui.hud.toggle() + } + + /** Puts back what [enter] changed. Does nothing if there's no stage to come back from. */ + fun restoreView() { + val camera = savedCamera ?: return + savedCamera = null + val minecraft = Minecraft.getInstance() + minecraft.options.cameraType = camera + minecraft.options.smoothCamera = savedSmoothCamera + if (minecraft.gui.hud.isHidden != savedHudHidden) minecraft.gui.hud.toggle() + } + + /** + * Leaves the stage for the Hexium menu. Ending the connection ends the session. Runs on the next + * pass of the task queue, since disconnecting waits for the server and draws frames meanwhile. + */ + fun leave(minecraft: Minecraft) { + minecraft.schedule { + minecraft.disconnectFromWorld(ClientLevel.DEFAULT_QUIT_MESSAGE) + minecraft.gui.setScreen(HexiumMenuScreen(TitleScreen())) + } + } + + fun registerEvents() { + ClientPlayConnectionEvents.JOIN.register { _, _, client -> + if (HexiumSession.active()) { + client.singleplayerServer?.let { server -> server.execute { prepare(server) } } + } + } + // This one can fire on the network thread. + ClientPlayConnectionEvents.DISCONNECT.register { _, client -> + if (HexiumSession.active()) client.execute { HexiumSession.end() } + } + } + + private fun flatFloor(registries: HolderLookup.Provider): WorldDimensions { + val floor = FlatLevelGeneratorSettings( + Optional.of(HolderSet.direct()), + registries.lookupOrThrow(Registries.BIOME).getOrThrow(Biomes.THE_VOID), + emptyList(), + ).withBiomeAndLayers( + listOf(FlatLayerInfo(StageGeometry.FLOOR_THICKNESS, Blocks.CONCRETE.pick(DyeColor.BLACK))), + Optional.of(HolderSet.direct()), + registries.lookupOrThrow(Registries.BIOME).getOrThrow(Biomes.THE_VOID), + ) + return WorldPresets.createNormalWorldDimensions(registries).replaceOverworldGenerator(registries, FlatLevelSource(floor)) + } + + /** Freezes the world and puts the player on the stand spot. Runs on the server thread. */ + private fun prepare(server: MinecraftServer) { + val rules = server.gameRules + rules.set(GameRules.ADVANCE_TIME, false, server) + rules.set(GameRules.ADVANCE_WEATHER, false, server) + rules.set(GameRules.RANDOM_TICK_SPEED, 0, server) + rules.set(GameRules.SPAWN_MOBS, false, server) + rules.set(GameRules.SHOW_ADVANCEMENT_MESSAGES, false, server) + val level = server.overworld() + level.dimensionTypeRegistration().value().defaultClock().ifPresent { clock -> + server.clockManager().setTotalTicks(clock, NOON_TICKS) + } + val y = level.minY + StageGeometry.FLOOR_THICKNESS.toDouble() + for (player in server.playerList.players) { + player.teleportTo(level, StageGeometry.STAND_X, y, StageGeometry.STAND_Z, emptySet(), StageGeometry.REST_YAW, StageGeometry.REST_PITCH, true) + } + } + + /** Returns false if it couldn't be cleared: a stage part way between old and new must not load. */ + private fun deleteOldStage(stage: Path): Boolean { + if (!Files.exists(stage, LinkOption.NOFOLLOW_LINKS)) return true + return try { + Files.walk(stage).use { paths -> + for (path in paths.sorted(Comparator.reverseOrder()).toList()) Files.delete(path) + } + true + } catch (e: IOException) { + LOGGER.warn("Can't delete the old stage {}", stage, e) + false + } catch (e: UncheckedIOException) { + LOGGER.warn("Can't delete the old stage {}", stage, e) + false + } + } +} diff --git a/mod/src/client/resources/assets/hexium/lang/en_us.json b/mod/src/client/resources/assets/hexium/lang/en_us.json index 799f4ea..6f507e6 100644 --- a/mod/src/client/resources/assets/hexium/lang/en_us.json +++ b/mod/src/client/resources/assets/hexium/lang/en_us.json @@ -4,7 +4,6 @@ "hexium.menu.no_charts": "No charts found. Put chart folders in .minecraft/hexium/charts.", "hexium.menu.broken": "Broken", "hexium.menu.sky_notes": "This chart has sky notes, which can't be played yet.", - "hexium.menu.selected": "%s, %s: %s notes. Playing comes in a later update.", "hexium.difficulty.basic": "Basic", "hexium.difficulty.advanced": "Advanced", "hexium.difficulty.expert": "Expert", @@ -13,5 +12,6 @@ "hexium.audio_test.pause": "Pause", "hexium.audio_test.resume": "Resume", "hexium.audio_test.rewind": "Back 3 s", - "hexium.audio_test.failed": "Can't play the song: %s" + "hexium.audio_test.failed": "Can't play the song: %s", + "hexium.stage.leave": "Leave Stage" } diff --git a/mod/src/client/resources/assets/hexium/lang/zh_cn.json b/mod/src/client/resources/assets/hexium/lang/zh_cn.json index e3de59f..c760e7a 100644 --- a/mod/src/client/resources/assets/hexium/lang/zh_cn.json +++ b/mod/src/client/resources/assets/hexium/lang/zh_cn.json @@ -4,7 +4,6 @@ "hexium.menu.no_charts": "没有找到谱面。请把谱面文件夹放到 .minecraft/hexium/charts。", "hexium.menu.broken": "已损坏", "hexium.menu.sky_notes": "此谱面包含天空音符,目前还无法游玩。", - "hexium.menu.selected": "%s,%s:%s 个音符。游玩功能将在后续更新中加入。", "hexium.difficulty.basic": "Basic", "hexium.difficulty.advanced": "Advanced", "hexium.difficulty.expert": "Expert", @@ -13,5 +12,6 @@ "hexium.audio_test.pause": "暂停", "hexium.audio_test.resume": "继续", "hexium.audio_test.rewind": "后退 3 秒", - "hexium.audio_test.failed": "无法播放歌曲:%s" + "hexium.audio_test.failed": "无法播放歌曲:%s", + "hexium.stage.leave": "离开舞台" } diff --git a/mod/src/client/resources/hexium.client.mixins.json b/mod/src/client/resources/hexium.client.mixins.json index 8144f3f..a8e9801 100644 --- a/mod/src/client/resources/hexium.client.mixins.json +++ b/mod/src/client/resources/hexium.client.mixins.json @@ -3,8 +3,12 @@ "package": "net.trilleo.hexium.client.mixin", "compatibilityLevel": "JAVA_25", "client": [ + "KeyboardInputMixin", + "MinecraftMixin", + "MouseHandlerMixin", "MusicManagerMixin", - "SoundLibraryMixin" + "SoundLibraryMixin", + "TutorialMixin" ], "injectors": { "defaultRequire": 1 diff --git a/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt b/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt new file mode 100644 index 0000000..9da70bc --- /dev/null +++ b/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt @@ -0,0 +1,155 @@ +package net.trilleo.hexium.gametest + +import net.fabricmc.fabric.api.client.gametest.v1.FabricClientGameTest +import net.fabricmc.fabric.api.client.gametest.v1.context.ClientGameTestContext +import net.minecraft.client.CameraType +import net.minecraft.client.Minecraft +import net.minecraft.client.gui.screens.TitleScreen +import net.minecraft.client.gui.screens.inventory.InventoryScreen +import net.minecraft.client.tutorial.TutorialSteps +import net.minecraft.world.Difficulty +import net.minecraft.world.level.GameType +import net.minecraft.world.level.gamerules.GameRules +import net.trilleo.hexium.client.screen.HexiumMenuScreen +import net.trilleo.hexium.client.screen.StageMenuScreen +import net.trilleo.hexium.client.session.HexiumSession +import net.trilleo.hexium.client.session.StageGeometry + +/** Runs in the real game. See docs/DEVELOPMENT.md. */ +class HexiumClientGameTest : FabricClientGameTest { + override fun runTest(context: ClientGameTestContext) { + context.waitForScreen(TitleScreen::class.java) + context.takeScreenshot("title") + theStageLocksThePlayerAndLeavesCleanly(context) + normalWorldsAreUntouched(context) + } + + private fun theStageLocksThePlayerAndLeavesCleanly(context: ClientGameTestContext) { + // Things a player can bring along, which the game test framework otherwise turns off. + context.runOnClient { minecraft -> + minecraft.options.tutorialStep = TutorialSteps.FIND_TREE + minecraft.options.cameraType = CameraType.THIRD_PERSON_BACK + minecraft.gui.hud.toggle() + } + context.clickScreenButton("hexium.title_button") + context.waitForScreen(HexiumMenuScreen::class.java) + context.takeScreenshot("menu") + context.clickScreenButton("hexium.difficulty.basic") + context.waitFor({ it.player != null && it.level != null && it.gui.screen() == null }, LOAD_TICKS) + // The stand spot arrives from the server after joining. + context.waitFor({ it.player!!.x == 0.5 && it.player!!.z == 0.5 }, LOAD_TICKS) + context.waitTicks(SETTLE_TICKS) + + context.runOnClient { minecraft -> + check(HexiumSession.active()) { "no session on the stage" } + check(minecraft.gameMode!!.playerMode == GameType.ADVENTURE) { "not in adventure mode" } + val server = minecraft.singleplayerServer!! + check(!server.gameRules.get(GameRules.ADVANCE_TIME)) { "time is running" } + check(!server.gameRules.get(GameRules.SPAWN_MOBS)) { "mobs can spawn" } + check(!server.gameRules.get(GameRules.ADVANCE_WEATHER)) { "weather is running" } + check(server.gameRules.get(GameRules.RANDOM_TICK_SPEED) == 0) { "random ticks are on" } + check(minecraft.level!!.difficulty == Difficulty.PEACEFUL) { "not on Peaceful" } + val player = minecraft.player!! + check(player.y == minecraft.level!!.minY + 1.0) { "not standing on the floor: y ${player.y}" } + check(player.yRot == StageGeometry.REST_YAW && player.xRot == StageGeometry.REST_PITCH) { + "not in the rest view: ${player.yRot}, ${player.xRot}" + } + check(minecraft.options.cameraType == CameraType.FIRST_PERSON) { "not in first person" } + check(!minecraft.gui.hud.isHidden) { "the HUD is hidden" } + } + context.takeScreenshot("stage") + + val start = position(context) + val input = context.input + input.holdKey { it.keyUp } + input.holdKey { it.keyLeft } + input.holdKey { it.keyJump } + input.holdKey { it.keyShift } + // Sampled each tick, since a jump would be back on the floor by the end. + repeat(HOLD_TICKS) { + context.waitTick() + check(position(context) == start) { "the player moved from $start to ${position(context)}" } + context.runOnClient { check(!it.player!!.isShiftKeyDown) { "the player is sneaking" } } + } + input.releaseKey { it.keyUp } + input.releaseKey { it.keyLeft } + input.releaseKey { it.keyJump } + input.releaseKey { it.keyShift } + + input.pressKey { it.keyHotbarSlots[3] } + input.pressKey { it.keyInventory } + input.scroll(1.0) + context.waitTicks(SETTLE_TICKS) + context.runOnClient { minecraft -> + check(minecraft.player!!.inventory.selectedSlot == 0) { "a hotbar key or the wheel worked" } + check(minecraft.gui.screen() == null) { "the inventory opened" } + } + + // Vanilla ignores the first movement after grabbing the mouse. + input.moveCursor(TURN_PIXELS, 0.0) + context.waitTicks(SETTLE_TICKS) + val yawBefore = context.computeOnClient { it.player!!.yRot } + input.moveCursor(TURN_PIXELS, 0.0) + context.waitTicks(SETTLE_TICKS) + check(context.computeOnClient { it.player!!.yRot } != yawBefore) { "the camera didn't turn" } + + context.runOnClient { it.pauseGame(false) } + context.waitForScreen(StageMenuScreen::class.java) + context.takeScreenshot("stage_menu") + context.clickScreenButton("hexium.stage.leave") + context.waitForScreen(HexiumMenuScreen::class.java) + context.runOnClient { minecraft -> + check(!HexiumSession.active()) { "the session outlived the stage" } + check(minecraft.level == null) { "still in the stage" } + check(minecraft.options.tutorialStep == TutorialSteps.FIND_TREE) { "the stage ended the player's tutorial" } + check(minecraft.options.cameraType == CameraType.THIRD_PERSON_BACK) { "the camera view wasn't put back" } + check(minecraft.gui.hud.isHidden) { "the HUD setting wasn't put back" } + minecraft.options.tutorialStep = TutorialSteps.NONE + minecraft.options.cameraType = CameraType.FIRST_PERSON + minecraft.gui.hud.toggle() + } + context.clickScreenButton("gui.back") + context.waitForScreen(TitleScreen::class.java) + } + + private fun normalWorldsAreUntouched(context: ClientGameTestContext) { + context.worldBuilder().create().use { world -> + world.connection.waitForChunksRender() + context.runOnClient { check(!HexiumSession.active()) { "a session in a normal world" } } + val start = position(context) + context.input.holdKey { it.keyUp } + context.waitTicks(HOLD_TICKS) + context.input.releaseKey { it.keyUp } + check(position(context) != start) { "the player can't move in a normal world" } + context.input.pressKey { it.keyHotbarSlots[3] } + context.waitTicks(SETTLE_TICKS) + context.runOnClient { + check(it.player!!.inventory.selectedSlot == 3) { "the hotbar keys don't work in a normal world" } + } + context.input.scroll(1.0) + context.waitTicks(SETTLE_TICKS) + context.runOnClient { + check(it.player!!.inventory.selectedSlot != 3) { "the wheel doesn't work in a normal world" } + } + context.input.pressKey { it.keyInventory } + context.waitForScreen(InventoryScreen::class.java) + context.setScreen { null } + context.runOnClient { it.pauseGame(false) } + context.waitFor({ it.gui.screen()?.javaClass?.simpleName == "PauseScreen" }, LOAD_TICKS) + context.setScreen { null } + } + } + + private fun position(context: ClientGameTestContext): Triple = + context.computeOnClient, RuntimeException> { minecraft: Minecraft -> + val player = minecraft.player!! + Triple(player.x, player.y, player.z) + } + + private companion object { + const val LOAD_TICKS = 1200 + const val SETTLE_TICKS = 20 + const val HOLD_TICKS = 40 + const val TURN_PIXELS = 200.0 + } +} diff --git a/mod/src/gametest/resources/fabric.mod.json b/mod/src/gametest/resources/fabric.mod.json new file mode 100644 index 0000000..debb175 --- /dev/null +++ b/mod/src/gametest/resources/fabric.mod.json @@ -0,0 +1,11 @@ +{ + "schemaVersion": 1, + "id": "hexium_gametest", + "version": "1", + "environment": "client", + "entrypoints": { + "fabric-client-gametest": [ + "net.trilleo.hexium.gametest.HexiumClientGameTest" + ] + } +} From b832028289acc1b28ed9f7a9ff30d9653d9300c2 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Wed, 4 Nov 2026 13:18:16 +0800 Subject: [PATCH 15/34] Feature: Play ground charts on the stage with SDL-timed lane keys, replay recording and a combo and judgement HUD --- CHANGELOG.md | 6 +- README.md | 2 +- .../net/trilleo/hexium/core/chart/Chart.kt | 18 ++ .../net/trilleo/hexium/core/judge/Judge.kt | 3 + .../hexium/core/chart/TimingMapTest.kt | 33 +++ .../hexium/core/clock/SongClockTest.kt | 16 ++ .../hexium/core/judge/JudgedPressTest.kt | 37 ++++ docs/ARCHITECTURE.md | 10 +- docs/DEVELOPMENT.md | 2 +- docs/REPLAY_FORMAT.md | 2 +- .../hexium/client/mixin/MinecraftMixin.java | 7 + .../client/mixin/SDLEventHandlerMixin.java | 20 ++ .../net/trilleo/hexium/client/HexiumClient.kt | 2 + .../trilleo/hexium/client/clock/AudioClock.kt | 19 +- .../trilleo/hexium/client/input/LaneInput.kt | 79 ++++++++ .../net/trilleo/hexium/client/play/PlayHud.kt | 190 ++++++++++++++++++ .../trilleo/hexium/client/play/PlaySession.kt | 138 +++++++++++++ .../hexium/client/screen/HexiumMenuScreen.kt | 32 ++- .../hexium/client/session/HexiumSession.kt | 17 +- .../hexium/client/session/StageWorld.kt | 7 +- .../resources/assets/hexium/lang/en_us.json | 12 +- .../resources/assets/hexium/lang/zh_cn.json | 12 +- .../resources/hexium.client.mixins.json | 1 + .../hexium/gametest/HexiumClientGameTest.kt | 113 +++++++++++ 24 files changed, 760 insertions(+), 18 deletions(-) create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgedPressTest.kt create mode 100644 mod/src/client/java/net/trilleo/hexium/client/mixin/SDLEventHandlerMixin.java create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/input/LaneInput.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/play/PlayHud.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index 831b1f9..971787d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,7 @@ + The menu lists every chart it finds, including a built-in Test Pattern and any folders in `.minecraft/hexium/charts`. + Broken charts are marked and show their first problem, and the full list goes to the log. + Charts with sky notes are shown but can't be selected yet. -+ Choosing a difficulty now takes you to the stage, and Esc offers a way back to the menu. - + Notes aren't there yet: the stage is empty for now. ++ Choosing a difficulty now plays it on the stage, and Esc offers a way back to the menu. #### Charts @@ -28,6 +27,9 @@ #### Gameplay ++ Ground charts can now be played: press A S D F (the same positions on any keyboard layout) in time with the song, with combo, judgement and score on screen. + + Presses are timed from when the key went down, not when the game got round to it. + + The notes themselves aren't drawn yet, so for now it's played by ear. + Added the stage: a plain floor you stand on, kept apart from your normal worlds. + You can look around, but moving, jumping and action keys are off while you're on it. + The hunger bar is hidden. diff --git a/README.md b/README.md index 60b134c..a04516d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ## How it plays -- **Ground track:** four lanes under your feet. Press A, S, D or F as notes reach the line. Some notes are holds: keep the key down until they end. +- **Ground track:** four lanes under your feet. Press A, S, D or F (the same positions on any keyboard layout) as notes reach the line. Some notes are holds: keep the key down until they end. - **Sky screen:** a giant screen in front of you. Aim at sky notes and click: left or right click, depending on the note. Slides need you to hold the click and follow a path. Flicks need a quick swipe through the note, no click. - **Timing:** every hit is judged Justice Critical, Justice, Attack or Miss. A perfect play scores 1,010,000. - **Charts:** play built-in charts, make your own in the in-game editor, and share them online with leaderboards (coming later). diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt index f04404e..585287a 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/Chart.kt @@ -41,6 +41,24 @@ data class DifficultyChart( /** True if every note is on the ground track: no sky taps, slides or flicks. */ val isGroundOnly: Boolean get() = notes.all { it is Note.Tap || it is Note.Hold } + + /** When the last note ends, in song milliseconds, or 0 if there are no notes. */ + fun lastNoteEndMs(): Double { + val timing = TimingMap(offsetMs, bpm) + var last = 0.0 + for (note in notes) { + val end = when (note) { + is Note.Tap -> note.t + is Note.Hold -> note.end + is Note.SkyTap -> note.t + is Note.Flick -> note.t + is Note.Slide -> note.points.last().t + } + val endMs = timing.beatToMs(end) + if (endMs > last) last = endMs + } + return last + } } data class BpmChange(val t: Beat, val bpm: Double) diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt b/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt index d7f719a..54138fc 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/judge/Judge.kt @@ -90,6 +90,9 @@ class Judge(private val chart: JudgeChart, private val judgementOffsetMs: Double /** The judged object's index in the chart's notes. */ fun judgedNote(index: Int): Int = chart.objectNote[judgedObject[index]] + /** False for hold and slide ticks: their delta is how long ago the input was held, not how well it was timed. */ + fun judgedIsPress(index: Int): Boolean = chart.tickObject.isEmpty() || judgedObject[index] < chart.tickObject[0] + /** Input time minus target time. Negative is early. NaN if there was no input to measure. */ fun judgedDeltaMs(index: Int): Double = judgedDelta[index] diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt index e401756..fc7d0f0 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/TimingMapTest.kt @@ -100,3 +100,36 @@ class TimingMapTest { assertFailsWith { TimingMap(Double.NaN, listOf(bpm(0, 120.0))) } } } + +class LastNoteEndTest { + private val beat = BpmChange(Beat(0, 0, 1), 120.0) + + private fun chart(vararg notes: Note) = DifficultyChart(1, Difficulty.BASIC, 1, 4, 100.0, listOf(beat), emptyList(), notes.toList()) + + @Test + fun aChartWithNoNotesEndsAtItsStart() { + assertEquals(0.0, chart().lastNoteEndMs(), 1e-9) + } + + @Test + fun theLatestEndNeedNotBeTheLastNoteListed() { + val chart = chart(Note.Hold(Beat(1, 0, 1), Beat(9, 0, 1), 0), Note.Tap(Beat(2, 0, 1), 1)) + assertEquals(4600.0, chart.lastNoteEndMs(), 1e-9) + } + + @Test + fun notesBeforeTheSongStartEndAtZero() { + val chart = chart(Note.Tap(Beat(1, 0, 1), 0)).copy(offsetMs = -2000.0) + assertEquals(0.0, chart.lastNoteEndMs(), 1e-9) + } + + @Test + fun itIsTheLatestEndOfAnyNoteType() { + val point = { whole: Int -> SlidePoint(Beat(whole, 0, 1), 0.5, 0.5, Ease.LINEAR) } + assertEquals(1100.0, chart(Note.Tap(Beat(2, 0, 1), 0)).lastNoteEndMs(), 1e-9) + assertEquals(2100.0, chart(Note.Tap(Beat(1, 0, 1), 0), Note.Hold(Beat(1, 0, 1), Beat(4, 0, 1), 1)).lastNoteEndMs(), 1e-9) + assertEquals(1600.0, chart(Note.SkyTap(Beat(3, 0, 1), 0.5, 0.5, SkyButton.L, 1.0)).lastNoteEndMs(), 1e-9) + assertEquals(2600.0, chart(Note.Flick(Beat(5, 0, 1), 0.5, 0.5, null, 1.0)).lastNoteEndMs(), 1e-9) + assertEquals(3100.0, chart(Note.Slide(SkyButton.L, 0.06, listOf(point(1), point(6)))).lastNoteEndMs(), 1e-9) + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/clock/SongClockTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/clock/SongClockTest.kt index 388e43a..4e4826b 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/clock/SongClockTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/clock/SongClockTest.kt @@ -219,4 +219,20 @@ class SongClockTest { assertEquals(0.0, clock.maxDriftMs) assertEquals(1, clock.resyncCount) } + + /** Before the music starts there's no position, so the first one is believed at once. */ + @Test + fun afterALeadInTheFirstAudioPositionIsTakenWhole() { + val clock = SongClock() + clock.start(-3000.0, 0L) + var wall = 0L + while (wall < 3_000_000_000L) { + wall += frameNs + clock.observe(Double.NaN, wall) + } + assertEquals(0.0, clock.nowMs(wall), 5.0) + clock.observe(-21.0, wall) + assertEquals(-21.0, clock.mapMs(wall), 1e-6) + assertEquals(0, clock.resyncCount) + } } diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgedPressTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgedPressTest.kt new file mode 100644 index 0000000..65905ff --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/judge/JudgedPressTest.kt @@ -0,0 +1,37 @@ +package net.trilleo.hexium.core.judge + +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFalse +import kotlin.test.assertTrue +import net.trilleo.hexium.core.chart.Beat +import net.trilleo.hexium.core.chart.BpmChange +import net.trilleo.hexium.core.chart.Difficulty +import net.trilleo.hexium.core.chart.DifficultyChart +import net.trilleo.hexium.core.chart.Note + +class JudgedPressTest { + private val chart = DifficultyChart( + 1, + Difficulty.BASIC, + 1, + 4, + 0.0, + listOf(BpmChange(Beat(0, 0, 1), 60.0)), + emptyList(), + listOf(Note.Tap(Beat(1, 0, 1), 0), Note.Hold(Beat(2, 0, 1), Beat(3, 0, 1), 1)), + ) + + @Test + fun tellsPressesFromHoldTicks() { + val judge = Judge(JudgeChart.compile(chart)) + judge.pressLane(0, 1000.0) + judge.releaseLane(0, 1010.0) + judge.pressLane(1, 2000.0) + judge.finish() + assertEquals(5, judge.judgedCount) + assertTrue(judge.judgedIsPress(0), "the tap") + assertTrue(judge.judgedIsPress(1), "the hold's head") + for (i in 2 until judge.judgedCount) assertFalse(judge.judgedIsPress(i), "tick $i") + } +} diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 50ce398..42d16dd 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -37,22 +37,24 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl - Every mixin and event hook starts with `if (!HexiumSession.active()) return;`, except the title screen button, which only adds that button. Joining a normal world or server means no session, so vanilla behaviour stays as it was. - The stage is a flat black floor made in code (`StageWorld`) and created fresh for each session in the mod's own folder, `.minecraft/hexium/stages/`, not `saves/`, so it never shows up in the vanilla world list. Making it in code means a Minecraft update can't ask to upgrade it. Chart-authored stages may bring template worlds in Milestone 8. It runs on the integrated server, with its rules frozen once the player joins: no daylight cycle, mobs, random ticks or weather. - The player is in adventure mode on Peaceful, placed on the stand spot. Gameplay never depends on the server; the world is just scenery. -- While a session is active, mixins hold the player still (`KeyboardInput`), stop every key that method handles (`Minecraft.handleKeybinds`: attack, items, hotbar, inventory, chat, F1, F5 and so on) and hotbar scrolling, keep vanilla's tutorial from starting, since it would end itself for good outside survival, and replace vanilla's pause menu. The camera turns freely until Milestone 3 adds its limits. The HUD stays vanilla apart from the hunger bar, which is hidden. A player arriving in third person or with the HUD hidden gets the normal view, and their own comes back afterwards. +- While a session is active, mixins hold the player still (`KeyboardInput`), stop every key that method handles (`Minecraft.handleKeybinds`: attack, items, hotbar, inventory, chat, F1, F5 and so on) and hotbar scrolling, keep vanilla's tutorial from starting, since it would end itself for good outside survival, and replace vanilla's pause menu. The camera turns freely until Milestone 3 adds its limits. Vanilla's HUD stays apart from the hunger bar, which is hidden, and Hexium draws combo, judgement and score over it. While no screen is open, vanilla doesn't see lane keys at all, so the play loop tells it there was input, or it would lower the frame rate. A player arriving in third person or with the HUD hidden gets the normal view, and their own comes back afterwards. - A session ends when the connection closes, and also whenever the title screen or the Hexium menu opens, so a failed load can't leave one running. ## Audio and clock - Songs are not played through Minecraft's sound manager. The mod decodes OGG with stb_vorbis (bundled with LWJGL) on a background thread and streams it into its own OpenAL source on the game's existing OpenAL context (`SongStream`). Minecraft destroys that context when the audio device changes or sounds reload, so a mixin stops the stream first, and it rebuilds its source on the new one at the clock's current time. The song is silent while Minecraft's loading screen covers the game. -- Song position comes from `AL_SEC_OFFSET_LATENCY_SOFT` (the OpenAL Soft latency extension), or `AL_SAMPLE_OFFSET` if it isn't there. This raw value updates in steps, so the clock runs on SDL's tick counter, the clock input events are stamped with, and is gently pulled toward the audio position. It only jumps if the audio is over 100 ms away, and never runs backwards: it holds still until the music catches up. The logic is `SongClock` in `core`, which has no time source of its own, so it can be tested. `AudioClock` in `mod` feeds it. +- Song position comes from `AL_SEC_OFFSET_LATENCY_SOFT` (the OpenAL Soft latency extension), or `AL_SAMPLE_OFFSET` if it isn't there. This raw value updates in steps, so the clock runs on SDL's tick counter, the clock input events are stamped with, and is gently pulled toward the audio position. It only jumps if the audio is over 100 ms away, or for the first position after a lead-in, and never runs backwards: it holds still until the music catches up. The logic is `SongClock` in `core`, which has no time source of its own, so it can be tested. `AudioClock` in `mod` feeds it. - Vanilla music is held for the length of a session. - Draw time = song time − visual offset (A). Judgement time = input song time − judgement offset (B). ## Input timing -- Minecraft 26.3 uses SDL3, not GLFW. Read input in `SDLEventHandler`, since it hands keys on to the keyboard handler later in the frame. Each SDL event carries a `timestamp` from SDL's tick counter (`SDL_GetTicksNS`), the same clock the song clock runs on, so convert that to song time with the clock's mapping. +- Minecraft 26.3 uses SDL3, not GLFW. Read lane keys in `SDLEventHandler` (`LaneInput`), since it hands keys on to the keyboard handler later in the frame. Keys are physical positions, so the left hand sits the same on any layout. Each SDL event carries a `timestamp` from SDL's tick counter (`SDL_GetTicksNS`), the same clock the song clock runs on, so convert that to song time with the clock's mapping. - Events are polled once per frame, so without a real timestamp from the OS the error is at most one frame. The debug overlay measures this. Tell players to run uncapped or at 240+ FPS during play (about 4 ms of error). Keep rendering fast so this holds. - Every frame, record an aim sample (song time, yaw, pitch → crosshair point on the screen plane). Slides and flicks are judged from these samples. Flicks test the line between two samples, so fast swipes at low FPS still register. -- Events go into a queue that the judge drains every frame. Every input event and aim sample is also appended to the replay: the mod sends input through `ReplayRecorder`, which records it and passes it to the judge ([REPLAY_FORMAT.md](REPLAY_FORMAT.md)). +- Events go into a fixed ring that the play loop (`PlaySession`) drains at the start of every frame, before anything reads the time. A play has a 3-second lead-in with the clock running before the music, and stays open 2 seconds after the last note. +- Until sky notes exist, the aim sample is a fixed mid-screen point, on the same code path. +- Events go through the judge every frame. Every input event and aim sample is also appended to the replay: the mod sends input through `ReplayRecorder`, which records it and passes it to the judge ([REPLAY_FORMAT.md](REPLAY_FORMAT.md)). ## Rendering diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index b671be7..8eeba4d 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -76,7 +76,7 @@ Parallel lanes that work well: after Milestone 1, `server` can build auth and ch - **`core` unit tests:** one file of synthetic input per rule in `docs/JUDGEMENT.md`. For example: "tap 20 ms late → Justice Critical", "hold released 120 ms before a tick → Attack on that tick", "slide with crosshair outside radius → Miss on those ticks", "flick too slow → no hit". - **Golden replays:** replays with their known scores live in `core/src/test/resources/golden`. Any change to the judge must keep them identical, or update them on purpose in the same PR (and raise `JudgementConfig.JUDGE_VERSION`). So far they come from scripted players, with scores worked out by hand in `GoldenReplayTest`. Real recorded plays join them from Milestone 2. Editing an example chart changes its hash, so its golden replays must be regenerated too. - **Property tests (jqwik):** shifting every input by the judgement offset B leaves the score unchanged when B is set to match. A steady straight swipe gets the same judgement at every frame rate (other results can differ by what one frame's sampling can, see [JUDGEMENT.md](JUDGEMENT.md)). Random input never breaks the judge, and its replay always gives the same results. -- **Fabric client game tests:** the title button opens the menu; the menu loads the stage; the stage holds the player still and blocks action keys while the camera still turns; leaving ends the session; joining a normal singleplayer world creates no session and the player can move. Still to come: a short chart plays to the results screen with autoplay. A button that disconnects must do it through the task queue (`StageWorld.leave` shows how): the test framework defers a disconnect made while handling a click, so the test would see a different order of events from the real game. +- **Fabric client game tests:** the title button opens the menu; the menu loads the stage; the stage holds the player still and blocks action keys while the camera still turns; leaving ends the session; joining a normal singleplayer world creates no session and the player can move; a bot plays a short chart to the end, pausing twice, with no Misses, and its replay re-judges to the same result. The bot pushes into `LaneInput` directly, so real key presses through SDL need a human. A button that disconnects must do it through the task queue (`StageWorld.leave` shows how): the test framework defers a disconnect made while handling a click, so the test would see a different order of events from the real game. - **Human playtest checklist per milestone:** offset calibration feels right; no drift after a 3-minute song; ground track readable while aiming at the corners; hold, slide and flick feel fair. ### Checking the clock diff --git a/docs/REPLAY_FORMAT.md b/docs/REPLAY_FORMAT.md index 0e792b0..2d663ed 100644 --- a/docs/REPLAY_FORMAT.md +++ b/docs/REPLAY_FORMAT.md @@ -31,7 +31,7 @@ Each event starts with one byte, the kind in the high 4 bits and the index in th ## Rules - Times never go down, so a replay always runs forward. When a player resumes from pause and the notes rewind, input isn't judged or recorded until play passes the point where it paused. -- Times, `x`, `y` and offset B are finite. +- Times, `x`, `y` and offset B are finite. Times may be negative: a play starts with a lead-in before the song. - A file holds at most 2,000,000 events, about 2 hours at 240 FPS. Reading stops at that size once decompressed, so a small file can't unpack into something huge. - A file whose contents have anything else wrong, including bytes left over after the last event, is rejected with a message. Reading never throws. Only the unpacked contents are checked, so bytes outside the gzip data are ignored. diff --git a/mod/src/client/java/net/trilleo/hexium/client/mixin/MinecraftMixin.java b/mod/src/client/java/net/trilleo/hexium/client/mixin/MinecraftMixin.java index 395b9c4..d4045bf 100644 --- a/mod/src/client/java/net/trilleo/hexium/client/mixin/MinecraftMixin.java +++ b/mod/src/client/java/net/trilleo/hexium/client/mixin/MinecraftMixin.java @@ -16,6 +16,13 @@ abstract class MinecraftMixin { ci.cancel(); } + /** Input has just arrived, and nothing has read the time yet. */ + @Inject(method = "runTick", at = @At("HEAD")) + private void hexium$frame(boolean advanceGameTime, CallbackInfo ci) { + if (!HexiumSession.active()) return; + HexiumSession.frame(); + } + /** Vanilla's pause menu could leave the stage without going through Hexium. */ @Inject(method = "pauseGame", at = @At("HEAD"), cancellable = true) private void hexium$ownPauseMenu(boolean suppressPauseMenu, CallbackInfo ci) { diff --git a/mod/src/client/java/net/trilleo/hexium/client/mixin/SDLEventHandlerMixin.java b/mod/src/client/java/net/trilleo/hexium/client/mixin/SDLEventHandlerMixin.java new file mode 100644 index 0000000..995d462 --- /dev/null +++ b/mod/src/client/java/net/trilleo/hexium/client/mixin/SDLEventHandlerMixin.java @@ -0,0 +1,20 @@ +package net.trilleo.hexium.client.mixin; + +import com.mojang.blaze3d.platform.SDLEventHandler; +import net.trilleo.hexium.client.input.LaneInput; +import net.trilleo.hexium.client.session.HexiumSession; +import org.lwjgl.sdl.SDL_Event; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +/** The only place that still has an input event's own timestamp. */ +@Mixin(SDLEventHandler.class) +abstract class SDLEventHandlerMixin { + @Inject(method = "handleKeyEvent", at = @At("HEAD"), cancellable = true) + private void hexium$laneKeys(SDL_Event event, CallbackInfo ci) { + if (!HexiumSession.active()) return; + if (LaneInput.onKeyEvent(event.address())) ci.cancel(); + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt index 048b2c9..b5a8b68 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt @@ -2,6 +2,7 @@ package net.trilleo.hexium.client import net.fabricmc.api.ClientModInitializer import net.trilleo.hexium.Hexium +import net.trilleo.hexium.client.play.PlayHud import net.trilleo.hexium.client.screen.TitleScreenButton import net.trilleo.hexium.client.session.StageHud import net.trilleo.hexium.client.session.StageWorld @@ -14,6 +15,7 @@ object HexiumClient : ClientModInitializer { TitleScreenButton.register() StageWorld.registerEvents() StageHud.register() + PlayHud.register() LOGGER.info("Hexium loaded") } } diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/clock/AudioClock.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/clock/AudioClock.kt index c49d900..86a39e3 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/clock/AudioClock.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/clock/AudioClock.kt @@ -15,8 +15,18 @@ class AudioClock(private val stream: SongStream) { var songTimeMs = 0.0 private set + /** True while the clock is running but hasn't reached the start of the song. */ + private var inLeadIn = false + + /** Starts from [leadInMs] before the song, so the first notes aren't sprung on the player. */ + fun playAfter(leadInMs: Double) { + songTimeMs = -leadInMs + play() + } + fun play() { - stream.play() + inLeadIn = songTimeMs < 0.0 + if (!inLeadIn) stream.play() clock.start(songTimeMs, SDLTimer.SDL_GetTicksNS()) } @@ -37,5 +47,12 @@ class AudioClock(private val stream: SongStream) { stream.recoverIfLost(clock.nowMs(now)) clock.observe(stream.positionMs(), now) songTimeMs = clock.nowMs(now) + if (inLeadIn && clock.running && songTimeMs >= 0.0) { + inLeadIn = false + stream.play() + } } + + /** Song time when something stamped [ticksNs] on SDL's tick counter happened. */ + fun songTimeAt(ticksNs: Long): Double = clock.mapMs(ticksNs) } diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/input/LaneInput.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/input/LaneInput.kt new file mode 100644 index 0000000..2d4e9a3 --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/input/LaneInput.kt @@ -0,0 +1,79 @@ +package net.trilleo.hexium.client.input + +import net.trilleo.hexium.client.session.HexiumSession +import org.lwjgl.sdl.SDLScancode +import org.lwjgl.sdl.SDL_KeyboardEvent + +/** + * Lane keys, read straight from SDL's events: vanilla only sees a key later in the frame, and SDL + * stamps each event with the clock the song clock runs on. Keys are physical positions, so the left + * hand sits the same on any keyboard layout. A fixed ring holds them until the frame drains it, so + * nothing here allocates. + */ +object LaneInput { + private val SCANCODES = intArrayOf( + SDLScancode.SDL_SCANCODE_A, + SDLScancode.SDL_SCANCODE_S, + SDLScancode.SDL_SCANCODE_D, + SDLScancode.SDL_SCANCODE_F, + ) + private const val CAPACITY = 256 + + private val lanes = IntArray(CAPACITY) + private val downs = BooleanArray(CAPACITY) + private val times = LongArray(CAPACITY) + private var head = 0 + private var count = 0 + + /** The next event's lane, once [hasEvent] says there's one. */ + val lane: Int + get() = lanes[head] + val down: Boolean + get() = downs[head] + + /** When it happened, on SDL's tick counter. */ + val timeNs: Long + get() = times[head] + + val hasEvent: Boolean + get() = count > 0 + + fun next() { + head = (head + 1) % CAPACITY + count-- + } + + fun clear() { + head = 0 + count = 0 + } + + /** Returns true if the event was a lane key meant for the game, so vanilla shouldn't see it. */ + @JvmStatic + fun onKeyEvent(event: Long): Boolean { + val play = HexiumSession.play() ?: return false + val lane = laneOf(SDL_KeyboardEvent.nscancode(event)) + if (lane < 0 || !play.acceptingInput) return false + val isDown = SDL_KeyboardEvent.ndown(event) + val toGame = HexiumSession.noScreenOpen() + // A release while a screen is open still counts: the key is no longer held. + if ((toGame || !isDown) && !SDL_KeyboardEvent.nrepeat(event)) push(lane, isDown, SDL_KeyboardEvent.ntimestamp(event)) + return toGame + } + + fun push(lane: Int, isDown: Boolean, atNs: Long) { + if (count == CAPACITY) return + val slot = (head + count) % CAPACITY + lanes[slot] = lane + downs[slot] = isDown + times[slot] = atNs + count++ + } + + private fun laneOf(scancode: Int): Int { + for (i in SCANCODES.indices) { + if (SCANCODES[i] == scancode) return i + } + return -1 + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlayHud.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlayHud.kt new file mode 100644 index 0000000..69c1287 --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlayHud.kt @@ -0,0 +1,190 @@ +package net.trilleo.hexium.client.play + +import net.fabricmc.fabric.api.client.rendering.v1.hud.HudElementRegistry +import net.minecraft.client.Minecraft +import net.minecraft.client.gui.Font +import net.minecraft.client.gui.GuiGraphicsExtractor +import net.minecraft.network.chat.Component +import net.minecraft.network.chat.Style +import net.minecraft.util.FormattedCharSequence +import net.minecraft.util.FormattedCharSink +import net.trilleo.hexium.Hexium +import net.trilleo.hexium.client.session.HexiumSession +import net.trilleo.hexium.core.judge.ClearLamp +import net.trilleo.hexium.core.judge.Judgement + +/** + * Combo, the last judgement and the score. Numbers go in reused buffers and fixed text is prepared + * when a play starts, so nothing here allocates. Vanilla still makes a small object per text drawn. + */ +object PlayHud { + private val JUDGEMENT_COLORS = intArrayOf(0xFFFFD84A.toInt(), 0xFFFF9A3C.toInt(), 0xFF6FD66F.toInt(), 0xFFA0A0A0.toInt()) + + private const val TEXT_COLOR = -1 + private const val JUDGEMENT_SHOWN_MS = 500.0 + private const val COMBO_SCALE = 3f + private const val COMBO_ABOVE = 60 + private const val JUDGEMENT_ABOVE = 26 + private const val DELTA_ABOVE = 14 + private const val MARGIN = 6 + private const val FINISHED_ABOVE = 30 + private const val LINE_HEIGHT = 12 + private const val ASCII = 128 + + /** Text prepared once, with its width. */ + private class Prepared(font: Font, text: Component) { + val sequence: FormattedCharSequence = text.visualOrderText + val width = font.width(sequence) + } + + /** A short run of characters that can be rewritten without allocating. */ + private class NumberText : FormattedCharSequence { + private val chars = IntArray(CAPACITY) + private var length = 0 + var width = 0 + private set + + fun set(value: Int) { + clear() + appendNumber(value) + } + + fun setSignedMs(value: Int) { + clear() + append(if (value > 0) '+'.code else if (value < 0) '-'.code else ' '.code) + appendNumber(if (value < 0) -value else value) + append(' '.code) + append('m'.code) + append('s'.code) + } + + fun clear() { + length = 0 + width = 0 + } + + private fun appendNumber(value: Int) { + var divisor = 1 + while (value / divisor >= 10) divisor *= 10 + while (divisor > 0) { + append('0'.code + value / divisor % 10) + divisor /= 10 + } + } + + private fun append(char: Int) { + chars[length++] = char + width += charWidths[char] + } + + override fun accept(output: FormattedCharSink): Boolean { + for (i in 0 until length) { + if (!output.accept(i, Style.EMPTY, chars[i])) return false + } + return true + } + + private companion object { + const val CAPACITY = 16 + } + } + + private val charWidths = IntArray(ASCII) + private val combo = NumberText() + private val score = NumberText() + private val delta = NumberText() + + private var judgementText = arrayOfNulls(0) + private var lampText = arrayOfNulls(0) + private var readyText: Prepared? = null + private var finishedText: Prepared? = null + + private var session: PlaySession? = null + private var seen = 0 + private var last: Judgement? = null + private var lastAtMs = 0.0 + + fun register() { + HudElementRegistry.addLast(Hexium.id("play")) { graphics, _ -> + val play = if (HexiumSession.active()) HexiumSession.play() else null + if (play != null) draw(graphics, play) else session = null + } + } + + private fun prepare(font: Font) { + for (i in 0 until ASCII) charWidths[i] = font.width(i.toChar().toString()) + judgementText = Array(Judgement.entries.size) { + Prepared(font, Component.translatable("hexium.judgement.${Judgement.entries[it].name.lowercase()}")) + } + lampText = Array(ClearLamp.entries.size) { + val lamp = ClearLamp.entries[it] + if (lamp == ClearLamp.NONE) null else Prepared(font, Component.translatable("hexium.lamp.${lamp.name.lowercase()}")) + } + readyText = Prepared(font, Component.translatable("hexium.play.ready")) + finishedText = Prepared(font, Component.translatable("hexium.play.finished")) + } + + private fun draw(graphics: GuiGraphicsExtractor, play: PlaySession) { + val font = Minecraft.getInstance().font + if (session !== play) { + session = play + prepare(font) + seen = 0 + last = null + combo.set(0) + score.set(0) + delta.clear() + } + catchUp(play) + val centre = graphics.guiWidth() / 2 + val middle = graphics.guiHeight() / 2 + val now = play.clock.songTimeMs + + if (now < 0.0 && play.state == PlaySession.State.PLAYING) { + drawCentred(graphics, font, readyText, centre, middle - JUDGEMENT_ABOVE, TEXT_COLOR) + } + graphics.text(font, score, graphics.guiWidth() - score.width - MARGIN, MARGIN, TEXT_COLOR) + + if (play.judge.combo > 1) { + graphics.pose().pushMatrix() + graphics.pose().translate(centre.toFloat(), (middle - COMBO_ABOVE).toFloat()) + graphics.pose().scale(COMBO_SCALE, COMBO_SCALE) + graphics.text(font, combo, -combo.width / 2, 0, TEXT_COLOR) + graphics.pose().popMatrix() + } + val judgement = last + if (judgement != null && now - lastAtMs < JUDGEMENT_SHOWN_MS) { + drawCentred(graphics, font, judgementText[judgement.ordinal], centre, middle - JUDGEMENT_ABOVE, JUDGEMENT_COLORS[judgement.ordinal]) + graphics.text(font, delta, centre - delta.width / 2, middle - DELTA_ABOVE, TEXT_COLOR) + } + if (play.state == PlaySession.State.FINISHED) { + drawCentred(graphics, font, finishedText, centre, middle + FINISHED_ABOVE, TEXT_COLOR) + drawCentred(graphics, font, lampText[play.judge.clearLamp.ordinal], centre, middle + FINISHED_ABOVE + LINE_HEIGHT, TEXT_COLOR) + } + } + + private fun drawCentred(graphics: GuiGraphicsExtractor, font: Font, text: Prepared?, centre: Int, y: Int, color: Int) { + if (text != null) graphics.text(font, text.sequence, centre - text.width / 2, y, color) + } + + private fun catchUp(play: PlaySession) { + val judge = play.judge + val count = judge.judgedCount + if (seen == count) return + val newest = count - 1 + last = judge.judgement(newest) + lastAtMs = play.clock.songTimeMs + // A tick's delta says how long ago the key was held, which would read as a mistimed press. + var i = newest + while (i >= seen && !judge.judgedIsPress(i)) i-- + if (i >= seen) { + val ms = judge.judgedDeltaMs(i) + if (ms.isNaN()) delta.clear() else delta.setSignedMs(Math.round(ms).toInt()) + } else if (judge.judgement(newest) == Judgement.MISS) { + delta.clear() + } + combo.set(judge.combo) + score.set(judge.score) + seen = count + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt new file mode 100644 index 0000000..70072ca --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt @@ -0,0 +1,138 @@ +package net.trilleo.hexium.client.play + +import java.io.IOException +import java.nio.file.Files +import net.minecraft.client.Minecraft +import net.minecraft.sounds.SoundSource +import net.trilleo.hexium.Hexium +import net.trilleo.hexium.client.audio.SongStream +import net.trilleo.hexium.client.chart.ChartPack +import net.trilleo.hexium.client.clock.AudioClock +import net.trilleo.hexium.client.input.LaneInput +import net.trilleo.hexium.core.chart.ChartFolder +import net.trilleo.hexium.core.chart.ChartParser +import net.trilleo.hexium.core.chart.ChartValidator +import net.trilleo.hexium.core.chart.Difficulty +import net.trilleo.hexium.core.chart.DifficultyChart +import net.trilleo.hexium.core.chart.Severity +import net.trilleo.hexium.core.judge.Judge +import net.trilleo.hexium.core.judge.JudgeChart +import net.trilleo.hexium.core.replay.Replay +import net.trilleo.hexium.core.replay.ReplayRecorder +import org.slf4j.LoggerFactory + +/** + * One play of a chart. Each frame it reads the audio clock, then sends everything that happened + * through [recorder], so a replay holds exactly what the judge saw. All the rules are in `core`. + */ +class PlaySession private constructor( + val chart: DifficultyChart, + val chartFile: ByteArray, + private val stream: SongStream, +) : AutoCloseable { + enum class State { WAITING_FOR_STAGE, PLAYING, PAUSED, FINISHED } + + val judgeChart: JudgeChart = JudgeChart.compile(chart) + val clock = AudioClock(stream) + val recorder = ReplayRecorder(judgeChart, Replay.hashOf(chartFile), JUDGEMENT_OFFSET_MS, expectedEvents()) + private val endMs = chart.lastNoteEndMs() + TAIL_MS + + var state = State.WAITING_FOR_STAGE + private set + + val judge: Judge + get() = recorder.judge + + val acceptingInput: Boolean + get() = state == State.PLAYING || state == State.PAUSED + + private fun expectedEvents(): Int { + val seconds = (stream.lengthMs + LEAD_IN_MS + TAIL_MS) / 1000.0 + return (seconds * EXPECTED_SAMPLES_PER_SECOND).toInt() + judgeChart.objectCount * 2 + } + + /** Call once per frame, before anything reads the time. Doesn't allocate. */ + fun frame() { + val minecraft = Minecraft.getInstance() + stream.setGain(minecraft.options.getFinalSoundSourceVolume(SoundSource.MUSIC)) + val screenOpen = minecraft.gui.screen() != null + when (state) { + State.WAITING_FOR_STAGE -> { + if (screenOpen || minecraft.player == null) return + LaneInput.clear() + clock.playAfter(LEAD_IN_MS) + state = State.PLAYING + } + State.PLAYING -> if (screenOpen) { + clock.pause() + state = State.PAUSED + } + State.PAUSED -> if (!screenOpen) { + clock.play() + state = State.PLAYING + } + State.FINISHED -> return + } + clock.update() + drainInput() + if (state != State.PLAYING) return + // Vanilla lowers the frame rate after a minute with no input it can see, and lane keys never reach it. + minecraft.framerateLimitTracker.onInputReceived() + val now = clock.songTimeMs + recorder.aimSample(now, REST_AIM, REST_AIM) + recorder.advanceTo(now) + if (now >= endMs) finish() + } + + private fun drainInput() { + while (LaneInput.hasEvent) { + val songMs = clock.songTimeAt(LaneInput.timeNs) + if (LaneInput.down) recorder.pressLane(LaneInput.lane, songMs) else recorder.releaseLane(LaneInput.lane, songMs) + LaneInput.next() + } + } + + private fun finish() { + recorder.finish() + clock.pause() + state = State.FINISHED + LOGGER.info("Finished with score {}, max combo {}, lamp {}", judge.score, judge.maxCombo, judge.clearLamp) + } + + override fun close() { + stream.close() + } + + companion object { + private val LOGGER = LoggerFactory.getLogger(Hexium.MOD_ID) + private const val LEAD_IN_MS = 3000.0 + + /** How long after the last note the play stays open. */ + private const val TAIL_MS = 2000.0 + + /** Room for this frame rate without growing during play, on top of the notes' own presses. */ + private const val EXPECTED_SAMPLES_PER_SECOND = 2000 + + /** Calibration sets this later. */ + private const val JUDGEMENT_OFFSET_MS = 0.0 + + /** Aiming arrives with sky notes. Until then the crosshair stays mid-screen, on the same code path. */ + private const val REST_AIM = 0.5f + + /** Reads the chart's own bytes, since a replay is tied to them. Throws [IOException] saying what's wrong. */ + fun load(pack: ChartPack, difficulty: Difficulty): PlaySession { + val bytes = Files.readAllBytes(pack.folder.resolve(ChartValidator.fileName(difficulty))) + val parsed = ChartParser.parseDifficulty(String(bytes, Charsets.UTF_8)) + val chart = parsed.value ?: throw IOException(parsed.issues.first { it.severity == Severity.ERROR }.toString()) + val stream = SongStream.open(pack.folder.resolve(ChartFolder.AUDIO_FILE)) + try { + val problem = ChartValidator.validateChart(chart, stream.lengthMs).firstOrNull { it.severity == Severity.ERROR } + if (problem != null) throw IOException(problem.toString()) + return PlaySession(chart, bytes, stream) + } catch (e: Exception) { + stream.close() + throw e + } + } + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt index bf1d847..cf68b6d 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt @@ -1,18 +1,23 @@ package net.trilleo.hexium.client.screen +import java.io.IOException import net.minecraft.client.gui.components.Button import net.minecraft.client.gui.components.StringWidget import net.minecraft.client.gui.components.Tooltip +import net.minecraft.client.gui.components.toasts.SystemToast import net.minecraft.client.gui.layouts.HeaderAndFooterLayout import net.minecraft.client.gui.layouts.LinearLayout import net.minecraft.client.gui.screens.Screen import net.minecraft.network.chat.CommonComponents import net.minecraft.network.chat.Component import net.trilleo.hexium.client.chart.ChartLibrary +import net.trilleo.hexium.Hexium import net.trilleo.hexium.client.chart.ChartPack +import net.trilleo.hexium.client.play.PlaySession import net.trilleo.hexium.client.session.HexiumSession import net.trilleo.hexium.client.session.StageWorld import net.trilleo.hexium.core.chart.DifficultyChart +import org.slf4j.LoggerFactory /** Hexium's menu, opened from the title screen. A plain list of charts until song select exists. */ class HexiumMenuScreen(private val lastScreen: Screen) : Screen(TITLE) { @@ -80,13 +85,33 @@ class HexiumMenuScreen(private val lastScreen: Screen) : Screen(TITLE) { row.addChild(broken) return row } - for (chart in pack.charts) row.addChild(difficultyButton(chart)) + for (chart in pack.charts) row.addChild(difficultyButton(pack, chart)) return row } - private fun difficultyButton(chart: DifficultyChart): Button { + private fun play(pack: ChartPack, chart: DifficultyChart) { + try { + StageWorld.enter(minecraft, this, PlaySession.load(pack, chart.difficulty)) + } catch (e: IOException) { + cantPlay(pack, chart, e) + } catch (e: RuntimeException) { + cantPlay(pack, chart, e) + } + } + + private fun cantPlay(pack: ChartPack, chart: DifficultyChart, cause: Exception) { + LOGGER.warn("Can't play {} in {}", chart.difficulty, pack.folder, cause) + SystemToast.add( + minecraft.gui.toastManager(), + SystemToast.SystemToastId.PACK_LOAD_FAILURE, + Component.translatable("hexium.menu.cant_play"), + Component.literal(cause.message.orEmpty()), + ) + } + + private fun difficultyButton(pack: ChartPack, chart: DifficultyChart): Button { val difficulty = Component.translatable("hexium.difficulty.${chart.difficulty.name.lowercase()}") - val button = Button.builder(difficulty) { StageWorld.enter(minecraft, this) }.width(DIFFICULTY_WIDTH) + val button = Button.builder(difficulty) { play(pack, chart) }.width(DIFFICULTY_WIDTH) if (!chart.isGroundOnly) button.tooltip(Tooltip.create(Component.translatable("hexium.menu.sky_notes"))) return button.build().also { it.active = chart.isGroundOnly } } @@ -96,6 +121,7 @@ class HexiumMenuScreen(private val lastScreen: Screen) : Screen(TITLE) { } private companion object { + val LOGGER = LoggerFactory.getLogger(Hexium.MOD_ID) val TITLE: Component = Component.translatable("hexium.menu.title") /** How far HeaderAndFooterLayout keeps its contents below the header. */ const val CONTENT_TOP_MARGIN = 30 diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt index ce21de7..0972b2f 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt @@ -1,6 +1,7 @@ package net.trilleo.hexium.client.session import net.minecraft.client.Minecraft +import net.trilleo.hexium.client.play.PlaySession import net.trilleo.hexium.client.screen.StageMenuScreen /** @@ -11,18 +12,32 @@ import net.trilleo.hexium.client.screen.StageMenuScreen object HexiumSession { @Volatile private var active = false + private var play: PlaySession? = null @JvmStatic fun active(): Boolean = active - fun start() { + fun start(play: PlaySession? = null) { active = true + this.play = play + } + + /** The play going on, if this session has one. */ + @JvmStatic + fun play(): PlaySession? = play + + /** Called at the start of every frame, after input arrives. */ + @JvmStatic + fun frame() { + play?.frame() } /** Render thread only. */ fun end() { if (!active) return active = false + play?.close() + play = null StageWorld.restoreView() } diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageWorld.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageWorld.kt index 33d8e41..e2c8c27 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageWorld.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageWorld.kt @@ -35,6 +35,7 @@ import net.minecraft.world.level.levelgen.flat.FlatLevelGeneratorSettings import net.minecraft.world.level.levelgen.presets.WorldPresets import net.minecraft.world.level.storage.LevelStorageSource import net.trilleo.hexium.Hexium +import net.trilleo.hexium.client.play.PlaySession import net.trilleo.hexium.client.screen.HexiumMenuScreen import org.slf4j.LoggerFactory @@ -57,13 +58,14 @@ object StageWorld { * Only the Hexium menu may call this. If the world can't be made, the player ends up on [parent] or, * if Minecraft can't open its folder, the title screen. Either of those ends the session. */ - fun enter(minecraft: Minecraft, parent: Screen) { + fun enter(minecraft: Minecraft, parent: Screen, play: PlaySession) { val folder = FabricLoader.getInstance().gameDir.resolve("hexium").resolve("stages") if (!deleteOldStage(folder.resolve(LEVEL_ID))) { SystemToast.onWorldAccessFailure(minecraft, LEVEL_ID) + play.close() return } - HexiumSession.start() + HexiumSession.start(play) minecraft.musicManager.stopPlaying() setView(minecraft) val settings = LevelSettings( @@ -102,6 +104,7 @@ object StageWorld { * pass of the task queue, since disconnecting waits for the server and draws frames meanwhile. */ fun leave(minecraft: Minecraft) { + HexiumSession.play()?.clock?.pause() minecraft.schedule { minecraft.disconnectFromWorld(ClientLevel.DEFAULT_QUIT_MESSAGE) minecraft.gui.setScreen(HexiumMenuScreen(TitleScreen())) diff --git a/mod/src/client/resources/assets/hexium/lang/en_us.json b/mod/src/client/resources/assets/hexium/lang/en_us.json index 6f507e6..d702020 100644 --- a/mod/src/client/resources/assets/hexium/lang/en_us.json +++ b/mod/src/client/resources/assets/hexium/lang/en_us.json @@ -13,5 +13,15 @@ "hexium.audio_test.resume": "Resume", "hexium.audio_test.rewind": "Back 3 s", "hexium.audio_test.failed": "Can't play the song: %s", - "hexium.stage.leave": "Leave Stage" + "hexium.stage.leave": "Leave Stage", + "hexium.menu.cant_play": "Can't play this chart", + "hexium.play.ready": "Get ready", + "hexium.play.finished": "Finished. Press Esc to leave.", + "hexium.judgement.justice_critical": "Justice Critical", + "hexium.judgement.justice": "Justice", + "hexium.judgement.attack": "Attack", + "hexium.judgement.miss": "Miss", + "hexium.lamp.full_combo": "Full Combo", + "hexium.lamp.all_justice": "All Justice", + "hexium.lamp.all_justice_critical": "All Justice Critical" } diff --git a/mod/src/client/resources/assets/hexium/lang/zh_cn.json b/mod/src/client/resources/assets/hexium/lang/zh_cn.json index c760e7a..2861fcf 100644 --- a/mod/src/client/resources/assets/hexium/lang/zh_cn.json +++ b/mod/src/client/resources/assets/hexium/lang/zh_cn.json @@ -13,5 +13,15 @@ "hexium.audio_test.resume": "继续", "hexium.audio_test.rewind": "后退 3 秒", "hexium.audio_test.failed": "无法播放歌曲:%s", - "hexium.stage.leave": "离开舞台" + "hexium.stage.leave": "离开舞台", + "hexium.menu.cant_play": "无法游玩此谱面", + "hexium.play.ready": "准备", + "hexium.play.finished": "已结束。按 Esc 离开。", + "hexium.judgement.justice_critical": "Justice Critical", + "hexium.judgement.justice": "Justice", + "hexium.judgement.attack": "Attack", + "hexium.judgement.miss": "Miss", + "hexium.lamp.full_combo": "Full Combo", + "hexium.lamp.all_justice": "All Justice", + "hexium.lamp.all_justice_critical": "All Justice Critical" } diff --git a/mod/src/client/resources/hexium.client.mixins.json b/mod/src/client/resources/hexium.client.mixins.json index a8e9801..2da54d2 100644 --- a/mod/src/client/resources/hexium.client.mixins.json +++ b/mod/src/client/resources/hexium.client.mixins.json @@ -7,6 +7,7 @@ "MinecraftMixin", "MouseHandlerMixin", "MusicManagerMixin", + "SDLEventHandlerMixin", "SoundLibraryMixin", "TutorialMixin" ], diff --git a/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt b/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt index 9da70bc..5732a07 100644 --- a/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt +++ b/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt @@ -7,20 +7,32 @@ import net.minecraft.client.Minecraft import net.minecraft.client.gui.screens.TitleScreen import net.minecraft.client.gui.screens.inventory.InventoryScreen import net.minecraft.client.tutorial.TutorialSteps +import net.minecraft.sounds.SoundSource import net.minecraft.world.Difficulty import net.minecraft.world.level.GameType import net.minecraft.world.level.gamerules.GameRules +import net.trilleo.hexium.client.input.LaneInput +import net.trilleo.hexium.client.play.PlaySession import net.trilleo.hexium.client.screen.HexiumMenuScreen import net.trilleo.hexium.client.screen.StageMenuScreen import net.trilleo.hexium.client.session.HexiumSession import net.trilleo.hexium.client.session.StageGeometry +import net.trilleo.hexium.core.chart.Note +import net.trilleo.hexium.core.chart.TimingMap +import net.trilleo.hexium.core.judge.ClearLamp +import net.trilleo.hexium.core.judge.Judgement +import net.trilleo.hexium.core.replay.ReplayJudge +import org.lwjgl.sdl.SDLTimer /** Runs in the real game. See docs/DEVELOPMENT.md. */ class HexiumClientGameTest : FabricClientGameTest { override fun runTest(context: ClientGameTestContext) { context.waitForScreen(TitleScreen::class.java) context.takeScreenshot("title") + // Songs play on a real audio device. Keep them quiet. + context.runOnClient { it.options.getSoundSourceOptionInstance(SoundSource.MASTER).set(0.0) } theStageLocksThePlayerAndLeavesCleanly(context) + aChartPlaysToTheEndAndItsReplayMatches(context) normalWorldsAreUntouched(context) } @@ -112,6 +124,98 @@ class HexiumClientGameTest : FabricClientGameTest { context.waitForScreen(TitleScreen::class.java) } + private fun aChartPlaysToTheEndAndItsReplayMatches(context: ClientGameTestContext) { + context.clickScreenButton("hexium.title_button") + context.waitForScreen(HexiumMenuScreen::class.java) + context.clickScreenButton("hexium.difficulty.basic") + context.waitFor({ HexiumSession.play()?.state == PlaySession.State.PLAYING }, LOAD_TICKS) + val play = HexiumSession.play()!! + pauseAndCheckTimeStops(context, play) + + val script = script(play) + var next = 0 + // Ticks are too coarse to press from, so it presses ahead, stamped with the note's own time, + // the way SDL stamps a real key. So every note should land dead on. + val bot = { song: Double -> + while (next < script.size && script[next].atMs <= song + BOT_LOOKAHEAD_MS) { + val nowNs = SDLTimer.SDL_GetTicksNS() + val aheadMs = script[next].atMs - play.clock.songTimeAt(nowNs) + LaneInput.push(script[next].lane, script[next].down, nowNs + (aheadMs * NANOS_PER_MS).toLong()) + next++ + } + } + context.waitFor({ + bot(play.clock.songTimeMs) + play.clock.songTimeMs >= PAUSE_AT_MS + }, SONG_TICKS) + pauseAndCheckTimeStops(context, play) + context.waitFor({ + bot(play.clock.songTimeMs) + play.state == PlaySession.State.FINISHED + }, SONG_TICKS) + context.takeScreenshot("finished") + context.runOnClient { + val judge = play.judge + check(next == script.size) { "the play ended before the script did" } + check(judge.judgedCount == judge.objectCount) { "${judge.judgedCount} of ${judge.objectCount} judged" } + for (i in 0 until judge.judgedCount) { + val delta = judge.judgedDeltaMs(i) + if (judge.judgedIsPress(i)) check(Math.abs(delta) < MAX_BOT_ERROR_MS) { "a press was $delta ms off" } + } + check(judge.clearLamp == ClearLamp.ALL_JUSTICE_CRITICAL) { "lamp ${judge.clearLamp}, score ${judge.score}" } + check(judge.score == PERFECT_SCORE) { "score ${judge.score}" } + check(judge.count(Judgement.MISS) == 0) { "${judge.count(Judgement.MISS)} Misses from a bot that hit everything" } + check(judge.score > 0) { "no score" } + val replay = play.recorder.toReplay() + check(replay.eventCount > judge.objectCount) { "only ${replay.eventCount} events recorded" } + val again = ReplayJudge.rejudge(play.chartFile, replay).judge!! + check(again.score == judge.score && again.maxCombo == judge.maxCombo) { + "the replay scored ${again.score}, live scored ${judge.score}" + } + } + context.runOnClient { it.pauseGame(false) } + context.waitForScreen(StageMenuScreen::class.java) + context.clickScreenButton("hexium.stage.leave") + context.waitForScreen(HexiumMenuScreen::class.java) + context.clickScreenButton("gui.back") + context.waitForScreen(TitleScreen::class.java) + } + + private fun pauseAndCheckTimeStops(context: ClientGameTestContext, play: PlaySession) { + context.runOnClient { it.pauseGame(false) } + context.waitForScreen(StageMenuScreen::class.java) + context.waitFor({ play.state == PlaySession.State.PAUSED }, SETTLE_TICKS) + val pausedAt = context.computeOnClient { play.clock.songTimeMs } + context.waitTicks(SETTLE_TICKS) + context.runOnClient { + check(play.clock.songTimeMs == pausedAt) { "time moved from $pausedAt to ${play.clock.songTimeMs} while paused" } + } + context.setScreen { null } + context.waitFor({ play.state == PlaySession.State.PLAYING && play.clock.songTimeMs > pausedAt }, SETTLE_TICKS) + } + + private class Press(val atMs: Double, val lane: Int, val down: Boolean) + + /** A bot that plays every note. */ + private fun script(play: PlaySession): List { + val timing = TimingMap(play.chart.offsetMs, play.chart.bpm) + val presses = ArrayList() + for (note in play.chart.notes) { + when (note) { + is Note.Tap -> { + presses += Press(timing.beatToMs(note.t), note.lane, true) + presses += Press(timing.beatToMs(note.t) + TAP_LENGTH_MS, note.lane, false) + } + is Note.Hold -> { + presses += Press(timing.beatToMs(note.t), note.lane, true) + presses += Press(timing.beatToMs(note.end), note.lane, false) + } + else -> error("Sky note in a ground chart") + } + } + return presses.sortedBy { it.atMs } + } + private fun normalWorldsAreUntouched(context: ClientGameTestContext) { context.worldBuilder().create().use { world -> world.connection.waitForChunksRender() @@ -151,5 +255,14 @@ class HexiumClientGameTest : FabricClientGameTest { const val SETTLE_TICKS = 20 const val HOLD_TICKS = 40 const val TURN_PIXELS = 200.0 + const val TAP_LENGTH_MS = 30.0 + const val SONG_TICKS = 1200 + const val BOT_LOOKAHEAD_MS = 120.0 + const val NANOS_PER_MS = 1_000_000.0 + const val MAX_BOT_ERROR_MS = 5.0 + const val PERFECT_SCORE = 1_010_000 + + /** Between notes in basic.json. */ + const val PAUSE_AT_MS = 3250.0 } } From 54fa5bb6c85600d7481048981ada385da34621c8 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Wed, 4 Nov 2026 15:22:06 +0800 Subject: [PATCH 16/34] Feature: Draw the ground track with taps, holds, note speed and a visual offset on the audio clock --- CHANGELOG.md | 3 +- .../trilleo/hexium/core/chart/GroundTrack.kt | 85 +++++++ .../hexium/core/chart/GroundTrackTest.kt | 106 +++++++++ docs/ARCHITECTURE.md | 6 +- docs/DESIGN.md | 4 +- docs/DEVELOPMENT.md | 2 +- .../net/trilleo/hexium/client/HexiumClient.kt | 2 + .../trilleo/hexium/client/play/PlaySession.kt | 31 ++- .../hexium/client/play/PlaySettings.kt | 27 +++ .../hexium/client/play/TrackRenderer.kt | 219 ++++++++++++++++++ .../hexium/client/screen/StageMenuScreen.kt | 28 ++- .../hexium/client/session/StageGeometry.kt | 14 ++ .../resources/assets/hexium/lang/en_us.json | 4 + .../resources/assets/hexium/lang/zh_cn.json | 4 + .../hexium/gametest/HexiumClientGameTest.kt | 66 ++++++ 15 files changed, 591 insertions(+), 10 deletions(-) create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/chart/GroundTrack.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/chart/GroundTrackTest.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySettings.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/play/TrackRenderer.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index 971787d..415552f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,8 @@ + Ground charts can now be played: press A S D F (the same positions on any keyboard layout) in time with the song, with combo, judgement and score on screen. + Presses are timed from when the key went down, not when the game got round to it. - + The notes themselves aren't drawn yet, so for now it's played by ear. + + Taps and holds come down the four lanes to a judgement line, with each lane lighting up while its key is down. + + The pause screen sets the note speed, which changes how far away notes appear but never their timing, and a visual offset, which shifts where notes are drawn relative to the music. These reset when you quit the game for now. + Added the stage: a plain floor you stand on, kept apart from your normal worlds. + You can look around, but moving, jumping and action keys are off while you're on it. + The hunger bar is hidden. diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/GroundTrack.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/GroundTrack.kt new file mode 100644 index 0000000..d3f28a5 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/GroundTrack.kt @@ -0,0 +1,85 @@ +package net.trilleo.hexium.core.chart + +/** + * A chart's taps and holds in time order, in song milliseconds, for drawing. Lookups don't allocate, so + * they're safe in per-frame code, and keep no position of their own, so time can jump either way. + * + * Expects a chart that passed the validator. + */ +class GroundTrack(chart: DifficultyChart) { + private class Entry(val startMs: Double, val endMs: Double, val lane: Int, val chartNote: Int, val isHold: Boolean) + + private val chartNotes: IntArray + private val lanes: IntArray + private val starts: DoubleArray + private val ends: DoubleArray + private val holds: BooleanArray + + /** The latest end among each note and all before it. It always rises, so it can be searched. */ + private val endsSoFar: DoubleArray + + init { + val timing = TimingMap(chart.offsetMs, chart.bpm) + val entries = ArrayList() + for (i in chart.notes.indices) { + when (val note = chart.notes[i]) { + is Note.Tap -> { + val ms = timing.beatToMs(note.t) + entries += Entry(ms, ms, note.lane, i, false) + } + is Note.Hold -> entries += Entry(timing.beatToMs(note.t), timing.beatToMs(note.end), note.lane, i, true) + else -> {} + } + } + entries.sortWith(compareBy { it.startMs }) + chartNotes = IntArray(entries.size) { entries[it].chartNote } + lanes = IntArray(entries.size) { entries[it].lane } + starts = DoubleArray(entries.size) { entries[it].startMs } + ends = DoubleArray(entries.size) { entries[it].endMs } + holds = BooleanArray(entries.size) { entries[it].isHold } + endsSoFar = DoubleArray(entries.size) + var latest = Double.NEGATIVE_INFINITY + for (i in entries.indices) { + if (ends[i] > latest) latest = ends[i] + endsSoFar[i] = latest + } + } + + val size: Int + get() = starts.size + + fun lane(index: Int): Int = lanes[index] + + /** The note's index in the chart's notes, which is what the judge reports. */ + fun chartNote(index: Int): Int = chartNotes[index] + + fun startMs(index: Int): Double = starts[index] + + /** A tap ends when it starts. */ + fun endMs(index: Int): Double = ends[index] + + fun isHold(index: Int): Boolean = holds[index] + + /** Every note before this index ended before [timeMs]. It's [size] if they all did. */ + fun firstEndingFrom(timeMs: Double): Int { + var low = 0 + var high = endsSoFar.size + while (low < high) { + val middle = (low + high) ushr 1 + if (endsSoFar[middle] < timeMs) low = middle + 1 else high = middle + } + return low + } + + companion object { + /** Offset A in docs/JUDGEMENT.md: a positive offset draws notes later. */ + fun drawTimeMs(songMs: Double, visualOffsetMs: Double): Double = songMs - visualOffsetMs + + /** + * How many blocks a time on a note is up the lane from the judgement line. Negative is past it. + * Speed only changes how far away a note appears, never when it arrives. + */ + fun distance(noteMs: Double, drawMs: Double, blocksPerSecond: Double): Double = + (noteMs - drawMs) * blocksPerSecond / 1000.0 + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/GroundTrackTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/GroundTrackTest.kt new file mode 100644 index 0000000..38f1eaa --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/GroundTrackTest.kt @@ -0,0 +1,106 @@ +package net.trilleo.hexium.core.chart + +import kotlin.test.Test +import kotlin.test.assertEquals + +class GroundTrackTest { + private val tolerance = 1e-9 + + private fun beat(whole: Int) = Beat(whole, 0, 1) + + /** At 120 BPM a beat is 500 ms. */ + private fun track(vararg notes: Note, offsetMs: Double = 0.0) = GroundTrack( + DifficultyChart(1, Difficulty.BASIC, 1, 4, offsetMs, listOf(BpmChange(beat(0), 120.0)), listOf(MeterChange(beat(0), 4, 4)), notes.toList()), + ) + + @Test + fun aTapStartsAndEndsOnItsOwnTimeInItsOwnLane() { + val track = track(Note.Tap(beat(2), 3), offsetMs = 100.0) + assertEquals(1, track.size) + assertEquals(3, track.lane(0)) + assertEquals(1100.0, track.startMs(0), tolerance) + assertEquals(1100.0, track.endMs(0), tolerance) + assertEquals(false, track.isHold(0)) + } + + @Test + fun aHoldRunsFromItsStartToItsEnd() { + val track = track(Note.Hold(beat(1), beat(5), 2)) + assertEquals(500.0, track.startMs(0), tolerance) + assertEquals(2500.0, track.endMs(0), tolerance) + assertEquals(true, track.isHold(0)) + } + + @Test + fun notesAreInTimeOrderAndRememberTheirPlaceInTheChart() { + val track = track(Note.Tap(beat(3), 0), Note.Tap(beat(1), 1), Note.Hold(beat(2), beat(4), 2)) + assertEquals(listOf(500.0, 1000.0, 1500.0), List(track.size) { track.startMs(it) }) + assertEquals(listOf(1, 2, 0), List(track.size) { track.chartNote(it) }) + } + + @Test + fun skyNotesAreNotOnTheTrackButKeepTheCountOfTheChart() { + val track = track(Note.SkyTap(beat(1), 0.5, 0.5, SkyButton.L, 1.0), Note.Tap(beat(2), 0)) + assertEquals(1, track.size) + assertEquals(1, track.chartNote(0)) + } + + @Test + fun theFirstNoteStillGoingIsFoundFromAnyTime() { + val track = track(Note.Tap(beat(1), 0), Note.Tap(beat(2), 0), Note.Tap(beat(3), 0)) + assertEquals(0, track.firstEndingFrom(-5000.0)) + assertEquals(0, track.firstEndingFrom(500.0)) + assertEquals(1, track.firstEndingFrom(500.5)) + assertEquals(2, track.firstEndingFrom(1500.0)) + assertEquals(3, track.firstEndingFrom(1500.5)) + } + + @Test + fun aLongHoldKeepsTheSearchFromSkippingIt() { + val track = track(Note.Hold(beat(1), beat(100), 0), Note.Tap(beat(2), 1), Note.Tap(beat(3), 1)) + assertEquals(0, track.firstEndingFrom(2000.0)) + assertEquals(0, track.firstEndingFrom(50000.0)) + assertEquals(3, track.firstEndingFrom(50000.5)) + } + + @Test + fun anEmptyTrackHasNothingToFind() { + assertEquals(0, track().firstEndingFrom(0.0)) + } + + @Test + fun aBpmChangeMovesTheNotesAfterIt() { + val chart = DifficultyChart( + 1, Difficulty.BASIC, 1, 4, 0.0, + listOf(BpmChange(beat(0), 120.0), BpmChange(beat(2), 60.0)), + listOf(MeterChange(beat(0), 4, 4)), + listOf(Note.Hold(beat(1), beat(3), 0)), + ) + val track = GroundTrack(chart) + assertEquals(500.0, track.startMs(0), tolerance) + assertEquals(2000.0, track.endMs(0), tolerance) + } + + @Test + fun aPositiveVisualOffsetDrawsANoteLater() { + val drawMs = GroundTrack.drawTimeMs(1000.0, 100.0) + assertEquals(900.0, drawMs, tolerance) + assertEquals(4.0, GroundTrack.distance(1000.0, drawMs, 40.0), tolerance) + } + + @Test + fun aNoteIsOnTheLineExactlyAtItsTime() { + assertEquals(0.0, GroundTrack.distance(1000.0, 1000.0, 40.0), tolerance) + } + + @Test + fun aNoteAheadIsFurtherAwayTheFasterTheSpeed() { + assertEquals(20.0, GroundTrack.distance(1500.0, 1000.0, 40.0), tolerance) + assertEquals(40.0, GroundTrack.distance(1500.0, 1000.0, 80.0), tolerance) + } + + @Test + fun aNotePastItsTimeIsOnThePlayersSideOfTheLine() { + assertEquals(-4.0, GroundTrack.distance(1000.0, 1100.0, 40.0), tolerance) + } +} diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 42d16dd..822431b 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -58,8 +58,10 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl ## Rendering -- Hook Fabric's world-render event for 26.3 (check the exact name in Fabric's 26.x docs, since rendering APIs changed). Draw only notes inside the visible time window. -- Notes are block models (note block styles per type) batched into one vertex buffer per frame. Hold bodies are stretched quads, slide paths are ribbons, and the screen is a translucent pane with a frame. +- `TrackRenderer` draws through Fabric's `LevelRenderEvents.COLLECT_SUBMITS` and `submitCustomGeometry`, never raw OpenGL, since 26.3 can run on Vulkan. Only notes inside the visible time window are drawn: `GroundTrack` in `core` holds them in time order and finds where to start, and every position is worked out fresh from draw time, so a note can't drift from the clock. A note's distance up the lane is `(note time − draw time) × note speed`, and speed never changes when it arrives. +- For now the render type doesn't write depth and, with classic transparency, sorts quads by their centres, so a long floor quad could paint over a note behind its middle. So the floor, hold bodies and notes are each submitted in their own order, which are drawn in turn, and a note only emits the faces the camera can see. Improved transparency (the Fabulous preset) draws these on a different path; the game test takes a screenshot of it to check by eye. A note goes once the judge has its head, and a hold's body stops at the line, shortening as it plays. Vertices are relative to the camera on an untransformed pose, as vanilla's entities are, so no matrix is applied per vertex. +- Notes are plain coloured cuboids until Milestone 5 brings block models (note block styles per type). Hold bodies are stretched quads, slide paths will be ribbons, and the screen will be a translucent pane with a frame. +- Note speed and visual offset A live in `PlaySettings`, changed from the pause screen. They reach only `TrackRenderer`, so the judge and replays never see them. - Hit effects are client-only particles and a short sound, with a hit-sound volume setting. - Performance budget: 240 FPS with 300 notes on screen on a mid-range GPU. Add a debug overlay showing clock drift, frame time and input-to-judgement delay from Milestone 2. diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 8b08130..91e5eb1 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -35,9 +35,9 @@ Everything is judged on one plane: the transparent screen in front of the player - The player is locked on the stand spot (the red circle), in adventure mode. Movement, jumping, sneaking, hotbar and inventory keys are suppressed during play. The hunger bar is hidden. - Screen plane: 8 blocks in front of the player's eyes, about 12 blocks wide and 6 tall, with its bottom edge on the floor. -- Ground lanes: 4 lanes lie on the floor and run away from the player past the screen into the distance. Notes spawn far down the lanes and slide toward the bottom edge of the screen. +- Ground lanes: 4 lanes, each 2 blocks wide, lie on the floor and run from the player past the screen, 64 blocks beyond it, into the distance. Notes spawn far down the lanes and slide toward the bottom edge of the screen. - Sky notes: they fly straight toward the screen along the depth axis, visible through it, and are judged when they reach their (x, y) spot on the screen. -- Note speed ("HiSpeed") is a player setting. It changes how far away notes appear, never their timing. +- Note speed ("HiSpeed") is a player setting in blocks per second, 25 by default. It changes how far away notes appear, never their timing. - Rest view: centred on the screen with the whole ground track visible. Yaw and pitch are clamped to the screen's edges plus a small margin, so the player can't spin away. ### Note types diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 8eeba4d..a789546 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -76,7 +76,7 @@ Parallel lanes that work well: after Milestone 1, `server` can build auth and ch - **`core` unit tests:** one file of synthetic input per rule in `docs/JUDGEMENT.md`. For example: "tap 20 ms late → Justice Critical", "hold released 120 ms before a tick → Attack on that tick", "slide with crosshair outside radius → Miss on those ticks", "flick too slow → no hit". - **Golden replays:** replays with their known scores live in `core/src/test/resources/golden`. Any change to the judge must keep them identical, or update them on purpose in the same PR (and raise `JudgementConfig.JUDGE_VERSION`). So far they come from scripted players, with scores worked out by hand in `GoldenReplayTest`. Real recorded plays join them from Milestone 2. Editing an example chart changes its hash, so its golden replays must be regenerated too. - **Property tests (jqwik):** shifting every input by the judgement offset B leaves the score unchanged when B is set to match. A steady straight swipe gets the same judgement at every frame rate (other results can differ by what one frame's sampling can, see [JUDGEMENT.md](JUDGEMENT.md)). Random input never breaks the judge, and its replay always gives the same results. -- **Fabric client game tests:** the title button opens the menu; the menu loads the stage; the stage holds the player still and blocks action keys while the camera still turns; leaving ends the session; joining a normal singleplayer world creates no session and the player can move; a bot plays a short chart to the end, pausing twice, with no Misses, and its replay re-judges to the same result. The bot pushes into `LaneInput` directly, so real key presses through SDL need a human. A button that disconnects must do it through the task queue (`StageWorld.leave` shows how): the test framework defers a disconnect made while handling a click, so the test would see a different order of events from the real game. +- **Fabric client game tests:** the title button opens the menu; the menu loads the stage; the stage holds the player still and blocks action keys while the camera still turns; leaving ends the session; joining a normal singleplayer world creates no session and the player can move; a bot plays a short chart to the end, pausing twice and changing the note speed, with notes drawn on the way and no Misses, and its replay re-judges to the same result; the track is never drawn in a normal world. The bot pushes into `LaneInput` directly, so real key presses through SDL need a human. A button that disconnects must do it through the task queue (`StageWorld.leave` shows how): the test framework defers a disconnect made while handling a click, so the test would see a different order of events from the real game. - **Human playtest checklist per milestone:** offset calibration feels right; no drift after a 3-minute song; ground track readable while aiming at the corners; hold, slide and flick feel fair. ### Checking the clock diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt index b5a8b68..ec9d05b 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt @@ -3,6 +3,7 @@ package net.trilleo.hexium.client import net.fabricmc.api.ClientModInitializer import net.trilleo.hexium.Hexium import net.trilleo.hexium.client.play.PlayHud +import net.trilleo.hexium.client.play.TrackRenderer import net.trilleo.hexium.client.screen.TitleScreenButton import net.trilleo.hexium.client.session.StageHud import net.trilleo.hexium.client.session.StageWorld @@ -16,6 +17,7 @@ object HexiumClient : ClientModInitializer { StageWorld.registerEvents() StageHud.register() PlayHud.register() + TrackRenderer.register() LOGGER.info("Hexium loaded") } } diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt index 70072ca..638fc40 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt @@ -14,6 +14,7 @@ import net.trilleo.hexium.core.chart.ChartParser import net.trilleo.hexium.core.chart.ChartValidator import net.trilleo.hexium.core.chart.Difficulty import net.trilleo.hexium.core.chart.DifficultyChart +import net.trilleo.hexium.core.chart.GroundTrack import net.trilleo.hexium.core.chart.Severity import net.trilleo.hexium.core.judge.Judge import net.trilleo.hexium.core.judge.JudgeChart @@ -35,7 +36,11 @@ class PlaySession private constructor( val judgeChart: JudgeChart = JudgeChart.compile(chart) val clock = AudioClock(stream) val recorder = ReplayRecorder(judgeChart, Replay.hashOf(chartFile), JUDGEMENT_OFFSET_MS, expectedEvents()) + val track = GroundTrack(chart) private val endMs = chart.lastNoteEndMs() + TAIL_MS + private val headJudged = BooleanArray(chart.notes.size) + private var judgedSeen = 0 + private val laneDown = BooleanArray(chart.laneCount) var state = State.WAITING_FOR_STAGE private set @@ -46,6 +51,15 @@ class PlaySession private constructor( val acceptingInput: Boolean get() = state == State.PLAYING || state == State.PAUSED + /** False until the clock has its first time, when there's nothing right to draw. */ + val notesMoving: Boolean + get() = state != State.WAITING_FOR_STAGE + + /** True once a tap or hold head, by its index in the chart's notes, has been judged. A hold's ticks don't count. */ + fun isHeadJudged(chartNote: Int): Boolean = headJudged[chartNote] + + fun isLaneDown(lane: Int): Boolean = laneDown[lane] + private fun expectedEvents(): Int { val seconds = (stream.lengthMs + LEAD_IN_MS + TAIL_MS) / 1000.0 return (seconds * EXPECTED_SAMPLES_PER_SECOND).toInt() + judgeChart.objectCount * 2 @@ -75,18 +89,30 @@ class PlaySession private constructor( } clock.update() drainInput() - if (state != State.PLAYING) return + if (state != State.PLAYING) { + readResults() + return + } // Vanilla lowers the frame rate after a minute with no input it can see, and lane keys never reach it. minecraft.framerateLimitTracker.onInputReceived() val now = clock.songTimeMs recorder.aimSample(now, REST_AIM, REST_AIM) recorder.advanceTo(now) + readResults() if (now >= endMs) finish() } + private fun readResults() { + while (judgedSeen < judge.judgedCount) { + if (judge.judgedIsPress(judgedSeen)) headJudged[judge.judgedNote(judgedSeen)] = true + judgedSeen++ + } + } + private fun drainInput() { while (LaneInput.hasEvent) { val songMs = clock.songTimeAt(LaneInput.timeNs) + laneDown[LaneInput.lane] = LaneInput.down if (LaneInput.down) recorder.pressLane(LaneInput.lane, songMs) else recorder.releaseLane(LaneInput.lane, songMs) LaneInput.next() } @@ -94,6 +120,9 @@ class PlaySession private constructor( private fun finish() { recorder.finish() + readResults() + // Input stops here, so a release would never arrive. + laneDown.fill(false) clock.pause() state = State.FINISHED LOGGER.info("Finished with score {}, max combo {}, lamp {}", judge.score, judge.maxCombo, judge.clearLamp) diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySettings.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySettings.kt new file mode 100644 index 0000000..0115584 --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySettings.kt @@ -0,0 +1,27 @@ +package net.trilleo.hexium.client.play + +/** The player's view settings. Changed from the pause screen, and forgotten on quitting for now. */ +object PlaySettings { + const val DEFAULT_NOTE_SPEED = 25 + private const val MIN_NOTE_SPEED = 10 + private const val MAX_NOTE_SPEED = 120 + private const val NOTE_SPEED_STEP = 5 + private const val MAX_VISUAL_OFFSET_MS = 500 + private const val VISUAL_OFFSET_STEP_MS = 5 + + /** Blocks per second. It changes how far away notes appear, never when they arrive. */ + var noteSpeed = DEFAULT_NOTE_SPEED + private set + + /** Offset A in docs/JUDGEMENT.md. Positive draws notes later. Judging doesn't see it. */ + var visualOffsetMs = 0 + private set + + fun changeNoteSpeed(steps: Int) { + noteSpeed = (noteSpeed + steps * NOTE_SPEED_STEP).coerceIn(MIN_NOTE_SPEED, MAX_NOTE_SPEED) + } + + fun changeVisualOffset(steps: Int) { + visualOffsetMs = (visualOffsetMs + steps * VISUAL_OFFSET_STEP_MS).coerceIn(-MAX_VISUAL_OFFSET_MS, MAX_VISUAL_OFFSET_MS) + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/play/TrackRenderer.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/play/TrackRenderer.kt new file mode 100644 index 0000000..53aee3b --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/play/TrackRenderer.kt @@ -0,0 +1,219 @@ +package net.trilleo.hexium.client.play + +import com.mojang.blaze3d.vertex.VertexConsumer +import net.fabricmc.fabric.api.client.rendering.v1.level.LevelRenderContext +import net.fabricmc.fabric.api.client.rendering.v1.level.LevelRenderEvents +import net.minecraft.client.Minecraft +import net.minecraft.client.renderer.SubmitNodeCollector +import net.minecraft.client.renderer.rendertype.RenderTypes +import net.trilleo.hexium.client.session.HexiumSession +import net.trilleo.hexium.client.session.StageGeometry +import net.trilleo.hexium.core.chart.GroundTrack + +/** + * Draws the ground track, in world space, from the audio clock. Positions are worked out fresh from the + * time each frame, so nothing here can drift, and the geometry callbacks are made once and reused. + * + * With classic transparency this render type doesn't write depth and sorts its quads by their centres, + * so long floor quads would paint over notes behind their middle. Each layer is submitted in its own + * order, drawn in turn. Improved transparency takes another path, which the game test screenshots. + */ +object TrackRenderer { + private const val FLOOR_ORDER = 1 + private const val BODY_ORDER = 2 + private const val NOTE_ORDER = 3 + + private const val FLOOR_LIFT = 0.01 + private const val LINE_LIFT = 0.02 + private const val BODY_LIFT = 0.04 + private const val DIVIDER_WIDTH = 0.06 + private const val LINE_DEPTH = 0.3 + private const val NOTE_WIDTH = 1.7 + private const val NOTE_DEPTH = 0.8 + private const val NOTE_HEIGHT = 0.4 + private const val BODY_WIDTH = 1.3 + private const val GLOW_LENGTH = 16.0 + + /** The last stretch of the track, where notes fade in instead of popping up. */ + private const val FADE_LENGTH = 10.0 + + /** A note stays this long after its Attack window, so it's judged before it goes. */ + private const val KEEP_AFTER_WINDOW_MS = 100.0 + + private const val LANE_LIGHT = 0x1CFFFFFF + private const val LANE_DARK = 0x0CFFFFFF + private const val DIVIDER = 0x70FFFFFF + private const val LINE = 0xFFFFD040.toInt() + private const val GLOW = 0x60FFD040 + private const val BODY = 0x5C30E0C0 + private const val BODY_HELD = 0xB040FFD8.toInt() + private const val TAP_TOP = 0xFFF2F6FF.toInt() + private const val TAP_FRONT = 0xFFB4BED8.toInt() + private const val TAP_SIDE = 0xFF8C96B0.toInt() + private const val HEAD_TOP = 0xFF40FFD8.toInt() + private const val HEAD_FRONT = 0xFF20B898.toInt() + private const val HEAD_SIDE = 0xFF18907A.toInt() + + private var cameraX = 0.0 + private var cameraY = 0.0 + private var cameraZ = 0.0 + private var floorY = 0.0 + private var songMs = 0.0 + private var drawMs = 0.0 + private var blocksPerSecond = 0.0 + + /** For the game test: how many frames were drawn, and how many taps and hold heads the last one had. */ + var framesDrawn = 0L + private set + var notesDrawn = 0 + private set + + private val floorLayer = SubmitNodeCollector.CustomGeometryRenderer { _, buffer -> HexiumSession.play()?.let { drawFloor(it, buffer) } } + private val bodyLayer = SubmitNodeCollector.CustomGeometryRenderer { _, buffer -> HexiumSession.play()?.let { drawBodies(it, buffer) } } + private val noteLayer = SubmitNodeCollector.CustomGeometryRenderer { _, buffer -> HexiumSession.play()?.let { drawNotes(it, buffer) } } + + fun register() { + LevelRenderEvents.COLLECT_SUBMITS.register(::collect) + } + + private fun collect(context: LevelRenderContext) { + if (!HexiumSession.active()) return + val play = HexiumSession.play() ?: return + val level = Minecraft.getInstance().level ?: return + val camera = context.levelState().cameraRenderState.pos + cameraX = camera.x + cameraY = camera.y + cameraZ = camera.z + floorY = (level.minY + StageGeometry.FLOOR_THICKNESS).toDouble() + songMs = play.clock.songTimeMs + drawMs = GroundTrack.drawTimeMs(songMs, PlaySettings.visualOffsetMs.toDouble()) + blocksPerSecond = PlaySettings.noteSpeed.toDouble() + val collector = context.submitNodeCollector() + val pose = context.poseStack() + val type = RenderTypes.debugQuads() + collector.order(FLOOR_ORDER).submitCustomGeometry(pose, type, floorLayer) + if (!play.notesMoving) return + collector.order(BODY_ORDER).submitCustomGeometry(pose, type, bodyLayer) + collector.order(NOTE_ORDER).submitCustomGeometry(pose, type, noteLayer) + } + + private fun drawFloor(play: PlaySession, buffer: VertexConsumer) { + framesDrawn++ + val laneCount = play.chart.laneCount + val near = -StageGeometry.TRACK_BEFORE_LINE + val far = StageGeometry.TRACK_LENGTH + for (lane in 0 until laneCount) { + val centre = StageGeometry.laneCentreX(lane, laneCount) + val half = StageGeometry.LANE_WIDTH / 2.0 + val color = if (lane % 2 == 0) LANE_LIGHT else LANE_DARK + flat(buffer, centre, half, near, far, FLOOR_LIFT, color, color and 0xFFFFFF) + if (play.isLaneDown(lane)) flat(buffer, centre, half, 0.0, GLOW_LENGTH, FLOOR_LIFT, GLOW, GLOW and 0xFFFFFF) + flat(buffer, centre + half, DIVIDER_WIDTH / 2.0, near, far, FLOOR_LIFT, DIVIDER, DIVIDER and 0xFFFFFF) + } + flat(buffer, StageGeometry.laneCentreX(laneCount - 1, laneCount) - StageGeometry.LANE_WIDTH / 2.0, DIVIDER_WIDTH / 2.0, near, far, FLOOR_LIFT, DIVIDER, DIVIDER and 0xFFFFFF) + flat(buffer, StageGeometry.STAND_X, laneCount * StageGeometry.LANE_WIDTH / 2.0, -LINE_DEPTH / 2.0, LINE_DEPTH / 2.0, LINE_LIFT, LINE, LINE) + } + + private fun drawBodies(play: PlaySession, buffer: VertexConsumer) { + val track = play.track + val laneCount = play.chart.laneCount + var i = track.firstEndingFrom(drawMs) + while (i < track.size) { + val start = GroundTrack.distance(track.startMs(i), drawMs, blocksPerSecond) + if (start > StageGeometry.TRACK_LENGTH) break + if (track.isHold(i)) { + // A body runs down to the line and stops there, shortening as it's played. + val near = maxOf(start, 0.0) + val far = minOf(GroundTrack.distance(track.endMs(i), drawMs, blocksPerSecond), StageGeometry.TRACK_LENGTH) + if (far > near) { + val lane = track.lane(i) + val color = if (start <= 0.0 && play.isLaneDown(lane)) BODY_HELD else BODY + val x = StageGeometry.laneCentreX(lane, laneCount) + // Split where the fade starts, or it would spread down the whole of a long body. + val fadeStart = StageGeometry.TRACK_LENGTH - FADE_LENGTH + if (near < fadeStart && far > fadeStart) { + flat(buffer, x, BODY_WIDTH / 2.0, near, fadeStart, BODY_LIFT, color, color) + flat(buffer, x, BODY_WIDTH / 2.0, fadeStart, far, BODY_LIFT, color, faded(color, far)) + } else { + flat(buffer, x, BODY_WIDTH / 2.0, near, far, BODY_LIFT, faded(color, near), faded(color, far)) + } + } + } + i++ + } + } + + private fun drawNotes(play: PlaySession, buffer: VertexConsumer) { + val track = play.track + val laneCount = play.chart.laneCount + // The judge works in song time and notes are drawn in draw time, so keep a note for whichever is behind. + val config = play.judgeChart.config + val oldest = minOf(drawMs, songMs) - maxOf(config.attackMs, config.easyAttackMs) - KEEP_AFTER_WINDOW_MS + var drawn = 0 + var i = track.firstEndingFrom(oldest) + while (i < track.size) { + val distance = GroundTrack.distance(track.startMs(i), drawMs, blocksPerSecond) + if (distance > StageGeometry.TRACK_LENGTH) break + // Only a hold can leave its start behind and still be here. + if (track.startMs(i) >= oldest && distance >= -StageGeometry.TRACK_BEFORE_LINE && !play.isHeadJudged(track.chartNote(i))) { + val x = StageGeometry.laneCentreX(track.lane(i), laneCount) + if (track.isHold(i)) block(buffer, x, distance, HEAD_TOP, HEAD_FRONT, HEAD_SIDE) else block(buffer, x, distance, TAP_TOP, TAP_FRONT, TAP_SIDE) + drawn++ + } + i++ + } + notesDrawn = drawn + } + + /** A note's alpha at [distance] up the track. */ + private fun faded(color: Int, distance: Double): Int { + val left = (StageGeometry.TRACK_LENGTH - distance) / FADE_LENGTH + if (left >= 1.0) return color + val alpha = ((color ushr 24) * left.coerceAtLeast(0.0)).toInt() + return (alpha shl 24) or (color and 0xFFFFFF) + } + + /** A flat quad along the track, from [near] to [far] up it, with each end's colour. */ + private fun flat(buffer: VertexConsumer, x: Double, halfWidth: Double, near: Double, far: Double, lift: Double, nearColor: Int, farColor: Int) { + val left = (x + halfWidth - cameraX).toFloat() + val right = (x - halfWidth - cameraX).toFloat() + val y = (floorY + lift - cameraY).toFloat() + val nearZ = (StageGeometry.JUDGEMENT_Z + near - cameraZ).toFloat() + val farZ = (StageGeometry.JUDGEMENT_Z + far - cameraZ).toFloat() + buffer.addVertex(left, y, nearZ).setColor(nearColor) + buffer.addVertex(right, y, nearZ).setColor(nearColor) + buffer.addVertex(right, y, farZ).setColor(farColor) + buffer.addVertex(left, y, farZ).setColor(farColor) + } + + /** A note centred on [distance]. Only the faces the camera can see, since nothing here writes depth. */ + private fun block(buffer: VertexConsumer, x: Double, distance: Double, top: Int, front: Int, side: Int) { + val left = (x + NOTE_WIDTH / 2.0 - cameraX).toFloat() + val right = (x - NOTE_WIDTH / 2.0 - cameraX).toFloat() + val low = (floorY + BODY_LIFT - cameraY).toFloat() + val high = (floorY + BODY_LIFT + NOTE_HEIGHT - cameraY).toFloat() + val nearZ = (StageGeometry.JUDGEMENT_Z + distance - NOTE_DEPTH / 2.0 - cameraZ).toFloat() + val farZ = (StageGeometry.JUDGEMENT_Z + distance + NOTE_DEPTH / 2.0 - cameraZ).toFloat() + val topColor = faded(top, distance) + val frontColor = faded(front, distance) + val sideColor = faded(side, distance) + if (left < 0f) quad(buffer, left, low, nearZ, left, high, nearZ, left, high, farZ, left, low, farZ, sideColor) + if (right > 0f) quad(buffer, right, low, nearZ, right, high, nearZ, right, high, farZ, right, low, farZ, sideColor) + if (nearZ > 0f) quad(buffer, left, low, nearZ, right, low, nearZ, right, high, nearZ, left, high, nearZ, frontColor) + quad(buffer, left, high, nearZ, right, high, nearZ, right, high, farZ, left, high, farZ, topColor) + } + + private fun quad( + buffer: VertexConsumer, + x0: Float, y0: Float, z0: Float, + x1: Float, y1: Float, z1: Float, + x2: Float, y2: Float, z2: Float, + x3: Float, y3: Float, z3: Float, + color: Int, + ) { + buffer.addVertex(x0, y0, z0).setColor(color) + buffer.addVertex(x1, y1, z1).setColor(color) + buffer.addVertex(x2, y2, z2).setColor(color) + buffer.addVertex(x3, y3, z3).setColor(color) + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/StageMenuScreen.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/StageMenuScreen.kt index 89d16cb..0205e2e 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/StageMenuScreen.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/StageMenuScreen.kt @@ -4,6 +4,7 @@ import net.minecraft.client.gui.GuiGraphicsExtractor import net.minecraft.client.gui.components.Button import net.minecraft.client.gui.screens.Screen import net.minecraft.network.chat.Component +import net.trilleo.hexium.client.play.PlaySettings import net.trilleo.hexium.client.session.StageWorld /** What Esc opens on the stage, in place of vanilla's pause menu. */ @@ -17,19 +18,40 @@ class StageMenuScreen : Screen(Component.translatable("menu.paused")) { ) addRenderableWidget( Button.builder(Component.translatable("hexium.stage.leave")) { StageWorld.leave(minecraft) } - .bounds(x, y + BUTTON_HEIGHT + GAP, BUTTON_WIDTH, BUTTON_HEIGHT).build(), + .bounds(x, y + ROW, BUTTON_WIDTH, BUTTON_HEIGHT).build(), + ) + addStepButtons(y + 2 * ROW + GROUP_GAP) { PlaySettings.changeNoteSpeed(it) } + addStepButtons(y + 3 * ROW + GROUP_GAP) { PlaySettings.changeVisualOffset(it) } + } + + private fun addStepButtons(y: Int, change: (Int) -> Unit) { + val x = width / 2 - BUTTON_WIDTH / 2 + addRenderableWidget( + Button.builder(Component.translatable("hexium.stage.less")) { change(-1) } + .bounds(x, y, BUTTON_HEIGHT, BUTTON_HEIGHT).build(), + ) + addRenderableWidget( + Button.builder(Component.translatable("hexium.stage.more")) { change(1) } + .bounds(x + BUTTON_WIDTH - BUTTON_HEIGHT, y, BUTTON_HEIGHT, BUTTON_HEIGHT).build(), ) } override fun extractRenderState(graphics: GuiGraphicsExtractor, mouseX: Int, mouseY: Int, a: Float) { super.extractRenderState(graphics, mouseX, mouseY, a) - graphics.centeredText(font, title, width / 2, height / 2 - BUTTON_HEIGHT - TITLE_ABOVE, TEXT_COLOR) + val y = height / 2 - BUTTON_HEIGHT + graphics.centeredText(font, title, width / 2, y - TITLE_ABOVE, TEXT_COLOR) + val noteSpeed = Component.translatable("hexium.stage.note_speed", PlaySettings.noteSpeed) + graphics.centeredText(font, noteSpeed, width / 2, y + 2 * ROW + GROUP_GAP + LABEL_DOWN, TEXT_COLOR) + val visualOffset = Component.translatable("hexium.stage.visual_offset", PlaySettings.visualOffsetMs) + graphics.centeredText(font, visualOffset, width / 2, y + 3 * ROW + GROUP_GAP + LABEL_DOWN, TEXT_COLOR) } private companion object { const val BUTTON_WIDTH = 200 const val BUTTON_HEIGHT = 20 - const val GAP = 4 + const val ROW = 24 + const val GROUP_GAP = 8 + const val LABEL_DOWN = 6 const val TITLE_ABOVE = 20 const val TEXT_COLOR = -1 } diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt index 199d759..97f9920 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt @@ -13,4 +13,18 @@ object StageGeometry { /** Looking at the middle of the screen, 3 blocks up and 8 away, from eyes 1.62 up. */ const val REST_PITCH = -9.8f + + /** Where the screen's bottom edge is, 8 blocks in front of the player. */ + const val JUDGEMENT_Z = STAND_Z + 8.0 + + const val LANE_WIDTH = 2.0 + + /** How far up the lanes the track runs from the judgement line. Notes appear at the far end. */ + const val TRACK_LENGTH = 64.0 + + /** How far the track carries on past the line, so a late note still has floor under it. */ + const val TRACK_BEFORE_LINE = 4.0 + + /** Facing +Z, the player's left is +X, so the first lane is on that side. */ + fun laneCentreX(lane: Int, laneCount: Int): Double = STAND_X + ((laneCount - 1) / 2.0 - lane) * LANE_WIDTH } diff --git a/mod/src/client/resources/assets/hexium/lang/en_us.json b/mod/src/client/resources/assets/hexium/lang/en_us.json index d702020..d7c76f6 100644 --- a/mod/src/client/resources/assets/hexium/lang/en_us.json +++ b/mod/src/client/resources/assets/hexium/lang/en_us.json @@ -14,6 +14,10 @@ "hexium.audio_test.rewind": "Back 3 s", "hexium.audio_test.failed": "Can't play the song: %s", "hexium.stage.leave": "Leave Stage", + "hexium.stage.note_speed": "Note Speed: %s", + "hexium.stage.visual_offset": "Visual Offset: %s ms", + "hexium.stage.less": "-", + "hexium.stage.more": "+", "hexium.menu.cant_play": "Can't play this chart", "hexium.play.ready": "Get ready", "hexium.play.finished": "Finished. Press Esc to leave.", diff --git a/mod/src/client/resources/assets/hexium/lang/zh_cn.json b/mod/src/client/resources/assets/hexium/lang/zh_cn.json index 2861fcf..a1b30ea 100644 --- a/mod/src/client/resources/assets/hexium/lang/zh_cn.json +++ b/mod/src/client/resources/assets/hexium/lang/zh_cn.json @@ -14,6 +14,10 @@ "hexium.audio_test.rewind": "后退 3 秒", "hexium.audio_test.failed": "无法播放歌曲:%s", "hexium.stage.leave": "离开舞台", + "hexium.stage.note_speed": "音符速度:%s", + "hexium.stage.visual_offset": "视觉偏移:%s 毫秒", + "hexium.stage.less": "-", + "hexium.stage.more": "+", "hexium.menu.cant_play": "无法游玩此谱面", "hexium.play.ready": "准备", "hexium.play.finished": "已结束。按 Esc 离开。", diff --git a/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt b/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt index 5732a07..76087f5 100644 --- a/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt +++ b/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt @@ -12,6 +12,8 @@ import net.minecraft.world.Difficulty import net.minecraft.world.level.GameType import net.minecraft.world.level.gamerules.GameRules import net.trilleo.hexium.client.input.LaneInput +import net.trilleo.hexium.client.play.PlaySettings +import net.trilleo.hexium.client.play.TrackRenderer import net.trilleo.hexium.client.play.PlaySession import net.trilleo.hexium.client.screen.HexiumMenuScreen import net.trilleo.hexium.client.screen.StageMenuScreen @@ -33,6 +35,7 @@ class HexiumClientGameTest : FabricClientGameTest { context.runOnClient { it.options.getSoundSourceOptionInstance(SoundSource.MASTER).set(0.0) } theStageLocksThePlayerAndLeavesCleanly(context) aChartPlaysToTheEndAndItsReplayMatches(context) + notesDrawWithImprovedTransparency(context) normalWorldsAreUntouched(context) } @@ -144,11 +147,23 @@ class HexiumClientGameTest : FabricClientGameTest { next++ } } + context.waitFor({ + bot(play.clock.songTimeMs) + play.clock.songTimeMs >= NOTES_IN_VIEW_MS + }, SONG_TICKS) + context.takeScreenshot("notes") + context.runOnClient { check(TrackRenderer.notesDrawn > 0) { "no notes drawn on the way to the first one" } } context.waitFor({ bot(play.clock.songTimeMs) play.clock.songTimeMs >= PAUSE_AT_MS }, SONG_TICKS) pauseAndCheckTimeStops(context, play) + pauseSettingsChange(context, play) + context.waitFor({ + bot(play.clock.songTimeMs) + play.clock.songTimeMs >= HOLD_IN_PLAY_MS + }, SONG_TICKS) + context.takeScreenshot("hold") context.waitFor({ bot(play.clock.songTimeMs) play.state == PlaySession.State.FINISHED @@ -181,6 +196,25 @@ class HexiumClientGameTest : FabricClientGameTest { context.waitForScreen(TitleScreen::class.java) } + /** The Fabulous preset's transparency draws on another path, which can only be judged by eye. */ + private fun notesDrawWithImprovedTransparency(context: ClientGameTestContext) { + context.runOnClient { it.options.improvedTransparency().set(true) } + context.clickScreenButton("hexium.title_button") + context.waitForScreen(HexiumMenuScreen::class.java) + context.clickScreenButton("hexium.difficulty.basic") + context.waitFor({ HexiumSession.play()?.state == PlaySession.State.PLAYING }, LOAD_TICKS) + val play = HexiumSession.play()!! + context.waitFor({ play.clock.songTimeMs >= HOLD_ON_THE_WAY_MS }, SONG_TICKS) + context.takeScreenshot("improved_transparency") + context.runOnClient { it.pauseGame(false) } + context.waitForScreen(StageMenuScreen::class.java) + context.clickScreenButton("hexium.stage.leave") + context.waitForScreen(HexiumMenuScreen::class.java) + context.clickScreenButton("gui.back") + context.waitForScreen(TitleScreen::class.java) + context.runOnClient { it.options.improvedTransparency().set(false) } + } + private fun pauseAndCheckTimeStops(context: ClientGameTestContext, play: PlaySession) { context.runOnClient { it.pauseGame(false) } context.waitForScreen(StageMenuScreen::class.java) @@ -194,6 +228,23 @@ class HexiumClientGameTest : FabricClientGameTest { context.waitFor({ play.state == PlaySession.State.PLAYING && play.clock.songTimeMs > pausedAt }, SETTLE_TICKS) } + /** Note speed and offset A are for the eye: the judge never hears of them, which the perfect score below shows. */ + private fun pauseSettingsChange(context: ClientGameTestContext, play: PlaySession) { + context.runOnClient { it.pauseGame(false) } + context.waitForScreen(StageMenuScreen::class.java) + context.waitFor({ play.state == PlaySession.State.PAUSED }, SETTLE_TICKS) + // This finds the first row's button, the note speed. Offset A has the same buttons on the next row. + context.clickScreenButton("hexium.stage.more") + context.waitTick() + context.runOnClient { + check(PlaySettings.noteSpeed > PlaySettings.DEFAULT_NOTE_SPEED) { "the note speed button did nothing" } + PlaySettings.changeVisualOffset(VISUAL_OFFSET_STEPS) + } + context.takeScreenshot("pause_menu") + context.setScreen { null } + context.waitFor({ play.state == PlaySession.State.PLAYING }, SETTLE_TICKS) + } + private class Press(val atMs: Double, val lane: Int, val down: Boolean) /** A bot that plays every note. */ @@ -220,6 +271,7 @@ class HexiumClientGameTest : FabricClientGameTest { context.worldBuilder().create().use { world -> world.connection.waitForChunksRender() context.runOnClient { check(!HexiumSession.active()) { "a session in a normal world" } } + val trackFrames = context.computeOnClient { TrackRenderer.framesDrawn } val start = position(context) context.input.holdKey { it.keyUp } context.waitTicks(HOLD_TICKS) @@ -235,6 +287,9 @@ class HexiumClientGameTest : FabricClientGameTest { context.runOnClient { check(it.player!!.inventory.selectedSlot != 3) { "the wheel doesn't work in a normal world" } } + context.runOnClient { + check(TrackRenderer.framesDrawn == trackFrames) { "the track was drawn in a normal world" } + } context.input.pressKey { it.keyInventory } context.waitForScreen(InventoryScreen::class.java) context.setScreen { null } @@ -264,5 +319,16 @@ class HexiumClientGameTest : FabricClientGameTest { /** Between notes in basic.json. */ const val PAUSE_AT_MS = 3250.0 + + const val VISUAL_OFFSET_STEPS = 10 + + /** A hold and taps are in view, with the taps in the lanes either side of it. */ + const val HOLD_ON_THE_WAY_MS = 3400.0 + + /** The first note in basic.json is at 2000 ms. */ + const val NOTES_IN_VIEW_MS = 1500.0 + + /** During its first hold, 4000 to 5000 ms in the second lane. */ + const val HOLD_IN_PLAY_MS = 4500.0 } } From 91230f06156d88e263e1bb7e8e8dbf303153ee57 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Wed, 4 Nov 2026 15:30:10 +0800 Subject: [PATCH 17/34] Improvement: Raise the player on a platform and widen the track to the sky screen's width --- CHANGELOG.md | 2 +- docs/ARCHITECTURE.md | 4 +-- docs/DESIGN.md | 6 ++--- .../hexium/client/play/TrackRenderer.kt | 4 +-- .../hexium/client/session/StageGeometry.kt | 15 ++++++++--- .../hexium/client/session/StageWorld.kt | 25 +++++++++++++++++-- .../hexium/gametest/HexiumClientGameTest.kt | 18 ++++++++++--- 7 files changed, 57 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 415552f..ca2fdcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,7 @@ + Presses are timed from when the key went down, not when the game got round to it. + Taps and holds come down the four lanes to a judgement line, with each lane lighting up while its key is down. + The pause screen sets the note speed, which changes how far away notes appear but never their timing, and a visual offset, which shifts where notes are drawn relative to the music. These reset when you quit the game for now. -+ Added the stage: a plain floor you stand on, kept apart from your normal worlds. ++ Added the stage: a plain floor with a raised platform you stand on, looking down the lanes, kept apart from your normal worlds. + You can look around, but moving, jumping and action keys are off while you're on it. + The hunger bar is hidden. + Added judging for ground taps and holds, with CHUNITHM's windows. diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 822431b..98fac4f 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -35,8 +35,8 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl - The title screen gets one extra button that opens the mod's menu. That menu is the only place a `HexiumSession` is ever created. - Every mixin and event hook starts with `if (!HexiumSession.active()) return;`, except the title screen button, which only adds that button. Joining a normal world or server means no session, so vanilla behaviour stays as it was. -- The stage is a flat black floor made in code (`StageWorld`) and created fresh for each session in the mod's own folder, `.minecraft/hexium/stages/`, not `saves/`, so it never shows up in the vanilla world list. Making it in code means a Minecraft update can't ask to upgrade it. Chart-authored stages may bring template worlds in Milestone 8. It runs on the integrated server, with its rules frozen once the player joins: no daylight cycle, mobs, random ticks or weather. -- The player is in adventure mode on Peaceful, placed on the stand spot. Gameplay never depends on the server; the world is just scenery. +- The stage is a flat black floor with a small platform for the player, made in code (`StageWorld`) and created fresh for each session in the mod's own folder, `.minecraft/hexium/stages/`, not `saves/`, so it never shows up in the vanilla world list. Making it in code means a Minecraft update can't ask to upgrade it. Chart-authored stages may bring template worlds in Milestone 8. It runs on the integrated server, with its rules frozen once the player joins: no daylight cycle, mobs, random ticks or weather. +- The player is in adventure mode on Peaceful, placed on the stand spot on top of the platform. Gameplay never depends on the server; the world is just scenery. - While a session is active, mixins hold the player still (`KeyboardInput`), stop every key that method handles (`Minecraft.handleKeybinds`: attack, items, hotbar, inventory, chat, F1, F5 and so on) and hotbar scrolling, keep vanilla's tutorial from starting, since it would end itself for good outside survival, and replace vanilla's pause menu. The camera turns freely until Milestone 3 adds its limits. Vanilla's HUD stays apart from the hunger bar, which is hidden, and Hexium draws combo, judgement and score over it. While no screen is open, vanilla doesn't see lane keys at all, so the play loop tells it there was input, or it would lower the frame rate. A player arriving in third person or with the HUD hidden gets the normal view, and their own comes back afterwards. - A session ends when the connection closes, and also whenever the title screen or the Hexium menu opens, so a failed load can't leave one running. diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 91e5eb1..4a1acdd 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -33,9 +33,9 @@ Everything is judged on one plane: the transparent screen in front of the player ### Stage geometry (starting values, all tunable) -- The player is locked on the stand spot (the red circle), in adventure mode. Movement, jumping, sneaking, hotbar and inventory keys are suppressed during play. The hunger bar is hidden. -- Screen plane: 8 blocks in front of the player's eyes, about 12 blocks wide and 6 tall, with its bottom edge on the floor. -- Ground lanes: 4 lanes, each 2 blocks wide, lie on the floor and run from the player past the screen, 64 blocks beyond it, into the distance. Notes spawn far down the lanes and slide toward the bottom edge of the screen. +- The player is locked on the stand spot (the red circle), on a platform 3 blocks above the floor so the lanes stay readable into the distance, in adventure mode. Movement, jumping, sneaking, hotbar and inventory keys are suppressed during play. The hunger bar is hidden. +- Screen plane: 8 blocks in front of the player's eyes, about 12 blocks wide and 6 tall, with its bottom edge on the floor, so the player's eyes are level with its upper half and the rest view looks slightly down. +- Ground lanes: 4 lanes, each 3 blocks wide so the track matches the screen's width, lie on the floor, starting just in front of the platform and running past the screen, 64 blocks beyond it, into the distance. Notes spawn far down the lanes and slide toward the bottom edge of the screen. - Sky notes: they fly straight toward the screen along the depth axis, visible through it, and are judged when they reach their (x, y) spot on the screen. - Note speed ("HiSpeed") is a player setting in blocks per second, 25 by default. It changes how far away notes appear, never their timing. - Rest view: centred on the screen with the whole ground track visible. Yaw and pitch are clamped to the screen's edges plus a small margin, so the player can't spin away. diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/play/TrackRenderer.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/play/TrackRenderer.kt index 53aee3b..e6208bf 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/play/TrackRenderer.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/play/TrackRenderer.kt @@ -28,10 +28,10 @@ object TrackRenderer { private const val BODY_LIFT = 0.04 private const val DIVIDER_WIDTH = 0.06 private const val LINE_DEPTH = 0.3 - private const val NOTE_WIDTH = 1.7 + private const val NOTE_WIDTH = 2.6 private const val NOTE_DEPTH = 0.8 private const val NOTE_HEIGHT = 0.4 - private const val BODY_WIDTH = 1.3 + private const val BODY_WIDTH = 2.0 private const val GLOW_LENGTH = 16.0 /** The last stretch of the track, where notes fade in instead of popping up. */ diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt index 97f9920..07cf38c 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt @@ -11,19 +11,26 @@ object StageGeometry { /** Facing +Z, down the lanes. */ const val REST_YAW = 0f - /** Looking at the middle of the screen, 3 blocks up and 8 away, from eyes 1.62 up. */ - const val REST_PITCH = -9.8f + /** How far above the floor the player stands, on a platform, so the lanes don't flatten toward the horizon. */ + const val STAND_HEIGHT = 3 + + /** How far the platform reaches each side of the block the player is on. */ + const val PLATFORM_REACH = 1 + + /** Looking down at the middle of the screen, 3 blocks up and 8 away, from eyes 4.62 up. */ + const val REST_PITCH = 11.4f /** Where the screen's bottom edge is, 8 blocks in front of the player. */ const val JUDGEMENT_Z = STAND_Z + 8.0 - const val LANE_WIDTH = 2.0 + /** Four of these make the track as wide as the sky screen will be, 12 blocks. */ + const val LANE_WIDTH = 3.0 /** How far up the lanes the track runs from the judgement line. Notes appear at the far end. */ const val TRACK_LENGTH = 64.0 /** How far the track carries on past the line, so a late note still has floor under it. */ - const val TRACK_BEFORE_LINE = 4.0 + const val TRACK_BEFORE_LINE = 3.5 /** Facing +Z, the player's left is +X, so the first lane is on that side. */ fun laneCentreX(lane: Int, laneCount: Int): Double = STAND_X + ((laneCount - 1) / 2.0 - lane) * LANE_WIDTH diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageWorld.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageWorld.kt index e2c8c27..b2749eb 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageWorld.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageWorld.kt @@ -15,16 +15,20 @@ import net.minecraft.client.gui.screens.Screen import net.minecraft.client.gui.screens.TitleScreen import net.minecraft.client.gui.screens.worldselection.WorldOpenFlows import net.minecraft.client.multiplayer.ClientLevel +import net.minecraft.core.BlockPos import net.minecraft.core.HolderLookup import net.minecraft.core.HolderSet import net.minecraft.core.registries.Registries import net.minecraft.server.MinecraftServer +import net.minecraft.server.level.ServerLevel +import net.minecraft.util.Mth import net.minecraft.world.Difficulty import net.minecraft.world.item.DyeColor import net.minecraft.world.level.GameType import net.minecraft.world.level.LevelSettings import net.minecraft.world.level.WorldDataConfiguration import net.minecraft.world.level.biome.Biomes +import net.minecraft.world.level.block.Block import net.minecraft.world.level.block.Blocks import net.minecraft.world.level.gamerules.GameRules import net.minecraft.world.level.levelgen.FlatLevelSource @@ -40,7 +44,7 @@ import net.trilleo.hexium.client.screen.HexiumMenuScreen import org.slf4j.LoggerFactory /** - * The stage: a flat floor with nothing else, made fresh for each session in Hexium's own folder, so + * The stage: a flat floor with only the player's platform on it, made fresh for each session in Hexium's own folder, so * it never shows up in the vanilla world list. Gameplay never depends on the server: the world is * just scenery. Made in code rather than bundled, so a Minecraft update can't ask to upgrade it. */ @@ -148,12 +152,29 @@ object StageWorld { level.dimensionTypeRegistration().value().defaultClock().ifPresent { clock -> server.clockManager().setTotalTicks(clock, NOON_TICKS) } - val y = level.minY + StageGeometry.FLOOR_THICKNESS.toDouble() + val floorY = level.minY + StageGeometry.FLOOR_THICKNESS + buildPlatform(level, floorY) + val y = (floorY + StageGeometry.STAND_HEIGHT).toDouble() for (player in server.playerList.players) { player.teleportTo(level, StageGeometry.STAND_X, y, StageGeometry.STAND_Z, emptySet(), StageGeometry.REST_YAW, StageGeometry.REST_PITCH, true) } } + /** What the player stands on, made before they're moved up to it. */ + private fun buildPlatform(level: ServerLevel, floorY: Int) { + val state = Blocks.CONCRETE.pick(DyeColor.GRAY).defaultBlockState() + val centreX = Mth.floor(StageGeometry.STAND_X) + val centreZ = Mth.floor(StageGeometry.STAND_Z) + val reach = StageGeometry.PLATFORM_REACH + for (x in centreX - reach..centreX + reach) { + for (z in centreZ - reach..centreZ + reach) { + for (y in floorY until floorY + StageGeometry.STAND_HEIGHT) { + level.setBlock(BlockPos(x, y, z), state, Block.UPDATE_ALL) + } + } + } + } + /** Returns false if it couldn't be cleared: a stage part way between old and new must not load. */ private fun deleteOldStage(stage: Path): Boolean { if (!Files.exists(stage, LinkOption.NOFOLLOW_LINKS)) return true diff --git a/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt b/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt index 76087f5..fa34cdf 100644 --- a/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt +++ b/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt @@ -7,6 +7,7 @@ import net.minecraft.client.Minecraft import net.minecraft.client.gui.screens.TitleScreen import net.minecraft.client.gui.screens.inventory.InventoryScreen import net.minecraft.client.tutorial.TutorialSteps +import net.minecraft.core.BlockPos import net.minecraft.sounds.SoundSource import net.minecraft.world.Difficulty import net.minecraft.world.level.GameType @@ -52,7 +53,7 @@ class HexiumClientGameTest : FabricClientGameTest { context.clickScreenButton("hexium.difficulty.basic") context.waitFor({ it.player != null && it.level != null && it.gui.screen() == null }, LOAD_TICKS) // The stand spot arrives from the server after joining. - context.waitFor({ it.player!!.x == 0.5 && it.player!!.z == 0.5 }, LOAD_TICKS) + context.waitFor({ it.player!!.x == 0.5 && it.player!!.z == 0.5 && it.player!!.y > it.level!!.minY + StageGeometry.FLOOR_THICKNESS }, LOAD_TICKS) context.waitTicks(SETTLE_TICKS) context.runOnClient { minecraft -> @@ -65,7 +66,15 @@ class HexiumClientGameTest : FabricClientGameTest { check(server.gameRules.get(GameRules.RANDOM_TICK_SPEED) == 0) { "random ticks are on" } check(minecraft.level!!.difficulty == Difficulty.PEACEFUL) { "not on Peaceful" } val player = minecraft.player!! - check(player.y == minecraft.level!!.minY + 1.0) { "not standing on the floor: y ${player.y}" } + val standY = minecraft.level!!.minY + StageGeometry.FLOOR_THICKNESS + StageGeometry.STAND_HEIGHT + check(player.y == standY.toDouble()) { "not on the platform: y ${player.y}" } + check(player.onGround()) { "standing on nothing" } + val floorY = minecraft.level!!.minY + StageGeometry.FLOOR_THICKNESS + val toMiddleOfScreen = Math.toDegrees(Math.atan((player.eyeY - floorY - SCREEN_MIDDLE_HEIGHT) / (StageGeometry.JUDGEMENT_Z - player.z))) + check(Math.abs(toMiddleOfScreen - StageGeometry.REST_PITCH) < MAX_PITCH_ERROR) { "the rest view isn't on the screen's middle, which is $toMiddleOfScreen down" } + val reach = StageGeometry.PLATFORM_REACH + check(!minecraft.level!!.getBlockState(BlockPos(reach, floorY, reach)).isAir) { "the platform has no corner" } + check(minecraft.level!!.getBlockState(BlockPos(reach + 1, floorY, reach + 1)).isAir) { "the platform is too wide" } check(player.yRot == StageGeometry.REST_YAW && player.xRot == StageGeometry.REST_PITCH) { "not in the rest view: ${player.yRot}, ${player.xRot}" } @@ -80,7 +89,7 @@ class HexiumClientGameTest : FabricClientGameTest { input.holdKey { it.keyLeft } input.holdKey { it.keyJump } input.holdKey { it.keyShift } - // Sampled each tick, since a jump would be back on the floor by the end. + // Sampled each tick, since a jump would be back on the platform by the end. repeat(HOLD_TICKS) { context.waitTick() check(position(context) == start) { "the player moved from $start to ${position(context)}" } @@ -320,6 +329,9 @@ class HexiumClientGameTest : FabricClientGameTest { /** Between notes in basic.json. */ const val PAUSE_AT_MS = 3250.0 + const val SCREEN_MIDDLE_HEIGHT = 3.0 + const val MAX_PITCH_ERROR = 0.1 + const val VISUAL_OFFSET_STEPS = 10 /** A hold and taps are in view, with the taps in the lanes either side of it. */ From 388f3e3d786174f3b45058dac6e794564ea4d883 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Wed, 4 Nov 2026 15:48:50 +0800 Subject: [PATCH 18/34] Feature: Add the pause rewind and countdown, a results screen, Retry and saved replays --- CHANGELOG.md | 5 + .../trilleo/hexium/core/replay/PlayInput.kt | 71 ++++++ .../hexium/core/replay/PlayInputTest.kt | 241 ++++++++++++++++++ docs/ARCHITECTURE.md | 4 +- docs/DESIGN.md | 2 +- docs/DEVELOPMENT.md | 2 +- docs/REPLAY_FORMAT.md | 4 +- .../trilleo/hexium/client/audio/SongStream.kt | 8 +- .../trilleo/hexium/client/clock/AudioClock.kt | 11 +- .../trilleo/hexium/client/input/LaneInput.kt | 8 +- .../net/trilleo/hexium/client/play/PlayHud.kt | 31 +-- .../trilleo/hexium/client/play/PlaySession.kt | 61 +++-- .../hexium/client/play/ReplayFolder.kt | 57 +++++ .../hexium/client/play/TrackRenderer.kt | 7 +- .../hexium/client/screen/ResultsScreen.kt | 85 ++++++ .../hexium/client/screen/StageMenuScreen.kt | 15 +- .../hexium/client/session/HexiumSession.kt | 35 +++ .../resources/assets/hexium/lang/en_us.json | 8 +- .../resources/assets/hexium/lang/zh_cn.json | 8 +- .../hexium/gametest/HexiumClientGameTest.kt | 63 ++++- 20 files changed, 663 insertions(+), 63 deletions(-) create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/replay/PlayInput.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/replay/PlayInputTest.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/play/ReplayFolder.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/screen/ResultsScreen.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index ca2fdcf..548671a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,11 @@ + Presses are timed from when the key went down, not when the game got round to it. + Taps and holds come down the four lanes to a judgement line, with each lane lighting up while its key is down. + The pause screen sets the note speed, which changes how far away notes appear but never their timing, and a visual offset, which shifts where notes are drawn relative to the music. These reset when you quit the game for now. ++ Pausing is now fair: resuming goes back 3 seconds and plays the song under a 3-2-1 countdown, and judging starts again exactly where you paused. + + Keys you changed while paused count from that moment, so you can get your fingers back in place. ++ Added a results screen with your score, clear lamp, judgement counts and best combo. ++ Added Retry, on the results and pause screens, which starts the chart again without reloading the stage. ++ Finished plays now save a replay in `.minecraft/hexium/replays`. + Added the stage: a plain floor with a raised platform you stand on, looking down the lanes, kept apart from your normal worlds. + You can look around, but moving, jumping and action keys are off while you're on it. + The hunger bar is hidden. diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/replay/PlayInput.kt b/core/src/main/kotlin/net/trilleo/hexium/core/replay/PlayInput.kt new file mode 100644 index 0000000..7c20313 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/replay/PlayInput.kt @@ -0,0 +1,71 @@ +package net.trilleo.hexium.core.replay + +/** + * What reaches [recorder] during a play, which is where the pause rule lives. Resuming rewinds the + * song so the player can get back in time, but judging and recording only reopen when it comes back to + * the point where they paused, and a key that changed in between is synced at that exact time. So + * a replay's times never go down, and a replay can't tell a pause happened. Doesn't allocate. + */ +class PlayInput(private val recorder: ReplayRecorder, laneCount: Int) { + /** Where the keys really are. */ + private val down = BooleanArray(laneCount) + + /** Where the judge thinks they are. */ + private val judged = BooleanArray(laneCount) + + private var paused = false + + /** True once input reaches the judge, which isn't while paused or during the rewind after it. */ + var isOpen = true + private set + + /** Everything up to here has been played. Before the first pause that's nothing. */ + var playedUntilMs = Double.NEGATIVE_INFINITY + private set + + fun isLaneDown(lane: Int): Boolean = down[lane] + + /** A lane key changing, wherever the play is. */ + fun lane(lane: Int, isDown: Boolean, timeMs: Double) { + if (!isOpen && !paused && timeMs >= playedUntilMs) reopen() + down[lane] = isDown + if (isOpen) send(lane, isDown, timeMs) + } + + /** Call once per frame while the song is running, after that frame's input. */ + fun frame(timeMs: Double, aimX: Float, aimY: Float) { + if (!isOpen && !paused && timeMs >= playedUntilMs) reopen() + if (!isOpen) return + recorder.aimSample(timeMs, aimX, aimY) + recorder.advanceTo(timeMs) + } + + /** Stops the play at [timeMs]. Pausing again during a rewind keeps the first pause point. */ + fun pause(timeMs: Double) { + if (isOpen) playedUntilMs = timeMs + isOpen = false + paused = true + } + + /** Returns the song time to go back to. */ + fun resume(): Double { + paused = false + return playedUntilMs - REWIND_MS + } + + private fun reopen() { + for (lane in down.indices) { + if (down[lane] != judged[lane]) send(lane, down[lane], playedUntilMs) + } + isOpen = true + } + + private fun send(lane: Int, isDown: Boolean, timeMs: Double) { + judged[lane] = isDown + if (isDown) recorder.pressLane(lane, timeMs) else recorder.releaseLane(lane, timeMs) + } + + companion object { + const val REWIND_MS = 3000.0 + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/replay/PlayInputTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/replay/PlayInputTest.kt new file mode 100644 index 0000000..1d912e4 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/replay/PlayInputTest.kt @@ -0,0 +1,241 @@ +package net.trilleo.hexium.core.replay + +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFalse +import kotlin.test.assertTrue +import net.trilleo.hexium.core.chart.Beat +import net.trilleo.hexium.core.chart.BpmChange +import net.trilleo.hexium.core.chart.Difficulty +import net.trilleo.hexium.core.chart.DifficultyChart +import net.trilleo.hexium.core.chart.MeterChange +import net.trilleo.hexium.core.chart.Note +import net.trilleo.hexium.core.judge.JudgeChart +import net.trilleo.hexium.core.judge.Judgement + +class PlayInputTest { + private fun beat(whole: Int) = Beat(whole, 0, 1) + + /** At 120 BPM a beat is 500 ms, so beat 20 is at 10 s. */ + private val chart = JudgeChart.compile( + DifficultyChart( + 1, Difficulty.EXPERT, 1, 4, 0.0, + listOf(BpmChange(beat(0), 120.0)), + listOf(MeterChange(beat(0), 4, 4)), + listOf(Note.Tap(beat(20), 0), Note.Hold(beat(20), beat(24), 1), Note.Tap(beat(30), 2)), + ), + ) + private val recorder = ReplayRecorder(chart, ByteArray(32), 0.0, 100) + private val input = PlayInput(recorder, 4) + + private fun laneEvents(): List { + val replay = recorder.toReplay() + return (0 until replay.eventCount).filter { replay.event(it) != ReplayEvent.AIM } + .map { "${replay.event(it)} ${replay.index(it)} at ${replay.timeMs(it)}" } + } + + private fun pauseAndComeBack(atMs: Double): Double { + input.pause(atMs) + return input.resume() + } + + @Test + fun beforeAnyPauseInputGoesStraightToTheJudge() { + assertTrue(input.isOpen) + input.lane(0, true, 10000.0) + assertEquals(Judgement.JUSTICE_CRITICAL, recorder.judge.judgement(0)) + assertEquals(listOf("LANE_DOWN 0 at 10000.0"), laneEvents()) + assertTrue(input.isLaneDown(0)) + } + + @Test + fun aFrameSendsAnAimSampleAndMovesTheJudgeOn() { + input.frame(20000.0, 0.5f, 0.5f) + assertEquals(1, recorder.toReplay().eventCount) + assertEquals(Judgement.MISS, recorder.judge.judgement(0)) + } + + @Test + fun nothingIsJudgedOrRecordedWhilePaused() { + input.pause(5000.0) + assertFalse(input.isOpen) + input.frame(20000.0, 0.5f, 0.5f) + input.lane(0, true, 10000.0) + assertEquals(0, recorder.toReplay().eventCount) + assertEquals(0, recorder.judge.judgedCount) + assertTrue(input.isLaneDown(0)) + } + + @Test + fun resumingRewindsThreeSecondsFromThePausePoint() { + assertEquals(2000.0, pauseAndComeBack(5000.0)) + assertEquals(5000.0, input.playedUntilMs) + } + + @Test + fun theRewindCanGoBeforeTheSong() { + assertEquals(-3500.0, pauseAndComeBack(-500.0)) + } + + @Test + fun nothingIsJudgedOrRecordedUntilThePausePointComesBack() { + pauseAndComeBack(5000.0) + input.frame(4999.0, 0.5f, 0.5f) + assertFalse(input.isOpen) + assertEquals(0, recorder.toReplay().eventCount) + input.frame(5000.0, 0.5f, 0.5f) + assertTrue(input.isOpen) + assertEquals(1, recorder.toReplay().eventCount) + } + + @Test + fun aKeyReleasedDuringThePauseIsReleasedAtThePausePoint() { + input.lane(0, true, 1000.0) + pauseAndComeBack(5000.0) + input.lane(0, false, 3000.0) + input.frame(5001.0, 0.5f, 0.5f) + assertEquals(listOf("LANE_DOWN 0 at 1000.0", "LANE_UP 0 at 5000.0"), laneEvents()) + } + + @Test + fun aKeyStillDownFromTheCountdownIsPressedAtThePausePoint() { + input.pause(10000.0) + input.lane(0, true, 10000.0) + input.resume() + input.frame(10001.0, 0.5f, 0.5f) + assertEquals(listOf("LANE_DOWN 0 at 10000.0"), laneEvents()) + assertEquals(Judgement.JUSTICE_CRITICAL, recorder.judge.judgement(0)) + } + + @Test + fun aTapDuringTheCountdownIsForgotten() { + pauseAndComeBack(5000.0) + input.lane(0, true, 3000.0) + input.lane(0, false, 3100.0) + input.frame(5001.0, 0.5f, 0.5f) + assertEquals(emptyList(), laneEvents()) + assertFalse(input.isLaneDown(0)) + } + + @Test + fun aKeyLetGoAndPressedAgainBeforeThePausePointNeverLeftTheJudgesView() { + input.lane(1, true, 9990.0) + pauseAndComeBack(10100.0) + input.lane(1, false, 8000.0) + input.lane(1, true, 8100.0) + input.frame(10500.0, 0.5f, 0.5f) + assertEquals(listOf("LANE_DOWN 1 at 9990.0"), laneEvents()) + assertTrue(recorder.judge.combo > 0) + } + + @Test + fun anEventPastThePausePointSyncsTheKeysFirstAndKeepsItsOwnTime() { + input.lane(0, true, 1000.0) + pauseAndComeBack(5000.0) + input.lane(0, false, 3000.0) + input.lane(2, true, 5200.0) + assertTrue(input.isOpen) + assertEquals(listOf("LANE_DOWN 0 at 1000.0", "LANE_UP 0 at 5000.0", "LANE_DOWN 2 at 5200.0"), laneEvents()) + } + + @Test + fun pausingAgainDuringTheCountdownKeepsTheFirstPausePoint() { + pauseAndComeBack(5000.0) + input.frame(3000.0, 0.5f, 0.5f) + input.pause(3000.0) + assertEquals(2000.0, input.resume()) + assertEquals(5000.0, input.playedUntilMs) + } + + @Test + fun pausingAgainAfterTheCountdownMovesThePausePoint() { + pauseAndComeBack(5000.0) + input.frame(6000.0, 0.5f, 0.5f) + assertEquals(4000.0, pauseAndComeBack(7000.0)) + } + + @Test + fun aPausedPlayReJudgesToTheSameResult() { + input.lane(0, true, 10010.0) + input.lane(0, false, 10050.0) + input.lane(1, true, 10020.0) + input.frame(10500.0, 0.5f, 0.5f) + pauseAndComeBack(10600.0) + input.lane(1, false, 8000.0) + input.frame(9000.0, 0.5f, 0.5f) + input.frame(10600.0, 0.5f, 0.5f) + input.lane(1, true, 10700.0) + input.frame(15500.0, 0.5f, 0.5f) + assertReJudgesTheSame() + } + + /** A re-judge always runs to the end of the chart, so the live play must have too. */ + private fun assertReJudgesTheSame() { + recorder.finish() + val judge = recorder.judge + val again = ReplayJudge.play(chart, ReplayFile.read(ReplayFile.write(recorder.toReplay())).replay!!) + assertEquals(judge.score, again.score) + assertEquals(judge.maxCombo, again.maxCombo) + assertEquals(judge.judgedCount, again.judgedCount) + for (i in 0 until judge.judgedCount) { + assertEquals(judge.judgement(i), again.judgement(i)) + assertEquals(judge.judgedDeltaMs(i), again.judgedDeltaMs(i)) + } + } + + @Test + fun anEventExactlyOnThePausePointReopensAndCounts() { + pauseAndComeBack(5000.0) + input.lane(2, true, 5000.0) + assertTrue(input.isOpen) + assertEquals(listOf("LANE_DOWN 2 at 5000.0"), laneEvents()) + } + + @Test + fun anEventJustBeforeThePausePointAfterReopeningCountsAsThePoint() { + pauseAndComeBack(5000.0) + input.frame(5010.0, 0.5f, 0.5f) + input.lane(2, true, 5005.0) + assertEquals(listOf("LANE_DOWN 2 at 5010.0"), laneEvents()) + } + + @Test + fun aPauseDuringTheLeadInReopensBeforeTheSong() { + pauseAndComeBack(-1000.0) + input.lane(0, true, -2000.0) + input.frame(-1000.0, 0.5f, 0.5f) + assertTrue(input.isOpen) + assertEquals(listOf("LANE_DOWN 0 at -1000.0"), laneEvents()) + assertReJudgesTheSame() + } + + @Test + fun severalKeysSyncTogetherAcrossTwoPauses() { + input.lane(0, true, 1000.0) + input.lane(1, true, 1000.0) + pauseAndComeBack(5000.0) + input.lane(0, false, 3000.0) + input.lane(2, true, 3100.0) + input.frame(3500.0, 0.5f, 0.5f) + input.pause(3500.0) + input.lane(1, false, 3500.0) + input.resume() + input.frame(5000.0, 0.5f, 0.5f) + assertEquals( + listOf("LANE_DOWN 0 at 1000.0", "LANE_DOWN 1 at 1000.0", "LANE_UP 0 at 5000.0", "LANE_UP 1 at 5000.0", "LANE_DOWN 2 at 5000.0"), + laneEvents(), + ) + } + + @Test + fun aHoldLetGoDuringThePauseIsTreatedAsLetGoAtThePausePoint() { + input.lane(1, true, 10000.0) + input.frame(10300.0, 0.5f, 0.5f) + pauseAndComeBack(10300.0) + input.lane(1, false, 8000.0) + input.frame(11500.0, 0.5f, 0.5f) + assertEquals(listOf("LANE_DOWN 1 at 10000.0", "LANE_UP 1 at 10300.0"), laneEvents()) + assertTrue(recorder.judge.count(Judgement.MISS) > 0) + assertReJudgesTheSame() + } +} diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 98fac4f..f38418c 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -54,6 +54,8 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl - Every frame, record an aim sample (song time, yaw, pitch → crosshair point on the screen plane). Slides and flicks are judged from these samples. Flicks test the line between two samples, so fast swipes at low FPS still register. - Events go into a fixed ring that the play loop (`PlaySession`) drains at the start of every frame, before anything reads the time. A play has a 3-second lead-in with the clock running before the music, and stays open 2 seconds after the last note. - Until sky notes exist, the aim sample is a fixed mid-screen point, on the same code path. +- Pausing stops the song and clock together. Resuming goes back 3 seconds, or to before the song if that's where it lands, and plays on from there under a 3-2-1 countdown. `PlayInput` in `core` holds the rule: nothing is judged or recorded until the song is back at the pause point, and any lane key that changed in between is pressed or released at exactly that time. Keys are read while the pause screen is open too, so this knows which are really down. Notes already judged stay hidden during the countdown, and so does the part of a hold already played. +- A finished play opens `ResultsScreen` and saves its replay. Retry, on that screen and the pause screen, loads a new `PlaySession` for the same chart and keeps the stage. Leaving or retrying part way through saves nothing. - Events go through the judge every frame. Every input event and aim sample is also appended to the replay: the mod sends input through `ReplayRecorder`, which records it and passes it to the judge ([REPLAY_FORMAT.md](REPLAY_FORMAT.md)). ## Rendering @@ -67,4 +69,4 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl ## Local data -`.minecraft/hexium/` holds `charts/` (one folder per chart package; the mod also bundles a test pack in `hexium_packs/`), `replays/`, `scores.json` (best scores per chart) and `settings.json`. That's enough for v1. A real database only lives on the server. +`.minecraft/hexium/` holds `charts/` (one folder per chart package; the mod also bundles a test pack in `hexium_packs/`), `replays/` (one `---

zAhgH}WBc{-P#?Q)5}iXjS3L?X+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-GNV(lNJ`Ydp3Z%EFy|IHjB#_x7F0~Jov_LlaI_m*CNgx+>HZ24uNCfid{FQ5f z77G-v%~~4_Oje+n?(by+%}#+*-l>msVd)B#A4C`oz&aGDR49A8!5b+As;{^GXab@n zP;0$C@*^~^1;f5NoJhtWHvIRLt*fEh3Dmih!c?$}1tX;$7$9voo7`x5A_-}>z; zEL6d0@5zhC!yubrjNhC0gP{5g#s+O%dmh>*CbpLA--A&ff$`V40(>8jVA5}o z&gal-6inet(v!i@6HJwUBr6T2O<6Ab_?A}iKq;?1^<2^y0L4^If@Ts3nO;RUivTX${_C=G#i?r`rgeroam0H%N> I)oF+U0LTCUlmGw# literal 0 HcmV?d00001 diff --git a/core/src/test/resources/golden/recorded/test-pattern-basic-20261104-224108.expected b/core/src/test/resources/golden/recorded/test-pattern-basic-20261104-224108.expected new file mode 100644 index 0000000..a25a539 --- /dev/null +++ b/core/src/test/resources/golden/recorded/test-pattern-basic-20261104-224108.expected @@ -0,0 +1,32 @@ +score 1008965 +lamp ALL_JUSTICE +maxCombo 29 +0 JUSTICE_CRITICAL 0.933689763887287 +1 JUSTICE 43.91046764766679 +2 JUSTICE_CRITICAL -23.488740735698684 +3 JUSTICE_CRITICAL -28.48628893251498 +4 JUSTICE_CRITICAL -18.770895311134154 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +4 JUSTICE_CRITICAL 0.0 +5 JUSTICE_CRITICAL 10.15670733888146 +6 JUSTICE_CRITICAL -10.250749876573536 +7 JUSTICE_CRITICAL 16.436597797965987 +8 JUSTICE_CRITICAL 26.780555586216906 +9 JUSTICE_CRITICAL 5.18015418187133 +10 JUSTICE_CRITICAL 3.7140301123399695 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +11 JUSTICE_CRITICAL -19.50088198989397 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +10 JUSTICE_CRITICAL 0.0 +12 JUSTICE 35.04590358581845 +13 JUSTICE -34.81583820636297 +14 JUSTICE_CRITICAL -4.768318561556953 diff --git a/core/src/test/resources/golden/recorded/test-pattern-basic-20261104-224108.hexreplay b/core/src/test/resources/golden/recorded/test-pattern-basic-20261104-224108.hexreplay new file mode 100644 index 0000000000000000000000000000000000000000..430a113f9a5fbe6c9c8fa31b201054e1f7672a65 GIT binary patch literal 20937 zcmV(>K-j+@iwFP!00000|E#@fIF(=f|F05BgD4t^%u+OvBH59OCZ&Wzh%!WFOc^uJ z^E}Tp+qlhpqCzyNh$0jXluV`4&;37+Z{GX!_ zCMKpO|NAdZ=z%mFhp@81PMe_cO_`cq*1w!{rkTHydqu>KC#1G9{rlg_T}v_`I z&t6Ik|M!3YEdXObZXd~|0CYVj@_vl~IBP>WE^`uqa!b+850d~6+&f?Yts20Nxa+q| zw*lDHS|@ao55Sr-o|7jB04$A*Jn;7TBFLT!@K0S50btBVbGD-gK>r7ek&+w$FO8nO zzoHDFePd_xeiHyqVwc6IX#ny=lFD|j0gy2NpNmHH?tJbr2*68UR_We202iyjmn}H~ z-1@oAufY?5>C~Ues-pld|GAm*Y9)ZPS!=YIHvv$%c{1S9V*r~srEDI24Pdq4Dz#dD z083tO`n}zE5oG;jk?yA?0(kjUFRUO0K)bQv!ju7MdTGc~umM1&;jar7*ljqw*0B|Z}Vez>E z98=FyBC`S5FJr=g$REINCQ;R4u;eVkX_~Q)E07|;@#MnjvRoegg zM&VxZb5dyllD;t7M@HnbKN^A;0r)?fV7c}afO9cpK*_L?|6Let2Eb$~qe*4x@B7c6 zoK8H{qmu#P_^#j$OCVfiC=4IbO&(v7o-p!a!(qBCjD~>M%(0+iadD~k6HRbIR`wXJIMRZ?bw=h^Zq~;*W9fQA zu8n_~0Gz8?2yEK{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passed --- CLAUDE.md | 4 ++-- docs/DEVELOPMENT.md | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 619f606..3678e54 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,8 +2,8 @@ Hexium is a Fabric rhythm game mod for Minecraft 26.3 (Kotlin, Java 25): a 4-lane keyboard track plus a mouse-aimed sky screen, with an in-game editor and online charts. -It is client-only. The project is at Milestone 2 (ground prototype); see the roadmap in -docs/DESIGN.md. +It is client-only. Milestone 2 (ground prototype) has passed its gate, so the project is at +Milestone 3 (sky layer); see the roadmap in docs/DESIGN.md. ## Working with me - Before any non-trivial task, ask clarifying questions about the idea and design diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 1b4f7f0..c551baa 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -81,6 +81,8 @@ Parallel lanes that work well: after Milestone 1, `server` can build auth and ch ### Milestone 2 gate +Passed on macOS on 2026-11-04, with the recorded plays in `golden/recorded`. Steps 1 and 2 haven't been run on Windows yet. + Real keys go through SDL, which the game tests can't reach, so this needs a person. F6 shows the numbers during a play. If you can, repeat 1 and 2 on Windows, where SDL's key timestamps may be coarser. 1. **Timing feels tight.** Calibrate, then play **Test Pattern → Basic** and **Advanced**. The ms under the judgement should sit around 0 when you're on the beat, and notes should meet the line on the clicks. Then set Max Framerate to 30 and tap: `key stamp age` should spread from about 0 up to a frame (33 ms) or more. Always near 0 means the OS stamps aren't real, and timing is really down to the frame. `late keys` should stay at 0 at 30 FPS and above, though a single long frame can add some. From b3892ff629ec59f80dca771b63e0945c639fca44 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Fri, 6 Nov 2026 18:51:22 +0800 Subject: [PATCH 26/34] Feature: Send sky buttons through the pause rule and stop paused mouse movement hitting flicks --- CHANGELOG.md | 1 + .../trilleo/hexium/core/replay/PlayInput.kt | 72 +++- .../hexium/core/replay/PlayInputSkyTest.kt | 318 ++++++++++++++++++ .../hexium/core/replay/PlayInputTest.kt | 9 +- docs/ARCHITECTURE.md | 4 +- docs/DESIGN.md | 2 +- docs/JUDGEMENT.md | 2 +- docs/REPLAY_FORMAT.md | 4 +- 8 files changed, 399 insertions(+), 13 deletions(-) create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/replay/PlayInputSkyTest.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index 74a10d4..7a6413a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ + Added judging for sky taps, slides and flicks. + A swipe that jumps over a flick between two frames still hits it, so low frame rates stay fair. ++ Pausing is fair for sky notes too: a mouse button you changed while paused counts from the moment you paused, and moving the mouse while paused never counts as a swipe through a flick. #### Online diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/replay/PlayInput.kt b/core/src/main/kotlin/net/trilleo/hexium/core/replay/PlayInput.kt index 3722e07..5dfda2d 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/replay/PlayInput.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/replay/PlayInput.kt @@ -1,5 +1,7 @@ package net.trilleo.hexium.core.replay +import net.trilleo.hexium.core.chart.SkyButton + /** * What reaches [recorder] during a play, which is where the pause rule lives. Resuming rewinds the * song so the player can get back in time, but judging and recording only reopen when it comes back to @@ -9,7 +11,14 @@ package net.trilleo.hexium.core.replay * A key reaches the game after it happened, often after a later frame has already read the time. So * aim samples, and the judge's clock with them, wait [HOLD_BACK_MS] behind the song, and a key is * judged at once at its own time, among the samples around it. Only a key older than that gets moved - * up to the judge's time, which [lateKeyCount] counts. All input must come through here, so it stays in order with the samples. Doesn't allocate. + * up to the judge's time, which [lateKeyCount] counts. Sky buttons work the same way as lane keys. + * All input must come through here, so it stays in order with the samples. Doesn't allocate. + * + * Moving the mouse during a pause mustn't look like a fast swipe once judging reopens. So pausing + * records the crosshair where it last was at the pause point, and reopening records it again at that + * same point: where it was on its way from the last countdown frame to the frame that reopened, or + * where it was last seen if a key reopened. The judge doesn't test flicks on a step that takes no + * time, so this moves the aim without swiping, and the next step keeps its real speed. */ class PlayInput(private val recorder: ReplayRecorder, laneCount: Int) { /** Where the keys really are. */ @@ -18,6 +27,15 @@ class PlayInput(private val recorder: ReplayRecorder, laneCount: Int) { /** Where the judge thinks they are. */ private val judged = BooleanArray(laneCount) + private val buttonDown = BooleanArray(BUTTONS.size) + private val buttonJudged = BooleanArray(BUTTONS.size) + + /** The crosshair in the latest frame, whether or not it was judged. */ + private var hasAim = false + private var lastAimMs = 0.0 + private var lastAimX = 0f + private var lastAimY = 0f + private var paused = false /** Samples not sent yet, oldest first, in a fixed ring. */ @@ -41,9 +59,11 @@ class PlayInput(private val recorder: ReplayRecorder, laneCount: Int) { fun isLaneDown(lane: Int): Boolean = down[lane] + fun isButtonDown(button: SkyButton): Boolean = buttonDown[button.ordinal] + /** A lane key changing, wherever the play is. */ fun lane(lane: Int, isDown: Boolean, timeMs: Double) { - if (!isOpen && !paused && timeMs >= playedUntilMs) reopen() + if (!isOpen && !paused && timeMs >= playedUntilMs) reopen(hasAim, lastAimX, lastAimY) down[lane] = isDown if (!isOpen) return sendAimUpTo(timeMs) @@ -51,10 +71,36 @@ class PlayInput(private val recorder: ReplayRecorder, laneCount: Int) { send(lane, isDown, timeMs) } + /** A sky button changing, wherever the play is, with the crosshair at that moment. */ + fun button(button: SkyButton, isDown: Boolean, timeMs: Double, x: Float, y: Float) { + if (!isOpen && !paused && timeMs >= playedUntilMs) reopen(hasAim, lastAimX, lastAimY) + buttonDown[button.ordinal] = isDown + if (!isOpen) return + sendAimUpTo(timeMs) + if (timeMs < recorder.latestMs) lateKeyCount++ + sendButton(button, isDown, timeMs, x, y) + } + /** Call once per frame while the song is running, after that frame's input. */ fun frame(timeMs: Double, aimX: Float, aimY: Float) { if (!timeMs.isFinite()) return - if (!isOpen && !paused && timeMs >= playedUntilMs) reopen() + val aimFinite = aimX.isFinite() && aimY.isFinite() + if (!isOpen && !paused && timeMs >= playedUntilMs) { + if (!aimFinite) { + reopen(hasAim, lastAimX, lastAimY) + } else if (!hasAim || timeMs <= lastAimMs) { + reopen(true, aimX, aimY) + } else { + val along = ((playedUntilMs - lastAimMs) / (timeMs - lastAimMs)).coerceIn(0.0, 1.0) + reopen(true, (lastAimX + (aimX - lastAimX) * along).toFloat(), (lastAimY + (aimY - lastAimY) * along).toFloat()) + } + } + if (aimFinite) { + hasAim = true + lastAimMs = timeMs + lastAimX = aimX + lastAimY = aimY + } if (!isOpen) return if (aimCount == AIM_CAPACITY) sendOldestAim() val slot = (aimHead + aimCount) % AIM_CAPACITY @@ -71,6 +117,7 @@ class PlayInput(private val recorder: ReplayRecorder, laneCount: Int) { fun pause(timeMs: Double) { if (isOpen) { sendAimUpTo(Double.POSITIVE_INFINITY) + if (hasAim) recorder.aimSample(timeMs, lastAimX, lastAimY) recorder.advanceTo(timeMs) playedUntilMs = timeMs } @@ -84,13 +131,28 @@ class PlayInput(private val recorder: ReplayRecorder, laneCount: Int) { return playedUntilMs - REWIND_MS } - private fun reopen() { + /** + * Syncs keys and buttons at the pause point, then records the crosshair at [aimX], [aimY] there. + * Without a crosshair seen yet ([aimKnown] false) there's nowhere to press a button, so a press + * waits for the next pause point. + */ + private fun reopen(aimKnown: Boolean, aimX: Float, aimY: Float) { for (lane in down.indices) { if (down[lane] != judged[lane]) send(lane, down[lane], playedUntilMs) } + for (i in BUTTONS.indices) { + if (buttonDown[i] != buttonJudged[i] && (aimKnown || !buttonDown[i])) sendButton(BUTTONS[i], buttonDown[i], playedUntilMs, aimX, aimY) + } + // After the buttons, so a slide only counts as held with the button really down. + if (aimKnown) recorder.aimSample(playedUntilMs, aimX, aimY) isOpen = true } + private fun sendButton(button: SkyButton, isDown: Boolean, timeMs: Double, x: Float, y: Float) { + buttonJudged[button.ordinal] = isDown + if (isDown) recorder.pressButton(button, timeMs, x, y) else recorder.releaseButton(button, timeMs) + } + private fun send(lane: Int, isDown: Boolean, timeMs: Double) { judged[lane] = isDown if (isDown) recorder.pressLane(lane, timeMs) else recorder.releaseLane(lane, timeMs) @@ -113,6 +175,8 @@ class PlayInput(private val recorder: ReplayRecorder, laneCount: Int) { } companion object { + private val BUTTONS = SkyButton.entries.toTypedArray() + const val REWIND_MS = 3000.0 /** Covers a key a whole frame old at about 30 FPS, plus its way to the game. Misses and ticks show this much later. */ diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/replay/PlayInputSkyTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/replay/PlayInputSkyTest.kt new file mode 100644 index 0000000..e8abc5a --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/replay/PlayInputSkyTest.kt @@ -0,0 +1,318 @@ +package net.trilleo.hexium.core.replay + +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFalse +import kotlin.test.assertTrue +import net.trilleo.hexium.core.chart.Beat +import net.trilleo.hexium.core.chart.BpmChange +import net.trilleo.hexium.core.chart.Difficulty +import net.trilleo.hexium.core.chart.DifficultyChart +import net.trilleo.hexium.core.chart.MeterChange +import net.trilleo.hexium.core.chart.Note +import net.trilleo.hexium.core.chart.SkyButton +import net.trilleo.hexium.core.chart.SlidePoint +import net.trilleo.hexium.core.chart.Ease +import net.trilleo.hexium.core.judge.JudgeChart +import net.trilleo.hexium.core.judge.Judgement + +/** Sky buttons and aim through [PlayInput]: the same hold-back and pause rule as lane keys. */ +class PlayInputSkyTest { + private fun beat(whole: Int) = Beat(whole, 0, 1) + + /** At 120 BPM a beat is 500 ms: an L sky tap at 10 s mid-screen, and a flick at 12.5 s on the right. */ + private val chart = JudgeChart.compile( + DifficultyChart( + 1, Difficulty.EXPERT, 1, 4, 0.0, + listOf(BpmChange(beat(0), 120.0)), + listOf(MeterChange(beat(0), 4, 4)), + listOf(Note.SkyTap(beat(20), 0.5, 0.5, SkyButton.L, 1.0), Note.Flick(beat(25), 0.8, 0.5, null, 1.0)), + ), + ) + private val recorder = ReplayRecorder(chart, ByteArray(32), 0.0, 1000) + private val input = PlayInput(recorder, 4) + + private fun events(): List { + val replay = recorder.toReplay() + return (0 until replay.eventCount).map { + val position = if (replay.event(it) == ReplayEvent.LANE_DOWN || replay.event(it) == ReplayEvent.LANE_UP || replay.event(it) == ReplayEvent.BUTTON_UP) "" else " (${replay.x(it)}, ${replay.y(it)})" + "${replay.event(it)} ${replay.index(it)} at ${replay.timeMs(it)}$position" + } + } + + private fun buttonEvents(): List = events().filter { it.startsWith("BUTTON") } + + private fun pauseAndComeBack(atMs: Double): Double { + input.pause(atMs) + return input.resume() + } + + @Test + fun aClickGoesStraightToTheJudgeWithItsPosition() { + input.button(SkyButton.L, true, 10000.0, 0.5f, 0.5f) + assertEquals(Judgement.JUSTICE_CRITICAL, recorder.judge.judgement(0)) + assertEquals(listOf("BUTTON_DOWN 0 at 10000.0 (0.5, 0.5)"), events()) + assertTrue(input.isButtonDown(SkyButton.L)) + assertFalse(input.isButtonDown(SkyButton.R)) + } + + @Test + fun aReleaseIsRecordedWithoutAPosition() { + input.button(SkyButton.R, true, 1000.0, 0.1f, 0.2f) + input.button(SkyButton.R, false, 1100.0, 0.3f, 0.4f) + assertEquals(listOf("BUTTON_DOWN 1 at 1000.0 (0.1, 0.2)", "BUTTON_UP 1 at 1100.0"), events()) + assertFalse(input.isButtonDown(SkyButton.R)) + } + + @Test + fun aClickLandsAmongTheAimSamplesInTimeOrder() { + input.frame(1000.0, 0.5f, 0.5f) + input.frame(1006.0, 0.5f, 0.5f) + input.frame(1012.0, 0.5f, 0.5f) + input.button(SkyButton.L, true, 1009.0, 0.5f, 0.5f) + input.finish() + val replay = recorder.toReplay() + assertEquals(listOf(1000.0, 1006.0, 1009.0, 1012.0), (0 until replay.eventCount).map { replay.timeMs(it) }) + assertEquals(ReplayEvent.BUTTON_DOWN, replay.event(2)) + } + + @Test + fun aClickOlderThanTheHoldBackIsMovedUpAndCounted() { + input.frame(10100.0, 0.5f, 0.5f) + input.button(SkyButton.L, true, 10040.0, 0.5f, 0.5f) + assertEquals(listOf("BUTTON_DOWN 0 at 10050.0 (0.5, 0.5)"), buttonEvents()) + assertEquals(1, input.lateKeyCount) + } + + @Test + fun nothingFromTheMouseIsJudgedOrRecordedWhilePaused() { + input.pause(5000.0) + input.frame(20000.0, 0.5f, 0.5f) + input.button(SkyButton.L, true, 10000.0, 0.5f, 0.5f) + assertEquals(0, recorder.toReplay().eventCount) + assertTrue(input.isButtonDown(SkyButton.L)) + } + + @Test + fun aButtonReleasedDuringThePauseIsReleasedAtThePausePoint() { + input.button(SkyButton.L, true, 1000.0, 0.5f, 0.5f) + pauseAndComeBack(5000.0) + input.button(SkyButton.L, false, 3000.0, 0.5f, 0.5f) + input.frame(5001.0, 0.5f, 0.5f) + assertEquals(listOf("BUTTON_DOWN 0 at 1000.0 (0.5, 0.5)", "BUTTON_UP 0 at 5000.0"), buttonEvents()) + } + + @Test + fun aButtonStillDownFromTheCountdownIsPressedAtThePausePointWhereTheCrosshairWas() { + input.frame(9900.0, 0.1f, 0.1f) + pauseAndComeBack(10000.0) + input.frame(9990.0, 0.4f, 0.4f) + input.button(SkyButton.L, true, 9995.0, 0.9f, 0.9f) + input.frame(10010.0, 0.6f, 0.6f) + assertEquals(listOf("BUTTON_DOWN 0 at 10000.0 (0.5, 0.5)"), buttonEvents()) + assertEquals(Judgement.JUSTICE_CRITICAL, recorder.judge.judgement(0)) + } + + @Test + fun aClickDuringTheCountdownIsForgotten() { + pauseAndComeBack(5000.0) + input.button(SkyButton.R, true, 3000.0, 0.5f, 0.5f) + input.button(SkyButton.R, false, 3100.0, 0.5f, 0.5f) + input.frame(5001.0, 0.5f, 0.5f) + assertEquals(emptyList(), buttonEvents()) + } + + @Test + fun aClickPastThePausePointReopensAndKeepsItsOwnTimeAndPosition() { + pauseAndComeBack(5000.0) + input.button(SkyButton.L, true, 5200.0, 0.3f, 0.7f) + assertTrue(input.isOpen) + assertEquals(listOf("BUTTON_DOWN 0 at 5200.0 (0.3, 0.7)"), buttonEvents()) + } + + @Test + fun pausingRecordsWhereTheCrosshairWasAtThePausePoint() { + input.frame(1000.0, 0.2f, 0.3f) + input.pause(1012.0) + assertEquals(listOf("AIM 0 at 1000.0 (0.2, 0.3)", "AIM 0 at 1012.0 (0.2, 0.3)"), events()) + } + + @Test + fun reopeningOnAFrameRecordsTheCrosshairOnItsWayThere() { + input.frame(1000.0, 0.2f, 0.3f) + pauseAndComeBack(1012.0) + input.frame(1004.0, 0.6f, 0.7f) + input.frame(1020.0, 0.8f, 0.9f) + // Halfway in time from the last countdown frame to this one, so its movement keeps its real speed. + val replay = recorder.toReplay() + assertEquals(3, replay.eventCount) + assertEquals(1012.0, replay.timeMs(2)) + assertEquals(0.7f, replay.x(2), 1e-6f) + assertEquals(0.8f, replay.y(2), 1e-6f) + input.finish() + assertEquals("AIM 0 at 1020.0 (0.8, 0.9)", events().last()) + } + + @Test + fun reopeningOnAKeyRecordsWhereTheCrosshairWasLastSeen() { + input.frame(1000.0, 0.2f, 0.3f) + pauseAndComeBack(1012.0) + input.frame(1004.0, 0.6f, 0.7f) + input.lane(0, true, 1015.0) + assertEquals( + listOf("AIM 0 at 1000.0 (0.2, 0.3)", "AIM 0 at 1012.0 (0.2, 0.3)", "AIM 0 at 1012.0 (0.6, 0.7)", "LANE_DOWN 0 at 1015.0"), + events(), + ) + } + + @Test + fun aButtonHeldBeforeAnyAimIsNotPressedAtAMadeUpPosition() { + input.pause(1000.0) + input.button(SkyButton.L, true, 900.0, 0.5f, 0.5f) + input.resume() + input.lane(0, true, 1001.0) + assertEquals(emptyList(), buttonEvents()) + assertTrue(input.isButtonDown(SkyButton.L)) + // It reaches the judge once there's a crosshair, at the next pause point. + input.frame(1010.0, 0.4f, 0.6f) + input.pause(1020.0) + input.resume() + input.frame(1030.0, 0.4f, 0.6f) + assertEquals(listOf("BUTTON_DOWN 0 at 1020.0 (0.4, 0.6)"), buttonEvents()) + } + + @Test + fun aPauseBeforeAnyAimRecordsNoPosition() { + pauseAndComeBack(1000.0) + input.lane(0, true, 1001.0) + assertEquals(listOf("LANE_DOWN 0 at 1001.0"), events()) + } + + /** The flick is the chart's second note. */ + private fun flickResult(): Judgement? { + val judge = recorder.judge + for (i in 0 until judge.judgedCount) if (judge.judgedNote(i) == 1) return judge.judgement(i) + return null + } + + /** + * Moves the crosshair from x 0.2 to 0.9 at mid-height, across the flick, while paused. The + * countdown's frames are off the grid of the ones before, so none lands on the pause point. + */ + private fun moveAcrossTheFlickWhilePaused(input: PlayInput) { + var frameMs = 12000.0 + while (frameMs < 12460.0) { + input.frame(frameMs, 0.2f, 0.5f) + frameMs += 6.0 + } + input.pause(12460.0) + input.resume() + frameMs = 9463.0 + while (frameMs < 12460.0) { + input.frame(frameMs, 0.9f, 0.5f) + frameMs += 6.0 + } + while (frameMs < 13000.0) { + input.frame(frameMs, 0.9f, 0.5f) + frameMs += 6.0 + } + input.finish() + } + + @Test + fun movingTheMouseDuringAPauseDoesNotHitAFlick() { + moveAcrossTheFlickWhilePaused(input) + assertEquals(Judgement.MISS, flickResult()) + assertReJudgesTheSame() + } + + @Test + fun movingTheMouseDuringAPauseDoesNotHitAFlickWithAJudgementOffset() { + val offsetRecorder = ReplayRecorder(chart, ByteArray(32), 37.5, 1000) + moveAcrossTheFlickWhilePaused(PlayInput(offsetRecorder, 4)) + val judge = offsetRecorder.judge + assertEquals(Judgement.MISS, (0 until judge.judgedCount).first { judge.judgedNote(it) == 1 }.let(judge::judgement)) + } + + @Test + fun aSwipeAfterReopeningStillHitsAFlick() { + var frameMs = 12000.0 + while (frameMs < 12400.0) { + input.frame(frameMs, 0.2f, 0.5f) + frameMs += 6.0 + } + pauseAndComeBack(12400.0) + frameMs = 9403.0 + while (frameMs < 12460.0) { + input.frame(frameMs, 0.2f, 0.5f) + frameMs += 6.0 + } + var x = 0.2f + while (frameMs < 13000.0) { + input.frame(frameMs, x, 0.5f) + x = minOf(x + 0.02f, 1f) + frameMs += 6.0 + } + input.finish() + assertEquals(Judgement.JUSTICE, flickResult()) + assertReJudgesTheSame() + } + + @Test + fun aButtonLetGoWhilePausedDoesNotHoldASlideAtThePausePoint() { + // An L slide sitting mid-screen from 10 s to 12 s, with a tick every 125 ms from 10125. + val slideChart = JudgeChart.compile( + DifficultyChart( + 1, Difficulty.EXPERT, 1, 4, 0.0, + listOf(BpmChange(beat(0), 120.0)), + listOf(MeterChange(beat(0), 4, 4)), + listOf(Note.Slide(SkyButton.L, 0.06, listOf(SlidePoint(beat(20), 0.5, 0.5, Ease.LINEAR), SlidePoint(beat(24), 0.5, 0.5, Ease.LINEAR)))), + ), + ) + val slideRecorder = ReplayRecorder(slideChart, ByteArray(32), 0.0, 2000) + val play = PlayInput(slideRecorder, 4) + play.button(SkyButton.L, true, 9000.0, 0.5f, 0.5f) + var frameMs = 9000.0 + while (frameMs < 10100.0) { + // On the path until 10 s, then off it. + play.frame(frameMs, if (frameMs < 10000.0) 0.5f else 0.1f, 0.5f) + frameMs += 6.0 + } + play.pause(10100.0) + play.button(SkyButton.L, false, 8000.0, 0.5f, 0.5f) + play.resume() + frameMs = 7103.0 + while (frameMs < 10300.0) { + play.frame(frameMs, 0.5f, 0.5f) + frameMs += 6.0 + } + play.finish() + val judge = slideRecorder.judge + // Last held at 9996, so the tick at 10125 is 129 ms on. + assertEquals(Judgement.ATTACK, judge.judgement(0)) + } + + @Test + fun aPausedClickAndSwipeReJudgeTheSame() { + input.frame(9900.0, 0.5f, 0.5f) + input.button(SkyButton.L, true, 9990.0, 0.5f, 0.5f) + pauseAndComeBack(10010.0) + input.button(SkyButton.L, false, 8000.0, 0.5f, 0.5f) + input.frame(10020.0, 0.4f, 0.5f) + input.button(SkyButton.R, true, 10030.0, 0.4f, 0.5f) + input.frame(10040.0, 0.4f, 0.5f) + assertReJudgesTheSame() + } + + private fun assertReJudgesTheSame() { + input.finish() + val replayed = ReplayJudge.play(chart, ReplayFile.read(ReplayFile.write(recorder.toReplay())).replay!!) + val live = recorder.judge + assertEquals(live.score, replayed.score) + assertEquals(live.judgedCount, replayed.judgedCount) + for (i in 0 until live.judgedCount) { + assertEquals(live.judgement(i), replayed.judgement(i)) + assertEquals(live.judgedDeltaMs(i), replayed.judgedDeltaMs(i)) + } + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/replay/PlayInputTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/replay/PlayInputTest.kt index f994121..3a61a7f 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/replay/PlayInputTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/replay/PlayInputTest.kt @@ -11,6 +11,7 @@ import net.trilleo.hexium.core.chart.Difficulty import net.trilleo.hexium.core.chart.DifficultyChart import net.trilleo.hexium.core.chart.MeterChange import net.trilleo.hexium.core.chart.Note +import net.trilleo.hexium.core.chart.SkyButton import net.trilleo.hexium.core.judge.Judge import net.trilleo.hexium.core.judge.JudgeChart import net.trilleo.hexium.core.judge.Judgement @@ -89,8 +90,9 @@ class PlayInputTest { assertEquals(0, recorder.toReplay().eventCount) input.frame(5000.0, 0.5f, 0.5f) assertTrue(input.isOpen) + // Where the crosshair was when judging reopened, then that frame's own sample. input.frame(5000.0 + PlayInput.HOLD_BACK_MS, 0.5f, 0.5f) - assertEquals(1, recorder.toReplay().eventCount) + assertEquals(listOf(5000.0, 5000.0), allEventTimes()) } @Test @@ -323,12 +325,12 @@ class PlayInputTest { } @Test - fun pausingSendsEverySampleStillWaiting() { + fun pausingSendsEverySampleStillWaitingAndOneAtThePausePoint() { input.frame(1000.0, 0.5f, 0.5f) input.frame(1010.0, 0.5f, 0.5f) assertEquals(0, recorder.toReplay().eventCount) input.pause(1012.0) - assertEquals(listOf(1000.0, 1010.0), allEventTimes()) + assertEquals(listOf(1000.0, 1010.0, 1012.0), allEventTimes()) } @Test @@ -461,6 +463,7 @@ class PlayInputTest { while (i < 200_000) { val time = i * 2.0 if (i % 50 == 0) play.lane(i % 4, i % 100 == 0, time - 3.0) + if (i % 70 == 0) play.button(if (i % 140 == 0) SkyButton.L else SkyButton.R, i % 280 < 140, time - 2.0, 0.4f, 0.6f) play.frame(time, 0.5f, 0.5f) if (i % 10_000 == 9_999) { play.pause(time) diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 55a8623..b6145a1 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -54,9 +54,9 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl - Every frame, record an aim sample (song time, yaw, pitch → crosshair point on the screen plane). Slides and flicks are judged from these samples. Flicks test the line between two samples, so fast swipes at low FPS still register. - Events go into a fixed ring that the play loop (`PlaySession`) drains at the start of every frame, before anything reads the time. A play has a 3-second lead-in with the clock running before the music, and stays open 2 seconds after the last note. - Until sky notes exist, the aim sample is a fixed mid-screen point, on the same code path. -- Pausing stops the song and clock together. Resuming goes back 3 seconds, or to before the song if that's where it lands, and plays on from there under a 3-2-1 countdown. `PlayInput` in `core` holds the rule: nothing is judged or recorded until the song is back at the pause point, and any lane key that changed in between is pressed or released at exactly that time. Keys are read while the pause screen is open too, so this knows which are really down. Notes already judged stay hidden during the countdown, and so does the part of a hold already played. +- Pausing stops the song and clock together. Resuming goes back 3 seconds, or to before the song if that's where it lands, and plays on from there under a 3-2-1 countdown. `PlayInput` in `core` holds the rule: nothing is judged or recorded until the song is back at the pause point, and any lane key or sky button that changed in between is pressed or released at exactly that time. The crosshair is recorded where it last was at the pause point, and again where it is on its way to the frame that reopens judging, at that same time, so moving the mouse while paused isn't a swipe ([REPLAY_FORMAT.md](REPLAY_FORMAT.md)). Keys are read while the pause screen is open too, so this knows which are really down. Notes already judged stay hidden during the countdown, and so does the part of a hold already played. - A finished play opens `ResultsScreen` and saves its replay. Retry, on that screen and the pause screen, loads a new `PlaySession` for the same chart and keeps the stage. Leaving or retrying part way through saves nothing. -- A key usually arrives after a later frame has read the time: on a Mac at 170 FPS, most stamps were already older than the last frame. So `PlayInput` holds aim samples and the judge's clock 50 ms behind the song. A key is judged at once at its own stamp, after the samples older than it, so hits show straight away and only Misses, ticks and, from Milestone 3, slide and flick results show up to 50 ms later. A key older than the judge's current time moves up to it and counts as a `late key`: that takes a stamp more than 50 ms behind the previous frame, or one older than a newer key or the pause point. Calibration reads the same stamps, so offset B applies to the times it was measured on. +- A key usually arrives after a later frame has read the time: on a Mac at 170 FPS, most stamps were already older than the last frame. So `PlayInput` holds aim samples and the judge's clock 50 ms behind the song. A key is judged at once at its own stamp, after the samples older than it, so hits show straight away and only Misses, ticks and, from Milestone 3, slide and flick results show up to 50 ms later. Sky buttons go through `PlayInput` the same way, with the crosshair at the click, never straight to `ReplayRecorder`, or they would land out of order with the held-back samples. A key or button older than the judge's current time moves up to it and counts as a `late key`: that takes a stamp more than 50 ms behind the previous frame, or one older than a newer key or the pause point. Calibration reads the same stamps, so offset B applies to the times it was measured on. - Events go through the judge every frame. Every input event and aim sample is also appended to the replay: the mod sends all input through `PlayInput`, then `ReplayRecorder`, which records it and passes it to the judge ([REPLAY_FORMAT.md](REPLAY_FORMAT.md)). ## Calibration diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 6dbf592..cef2055 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -57,7 +57,7 @@ Everything is judged on one plane: the transparent screen in front of the player - A sky tap pressed with the wrong button is ignored by that note. It neither hits nor breaks it. - One press resolves at most one note: the earliest unjudged note in range, by timing. - Mouse sensitivity during play is the mod's own setting. It applies on top of Minecraft's raw mouse input, so menu feel doesn't change. -- Pause (Esc) pauses the audio and the clock together. Resuming rewinds the song 3 seconds and plays it under a 3-2-1 countdown, as most rhythm games do. Judging reopens exactly at the pause point, and any lane key changed in between counts from there ([REPLAY_FORMAT.md](REPLAY_FORMAT.md)). +- Pause (Esc) pauses the audio and the clock together. Resuming rewinds the song 3 seconds and plays it under a 3-2-1 countdown, as most rhythm games do. Judging reopens exactly at the pause point, and any lane key or mouse button changed in between counts from there. Moving the mouse while paused never counts as a swipe ([REPLAY_FORMAT.md](REPLAY_FORMAT.md)). ### Aiming with real camera rotation diff --git a/docs/JUDGEMENT.md b/docs/JUDGEMENT.md index e7c2680..96fc774 100644 --- a/docs/JUDGEMENT.md +++ b/docs/JUDGEMENT.md @@ -18,7 +18,7 @@ Limits are inclusive. For taps, sky taps and hold heads, the Miss window runs fr - **Tap and sky tap:** judged by |press time − target|. A sky tap also needs the crosshair inside the note's hit area at the moment of the click. A note's hit area is a circle whose radius is the base hit radius in `JudgementConfig` (0.08) times the note's `size`. Hit radii are fractions of the screen's height, and circles are measured using the screen's 2:1 aspect, also in `JudgementConfig`. A press with no note in its Miss window does nothing (no penalty). A sky tap click outside the hit area, or with the wrong button, is ignored by that note, so the player can click again in time. The crosshair position is recorded with the click. - **Ground hold:** the head is judged like a tap. The body has invisible ticks, one every 1/4 beat (fixed in `JudgementConfig`, not set per chart, at least one per hold). Ticks are counted from the hold's start and exclude its start and end. A hold too short for any tick gets one at its end. Each tick is judged at its own time, on how long ago the lane key was last down, even if it was pressed before the hold began. A press after the tick doesn't help it. Releasing and pressing again inside the window keeps Justice Critical, like CHUNITHM. There's no tail judgement, and holding past the end is never penalised. - **Sky slide:** no head or tail judgement. Ticks every 1/4 beat along the path (the same fixed rate and placement as holds, from the first point to the last). A tick is "held" while the required button is down AND the crosshair is inside the path's hit radius (its `radius`, a fraction of the screen's height) at the path's current position. Before the first point, the position is the first point. Each tick is judged on how long ago the last aim sample that was "held" came, with the tick windows above. A click counts as an aim sample at its own position. -- **Flick:** hit when the crosshair passes through the note's hit area between two frames, moving faster than a minimum speed (screen units per second), in the optional required direction. The judgement is the crossing time against the target: the moment the swipe first enters the hit area, worked out along the line between the two samples. A swipe that starts inside uses the time of that first sample. A swipe that entered before the window opened and is still inside when it opens counts as crossing at that moment. The minimum speed is 1 screen height per second and the direction tolerance is ±45°, both in `JudgementConfig`. One swipe can hit several flicks. +- **Flick:** hit when the crosshair passes through the note's hit area between two frames, moving faster than a minimum speed (screen units per second), in the optional required direction. The judgement is the crossing time against the target: the moment the swipe first enters the hit area, worked out along the line between the two samples. A swipe that starts inside uses the time of that first sample. A swipe that entered before the window opened and is still inside when it opens counts as crossing at that moment. The minimum speed is 1 screen height per second and the direction tolerance is ±45°, both in `JudgementConfig`. One swipe can hit several flicks. Two aim samples at the same time are never a swipe: the crosshair just moves, which is how the pause rule moves it without hitting anything ([REPLAY_FORMAT.md](REPLAY_FORMAT.md)). - A missed head doesn't auto-fail the hold's ticks. Each tick stands on its own. ## Score diff --git a/docs/REPLAY_FORMAT.md b/docs/REPLAY_FORMAT.md index a226eeb..d865661 100644 --- a/docs/REPLAY_FORMAT.md +++ b/docs/REPLAY_FORMAT.md @@ -30,7 +30,7 @@ Each event starts with one byte, the kind in the high 4 bits and the index in th ## Rules -- Times never go down, so a replay always runs forward. When a player resumes from pause and the notes rewind, input isn't judged or recorded until play passes the point where it paused. A lane key that changed in between is recorded as changing at exactly that point. +- Times never go down, so a replay always runs forward. When a player resumes from pause and the notes rewind, input isn't judged or recorded until play passes the point where it paused. A lane key or sky button that changed in between is recorded as changing at exactly that point. Moving the mouse while paused mustn't count as a swipe, so pausing records an aim sample at the pause point where the crosshair last was, and reopening records another at that same point. When a frame reopens judging, that second sample is where the crosshair was at the pause point on its way from the last countdown frame to this one, so the next step keeps its real speed; when a key reopens it, it's where the crosshair was last seen. Keys and buttons are synced first, a button press at that same position, and then that sample is recorded. Two samples at the same time are never a swipe ([JUDGEMENT.md](JUDGEMENT.md)), so the aim moves without one. Before any frame there's no crosshair, so a button pressed then waits for the next pause point. - Times, `x`, `y` and offset B are finite. Times may be negative: a play starts with a lead-in before the song. - A file holds at most 2,000,000 events, about 2 hours at 240 FPS. Reading stops at that size once decompressed, so a small file can't unpack into something huge. - A file whose contents have anything else wrong, including bytes left over after the last event, is rejected with a message. Reading never throws. Only the unpacked contents are checked, so bytes outside the gzip data are ignored. @@ -41,4 +41,4 @@ The judge version is `JudgementConfig.JUDGE_VERSION`. Raise it whenever a change ## Recording -The mod sends input through `PlayInput`, which holds the pause rule above, and on to `ReplayRecorder`, which records each event and passes it to the judge, so a replay holds exactly what the judge saw. Keys reach the game after they happened, so `PlayInput` holds aim samples and the judge's clock 50 ms behind the song, and a key goes in at its own time among the samples around it. An event older than the judge's current time is recorded as happening at that time, which is also how the judge treats it. +The mod sends input through `PlayInput`, which holds the pause rule above, and on to `ReplayRecorder`, which records each event and passes it to the judge, so a replay holds exactly what the judge saw. Keys reach the game after they happened, so `PlayInput` holds aim samples and the judge's clock 50 ms behind the song, and a key or sky button goes in at its own time among the samples around it. An event older than the judge's current time is recorded as happening at that time, which is also how the judge treats it. From 6c8005ddb5e368ae9d8ce78bbec51b1d6ddbd589 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Sun, 8 Nov 2026 09:15:23 +0800 Subject: [PATCH 27/34] Feature: Add a sky readability chart to the Test Pattern and a sky note lookup for drawing --- CHANGELOG.md | 1 + .../net/trilleo/hexium/core/chart/SkyTrack.kt | 133 +++++++++ .../hexium/core/chart/ChartFolderTest.kt | 2 +- .../trilleo/hexium/core/chart/SkyTrackTest.kt | 252 ++++++++++++++++++ .../trilleo/hexium/core/chart/TestPackTest.kt | 84 +++++- docs/ARCHITECTURE.md | 2 +- docs/DEVELOPMENT.md | 2 +- .../hexium_packs/test-pattern/expert.json | 251 +++++++++++++++++ .../hexium_packs/test-pattern/meta.json | 2 +- 9 files changed, 722 insertions(+), 7 deletions(-) create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/chart/SkyTrack.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/chart/SkyTrackTest.kt create mode 100644 mod/src/client/resources/hexium_packs/test-pattern/expert.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a6413a..da5cc1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ + Checks charts and packages against every rule in the chart format. + Warns when a moment is too dense to play with one hand on the keys. + Added basic, advanced and expert example charts for charters to learn the format from. ++ The built-in Test Pattern has a new Expert chart: 90 seconds of sky taps, slides and flicks all over the screen, corners included, mixed with ground notes. + Added a command-line chart linter, `lint`, that checks chart files and folders against the format. #### Gameplay diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/chart/SkyTrack.kt b/core/src/main/kotlin/net/trilleo/hexium/core/chart/SkyTrack.kt new file mode 100644 index 0000000..0bc83f8 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/chart/SkyTrack.kt @@ -0,0 +1,133 @@ +package net.trilleo.hexium.core.chart + +import net.trilleo.hexium.core.judge.JudgementConfig + +/** + * A chart's sky taps, slides and flicks in time order, in song milliseconds, for drawing. A note's + * radius is the judge's hit radius, so what's drawn is what counts. Lookups don't allocate, so + * they're safe in per-frame code, and keep no position of their own, so time can jump either way. + * How far away a note is drawn comes from [GroundTrack.distance], as for ground notes. + * + * Expects a chart that passed the validator. + */ +class SkyTrack(chart: DifficultyChart, config: JudgementConfig = JudgementConfig.DEFAULT) { + enum class Kind { TAP, SLIDE, FLICK } + + private class Entry( + val kind: Kind, + val startMs: Double, + val endMs: Double, + val x: Double, + val y: Double, + val button: SkyButton?, + val radius: Double, + val directionDegrees: Double, + val chartNote: Int, + val path: SlidePath?, + ) + + private val timing = TimingMap(chart.offsetMs, chart.bpm) + private val kinds: Array + private val starts: DoubleArray + private val ends: DoubleArray + private val xs: DoubleArray + private val ys: DoubleArray + private val buttons: Array + private val radii: DoubleArray + private val directions: DoubleArray + private val chartNotes: IntArray + private val paths: Array + + /** The latest end among each note and all before it. It always rises, so it can be searched. */ + private val endsSoFar: DoubleArray + + init { + val entries = ArrayList() + for (i in chart.notes.indices) { + when (val note = chart.notes[i]) { + is Note.SkyTap -> { + val ms = timing.beatToMs(note.t) + entries += Entry(Kind.TAP, ms, ms, note.x, note.y, note.button, config.baseHitRadius * note.size, Double.NaN, i, null) + } + is Note.Flick -> { + val ms = timing.beatToMs(note.t) + entries += Entry(Kind.FLICK, ms, ms, note.x, note.y, null, config.baseHitRadius * note.size, note.dir ?: Double.NaN, i, null) + } + is Note.Slide -> { + val first = note.points.first() + entries += Entry( + Kind.SLIDE, timing.beatToMs(first.t), timing.beatToMs(note.points.last().t), + first.x, first.y, note.button, note.radius, Double.NaN, i, SlidePath(note.points), + ) + } + else -> {} + } + } + // Stable, so notes at the same time keep the chart's order. + entries.sortWith(compareBy { it.startMs }) + kinds = Array(entries.size) { entries[it].kind } + starts = DoubleArray(entries.size) { entries[it].startMs } + ends = DoubleArray(entries.size) { entries[it].endMs } + xs = DoubleArray(entries.size) { entries[it].x } + ys = DoubleArray(entries.size) { entries[it].y } + buttons = Array(entries.size) { entries[it].button } + radii = DoubleArray(entries.size) { entries[it].radius } + directions = DoubleArray(entries.size) { entries[it].directionDegrees } + chartNotes = IntArray(entries.size) { entries[it].chartNote } + paths = Array(entries.size) { entries[it].path } + endsSoFar = DoubleArray(entries.size) + var latest = Double.NEGATIVE_INFINITY + for (i in entries.indices) { + if (ends[i] > latest) latest = ends[i] + endsSoFar[i] = latest + } + } + + val size: Int + get() = starts.size + + /** The screen's width over its height. A hit circle [radius] high is `radius / screenAspect` wide in x's units. */ + val screenAspect: Double = config.screenAspect + + fun kind(index: Int): Kind = kinds[index] + + /** The note's index in the chart's notes, which is what the judge reports. */ + fun chartNote(index: Int): Int = chartNotes[index] + + fun startMs(index: Int): Double = starts[index] + + /** A tap or flick ends when it starts. */ + fun endMs(index: Int): Double = ends[index] + + /** The button a tap or slide needs, or null for a flick. */ + fun button(index: Int): SkyButton? = buttons[index] + + /** The hit radius, as a fraction of the screen's height, measured with [screenAspect] (docs/JUDGEMENT.md). */ + fun radius(index: Int): Double = radii[index] + + /** A flick's required direction in degrees (0 = right, 90 = up), or NaN if any will do. NaN for taps and slides. */ + fun directionDegrees(index: Int): Double = directions[index] + + /** Where the note is across the screen at [timeMs], 0 (left) to 1 (right). Only a slide moves. */ + fun x(index: Int, timeMs: Double): Double { + val path = paths[index] ?: return xs[index] + return path.x(timing.msToBeat(timeMs)) + } + + /** Where the note is up the screen at [timeMs], 0 (bottom) to 1 (top). Only a slide moves. */ + fun y(index: Int, timeMs: Double): Double { + val path = paths[index] ?: return ys[index] + return path.y(timing.msToBeat(timeMs)) + } + + /** Every note before this index ended before [timeMs]. It's [size] if they all did. */ + fun firstEndingFrom(timeMs: Double): Int { + var low = 0 + var high = endsSoFar.size + while (low < high) { + val middle = (low + high) ushr 1 + if (endsSoFar[middle] < timeMs) low = middle + 1 else high = middle + } + return low + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartFolderTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartFolderTest.kt index 96d6965..739576c 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartFolderTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/ChartFolderTest.kt @@ -9,7 +9,7 @@ import kotlin.test.assertTrue class ChartFolderTest { private val meta = File("../mod/src/client/resources/hexium_packs/test-pattern/meta.json").readText() - .replace("""[ "BASIC", "ADVANCED" ]""", """[ "BASIC" ]""") + .replace("""[ "BASIC", "ADVANCED", "EXPERT" ]""", """[ "BASIC" ]""") private val basic = File("../docs/examples/basic.json").readText() private val audio = ChartFolder.AUDIO_FILE diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/SkyTrackTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/SkyTrackTest.kt new file mode 100644 index 0000000..f142054 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/SkyTrackTest.kt @@ -0,0 +1,252 @@ +package net.trilleo.hexium.core.chart + +import java.io.File +import java.lang.management.ManagementFactory +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertNotNull +import kotlin.test.assertNull +import kotlin.test.assertTrue +import net.trilleo.hexium.core.judge.JudgeChart +import net.trilleo.hexium.core.judge.JudgementConfig + +class SkyTrackTest { + private val tolerance = 1e-9 + + private fun beat(whole: Int, numerator: Int = 0, denominator: Int = 1) = Beat(whole, numerator, denominator) + + private fun chart(vararg notes: Note, offsetMs: Double = 0.0, bpm: List = listOf(BpmChange(beat(0), 120.0))) = + DifficultyChart(1, Difficulty.EXPERT, 1, 4, offsetMs, bpm, listOf(MeterChange(beat(0), 4, 4)), notes.toList()) + + /** At 120 BPM a beat is 500 ms. */ + private fun track(vararg notes: Note, offsetMs: Double = 0.0) = SkyTrack(chart(*notes, offsetMs = offsetMs)) + + private fun slide(button: SkyButton, radius: Double, vararg points: SlidePoint) = Note.Slide(button, radius, points.toList()) + + private fun point(t: Beat, x: Double, y: Double, ease: Ease = Ease.LINEAR) = SlidePoint(t, x, y, ease) + + @Test + fun aSkyTapSitsOnItsSpotAtItsTime() { + val track = track(Note.SkyTap(beat(2), 0.25, 0.75, SkyButton.R, 1.5), offsetMs = 100.0) + assertEquals(1, track.size) + assertEquals(SkyTrack.Kind.TAP, track.kind(0)) + assertEquals(SkyButton.R, track.button(0)) + assertEquals(1100.0, track.startMs(0), tolerance) + assertEquals(1100.0, track.endMs(0), tolerance) + assertEquals(0.25, track.x(0, 0.0), tolerance) + assertEquals(0.75, track.y(0, 5000.0), tolerance) + assertTrue(track.directionDegrees(0).isNaN()) + } + + /** The judge's hit circle, so what's drawn is what counts. */ + @Test + fun aSkyTapsRadiusIsTheBaseHitRadiusTimesItsSize() { + val track = track(Note.SkyTap(beat(2), 0.5, 0.5, SkyButton.L, 1.5)) + assertEquals(JudgementConfig.DEFAULT.baseHitRadius * 1.5, track.radius(0), tolerance) + } + + @Test + fun theRadiusFollowsTheConfigItIsGiven() { + val track = SkyTrack(chart(Note.Flick(beat(1), 0.5, 0.5, null, 2.0)), JudgementConfig(baseHitRadius = 0.1)) + assertEquals(0.2, track.radius(0), tolerance) + } + + @Test + fun aFlickNeedsNoButtonAndKeepsItsDirection() { + val track = track(Note.Flick(beat(4), 0.3, 0.4, 225.0, 1.0)) + assertEquals(SkyTrack.Kind.FLICK, track.kind(0)) + assertNull(track.button(0)) + assertEquals(2000.0, track.startMs(0), tolerance) + assertEquals(2000.0, track.endMs(0), tolerance) + assertEquals(225.0, track.directionDegrees(0), tolerance) + assertEquals(0.3, track.x(0, 2000.0), tolerance) + assertEquals(0.4, track.y(0, 2000.0), tolerance) + } + + @Test + fun aFlickWithoutADirectionTakesAny() { + val track = track(Note.Flick(beat(4), 0.3, 0.4, null, 1.0)) + assertTrue(track.directionDegrees(0).isNaN()) + } + + @Test + fun aSlideRunsFromItsFirstPointToItsLastWithItsOwnRadius() { + val track = track(slide(SkyButton.L, 0.06, point(beat(2), 0.2, 0.5), point(beat(4), 0.6, 0.9), point(beat(6), 0.6, 0.1))) + assertEquals(SkyTrack.Kind.SLIDE, track.kind(0)) + assertEquals(SkyButton.L, track.button(0)) + assertEquals(1000.0, track.startMs(0), tolerance) + assertEquals(3000.0, track.endMs(0), tolerance) + assertEquals(0.06, track.radius(0), tolerance) + assertTrue(track.directionDegrees(0).isNaN()) + } + + @Test + fun aSlideIsWhereItsPathIsAtThatTime() { + val track = track(slide(SkyButton.L, 0.06, point(beat(2), 0.2, 0.5), point(beat(4), 0.6, 0.9, Ease.IN), point(beat(6), 0.6, 0.1))) + // Halfway along a linear segment. + assertEquals(0.4, track.x(0, 1500.0), tolerance) + assertEquals(0.7, track.y(0, 1500.0), tolerance) + // Halfway along an `in` segment has gone a quarter of the way. + assertEquals(0.7, track.y(0, 2500.0), tolerance) + } + + @Test + fun aSlideStaysOnItsEndsBeforeAndAfterItsPath() { + val track = track(slide(SkyButton.R, 0.06, point(beat(2), 0.2, 0.5), point(beat(4), 0.6, 0.9))) + assertEquals(0.2, track.x(0, -5000.0), tolerance) + assertEquals(0.5, track.y(0, 999.0), tolerance) + assertEquals(0.6, track.x(0, 2001.0), tolerance) + assertEquals(0.9, track.y(0, 99999.0), tolerance) + } + + /** Eases are measured in beats, so a BPM change part way along doesn't bend the path. */ + @Test + fun aSlideAcrossABpmChangeMovesEvenlyInBeats() { + val bpm = listOf(BpmChange(beat(0), 120.0), BpmChange(beat(3), 60.0)) + val track = SkyTrack(chart(slide(SkyButton.L, 0.06, point(beat(2), 0.0, 0.0), point(beat(4), 1.0, 1.0)), bpm = bpm)) + // Beat 3 is at 1500 ms, the middle of the path in beats. + assertEquals(0.5, track.x(0, 1500.0), tolerance) + // Beat 3.5 is 500 ms after it at 60 BPM. + assertEquals(0.75, track.x(0, 2000.0), tolerance) + } + + @Test + fun notesAreInTimeOrderAndRememberTheirPlaceInTheChart() { + val track = track( + Note.Flick(beat(3), 0.5, 0.5, null, 1.0), + Note.Tap(beat(1), 0), + Note.SkyTap(beat(1), 0.5, 0.5, SkyButton.L, 1.0), + slide(SkyButton.R, 0.06, point(beat(2), 0.5, 0.5), point(beat(5), 0.5, 0.5)), + Note.Hold(beat(2), beat(3), 1), + ) + assertEquals(3, track.size) + assertEquals(listOf(500.0, 1000.0, 1500.0), List(track.size) { track.startMs(it) }) + assertEquals(listOf(2, 3, 0), List(track.size) { track.chartNote(it) }) + assertEquals(listOf(SkyTrack.Kind.TAP, SkyTrack.Kind.SLIDE, SkyTrack.Kind.FLICK), List(track.size) { track.kind(it) }) + } + + @Test + fun notesAtTheSameTimeKeepTheChartsOrder() { + val track = track(Note.SkyTap(beat(1), 0.2, 0.5, SkyButton.L, 1.0), Note.SkyTap(beat(1), 0.8, 0.5, SkyButton.R, 1.0)) + assertEquals(listOf(0, 1), List(track.size) { track.chartNote(it) }) + } + + @Test + fun theFirstNoteStillGoingIsFoundFromAnyTime() { + val track = track( + Note.SkyTap(beat(1), 0.5, 0.5, SkyButton.L, 1.0), + Note.SkyTap(beat(2), 0.5, 0.5, SkyButton.L, 1.0), + Note.Flick(beat(3), 0.5, 0.5, null, 1.0), + ) + assertEquals(0, track.firstEndingFrom(-5000.0)) + assertEquals(0, track.firstEndingFrom(500.0)) + assertEquals(1, track.firstEndingFrom(500.5)) + assertEquals(2, track.firstEndingFrom(1500.0)) + assertEquals(3, track.firstEndingFrom(1500.5)) + } + + @Test + fun aLongSlideKeepsTheSearchFromSkippingIt() { + val track = track( + slide(SkyButton.L, 0.06, point(beat(1), 0.5, 0.5), point(beat(100), 0.5, 0.5)), + Note.SkyTap(beat(2), 0.5, 0.5, SkyButton.L, 1.0), + Note.SkyTap(beat(3), 0.5, 0.5, SkyButton.L, 1.0), + ) + assertEquals(0, track.firstEndingFrom(2000.0)) + assertEquals(0, track.firstEndingFrom(50000.0)) + assertEquals(3, track.firstEndingFrom(50000.5)) + } + + @Test + fun theAspectComesFromTheConfig() { + assertEquals(JudgementConfig.DEFAULT.screenAspect, track().screenAspect, tolerance) + assertEquals(3.0, SkyTrack(chart(), JudgementConfig(screenAspect = 3.0)).screenAspect, tolerance) + } + + /** What's drawn must be what's judged: every time, spot, radius and path matches the judge's own chart. */ + @Test + fun everyNoteMatchesWhatTheJudgeUses() { + val files = listOf(File("../docs/examples/expert.json"), File("../mod/src/client/resources/hexium_packs/test-pattern/expert.json")) + for (file in files) { + val chart = assertNotNull(ChartParser.parseDifficulty(file.readText()).value, file.path) + val judge = JudgeChart.compile(chart) + val sky = SkyTrack(chart) + var slide = 0 + var checked = 0 + for (i in 0 until sky.size) { + val note = sky.chartNote(i) + when (sky.kind(i)) { + SkyTrack.Kind.TAP -> { + val b = sky.button(i)!!.ordinal + val k = judge.skyObject[b].indexOfFirst { judge.objectNote[it] == note } + assertTrue(k >= 0, "note $note in ${file.path}") + assertEquals(judge.skyMs[b][k], sky.startMs(i), tolerance) + assertEquals(judge.skyX[b][k], sky.x(i, 0.0), tolerance) + assertEquals(judge.skyY[b][k], sky.y(i, 0.0), tolerance) + assertEquals(judge.skyRadius[b][k], sky.radius(i), tolerance) + } + SkyTrack.Kind.FLICK -> { + val k = judge.flickObject.indexOfFirst { judge.objectNote[it] == note } + assertTrue(k >= 0, "note $note in ${file.path}") + assertEquals(judge.flickMs[k], sky.startMs(i), tolerance) + assertEquals(judge.flickX[k], sky.x(i, 0.0), tolerance) + assertEquals(judge.flickY[k], sky.y(i, 0.0), tolerance) + assertEquals(judge.flickRadius[k], sky.radius(i), tolerance) + assertEquals(judge.flickDir[k].isNaN(), sky.directionDegrees(i).isNaN()) + if (!judge.flickDir[k].isNaN()) assertEquals(judge.flickDir[k], sky.directionDegrees(i), tolerance) + } + SkyTrack.Kind.SLIDE -> { + // Both keep slides in start order. + assertEquals(judge.slideStartMs[slide], sky.startMs(i), tolerance) + assertEquals(judge.slideEndMs[slide], sky.endMs(i), tolerance) + assertEquals(judge.slideRadius[slide], sky.radius(i), tolerance) + assertEquals(judge.slideButton[slide], sky.button(i)!!.ordinal) + for (step in 0..8) { + val ms = sky.startMs(i) + (sky.endMs(i) - sky.startMs(i)) * step / 8.0 + val beat = judge.timing.msToBeat(ms) + assertEquals(judge.slidePath[slide].x(beat), sky.x(i, ms), tolerance) + assertEquals(judge.slidePath[slide].y(beat), sky.y(i, ms), tolerance) + } + slide++ + } + } + checked++ + } + assertEquals(judge.slideCount, slide, file.path) + assertTrue(checked >= 7, file.path) + } + } + + @Test + fun aGroundChartHasNothingInTheSky() { + val track = track(Note.Tap(beat(1), 0), Note.Hold(beat(2), beat(3), 1)) + assertEquals(0, track.size) + assertEquals(0, track.firstEndingFrom(0.0)) + } + + @Test + fun lookupsDoNotAllocate() { + val track = track( + Note.SkyTap(beat(1), 0.5, 0.5, SkyButton.L, 1.0), + slide(SkyButton.R, 0.06, point(beat(2), 0.2, 0.5), point(beat(4), 0.6, 0.9, Ease.IN_OUT), point(beat(6), 0.6, 0.1)), + Note.Flick(beat(7), 0.5, 0.5, 90.0, 1.0), + ) + val threads = ManagementFactory.getThreadMXBean() as com.sun.management.ThreadMXBean + val thread = Thread.currentThread().threadId() + var sum = 0.0 + val before = threads.getThreadAllocatedBytes(thread) + for (i in 0 until 100_000) { + val ms = (i % 4000).toDouble() + var n = track.firstEndingFrom(ms) + while (n < track.size) { + sum += track.x(n, ms) + track.y(n, ms) + track.radius(n) + track.startMs(n) + track.endMs(n) + if (track.kind(n) == SkyTrack.Kind.FLICK) sum += track.directionDegrees(n) + if (track.button(n) == SkyButton.L) sum += track.chartNote(n) + n++ + } + } + val allocated = threads.getThreadAllocatedBytes(thread) - before + assertTrue(sum.isFinite()) + assertTrue(allocated < 16 * 1024, "allocated $allocated bytes") + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/chart/TestPackTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/chart/TestPackTest.kt index 0f528ce..d53873a 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/chart/TestPackTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/chart/TestPackTest.kt @@ -26,7 +26,7 @@ class TestPackTest { @Test fun packPassesTheValidatorWithoutWarnings() { - val pkg = ChartPackage(meta(), listOf(chart("basic"), chart("advanced"))) + val pkg = ChartPackage(meta(), listOf(chart("basic"), chart("advanced"), chart("expert"))) assertEquals(emptyList(), ChartValidator.validatePackage(pkg, audioDurationMs = AUDIO_MS, packageSizeBytes = packBytes())) } @@ -58,14 +58,92 @@ class TestPackTest { } @Test - fun theChartIsWrittenInTheWritersLayout() { - assertEquals(File(pack, "advanced.json").readText(), ChartWriter.writeDifficulty(chart("advanced"))) + fun theChartsAreWrittenInTheWritersLayout() { + for (name in listOf("advanced", "expert")) assertEquals(File(pack, "$name.json").readText(), ChartWriter.writeDifficulty(chart(name)), name) + } + + /** Expert is the Milestone 3 readability chart, so it needs every sky note, on both buttons. */ + @Test + fun expertHasEverySkyNoteOnBothButtons() { + val notes = chart("expert").notes + for (button in SkyButton.entries) { + assertTrue(notes.any { it is Note.SkyTap && it.button == button }, "$button sky tap") + assertTrue(notes.any { it is Note.Slide && it.button == button }, "$button slide") + } + assertTrue(notes.any { it is Note.Flick && it.dir == null }, "flick in any direction") + val directions = notes.mapNotNull { (it as? Note.Flick)?.dir }.toSet() + assertEquals(setOf(0.0, 45.0, 90.0, 135.0, 180.0, 225.0, 270.0, 315.0), directions.filter { it % 45.0 == 0.0 }.toSet()) + } + + /** The gate asks whether the track stays readable while aiming at the corners. */ + @Test + fun expertReachesEveryCornerWhileGroundNotesAreComing() { + val chart = chart("expert") + val sky = SkyTrack(chart) + val ground = GroundTrack(chart) + for ((cornerX, cornerY) in listOf(0.1 to 0.9, 0.9 to 0.9, 0.1 to 0.1, 0.9 to 0.1)) { + assertTrue((0 until sky.size).any { sky.x(it, sky.startMs(it)) == cornerX && sky.y(it, sky.startMs(it)) == cornerY }, "corner $cornerX, $cornerY") + } + // Each top corner within a beat of a ground note. + for (cornerX in listOf(0.1, 0.9)) { + assertTrue( + (0 until sky.size).any { i -> + val ms = sky.startMs(i) + sky.x(i, ms) == cornerX && sky.y(i, ms) == 0.9 && (0 until ground.size).any { Math.abs(ground.startMs(it) - ms) <= 500.0 } + }, + "top corner at x $cornerX with a ground note near it", + ) + } + } + + /** Every hit area fits on the screen, so nothing asks the crosshair to leave it. */ + @Test + fun expertsHitAreasStayOnTheScreen() { + val sky = SkyTrack(chart("expert")) + for (i in 0 until sky.size) { + val halfWidth = sky.radius(i) / sky.screenAspect + var step = 0 + while (step <= 16) { + val ms = sky.startMs(i) + (sky.endMs(i) - sky.startMs(i)) * step / 16.0 + val x = sky.x(i, ms) + val y = sky.y(i, ms) + assertTrue(x - halfWidth >= 0.0 && x + halfWidth <= 1.0 && y - sky.radius(i) >= 0.0 && y + sky.radius(i) <= 1.0, "note ${sky.chartNote(i)} at $x, $y") + step++ + } + } + } + + /** + * One crosshair can't be in two places: sky notes at the same moment share a spot, and a tap or + * flick while a slide is going sits inside the slide's hit area. + */ + @Test + fun expertsSkyNotesAtTheSameTimeShareASpot() { + val sky = SkyTrack(chart("expert")) + for (i in 0 until sky.size) { + if (sky.kind(i) == SkyTrack.Kind.SLIDE) continue + val ms = sky.startMs(i) + for (j in 0 until sky.size) { + if (sky.kind(j) != SkyTrack.Kind.SLIDE || ms < sky.startMs(j) || ms > sky.endMs(j)) continue + val dx = (sky.x(i, ms) - sky.x(j, ms)) * sky.screenAspect + val dy = sky.y(i, ms) - sky.y(j, ms) + assertTrue(dx * dx + dy * dy <= sky.radius(j) * sky.radius(j), "note ${sky.chartNote(i)} off slide ${sky.chartNote(j)}") + } + } + for (i in 0 until sky.size) { + for (j in i + 1 until sky.size) { + if (sky.startMs(j) != sky.startMs(i)) continue + assertEquals(sky.x(i, sky.startMs(i)), sky.x(j, sky.startMs(j)), "notes ${sky.chartNote(i)} and ${sky.chartNote(j)}") + assertEquals(sky.y(i, sky.startMs(i)), sky.y(j, sky.startMs(j)), "notes ${sky.chartNote(i)} and ${sky.chartNote(j)}") + } + } } @Test fun groundOnlyTellsChartsWithSkyNotesApart() { assertTrue(chart("basic").isGroundOnly) assertTrue(chart("advanced").isGroundOnly) + assertFalse(chart("expert").isGroundOnly) val sky = ChartParser.parseDifficulty(File("../docs/examples/expert.json").readText()).value assertFalse(assertNotNull(sky).isGroundOnly) } diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index b6145a1..5d06157 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -65,7 +65,7 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl ## Rendering -- `TrackRenderer` draws through Fabric's `LevelRenderEvents.COLLECT_SUBMITS` and `submitCustomGeometry`, never raw OpenGL, since 26.3 can run on Vulkan. Only notes inside the visible time window are drawn: `GroundTrack` in `core` holds them in time order and finds where to start, and every position is worked out fresh from draw time, so a note can't drift from the clock. A note's distance up the lane is `(note time − draw time) × note speed`, and speed never changes when it arrives. +- `TrackRenderer` draws through Fabric's `LevelRenderEvents.COLLECT_SUBMITS` and `submitCustomGeometry`, never raw OpenGL, since 26.3 can run on Vulkan. Only notes inside the visible time window are drawn: `GroundTrack` in `core` holds them in time order and finds where to start, and every position is worked out fresh from draw time, so a note can't drift from the clock. `SkyTrack` does the same for sky taps, slides and flicks: it gives each note's hit radius from `JudgementConfig`, so the drawn size is the judged size, and a slide's position at any time from the same `SlidePath` the judge uses. A note's distance up the lane is `(note time − draw time) × note speed`, and speed never changes when it arrives. - For now the render type doesn't write depth and, with classic transparency, sorts quads by their centres, so a long floor quad could paint over a note behind its middle. So the floor, hold bodies and notes are each submitted in their own order, which are drawn in turn, and a note only emits the faces the camera can see. Improved transparency (the Fabulous preset) draws these on a different path; the game test takes a screenshot of it to check by eye. A note goes once the judge has its head, and a hold's body stops at the line, shortening as it plays. Vertices are relative to the camera on an untransformed pose, as vanilla's entities are, so no matrix is applied per vertex. - Notes are plain coloured cuboids until Milestone 5 brings block models (note block styles per type). Hold bodies are stretched quads, slide paths will be ribbons, and the screen will be a translucent pane with a frame. - Note speed and visual offset A live in `PlaySettings`, changed from the pause screen, and A also by calibration. They reach only `TrackRenderer`, so the judge and replays never see them. Offset B is read when a play starts and goes in its replay. diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index c551baa..7c03913 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -20,7 +20,7 @@ The Gradle wrapper downloads the right Gradle version, and Loom downloads Minecr | `tools/` | Command-line tools: chart lint, replay re-judge, replay dump. | | `docs/` | Design, specs and developer docs (upper-case file names). | | `docs/examples/` | Hand-written example charts in the writer's layout, used as test fixtures. | -| `mod/src/client/resources/hexium_packs/test-pattern/` | The chart pack bundled in the mod: a click track, `basic.json` (an exact copy of the example chart) and a 3-minute `advanced.json` for drift tests. | +| `mod/src/client/resources/hexium_packs/test-pattern/` | The chart pack bundled in the mod: a click track, `basic.json` (an exact copy of the example chart), a 3-minute `advanced.json` for drift tests, and a 90-second `expert.json` with sky notes in every corner, mixed with ground notes, for the Milestone 3 readability playtest. | | `CHANGELOG.md` | Player-facing change log, see [RELEASING.md](RELEASING.md). | ## Commands diff --git a/mod/src/client/resources/hexium_packs/test-pattern/expert.json b/mod/src/client/resources/hexium_packs/test-pattern/expert.json new file mode 100644 index 0000000..dec987f --- /dev/null +++ b/mod/src/client/resources/hexium_packs/test-pattern/expert.json @@ -0,0 +1,251 @@ +{ + "formatVersion": 1, + "difficulty": "EXPERT", + "level": 9, + "laneCount": 4, + "offsetMs": 0, + "bpm": [ + { "t": [0,0,1], "bpm": 120 } + ], + "meter": [ + { "t": [0,0,1], "num": 4, "den": 4 } + ], + "notes": [ + { "type": "skyTap", "t": [4,0,1], "x": 0.35, "y": 0.4, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [5,0,1], "x": 0.65, "y": 0.4, "button": "R", "size": 1 }, + { "type": "skyTap", "t": [6,0,1], "x": 0.35, "y": 0.5, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [7,0,1], "x": 0.65, "y": 0.5, "button": "R", "size": 1 }, + { "type": "skyTap", "t": [8,0,1], "x": 0.35, "y": 0.6, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [9,0,1], "x": 0.65, "y": 0.6, "button": "R", "size": 1 }, + { "type": "skyTap", "t": [10,0,1], "x": 0.35, "y": 0.4, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [11,0,1], "x": 0.65, "y": 0.4, "button": "R", "size": 1 }, + { "type": "skyTap", "t": [12,0,1], "x": 0.35, "y": 0.5, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [13,0,1], "x": 0.65, "y": 0.5, "button": "R", "size": 1 }, + { "type": "skyTap", "t": [14,0,1], "x": 0.35, "y": 0.6, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [15,0,1], "x": 0.65, "y": 0.6, "button": "R", "size": 1 }, + { "type": "skyTap", "t": [16,0,1], "x": 0.35, "y": 0.4, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [17,0,1], "x": 0.65, "y": 0.4, "button": "R", "size": 1 }, + { "type": "skyTap", "t": [18,0,1], "x": 0.35, "y": 0.5, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [19,0,1], "x": 0.65, "y": 0.5, "button": "R", "size": 1 }, + { "type": "skyTap", "t": [20,0,1], "x": 0.1, "y": 0.9, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [21,0,1], "x": 0.9, "y": 0.9, "button": "R", "size": 1 }, + { "type": "skyTap", "t": [22,0,1], "x": 0.9, "y": 0.1, "button": "R", "size": 1 }, + { "type": "skyTap", "t": [23,0,1], "x": 0.1, "y": 0.1, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [24,0,1], "x": 0.5, "y": 0.9, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [25,0,1], "x": 0.9, "y": 0.5, "button": "R", "size": 1 }, + { "type": "skyTap", "t": [26,0,1], "x": 0.5, "y": 0.1, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [27,0,1], "x": 0.1, "y": 0.5, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [28,0,1], "x": 0.1, "y": 0.9, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [29,0,1], "x": 0.9, "y": 0.9, "button": "R", "size": 1 }, + { "type": "skyTap", "t": [30,0,1], "x": 0.9, "y": 0.1, "button": "R", "size": 1 }, + { "type": "skyTap", "t": [31,0,1], "x": 0.1, "y": 0.1, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [32,0,1], "x": 0.5, "y": 0.9, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [33,0,1], "x": 0.9, "y": 0.5, "button": "R", "size": 1 }, + { "type": "skyTap", "t": [34,0,1], "x": 0.5, "y": 0.1, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [35,0,1], "x": 0.1, "y": 0.5, "button": "L", "size": 1 }, + { "type": "tap", "t": [36,0,1], "lane": 0 }, + { "type": "skyTap", "t": [36,1,2], "x": 0.1, "y": 0.9, "button": "L", "size": 1 }, + { "type": "tap", "t": [37,0,1], "lane": 1 }, + { "type": "tap", "t": [38,0,1], "lane": 2 }, + { "type": "skyTap", "t": [38,1,2], "x": 0.9, "y": 0.9, "button": "R", "size": 1 }, + { "type": "tap", "t": [39,0,1], "lane": 3 }, + { "type": "tap", "t": [40,0,1], "lane": 2 }, + { "type": "skyTap", "t": [40,1,2], "x": 0.1, "y": 0.9, "button": "L", "size": 1 }, + { "type": "tap", "t": [41,0,1], "lane": 1 }, + { "type": "tap", "t": [42,0,1], "lane": 0 }, + { "type": "skyTap", "t": [42,1,2], "x": 0.9, "y": 0.9, "button": "R", "size": 1 }, + { "type": "tap", "t": [43,0,1], "lane": 1 }, + { "type": "tap", "t": [44,0,1], "lane": 2 }, + { "type": "skyTap", "t": [44,1,2], "x": 0.1, "y": 0.9, "button": "L", "size": 1 }, + { "type": "tap", "t": [45,0,1], "lane": 3 }, + { "type": "tap", "t": [46,0,1], "lane": 2 }, + { "type": "skyTap", "t": [46,1,2], "x": 0.9, "y": 0.9, "button": "R", "size": 1 }, + { "type": "tap", "t": [47,0,1], "lane": 1 }, + { "type": "tap", "t": [48,0,1], "lane": 0 }, + { "type": "skyTap", "t": [48,1,2], "x": 0.1, "y": 0.9, "button": "L", "size": 1 }, + { "type": "tap", "t": [49,0,1], "lane": 1 }, + { "type": "tap", "t": [50,0,1], "lane": 2 }, + { "type": "skyTap", "t": [50,1,2], "x": 0.9, "y": 0.9, "button": "R", "size": 1 }, + { "type": "tap", "t": [51,0,1], "lane": 3 }, + { "type": "slide", "button": "L", "radius": 0.06, "points": [ + { "t": [52,0,1], "x": 0.1, "y": 0.9, "ease": "linear" }, + { "t": [56,0,1], "x": 0.9, "y": 0.9, "ease": "linear" } + ] }, + { "type": "hold", "t": [52,0,1], "end": [56,0,1], "lane": 0 }, + { "type": "slide", "button": "R", "radius": 0.06, "points": [ + { "t": [58,0,1], "x": 0.9, "y": 0.9, "ease": "inOut" }, + { "t": [62,0,1], "x": 0.9, "y": 0.1, "ease": "linear" } + ] }, + { "type": "tap", "t": [58,0,1], "lane": 3 }, + { "type": "tap", "t": [59,0,1], "lane": 2 }, + { "type": "tap", "t": [60,0,1], "lane": 1 }, + { "type": "tap", "t": [61,0,1], "lane": 0 }, + { "type": "slide", "button": "L", "radius": 0.06, "points": [ + { "t": [64,0,1], "x": 0.1, "y": 0.1, "ease": "in" }, + { "t": [66,0,1], "x": 0.5, "y": 0.5, "ease": "out" }, + { "t": [68,0,1], "x": 0.9, "y": 0.9, "ease": "linear" } + ] }, + { "type": "tap", "t": [64,0,1], "lane": 1 }, + { "type": "tap", "t": [66,0,1], "lane": 2 }, + { "type": "flick", "t": [70,0,1], "x": 0.3, "y": 0.5, "dir": 0, "size": 1 }, + { "type": "tap", "t": [71,0,1], "lane": 0 }, + { "type": "flick", "t": [72,0,1], "x": 0.3, "y": 0.3, "dir": 45, "size": 1 }, + { "type": "tap", "t": [73,0,1], "lane": 1 }, + { "type": "flick", "t": [74,0,1], "x": 0.5, "y": 0.3, "dir": 90, "size": 1 }, + { "type": "tap", "t": [75,0,1], "lane": 2 }, + { "type": "flick", "t": [76,0,1], "x": 0.7, "y": 0.3, "dir": 135, "size": 1 }, + { "type": "tap", "t": [77,0,1], "lane": 3 }, + { "type": "flick", "t": [78,0,1], "x": 0.7, "y": 0.5, "dir": 180, "size": 1 }, + { "type": "tap", "t": [79,0,1], "lane": 0 }, + { "type": "flick", "t": [80,0,1], "x": 0.7, "y": 0.7, "dir": 225, "size": 1 }, + { "type": "tap", "t": [81,0,1], "lane": 1 }, + { "type": "flick", "t": [82,0,1], "x": 0.5, "y": 0.7, "dir": 270, "size": 1 }, + { "type": "tap", "t": [83,0,1], "lane": 2 }, + { "type": "flick", "t": [84,0,1], "x": 0.3, "y": 0.7, "dir": 315, "size": 1 }, + { "type": "tap", "t": [85,0,1], "lane": 3 }, + { "type": "flick", "t": [86,0,1], "x": 0.1, "y": 0.9, "size": 1 }, + { "type": "tap", "t": [87,0,1], "lane": 3 }, + { "type": "flick", "t": [88,0,1], "x": 0.9, "y": 0.9, "size": 1 }, + { "type": "tap", "t": [89,0,1], "lane": 2 }, + { "type": "flick", "t": [90,0,1], "x": 0.9, "y": 0.1, "size": 1 }, + { "type": "tap", "t": [91,0,1], "lane": 1 }, + { "type": "flick", "t": [92,0,1], "x": 0.1, "y": 0.1, "size": 1 }, + { "type": "tap", "t": [93,0,1], "lane": 0 }, + { "type": "flick", "t": [94,0,1], "x": 0.1, "y": 0.88, "size": 1.5 }, + { "type": "tap", "t": [95,0,1], "lane": 3 }, + { "type": "flick", "t": [96,0,1], "x": 0.9, "y": 0.88, "size": 1.5 }, + { "type": "tap", "t": [97,0,1], "lane": 2 }, + { "type": "flick", "t": [98,0,1], "x": 0.9, "y": 0.12, "size": 1.5 }, + { "type": "tap", "t": [99,0,1], "lane": 1 }, + { "type": "flick", "t": [100,0,1], "x": 0.1, "y": 0.12, "size": 1.5 }, + { "type": "tap", "t": [101,0,1], "lane": 0 }, + { "type": "tap", "t": [102,0,1], "lane": 0 }, + { "type": "skyTap", "t": [102,1,2], "x": 0.2, "y": 0.8, "button": "L", "size": 1 }, + { "type": "tap", "t": [103,0,1], "lane": 2 }, + { "type": "tap", "t": [104,0,1], "lane": 1 }, + { "type": "skyTap", "t": [104,1,2], "x": 0.8, "y": 0.8, "button": "R", "size": 1 }, + { "type": "tap", "t": [105,0,1], "lane": 3 }, + { "type": "tap", "t": [106,0,1], "lane": 0 }, + { "type": "skyTap", "t": [106,1,2], "x": 0.35, "y": 0.3, "button": "L", "size": 1 }, + { "type": "tap", "t": [107,0,1], "lane": 2 }, + { "type": "tap", "t": [108,0,1], "lane": 1 }, + { "type": "flick", "t": [108,1,2], "x": 0.65, "y": 0.3, "dir": 90, "size": 1 }, + { "type": "tap", "t": [109,0,1], "lane": 3 }, + { "type": "hold", "t": [110,0,1], "end": [114,0,1], "lane": 1 }, + { "type": "skyTap", "t": [110,1,2], "x": 0.5, "y": 0.6, "button": "R", "size": 1 }, + { "type": "skyTap", "t": [112,1,2], "x": 0.15, "y": 0.15, "button": "L", "size": 1 }, + { "type": "tap", "t": [114,0,1], "lane": 0 }, + { "type": "skyTap", "t": [114,1,2], "x": 0.85, "y": 0.15, "button": "R", "size": 1 }, + { "type": "tap", "t": [115,0,1], "lane": 2 }, + { "type": "tap", "t": [116,0,1], "lane": 1 }, + { "type": "flick", "t": [116,1,2], "x": 0.5, "y": 0.9, "dir": 270, "size": 1 }, + { "type": "tap", "t": [117,0,1], "lane": 3 }, + { "type": "tap", "t": [118,0,1], "lane": 0 }, + { "type": "skyTap", "t": [118,1,2], "x": 0.2, "y": 0.8, "button": "L", "size": 1 }, + { "type": "tap", "t": [119,0,1], "lane": 2 }, + { "type": "tap", "t": [120,0,1], "lane": 1 }, + { "type": "skyTap", "t": [120,1,2], "x": 0.8, "y": 0.8, "button": "R", "size": 1 }, + { "type": "tap", "t": [121,0,1], "lane": 3 }, + { "type": "tap", "t": [122,0,1], "lane": 0 }, + { "type": "skyTap", "t": [122,1,2], "x": 0.35, "y": 0.3, "button": "L", "size": 1 }, + { "type": "tap", "t": [123,0,1], "lane": 2 }, + { "type": "tap", "t": [124,0,1], "lane": 1 }, + { "type": "flick", "t": [124,1,2], "x": 0.65, "y": 0.3, "dir": 90, "size": 1 }, + { "type": "tap", "t": [125,0,1], "lane": 3 }, + { "type": "tap", "t": [126,0,1], "lane": 0 }, + { "type": "skyTap", "t": [126,1,2], "x": 0.5, "y": 0.6, "button": "R", "size": 1 }, + { "type": "tap", "t": [127,0,1], "lane": 2 }, + { "type": "tap", "t": [128,0,1], "lane": 1 }, + { "type": "skyTap", "t": [128,1,2], "x": 0.15, "y": 0.15, "button": "L", "size": 1 }, + { "type": "tap", "t": [129,0,1], "lane": 3 }, + { "type": "tap", "t": [130,0,1], "lane": 0 }, + { "type": "skyTap", "t": [130,1,2], "x": 0.85, "y": 0.15, "button": "R", "size": 1 }, + { "type": "tap", "t": [131,0,1], "lane": 2 }, + { "type": "tap", "t": [132,0,1], "lane": 1 }, + { "type": "flick", "t": [132,1,2], "x": 0.5, "y": 0.9, "dir": 270, "size": 1 }, + { "type": "tap", "t": [133,0,1], "lane": 3 }, + { "type": "slide", "button": "L", "radius": 0.06, "points": [ + { "t": [134,0,1], "x": 0.1, "y": 0.1, "ease": "linear" }, + { "t": [138,0,1], "x": 0.1, "y": 0.9, "ease": "linear" }, + { "t": [142,0,1], "x": 0.9, "y": 0.9, "ease": "linear" }, + { "t": [146,0,1], "x": 0.9, "y": 0.1, "ease": "linear" }, + { "t": [150,0,1], "x": 0.5, "y": 0.1, "ease": "linear" } + ] }, + { "type": "tap", "t": [134,0,1], "lane": 3 }, + { "type": "skyTap", "t": [135,0,1], "x": 0.1, "y": 0.3, "button": "R", "size": 1 }, + { "type": "tap", "t": [136,0,1], "lane": 0 }, + { "type": "skyTap", "t": [137,0,1], "x": 0.1, "y": 0.7, "button": "R", "size": 1 }, + { "type": "tap", "t": [138,0,1], "lane": 1 }, + { "type": "skyTap", "t": [139,0,1], "x": 0.3, "y": 0.9, "button": "R", "size": 1 }, + { "type": "tap", "t": [140,0,1], "lane": 2 }, + { "type": "skyTap", "t": [141,0,1], "x": 0.7, "y": 0.9, "button": "R", "size": 1 }, + { "type": "tap", "t": [142,0,1], "lane": 3 }, + { "type": "skyTap", "t": [143,0,1], "x": 0.9, "y": 0.7, "button": "R", "size": 1 }, + { "type": "tap", "t": [144,0,1], "lane": 0 }, + { "type": "skyTap", "t": [145,0,1], "x": 0.9, "y": 0.3, "button": "R", "size": 1 }, + { "type": "tap", "t": [146,0,1], "lane": 1 }, + { "type": "skyTap", "t": [147,0,1], "x": 0.8, "y": 0.1, "button": "R", "size": 1 }, + { "type": "tap", "t": [148,0,1], "lane": 2 }, + { "type": "skyTap", "t": [149,0,1], "x": 0.6, "y": 0.1, "button": "R", "size": 1 }, + { "type": "flick", "t": [152,0,1], "x": 0.5, "y": 0.3, "dir": 90, "size": 1 }, + { "type": "tap", "t": [156,0,1], "lane": 0 }, + { "type": "skyTap", "t": [156,1,4], "x": 0.1, "y": 0.9, "button": "L", "size": 1 }, + { "type": "tap", "t": [156,1,2], "lane": 1 }, + { "type": "tap", "t": [157,0,1], "lane": 2 }, + { "type": "tap", "t": [157,1,2], "lane": 3 }, + { "type": "tap", "t": [158,0,1], "lane": 2 }, + { "type": "skyTap", "t": [158,1,4], "x": 0.9, "y": 0.9, "button": "R", "size": 1 }, + { "type": "tap", "t": [158,1,2], "lane": 1 }, + { "type": "tap", "t": [159,0,1], "lane": 0 }, + { "type": "tap", "t": [159,1,2], "lane": 1 }, + { "type": "tap", "t": [160,0,1], "lane": 0 }, + { "type": "skyTap", "t": [160,1,4], "x": 0.3, "y": 0.9, "button": "L", "size": 1 }, + { "type": "tap", "t": [160,1,2], "lane": 1 }, + { "type": "tap", "t": [161,0,1], "lane": 2 }, + { "type": "tap", "t": [161,1,2], "lane": 3 }, + { "type": "tap", "t": [162,0,1], "lane": 2 }, + { "type": "skyTap", "t": [162,1,4], "x": 0.7, "y": 0.9, "button": "R", "size": 1 }, + { "type": "tap", "t": [162,1,2], "lane": 1 }, + { "type": "tap", "t": [163,0,1], "lane": 0 }, + { "type": "tap", "t": [163,1,2], "lane": 1 }, + { "type": "tap", "t": [164,0,1], "lane": 0 }, + { "type": "skyTap", "t": [164,1,4], "x": 0.1, "y": 0.9, "button": "L", "size": 1 }, + { "type": "tap", "t": [164,1,2], "lane": 1 }, + { "type": "tap", "t": [165,0,1], "lane": 2 }, + { "type": "tap", "t": [165,1,2], "lane": 3 }, + { "type": "tap", "t": [166,0,1], "lane": 2 }, + { "type": "skyTap", "t": [166,1,4], "x": 0.9, "y": 0.9, "button": "R", "size": 1 }, + { "type": "tap", "t": [166,1,2], "lane": 1 }, + { "type": "tap", "t": [167,0,1], "lane": 0 }, + { "type": "tap", "t": [167,1,2], "lane": 1 }, + { "type": "tap", "t": [168,0,1], "lane": 0 }, + { "type": "skyTap", "t": [168,1,4], "x": 0.3, "y": 0.9, "button": "L", "size": 1 }, + { "type": "tap", "t": [168,1,2], "lane": 1 }, + { "type": "tap", "t": [169,0,1], "lane": 2 }, + { "type": "tap", "t": [169,1,2], "lane": 3 }, + { "type": "tap", "t": [170,0,1], "lane": 2 }, + { "type": "skyTap", "t": [170,1,4], "x": 0.7, "y": 0.9, "button": "R", "size": 1 }, + { "type": "tap", "t": [170,1,2], "lane": 1 }, + { "type": "tap", "t": [171,0,1], "lane": 0 }, + { "type": "tap", "t": [171,1,2], "lane": 1 }, + { "type": "tap", "t": [172,0,1], "lane": 0 }, + { "type": "skyTap", "t": [172,1,4], "x": 0.1, "y": 0.9, "button": "L", "size": 1 }, + { "type": "tap", "t": [172,1,2], "lane": 1 }, + { "type": "tap", "t": [173,0,1], "lane": 2 }, + { "type": "tap", "t": [173,1,2], "lane": 3 }, + { "type": "tap", "t": [174,0,1], "lane": 2 }, + { "type": "skyTap", "t": [174,1,4], "x": 0.9, "y": 0.9, "button": "R", "size": 1 }, + { "type": "tap", "t": [174,1,2], "lane": 1 }, + { "type": "tap", "t": [175,0,1], "lane": 0 }, + { "type": "tap", "t": [175,1,2], "lane": 1 }, + { "type": "tap", "t": [176,0,1], "lane": 0 }, + { "type": "skyTap", "t": [176,1,4], "x": 0.3, "y": 0.9, "button": "L", "size": 1 }, + { "type": "tap", "t": [176,1,2], "lane": 1 }, + { "type": "tap", "t": [177,0,1], "lane": 2 }, + { "type": "tap", "t": [177,1,2], "lane": 3 }, + { "type": "skyTap", "t": [178,0,1], "x": 0.5, "y": 0.5, "button": "L", "size": 1 }, + { "type": "skyTap", "t": [178,0,1], "x": 0.5, "y": 0.5, "button": "R", "size": 1 }, + { "type": "tap", "t": [178,0,1], "lane": 0 }, + { "type": "tap", "t": [178,0,1], "lane": 3 } + ] +} diff --git a/mod/src/client/resources/hexium_packs/test-pattern/meta.json b/mod/src/client/resources/hexium_packs/test-pattern/meta.json index 0640646..ec192af 100644 --- a/mod/src/client/resources/hexium_packs/test-pattern/meta.json +++ b/mod/src/client/resources/hexium_packs/test-pattern/meta.json @@ -6,5 +6,5 @@ "charter": "Hexium", "previewStartMs": 0, "license": { "type": "original", "source": "A click track generated for Hexium" }, - "difficulties": [ "BASIC", "ADVANCED" ] + "difficulties": [ "BASIC", "ADVANCED", "EXPERT" ] } From 449df495cfc62f69e602976541134da164f91b84 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Sun, 8 Nov 2026 09:36:41 +0800 Subject: [PATCH 28/34] Feature: Aim at the sky screen with the camera, stop it past the screen's edges and time sky clicks --- CHANGELOG.md | 2 + .../trilleo/hexium/core/aim/ScreenPlane.kt | 116 +++++++++++ .../hexium/core/aim/ScreenPlaneTest.kt | 184 ++++++++++++++++++ docs/ARCHITECTURE.md | 11 +- docs/DEVELOPMENT.md | 2 +- .../client/mixin/MouseHandlerMixin.java | 9 +- .../client/mixin/SDLEventHandlerMixin.java | 7 + .../net/trilleo/hexium/client/input/Aim.kt | 68 +++++++ .../trilleo/hexium/client/input/SkyInput.kt | 96 +++++++++ .../trilleo/hexium/client/play/PlaySession.kt | 64 ++++-- .../hexium/client/session/HexiumSession.kt | 8 + .../hexium/client/session/StageGeometry.kt | 13 +- .../hexium/gametest/HexiumClientGameTest.kt | 60 +++++- 13 files changed, 616 insertions(+), 24 deletions(-) create mode 100644 core/src/main/kotlin/net/trilleo/hexium/core/aim/ScreenPlane.kt create mode 100644 core/src/test/kotlin/net/trilleo/hexium/core/aim/ScreenPlaneTest.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/input/Aim.kt create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/input/SkyInput.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index da5cc1c..81b46c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ + Added the stage: a plain floor with a raised platform you stand on, looking down the lanes, kept apart from your normal worlds. + You stand 6 blocks from the judgement line, so it's close enough to read. + You can look around, but moving, jumping and action keys are off while you're on it. + + The camera stops a block past the sky screen's edges, so you can't turn away from the stage. + The hunger bar is hidden. + Added judging for ground taps and holds, with CHUNITHM's windows. + Hold ticks are judged on how long ago the key was last down. @@ -53,6 +54,7 @@ + Added judging for sky taps, slides and flicks. + A swipe that jumps over a flick between two frames still hits it, so low frame rates stay fair. ++ Left and right clicks on the stage are now timed from when the button went down and placed where the crosshair meets the sky screen, ready for sky notes. + Pausing is fair for sky notes too: a mouse button you changed while paused counts from the moment you paused, and moving the mouse while paused never counts as a swipe through a flick. #### Online diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/aim/ScreenPlane.kt b/core/src/main/kotlin/net/trilleo/hexium/core/aim/ScreenPlane.kt new file mode 100644 index 0000000..c319fc7 --- /dev/null +++ b/core/src/main/kotlin/net/trilleo/hexium/core/aim/ScreenPlane.kt @@ -0,0 +1,116 @@ +package net.trilleo.hexium.core.aim + +import kotlin.math.atan2 +import kotlin.math.cos +import kotlin.math.sin +import kotlin.math.sqrt + +/** + * The sky screen as a flat plane across +Z, at [planeZ], turning a look into the crosshair's place on it + * and back. Places are the chart's normalised screen coordinates: x from 0 at [leftX] to 1 at [rightX], + * y from 0 at [bottomY] to 1 at [topY], and either may be off the screen. Angles are Minecraft's, in + * degrees: yaw 0 looks down +Z and turns toward -X as it grows, pitch looks down as it grows. + * + * This is how the mod reads aim, not a judging rule: replays hold the places, never the angles. Results + * go in [x], [y], [yaw] and [pitch] instead of new objects, so nothing allocates. One thread only. + */ +class ScreenPlane( + private val leftX: Double, + private val rightX: Double, + private val bottomY: Double, + private val topY: Double, + private val planeZ: Double, +) { + /** Where the last [aim] hit, or NaN if it looked away from the screen. */ + var x = Double.NaN + private set + var y = Double.NaN + private set + + /** The look from the last [clampLook] or [lookToward]. */ + var yaw = 0.0 + private set + var pitch = 0.0 + private set + + /** The last [aim]'s look, across and up, for a look that missed. */ + private var lookX = 0.0 + private var lookY = 0.0 + + /** Where a look from the eye meets the plane, into [x] and [y]. False if it looks along or away from it. */ + fun aim(eyeX: Double, eyeY: Double, eyeZ: Double, yaw: Double, pitch: Double): Boolean { + val yawRadians = Math.toRadians(yaw) + val pitchRadians = Math.toRadians(pitch) + val along = cos(pitchRadians) + val dirX = -sin(yawRadians) * along + val dirY = -sin(pitchRadians) + val dirZ = cos(yawRadians) * along + lookX = dirX + lookY = dirY + val distance = planeZ - eyeZ + if (dirZ < MIN_FORWARD || distance <= 0.0) { + x = Double.NaN + y = Double.NaN + return false + } + val t = distance / dirZ + x = (leftX - (eyeX + dirX * t)) / (leftX - rightX) + y = (eyeY + dirY * t - bottomY) / (topY - bottomY) + return true + } + + /** The look from the eye toward a place on the plane, into [yaw] and [pitch]. Yaw is in -180 to 180. */ + fun lookToward(eyeX: Double, eyeY: Double, eyeZ: Double, screenX: Double, screenY: Double) { + val dx = leftX + (rightX - leftX) * screenX - eyeX + val dy = bottomY + (topY - bottomY) * screenY - eyeY + val dz = planeZ - eyeZ + yaw = Math.toDegrees(atan2(-dx, dz)) + pitch = Math.toDegrees(atan2(-dy, sqrt(dx * dx + dz * dz))) + } + + /** + * Keeps a look on the screen, plus [marginX] and [marginY] past its edges in screen units, into [yaw] + * and [pitch]. A look past an edge stops at it. One turned so far it misses the plane, which one frame's + * turn can do, stops at the edges it went past, and stays level with the eye on an axis it didn't turn on. + * The yaw stays on the same whole turn as [yaw] given, since the camera's keeps counting. Returns true + * if the look had to change. + */ + fun clampLook(eyeX: Double, eyeY: Double, eyeZ: Double, yaw: Double, pitch: Double, marginX: Double, marginY: Double): Boolean { + val hits = aim(eyeX, eyeY, eyeZ, yaw, pitch) + val placeX = if (hits) x else pastEdge(lookX * (rightX - leftX), (leftX - eyeX) / (leftX - rightX), marginX) + val placeY = if (hits) y else pastEdge(lookY * (topY - bottomY), (eyeY - bottomY) / (topY - bottomY), marginY) + val clampedX = placeX.coerceIn(-marginX, 1.0 + marginX) + val clampedY = placeY.coerceIn(-marginY, 1.0 + marginY) + if (hits && clampedX == x && clampedY == y) { + this.yaw = yaw + this.pitch = pitch + return false + } + lookToward(eyeX, eyeY, eyeZ, clampedX, clampedY) + this.yaw = yaw + wrapDegrees(this.yaw - yaw) + return true + } + + /** + * For a look that misses the plane, on one axis: [towardOne] is how fast the look heads toward that + * axis's 1 edge. It stops past the edge it heads for, or at the eye's own place, [eye], if it hardly + * heads either way. + */ + private fun pastEdge(towardOne: Double, eye: Double, margin: Double): Double = when { + towardOne > MIN_FORWARD -> 1.0 + margin + towardOne < -MIN_FORWARD -> -margin + else -> eye + } + + private fun wrapDegrees(degrees: Double): Double { + var d = degrees % 360.0 + if (d >= 180.0) d -= 360.0 + if (d < -180.0) d += 360.0 + return d + } + + private companion object { + /** A look this close to along the plane is treated as missing it, so its place can't overflow. */ + const val MIN_FORWARD = 1e-6 + } +} diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/aim/ScreenPlaneTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/aim/ScreenPlaneTest.kt new file mode 100644 index 0000000..98dd4e2 --- /dev/null +++ b/core/src/test/kotlin/net/trilleo/hexium/core/aim/ScreenPlaneTest.kt @@ -0,0 +1,184 @@ +package net.trilleo.hexium.core.aim + +import java.lang.management.ManagementFactory +import kotlin.math.atan +import kotlin.math.sqrt +import kotlin.random.Random +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFalse +import kotlin.test.assertTrue + +class ScreenPlaneTest { + private val tolerance = 1e-9 + + /** A 12 by 6 screen standing on y 0, 6 blocks down +Z from the eye at (0, 3, 0). Its left edge is on +X. */ + private val plane = ScreenPlane(leftX = 6.0, rightX = -6.0, bottomY = 0.0, topY = 6.0, planeZ = 6.0) + + private fun degrees(radians: Double) = Math.toDegrees(radians) + + @Test + fun lookingStraightAheadHitsTheMiddle() { + assertTrue(plane.aim(0.0, 3.0, 0.0, 0.0, 0.0)) + assertEquals(0.5, plane.x, tolerance) + assertEquals(0.5, plane.y, tolerance) + } + + /** Minecraft's yaw turns toward -X as it grows, and the screen's right edge is on -X. */ + @Test + fun turningRightMovesTheAimRight() { + assertTrue(plane.aim(0.0, 3.0, 0.0, 45.0, 0.0)) + assertEquals(1.0, plane.x, tolerance) + assertEquals(0.5, plane.y, tolerance) + plane.aim(0.0, 3.0, 0.0, -45.0, 0.0) + assertEquals(0.0, plane.x, tolerance) + } + + /** Minecraft's pitch looks down as it grows. */ + @Test + fun lookingDownMovesTheAimDown() { + plane.aim(0.0, 3.0, 0.0, 0.0, degrees(atan(0.5))) + assertEquals(0.0, plane.y, tolerance) + plane.aim(0.0, 3.0, 0.0, 0.0, -degrees(atan(0.5))) + assertEquals(1.0, plane.y, tolerance) + } + + @Test + fun theEyesOwnPlaceCounts() { + plane.aim(3.0, 6.0, 3.0, 0.0, 0.0) + assertEquals(0.25, plane.x, tolerance) + assertEquals(1.0, plane.y, tolerance) + } + + @Test + fun anAimOffTheScreenStillGivesItsPlace() { + plane.aim(0.0, 3.0, 0.0, 60.0, 0.0) + assertTrue(plane.x > 1.0) + } + + @Test + fun lookingAwayFromTheScreenHitsNothing() { + assertFalse(plane.aim(0.0, 3.0, 0.0, 180.0, 0.0)) + assertTrue(plane.x.isNaN() && plane.y.isNaN()) + assertFalse(plane.aim(0.0, 3.0, 0.0, 0.0, 90.0)) + assertFalse(plane.aim(0.0, 3.0, 0.0, 90.0, 0.0)) + } + + @Test + fun aWholeTurnMakesNoDifference() { + plane.aim(0.0, 3.0, 0.0, 20.0 + 720.0, 10.0) + val x = plane.x + val y = plane.y + plane.aim(0.0, 3.0, 0.0, 20.0, 10.0) + assertEquals(x, plane.x, 1e-9) + assertEquals(y, plane.y, 1e-9) + } + + @Test + fun aLookInsideTheLimitIsLeftAlone() { + assertFalse(plane.clampLook(0.0, 3.0, 0.0, 10.0, 5.0, 0.1, 0.1)) + assertEquals(10.0, plane.yaw, tolerance) + assertEquals(5.0, plane.pitch, tolerance) + } + + @Test + fun aLookPastAnEdgeStopsAtTheEdgePlusTheMargin() { + assertTrue(plane.clampLook(0.0, 3.0, 0.0, 60.0, 0.0, 0.1, 0.2)) + plane.aim(0.0, 3.0, 0.0, plane.yaw, plane.pitch) + assertEquals(1.1, plane.x, 1e-9) + assertEquals(0.5, plane.y, 1e-9) + assertTrue(plane.clampLook(0.0, 3.0, 0.0, 0.0, -80.0, 0.1, 0.2)) + plane.aim(0.0, 3.0, 0.0, plane.yaw, plane.pitch) + assertEquals(0.5, plane.x, 1e-9) + assertEquals(1.2, plane.y, 1e-9) + } + + @Test + fun aCornerIsClampedOnBothAxes() { + assertTrue(plane.clampLook(0.0, 3.0, 0.0, -70.0, 70.0, 0.1, 0.2)) + plane.aim(0.0, 3.0, 0.0, plane.yaw, plane.pitch) + assertEquals(-0.1, plane.x, 1e-9) + assertEquals(-0.2, plane.y, 1e-9) + } + + /** The camera's yaw keeps counting past a whole turn, so a clamp mustn't make it jump back by 360. */ + @Test + fun aClampedYawStaysOnTheSameTurn() { + assertTrue(plane.clampLook(0.0, 3.0, 0.0, 720.0 + 60.0, 0.0, 0.1, 0.1)) + assertTrue(plane.yaw > 700.0 && plane.yaw < 780.0, "yaw ${plane.yaw}") + assertTrue(plane.clampLook(0.0, 3.0, 0.0, -720.0 - 60.0, 0.0, 0.1, 0.1)) + assertTrue(plane.yaw < -700.0 && plane.yaw > -780.0, "yaw ${plane.yaw}") + } + + /** One frame's turn can go past where the look misses the screen at all. It still stops at the edge it went past. */ + @Test + fun turningSoFarTheLookMissesStopsAtTheEdgeItWentPast() { + assertTrue(plane.clampLook(0.0, 3.0, 0.0, 120.0, 0.0, 0.1, 0.1)) + plane.aim(0.0, 3.0, 0.0, plane.yaw, plane.pitch) + assertEquals(1.1, plane.x, 1e-9) + assertEquals(0.5, plane.y, 1e-9) + assertTrue(plane.clampLook(0.0, 3.0, 0.0, -100.0, -30.0, 0.1, 0.1)) + plane.aim(0.0, 3.0, 0.0, plane.yaw, plane.pitch) + assertEquals(-0.1, plane.x, 1e-9) + assertEquals(1.1, plane.y, 1e-9) + } + + /** Straight up or straight behind has no side to go to, so it stays level with the eye on that axis. */ + @Test + fun lookingStraightAwayIsTurnedBackInLineWithTheEye() { + assertTrue(plane.clampLook(0.0, 3.0, 0.0, 180.0, 0.0, 0.1, 0.1)) + plane.aim(0.0, 3.0, 0.0, plane.yaw, plane.pitch) + assertEquals(0.5, plane.x, 1e-9) + assertEquals(0.5, plane.y, 1e-9) + assertTrue(plane.clampLook(0.0, 3.0, 0.0, 3030.0, -90.0, 0.1, 0.1)) + plane.aim(0.0, 3.0, 0.0, plane.yaw, plane.pitch) + assertEquals(0.5, plane.x, 1e-9) + assertEquals(1.1, plane.y, 1e-9) + } + + @Test + fun lookingTowardAPointHitsIt() { + val random = Random(7) + repeat(200) { + val x = random.nextDouble(-0.2, 1.2) + val y = random.nextDouble(-0.2, 1.2) + plane.lookToward(1.0, 4.0, -1.0, x, y) + assertTrue(plane.aim(1.0, 4.0, -1.0, plane.yaw, plane.pitch)) + assertEquals(x, plane.x, 1e-9) + assertEquals(y, plane.y, 1e-9) + } + } + + /** The bottom right corner is 6 blocks right, 3 down and 6 ahead: half right and a little down, in Minecraft's angles. */ + @Test + fun lookingTowardAPointGivesMinecraftsAngles() { + plane.lookToward(0.0, 3.0, 0.0, 1.0, 0.0) + assertEquals(45.0, plane.yaw, 1e-9) + assertEquals(degrees(atan(3.0 / sqrt(72.0))), plane.pitch, 1e-9) + // Minecraft's own view vector for those angles points at the corner. + val yaw = Math.toRadians(plane.yaw) + val pitch = Math.toRadians(plane.pitch) + val length = sqrt(81.0) + assertEquals(-6.0 / length, -Math.sin(yaw) * Math.cos(pitch), 1e-9) + assertEquals(-3.0 / length, -Math.sin(pitch), 1e-9) + assertEquals(6.0 / length, Math.cos(yaw) * Math.cos(pitch), 1e-9) + } + + @Test + fun aimingAndClampingDoNotAllocate() { + val threads = ManagementFactory.getThreadMXBean() as com.sun.management.ThreadMXBean + val thread = Thread.currentThread().threadId() + var sum = 0.0 + val before = threads.getThreadAllocatedBytes(thread) + for (i in 0 until 100_000) { + val yaw = (i % 200) - 100.0 + val pitch = (i % 120) - 60.0 + if (plane.aim(0.0, 3.0, 0.0, yaw, pitch)) sum += plane.x + plane.y + plane.clampLook(0.0, 3.0, 0.0, yaw, pitch, 0.1, 0.1) + sum += plane.yaw + plane.pitch + } + val allocated = threads.getThreadAllocatedBytes(thread) - before + assertTrue(sum.isFinite()) + assertTrue(allocated < 16 * 1024, "allocated $allocated bytes") + } +} diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 5d06157..9ab56aa 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -37,7 +37,7 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl - Every mixin and event hook starts with `if (!HexiumSession.active()) return;`, except the title screen button, which only adds that button. Joining a normal world or server means no session, so vanilla behaviour stays as it was. - The stage is a flat black floor with a small platform for the player, made in code (`StageWorld`) and created fresh for each session in the mod's own folder, `.minecraft/hexium/stages/`, not `saves/`, so it never shows up in the vanilla world list. Making it in code means a Minecraft update can't ask to upgrade it. Chart-authored stages may bring template worlds in Milestone 8. It runs on the integrated server, with its rules frozen once the player joins: no daylight cycle, mobs, random ticks or weather. - The player is in adventure mode on Peaceful, placed on the stand spot on top of the platform. Gameplay never depends on the server; the world is just scenery. -- While a session is active, mixins hold the player still (`KeyboardInput`), stop every key that method handles (`Minecraft.handleKeybinds`: attack, items, hotbar, inventory, chat, F1, F5 and so on) and hotbar scrolling, keep vanilla's tutorial from starting, since it would end itself for good outside survival, and replace vanilla's pause menu. The camera turns freely until Milestone 3 adds its limits. Vanilla's HUD stays apart from the hunger bar, which is hidden, and Hexium draws combo, judgement and score over it. While no screen is open, vanilla doesn't see lane keys at all, so the play loop tells it there was input, or it would lower the frame rate. A player arriving in third person or with the HUD hidden gets the normal view, and their own comes back afterwards. +- While a session is active, mixins hold the player still (`KeyboardInput`), stop every key that method handles (`Minecraft.handleKeybinds`: attack, items, hotbar, inventory, chat, F1, F5 and so on) and hotbar scrolling, keep vanilla's tutorial from starting, since it would end itself for good outside survival, and replace vanilla's pause menu. The camera turns with the mouse, but stops 1 block past the sky screen's edges (`Aim`, with the maths in `ScreenPlane` in `core`), so the player can't spin away from the stage. Vanilla's HUD stays apart from the hunger bar, which is hidden, and Hexium draws combo, judgement and score over it. While no screen is open, vanilla doesn't see lane keys at all, so the play loop tells it there was input, or it would lower the frame rate. A player arriving in third person or with the HUD hidden gets the normal view, and their own comes back afterwards. - A session ends when the connection closes, and also whenever the title screen or the Hexium menu opens, so a failed load can't leave one running. ## Audio and clock @@ -49,11 +49,10 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl ## Input timing -- Minecraft 26.3 uses SDL3, not GLFW. Read lane keys in `SDLEventHandler` (`LaneInput`), since it hands keys on to the keyboard handler later in the frame. Keys are physical positions, so the left hand sits the same on any layout. Each SDL event carries a `timestamp` from SDL's tick counter (`SDL_GetTicksNS`), the same clock the song clock runs on, so convert that to song time with the clock's mapping. +- Minecraft 26.3 uses SDL3, not GLFW. Read lane keys in `SDLEventHandler` (`LaneInput`), since it hands keys on to the keyboard handler later in the frame, and the left and right mouse buttons there too (`SkyInput`). A click that grabs the mouse back after the window lost focus still reaches vanilla, so it can, and a release always goes wherever its press went, so vanilla never sees half a click. Keys are physical positions, so the left hand sits the same on any layout. Each SDL event carries a `timestamp` from SDL's tick counter (`SDL_GetTicksNS`), the same clock the song clock runs on, so convert that to song time with the clock's mapping. - Events are polled once per frame, so without a real timestamp from the OS the error is at most one frame. The debug overlay's `key stamp age` hints at whether stamps are real: at a low frame rate they should spread from about 0 up to a frame. Tell players to run uncapped or at 240+ FPS during play (about 4 ms of error). Keep rendering fast so this holds. -- Every frame, record an aim sample (song time, yaw, pitch → crosshair point on the screen plane). Slides and flicks are judged from these samples. Flicks test the line between two samples, so fast swipes at low FPS still register. -- Events go into a fixed ring that the play loop (`PlaySession`) drains at the start of every frame, before anything reads the time. A play has a 3-second lead-in with the clock running before the music, and stays open 2 seconds after the last note. -- Until sky notes exist, the aim sample is a fixed mid-screen point, on the same code path. +- Every frame, record an aim sample: where the camera's look ray from the eye meets the screen plane (`ScreenPlane`), as normalised screen coordinates. Slides and flicks are judged from these samples. Flicks test the line between two samples, so fast swipes at low FPS still register. +- Events go into fixed rings. The play loop (`PlaySession`) reads the clock at the start of every frame, before anything reads the time. Vanilla turns the camera with the mouse later in the frame (`MouseHandler.handleAccumulatedMovement`), so only then does the play loop keep the camera within its limit, drain keys and buttons oldest first, and send the frame's aim sample, before anything is drawn. So a sample is where the camera really pointed that frame, and a click is placed there too: a click's own position within the frame isn't known. A play has a 3-second lead-in with the clock running before the music, and stays open 2 seconds after the last note. - Pausing stops the song and clock together. Resuming goes back 3 seconds, or to before the song if that's where it lands, and plays on from there under a 3-2-1 countdown. `PlayInput` in `core` holds the rule: nothing is judged or recorded until the song is back at the pause point, and any lane key or sky button that changed in between is pressed or released at exactly that time. The crosshair is recorded where it last was at the pause point, and again where it is on its way to the frame that reopens judging, at that same time, so moving the mouse while paused isn't a swipe ([REPLAY_FORMAT.md](REPLAY_FORMAT.md)). Keys are read while the pause screen is open too, so this knows which are really down. Notes already judged stay hidden during the countdown, and so does the part of a hold already played. - A finished play opens `ResultsScreen` and saves its replay. Retry, on that screen and the pause screen, loads a new `PlaySession` for the same chart and keeps the stage. Leaving or retrying part way through saves nothing. - A key usually arrives after a later frame has read the time: on a Mac at 170 FPS, most stamps were already older than the last frame. So `PlayInput` holds aim samples and the judge's clock 50 ms behind the song. A key is judged at once at its own stamp, after the samples older than it, so hits show straight away and only Misses, ticks and, from Milestone 3, slide and flick results show up to 50 ms later. Sky buttons go through `PlayInput` the same way, with the crosshair at the click, never straight to `ReplayRecorder`, or they would land out of order with the held-back samples. A key or button older than the judge's current time moves up to it and counts as a `late key`: that takes a stamp more than 50 ms behind the previous frame, or one older than a newer key or the pause point. Calibration reads the same stamps, so offset B applies to the times it was measured on. @@ -70,7 +69,7 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl - Notes are plain coloured cuboids until Milestone 5 brings block models (note block styles per type). Hold bodies are stretched quads, slide paths will be ribbons, and the screen will be a translucent pane with a frame. - Note speed and visual offset A live in `PlaySettings`, changed from the pause screen, and A also by calibration. They reach only `TrackRenderer`, so the judge and replays never see them. Offset B is read when a play starts and goes in its replay. - Hit effects are client-only particles and a short sound, with a hit-sound volume setting. -- Performance budget: 240 FPS with 300 notes on screen on a mid-range GPU. F6 during a play shows a debug overlay with the song position, clock drift, frame time, the offsets, and input-to-judgement delay as `key stamp age`: how old a key's SDL timestamp is when the judge gets it (minimum, average, maximum). Judged times come from the stamp unless it's older than the judge's current time, which `late keys` counts, and it can't see the keyboard's own delay. It rebuilds its text every quarter second. It stays on across plays until the game closes, and F3+F6 still reaches vanilla. +- Performance budget: 240 FPS with 300 notes on screen on a mid-range GPU. F6 during a play shows a debug overlay with the song position, clock drift, frame time, the offsets, and input-to-judgement delay as `key stamp age`: how old a key's SDL timestamp is at the start of the frame that judges it (minimum, average, maximum). Judged times come from the stamp unless it's older than the judge's current time, which `late keys` counts, and it can't see the keyboard's own delay. It rebuilds its text every quarter second. It stays on across plays until the game closes, and F3+F6 still reaches vanilla. ## Local data diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 7c03913..5fbd67e 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -76,7 +76,7 @@ Parallel lanes that work well: after Milestone 1, `server` can build auth and ch - **`core` unit tests:** one file of synthetic input per rule in `docs/JUDGEMENT.md`. For example: "tap 20 ms late → Justice Critical", "hold released 120 ms before a tick → Attack on that tick", "slide with crosshair outside radius → Miss on those ticks", "flick too slow → no hit". - **Golden replays:** replays with their known scores live in `core/src/test/resources/golden`. Any change to the judge must keep them identical, or update them on purpose in the same PR (and raise `JudgementConfig.JUDGE_VERSION`). So far they come from scripted players, with scores worked out by hand in `GoldenReplayTest`. Real plays recorded in the game live in `golden/recorded/`: they lock in what the judge gave, since nobody can work out a person's results by hand. To add one, copy a `.hexreplay` of the bundled test pack from `mod/run/hexium/replays` there, keeping its name, and regenerate. A judge change is accepted by regenerating, since these ignore the judge version. Editing a test pack chart means deleting its recordings and playing new ones. Editing an example chart changes its hash, so its golden replays must be regenerated too. - **Property tests (jqwik):** shifting every input by the judgement offset B leaves the score unchanged when B is set to match. A steady straight swipe gets the same judgement at every frame rate (other results can differ by what one frame's sampling can, see [JUDGEMENT.md](JUDGEMENT.md)). Random input never breaks the judge, and its replay always gives the same results. -- **Fabric client game tests:** the title button opens the menu; the menu loads the stage; the stage holds the player still and blocks action keys while the camera still turns; leaving ends the session; joining a normal singleplayer world creates no session and the player can move; a bot plays a short chart to the end, pausing three times with each resume rewinding and judging nothing until the pause point, changing the note speed, with notes drawn on the way and no Misses; its saved replay file re-judges to the same result; Retry starts over from the results and pause screens; the debug overlay is drawn; the track is never drawn in a normal world; calibration sends uneven taps back, turns taps late by known amounts into the right offsets, saves them to `settings.json`, and the next play's replay records B. The bot pushes into `LaneInput` directly, so real key presses through SDL need a human. A button that disconnects must do it through the task queue (`StageWorld.leave` shows how): the test framework defers a disconnect made while handling a click, so the test would see a different order of events from the real game. +- **Fabric client game tests:** the title button opens the menu; the menu loads the stage; the stage holds the player still and blocks action keys while the camera still turns, and a big swing stops at the sky screen's edges plus the margin; leaving ends the session; joining a normal singleplayer world creates no session and the player can move; a bot plays a short chart to the end, pausing three times with each resume rewinding and judging nothing until the pause point, changing the note speed, with notes drawn on the way and no Misses, and a click is recorded where the turned camera pointed; its saved replay file re-judges to the same result; Retry starts over from the results and pause screens; the debug overlay is drawn; the track is never drawn in a normal world; calibration sends uneven taps back, turns taps late by known amounts into the right offsets, saves them to `settings.json`, and the next play's replay records B. The bot pushes into `LaneInput` and `SkyInput` directly, so real key presses and clicks through SDL need a human. A button that disconnects must do it through the task queue (`StageWorld.leave` shows how): the test framework defers a disconnect made while handling a click, so the test would see a different order of events from the real game. - **Human playtest checklist per milestone:** offset calibration feels right; no drift after a 3-minute song; ground track readable while aiming at the corners; hold, slide and flick feel fair. ### Milestone 2 gate diff --git a/mod/src/client/java/net/trilleo/hexium/client/mixin/MouseHandlerMixin.java b/mod/src/client/java/net/trilleo/hexium/client/mixin/MouseHandlerMixin.java index 8831068..92b60f7 100644 --- a/mod/src/client/java/net/trilleo/hexium/client/mixin/MouseHandlerMixin.java +++ b/mod/src/client/java/net/trilleo/hexium/client/mixin/MouseHandlerMixin.java @@ -7,9 +7,16 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -/** The wheel changes the hotbar slot directly. Screens still get it. */ @Mixin(MouseHandler.class) abstract class MouseHandlerMixin { + /** The camera has just turned with this frame's mouse movement, and nothing has drawn it yet. */ + @Inject(method = "handleAccumulatedMovement", at = @At("TAIL")) + private void hexium$afterMouse(CallbackInfo ci) { + if (!HexiumSession.active()) return; + HexiumSession.afterMouse(); + } + + /** The wheel changes the hotbar slot directly. Screens still get it. */ @Inject(method = "onScroll", at = @At("HEAD"), cancellable = true) private void hexium$noHotbarScroll(long handle, double xoffset, double yoffset, CallbackInfo ci) { if (!HexiumSession.active()) return; diff --git a/mod/src/client/java/net/trilleo/hexium/client/mixin/SDLEventHandlerMixin.java b/mod/src/client/java/net/trilleo/hexium/client/mixin/SDLEventHandlerMixin.java index 995d462..58d67ed 100644 --- a/mod/src/client/java/net/trilleo/hexium/client/mixin/SDLEventHandlerMixin.java +++ b/mod/src/client/java/net/trilleo/hexium/client/mixin/SDLEventHandlerMixin.java @@ -2,6 +2,7 @@ import com.mojang.blaze3d.platform.SDLEventHandler; import net.trilleo.hexium.client.input.LaneInput; +import net.trilleo.hexium.client.input.SkyInput; import net.trilleo.hexium.client.session.HexiumSession; import org.lwjgl.sdl.SDL_Event; import org.spongepowered.asm.mixin.Mixin; @@ -17,4 +18,10 @@ abstract class SDLEventHandlerMixin { if (!HexiumSession.active()) return; if (LaneInput.onKeyEvent(event.address())) ci.cancel(); } + + @Inject(method = "handleMouseButtonEvent", at = @At("HEAD"), cancellable = true) + private void hexium$skyButtons(SDL_Event event, CallbackInfo ci) { + if (!HexiumSession.active()) return; + if (SkyInput.onMouseButtonEvent(event.address())) ci.cancel(); + } } diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/input/Aim.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/input/Aim.kt new file mode 100644 index 0000000..d2c0a7d --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/input/Aim.kt @@ -0,0 +1,68 @@ +package net.trilleo.hexium.client.input + +import net.minecraft.client.Minecraft +import net.trilleo.hexium.client.session.StageGeometry +import net.trilleo.hexium.core.aim.ScreenPlane + +/** + * Where the crosshair meets the sky screen, and the camera limit that keeps it near there. The camera is + * the player's own rotation (real camera rotation, docs/DESIGN.md), so the look is read from the player + * and, past the screen's edges plus a margin, set back on it. Call [update] once per frame, after vanilla + * has turned the camera with that frame's mouse movement. Doesn't allocate. + */ +object Aim { + private var plane: ScreenPlane? = null + private var planeFloorY = Double.NaN + + /** The crosshair at the last [update], in the chart's screen coordinates. Mid-screen until then. */ + var x = 0.5f + private set + var y = 0.5f + private set + + /** Keeps the camera within the limit, then reads where it aims. */ + fun update() { + val minecraft = Minecraft.getInstance() + val player = minecraft.player ?: return + val level = minecraft.level ?: return + val floorY = (level.minY + StageGeometry.FLOOR_THICKNESS).toDouble() + val plane = planeFor(floorY) + val yaw = player.yRot + val pitch = player.xRot + if (plane.clampLook(player.x, player.eyeY, player.z, yaw.toDouble(), pitch.toDouble(), StageGeometry.AIM_MARGIN / StageGeometry.SCREEN_WIDTH, StageGeometry.AIM_MARGIN / StageGeometry.SCREEN_HEIGHT)) { + val newYaw = plane.yaw.toFloat() + val newPitch = plane.pitch.toFloat() + // The previous frame's look moves by as much, so the camera doesn't swing back between ticks. + player.yRotO += newYaw - yaw + player.xRotO += newPitch - pitch + player.yRot = newYaw + player.xRot = newPitch + } + if (plane.aim(player.x, player.eyeY, player.z, player.yRot.toDouble(), player.xRot.toDouble())) { + x = plane.x.toFloat() + y = plane.y.toFloat() + } + } + + /** Back to mid-screen, for a new play. */ + fun reset() { + x = 0.5f + y = 0.5f + } + + private fun planeFor(floorY: Double): ScreenPlane { + val existing = plane + if (existing != null && floorY == planeFloorY) return existing + val halfWidth = StageGeometry.SCREEN_WIDTH / 2.0 + val made = ScreenPlane( + leftX = StageGeometry.STAND_X + halfWidth, + rightX = StageGeometry.STAND_X - halfWidth, + bottomY = floorY, + topY = floorY + StageGeometry.SCREEN_HEIGHT, + planeZ = StageGeometry.JUDGEMENT_Z, + ) + plane = made + planeFloorY = floorY + return made + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/input/SkyInput.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/input/SkyInput.kt new file mode 100644 index 0000000..e4ed293 --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/input/SkyInput.kt @@ -0,0 +1,96 @@ +package net.trilleo.hexium.client.input + +import net.minecraft.client.Minecraft +import net.trilleo.hexium.client.session.HexiumSession +import net.trilleo.hexium.core.chart.SkyButton +import org.lwjgl.sdl.SDLMouse +import org.lwjgl.sdl.SDL_MouseButtonEvent + +/** + * The left and right mouse buttons for sky notes, read straight from SDL's events with their + * timestamps, as [LaneInput] reads keys. A fixed ring holds them until the frame drains it, so + * nothing here allocates. + */ +object SkyInput { + private val BUTTONS = SkyButton.entries.toTypedArray() + private const val CAPACITY = 256 + + private val buttons = IntArray(CAPACITY) + private val downs = BooleanArray(CAPACITY) + private val times = LongArray(CAPACITY) + private var head = 0 + private var count = 0 + + /** Whether Hexium kept each button's last press from vanilla, so its release is kept too and vanilla never sees half a click. */ + private val tookPress = BooleanArray(BUTTONS.size) + + /** The next event's button, once [hasEvent] says there's one. */ + val button: SkyButton + get() = BUTTONS[buttons[head]] + val down: Boolean + get() = downs[head] + + /** When it happened, on SDL's tick counter. */ + val timeNs: Long + get() = times[head] + + val hasEvent: Boolean + get() = count > 0 + + fun next() { + head = (head + 1) % CAPACITY + count-- + } + + fun clear() { + head = 0 + count = 0 + } + + /** + * Returns true if vanilla shouldn't see the event. Taken while a screen is open too, since the pause + * rule needs to know which buttons are down on resuming. A press reaches vanilla while a screen is + * open, or when it grabs the mouse back after the window lost focus. Its release follows it either + * way, even if the screen has closed since, so vanilla never sees half a click. + */ + @JvmStatic + fun onMouseButtonEvent(event: Long): Boolean { + val button = when (SDL_MouseButtonEvent.nbutton(event).toInt()) { + SDLMouse.SDL_BUTTON_LEFT -> SkyButton.L + SDLMouse.SDL_BUTTON_RIGHT -> SkyButton.R + else -> return false + } + val isDown = SDL_MouseButtonEvent.ndown(event) + if (HexiumSession.play()?.acceptingInput == true) push(button, isDown, SDL_MouseButtonEvent.ntimestamp(event)) + return !vanillaSees(button, isDown) + } + + private fun vanillaSees(button: SkyButton, isDown: Boolean): Boolean { + val b = button.ordinal + if (!isDown) { + val took = tookPress[b] + tookPress[b] = false + return !took + } + val playing = HexiumSession.play()?.acceptingInput == true + tookPress[b] = playing && HexiumSession.noScreenOpen() && Minecraft.getInstance().mouseHandler.isMouseGrabbed + return !tookPress[b] + } + + /** + * For a new session. A press from before it, such as the click that started it, went to vanilla, + * so its release does too. + */ + fun forgetPresses() { + tookPress.fill(false) + } + + fun push(button: SkyButton, isDown: Boolean, atNs: Long) { + if (count == CAPACITY) return + val slot = (head + count) % CAPACITY + buttons[slot] = button.ordinal + downs[slot] = isDown + times[slot] = atNs + count++ + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt index b9b94ce..e369f48 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt @@ -11,7 +11,9 @@ import net.trilleo.hexium.client.chart.ChartPack import net.trilleo.hexium.client.clock.AudioClock import net.trilleo.hexium.client.debug.DebugOverlay import net.trilleo.hexium.client.debug.InputDelay +import net.trilleo.hexium.client.input.Aim import net.trilleo.hexium.client.input.LaneInput +import net.trilleo.hexium.client.input.SkyInput import net.trilleo.hexium.client.screen.ResultsScreen import net.trilleo.hexium.core.chart.ChartFolder import net.trilleo.hexium.core.chart.ChartParser @@ -20,6 +22,7 @@ import net.trilleo.hexium.core.chart.Difficulty import net.trilleo.hexium.core.chart.DifficultyChart import net.trilleo.hexium.core.chart.GroundTrack import net.trilleo.hexium.core.chart.Severity +import net.trilleo.hexium.core.chart.SkyButton import net.trilleo.hexium.core.judge.Judge import net.trilleo.hexium.core.judge.JudgeChart import net.trilleo.hexium.core.replay.PlayInput @@ -29,9 +32,10 @@ import org.lwjgl.sdl.SDLTimer import org.slf4j.LoggerFactory /** - * One play of a chart. Each frame it reads the audio clock, then sends everything that happened - * through [input] and on to [recorder], so a replay holds exactly what the judge saw. All the rules, - * including what a pause does, are in `core`. + * One play of a chart. Each frame it reads the audio clock at the start ([frame]), then, once vanilla + * has turned the camera with that frame's mouse movement ([afterMouse]), sends everything that + * happened through [input] and on to [recorder], so a replay holds exactly what the judge saw and each + * aim sample is where the camera really pointed. All the rules, including what a pause does, are in `core`. */ class PlaySession private constructor( private val pack: ChartPack, @@ -54,6 +58,13 @@ class PlaySession private constructor( private var judgedSeen = 0 private val input = PlayInput(recorder, chart.laneCount) + /** The song time [frame] read, waiting for [afterMouse] to send it with the aim. */ + private var frameMs = 0.0 + private var framePending = false + + /** SDL's tick counter at the start of the frame, so a key's stamp age doesn't count vanilla's work since. */ + private var frameStartNs = 0L + /** Where the replay of this play went, once it has finished, or null if it couldn't be saved. */ var savedReplay: Path? = null private set @@ -83,6 +94,9 @@ class PlaySession private constructor( fun isLaneDown(lane: Int): Boolean = acceptingInput && input.isLaneDown(lane) + /** For drawing a slide as held. */ + fun isButtonDown(button: SkyButton): Boolean = acceptingInput && input.isButtonDown(button) + private fun expectedEvents(): Int { val seconds = (stream.lengthMs + LEAD_IN_MS + TAIL_MS) / 1000.0 return (seconds * EXPECTED_SAMPLES_PER_SECOND).toInt() + judgeChart.objectCount * 2 @@ -91,12 +105,15 @@ class PlaySession private constructor( /** Call once per frame, before anything reads the time. Doesn't allocate. */ fun frame() { val minecraft = Minecraft.getInstance() + frameStartNs = SDLTimer.SDL_GetTicksNS() stream.setGain(minecraft.options.getFinalSoundSourceVolume(SoundSource.MUSIC)) val screenOpen = minecraft.gui.screen() != null when (state) { State.WAITING_FOR_STAGE -> { if (screenOpen || minecraft.player == null) return LaneInput.clear() + SkyInput.clear() + Aim.reset() clock.playAfter(LEAD_IN_MS) state = State.PLAYING } @@ -114,18 +131,32 @@ class PlaySession private constructor( State.FINISHED -> return } clock.update() - drainInput() if (state == State.PAUSED) { + // Keys and buttons changed during the pause, read on this clock before resuming moves it. + drainInput() readResults() return } // Vanilla lowers the frame rate after a minute with no input it can see, and lane keys never reach it. minecraft.framerateLimitTracker.onInputReceived() - val now = clock.songTimeMs - input.frame(now, REST_AIM, REST_AIM) + frameMs = clock.songTimeMs + framePending = true + } + + /** + * Call once per frame after vanilla has turned the camera with the mouse. Keeps the camera within its + * limit, then sends that frame's input and aim sample. Doesn't allocate. + */ + fun afterMouse() { + if (state == State.WAITING_FOR_STAGE || state == State.FINISHED) return + Aim.update() + drainInput() + if (!framePending) return + framePending = false + input.frame(frameMs, Aim.x, Aim.y) if (state == State.REWINDING && input.isOpen) state = State.PLAYING readResults() - if (state == State.PLAYING && now >= endMs) finish(minecraft) + if (state == State.PLAYING && frameMs >= endMs) finish(Minecraft.getInstance()) } private fun readResults() { @@ -135,13 +166,21 @@ class PlaySession private constructor( } } + /** Keys and mouse buttons, oldest first. A button is pressed where the crosshair is now. */ private fun drainInput() { - while (LaneInput.hasEvent) { - input.lane(LaneInput.lane, LaneInput.down, clock.songTimeAt(LaneInput.timeNs)) + while (LaneInput.hasEvent || SkyInput.hasEvent) { + val laneFirst = LaneInput.hasEvent && (!SkyInput.hasEvent || LaneInput.timeNs <= SkyInput.timeNs) + val timeNs = if (laneFirst) LaneInput.timeNs else SkyInput.timeNs + if (laneFirst) { + input.lane(LaneInput.lane, LaneInput.down, clock.songTimeAt(timeNs)) + LaneInput.next() + } else { + input.button(SkyInput.button, SkyInput.down, clock.songTimeAt(timeNs), Aim.x, Aim.y) + SkyInput.next() + } inputDelay.lateKeys = input.lateKeyCount // Only what reached the judge, so a key changed during a pause isn't counted. - if (input.isOpen) inputDelay.record(SDLTimer.SDL_GetTicksNS() - LaneInput.timeNs) - LaneInput.next() + if (input.isOpen) inputDelay.record(frameStartNs - timeNs) } } @@ -175,9 +214,6 @@ class PlaySession private constructor( /** Room for this frame rate without growing during play, on top of the notes' own presses. */ private const val EXPECTED_SAMPLES_PER_SECOND = 2000 - /** Aiming arrives with sky notes. Until then the crosshair stays mid-screen, on the same code path. */ - private const val REST_AIM = 0.5f - /** Reads the chart's own bytes, since a replay is tied to them. Throws [IOException] saying what's wrong. */ fun load(pack: ChartPack, difficulty: Difficulty): PlaySession { val bytes = Files.readAllBytes(pack.folder.resolve(ChartValidator.fileName(difficulty))) diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt index 6b9854c..bd34002 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/session/HexiumSession.kt @@ -5,6 +5,7 @@ import net.minecraft.client.Minecraft import net.minecraft.client.gui.components.toasts.SystemToast import net.minecraft.network.chat.Component import net.trilleo.hexium.Hexium +import net.trilleo.hexium.client.input.SkyInput import net.trilleo.hexium.client.play.PlaySession import net.trilleo.hexium.client.screen.StageMenuScreen import org.slf4j.LoggerFactory @@ -25,6 +26,7 @@ object HexiumSession { fun active(): Boolean = active fun start(play: PlaySession? = null) { + SkyInput.forgetPresses() active = true this.play = play } @@ -39,6 +41,12 @@ object HexiumSession { play?.frame() } + /** Called every frame once vanilla has turned the camera with the mouse, before anything is drawn. */ + @JvmStatic + fun afterMouse() { + play?.afterMouse() + } + /** Starts the chart again on the stage that's already here. If it can't be read, the player stays where they are. */ fun retry() { val old = play ?: return diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt index c747f2b..97c5f29 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt @@ -1,5 +1,7 @@ package net.trilleo.hexium.client.session +import net.trilleo.hexium.core.judge.JudgementConfig + /** Where things stand on the stage. Starting values from docs/DESIGN.md, all tunable. */ object StageGeometry { const val FLOOR_THICKNESS = 1 @@ -23,9 +25,18 @@ object StageGeometry { /** Where the screen's bottom edge is, 6 blocks in front of the player. */ const val JUDGEMENT_Z = STAND_Z + 6.0 - /** Four of these make the track as wide as the sky screen will be, 12 blocks. */ + /** Four of these make the track as wide as the sky screen, 12 blocks. */ const val LANE_WIDTH = 3.0 + /** The sky screen stands on the floor at the judgement line, as wide as the track, 12 blocks. */ + const val SCREEN_WIDTH = LANE_WIDTH * 4 + + /** 6 blocks, from the judge's own aspect, so hit circles stay round on the screen. */ + val SCREEN_HEIGHT = SCREEN_WIDTH / JudgementConfig.DEFAULT.screenAspect + + /** How far past the screen's edges, in blocks, the camera can look before it stops. */ + const val AIM_MARGIN = 1.0 + /** How far up the lanes the track runs from the judgement line. Notes appear at the far end. */ const val TRACK_LENGTH = 64.0 diff --git a/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt b/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt index 09dc512..2fda1b4 100644 --- a/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt +++ b/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt @@ -13,7 +13,9 @@ import net.minecraft.sounds.SoundSource import net.minecraft.world.Difficulty import net.minecraft.world.level.GameType import net.minecraft.world.level.gamerules.GameRules +import net.trilleo.hexium.client.input.Aim import net.trilleo.hexium.client.input.LaneInput +import net.trilleo.hexium.client.input.SkyInput import net.trilleo.hexium.client.play.PlayHud import net.trilleo.hexium.client.play.PlaySettings import net.trilleo.hexium.client.play.TrackRenderer @@ -25,6 +27,7 @@ import net.trilleo.hexium.client.screen.StageMenuScreen import net.trilleo.hexium.client.session.HexiumSession import net.trilleo.hexium.client.session.StageGeometry import net.trilleo.hexium.core.chart.Note +import net.trilleo.hexium.core.chart.SkyButton import net.trilleo.hexium.core.chart.TimingMap import net.trilleo.hexium.core.judge.ClearLamp import net.trilleo.hexium.core.judge.Judgement @@ -220,6 +223,22 @@ class HexiumClientGameTest : FabricClientGameTest { context.waitTicks(SETTLE_TICKS) check(context.computeOnClient { it.player!!.yRot } != yawBefore) { "the camera didn't turn" } + // A big swing, a frame at a time as a real mouse moves, stops at the sky screen's edge plus the margin. + swing(context, SWING_STEP_PIXELS, -SWING_STEP_PIXELS) + context.takeScreenshot("camera_limit") + context.runOnClient { + val edgeX = 1.0 + StageGeometry.AIM_MARGIN / StageGeometry.SCREEN_WIDTH + val edgeY = 1.0 + StageGeometry.AIM_MARGIN / StageGeometry.SCREEN_HEIGHT + check(StageGeometry.SCREEN_WIDTH == StageGeometry.LANE_WIDTH * 4 && StageGeometry.SCREEN_HEIGHT == 6.0) { "the sky screen isn't 12 by 6" } + check(Math.abs(Aim.x - edgeX) < MAX_AIM_ERROR && Math.abs(Aim.y - edgeY) < MAX_AIM_ERROR) { "the camera stopped at ${Aim.x}, ${Aim.y}" } + } + swing(context, -SWING_STEP_PIXELS, SWING_STEP_PIXELS) + context.runOnClient { + val edgeX = -StageGeometry.AIM_MARGIN / StageGeometry.SCREEN_WIDTH + val edgeY = -StageGeometry.AIM_MARGIN / StageGeometry.SCREEN_HEIGHT + check(Math.abs(Aim.x - edgeX) < MAX_AIM_ERROR && Math.abs(Aim.y - edgeY) < MAX_AIM_ERROR) { "the camera stopped at ${Aim.x}, ${Aim.y}" } + } + context.runOnClient { it.pauseGame(false) } context.waitForScreen(StageMenuScreen::class.java) context.takeScreenshot("stage_menu") @@ -239,17 +258,34 @@ class HexiumClientGameTest : FabricClientGameTest { context.waitForScreen(TitleScreen::class.java) } + private fun swing(context: ClientGameTestContext, stepX: Double, stepY: Double) { + repeat(SWING_STEPS) { + context.input.moveCursor(stepX, stepY) + context.waitTick() + } + context.waitTicks(SETTLE_TICKS) + } + private fun aChartPlaysToTheEndAndItsReplayMatches(context: ClientGameTestContext) { context.clickScreenButton("hexium.title_button") context.waitForScreen(HexiumMenuScreen::class.java) context.clickScreenButton("hexium.difficulty.basic") context.waitFor({ HexiumSession.play()?.state == PlaySession.State.PLAYING }, LOAD_TICKS) val play = HexiumSession.play()!! - // A tap in the same frame as the pause came before it, so it must not be lost. + // Off the middle, so a click's place shows it comes from the camera. Vanilla ignores the first move after grabbing the mouse. + context.input.moveCursor(AIM_TURN_PIXELS, AIM_TURN_PIXELS) + context.waitTicks(AIM_TURN_TICKS) + context.input.moveCursor(AIM_TURN_PIXELS, AIM_TURN_PIXELS) + context.waitTicks(AIM_TURN_TICKS) + val aimed = context.computeOnClient, RuntimeException> { Aim.x to Aim.y } + check(Math.abs(aimed.first - 0.5f) > MIN_AIM_TURN && Math.abs(aimed.second - 0.5f) > MIN_AIM_TURN) { "the camera didn't turn off the middle: $aimed" } + // A tap and a click pushed between frames, as SDL delivers them, must not be lost to the pause right after. context.runOnClient { val now = SDLTimer.SDL_GetTicksNS() LaneInput.push(TAP_BEFORE_PAUSE_LANE, true, now) LaneInput.push(TAP_BEFORE_PAUSE_LANE, false, now) + SkyInput.push(SkyButton.R, true, now) + SkyInput.push(SkyButton.R, false, now) } pauseAndCheckTimeStops(context, play, "lead_in") context.runOnClient { @@ -257,6 +293,18 @@ class HexiumClientGameTest : FabricClientGameTest { check((0 until replay.eventCount).any { replay.event(it) == ReplayEvent.LANE_DOWN && replay.index(it) == TAP_BEFORE_PAUSE_LANE }) { "a tap just before the pause was lost" } + // Pressed where the crosshair was. + check( + (0 until replay.eventCount).any { + replay.event(it) == ReplayEvent.BUTTON_DOWN && replay.index(it) == SkyButton.R.ordinal && + Math.abs(replay.x(it) - aimed.first) < MAX_AIM_ERROR && Math.abs(replay.y(it) - aimed.second) < MAX_AIM_ERROR + }, + ) { "a click just before the pause was lost or put in the wrong place" } + check( + (0 until replay.eventCount).any { + replay.event(it) == ReplayEvent.AIM && Math.abs(replay.x(it) - aimed.first) < MAX_AIM_ERROR && Math.abs(replay.y(it) - aimed.second) < MAX_AIM_ERROR + }, + ) { "no aim sample where the camera pointed" } } val script = script(play) @@ -467,6 +515,16 @@ class HexiumClientGameTest : FabricClientGameTest { const val SETTLE_TICKS = 20 const val HOLD_TICKS = 40 const val TURN_PIXELS = 200.0 + + /** About 15 degrees a step at the default sensitivity, far enough in all to turn well past every edge. */ + const val SWING_STEP_PIXELS = 100.0 + const val SWING_STEPS = 30 + const val MAX_AIM_ERROR = 0.002 + + /** A few degrees right and down at the default sensitivity, a little way into the lead-in. */ + const val AIM_TURN_PIXELS = 20.0 + const val AIM_TURN_TICKS = 3 + const val MIN_AIM_TURN = 0.02f const val TAP_LENGTH_MS = 30.0 const val SONG_TICKS = 1200 const val BOT_LOOKAHEAD_MS = 120.0 From 4aeb36bd5d55ec878e8d1d3776119a94671fbd23 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Sun, 8 Nov 2026 09:55:43 +0800 Subject: [PATCH 29/34] Feature: Draw sky notes on the sky screen and scale the stage so the screen is centred on the player's eyes --- CHANGELOG.md | 10 +- docs/ARCHITECTURE.md | 8 +- docs/CHART_FORMAT.md | 2 +- docs/DESIGN.md | 6 +- docs/DEVELOPMENT.md | 2 +- .../net/trilleo/hexium/client/HexiumClient.kt | 2 + .../net/trilleo/hexium/client/input/Aim.kt | 28 +- .../trilleo/hexium/client/play/PlaySession.kt | 4 +- .../trilleo/hexium/client/play/SkyRenderer.kt | 303 ++++++++++++++++++ .../hexium/client/play/TrackRenderer.kt | 16 +- .../hexium/client/screen/HexiumMenuScreen.kt | 4 +- .../hexium/client/session/StageGeometry.kt | 40 ++- .../resources/assets/hexium/lang/en_us.json | 1 - .../resources/assets/hexium/lang/zh_cn.json | 1 - .../hexium/gametest/HexiumClientGameTest.kt | 62 +++- 15 files changed, 442 insertions(+), 47 deletions(-) create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/play/SkyRenderer.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index 81b46c7..7a53fa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,6 @@ + Added a Hexium button on the title screen that opens Hexium's menu. + The menu lists every chart it finds, including a built-in Test Pattern and any folders in `.minecraft/hexium/charts`. + Broken charts are marked and show their first problem, and the full list goes to the log. - + Charts with sky notes are shown but can't be selected yet. + Choosing a difficulty now plays it on the stage, and Esc offers a way back to the menu. #### Charts @@ -42,9 +41,9 @@ + Tap to clicks with your eyes closed, then to moving notes with no sound, and it suggests a judgement offset and a visual offset that you can adjust before saving. + Your note speed and offsets are now remembered, in `.minecraft/hexium/settings.json`. + Added the stage: a plain floor with a raised platform you stand on, looking down the lanes, kept apart from your normal worlds. - + You stand 6 blocks from the judgement line, so it's close enough to read. + + You stand 9 blocks from the judgement line, with a sky screen 18 blocks wide and 9 tall whose middle is level with your eyes. + You can look around, but moving, jumping and action keys are off while you're on it. - + The camera stops a block past the sky screen's edges, so you can't turn away from the stage. + + The camera stops just past the sky screen's edges, so you can't turn away from the stage. + The hunger bar is hidden. + Added judging for ground taps and holds, with CHUNITHM's windows. + Hold ticks are judged on how long ago the key was last down. @@ -52,6 +51,11 @@ #### Sky Notes ++ Sky notes can now be played on the screen in front of you: aim with the camera and click. + + Sky taps fly toward the screen and are hit with a left click (orange) or a right click (blue). + + Slides are a trail of beads to follow with the button held, with a ring where the slide crosses the screen, white while you hold the button. + + Flicks are magenta, with an arrow when they need a direction: swipe through them. + + A faint ring on the screen shows where a coming note will land. + Added judging for sky taps, slides and flicks. + A swipe that jumps over a flick between two frames still hits it, so low frame rates stay fair. + Left and right clicks on the stage are now timed from when the button went down and placed where the crosshair meets the sky screen, ready for sky notes. diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 9ab56aa..c088dda 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -37,7 +37,7 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl - Every mixin and event hook starts with `if (!HexiumSession.active()) return;`, except the title screen button, which only adds that button. Joining a normal world or server means no session, so vanilla behaviour stays as it was. - The stage is a flat black floor with a small platform for the player, made in code (`StageWorld`) and created fresh for each session in the mod's own folder, `.minecraft/hexium/stages/`, not `saves/`, so it never shows up in the vanilla world list. Making it in code means a Minecraft update can't ask to upgrade it. Chart-authored stages may bring template worlds in Milestone 8. It runs on the integrated server, with its rules frozen once the player joins: no daylight cycle, mobs, random ticks or weather. - The player is in adventure mode on Peaceful, placed on the stand spot on top of the platform. Gameplay never depends on the server; the world is just scenery. -- While a session is active, mixins hold the player still (`KeyboardInput`), stop every key that method handles (`Minecraft.handleKeybinds`: attack, items, hotbar, inventory, chat, F1, F5 and so on) and hotbar scrolling, keep vanilla's tutorial from starting, since it would end itself for good outside survival, and replace vanilla's pause menu. The camera turns with the mouse, but stops 1 block past the sky screen's edges (`Aim`, with the maths in `ScreenPlane` in `core`), so the player can't spin away from the stage. Vanilla's HUD stays apart from the hunger bar, which is hidden, and Hexium draws combo, judgement and score over it. While no screen is open, vanilla doesn't see lane keys at all, so the play loop tells it there was input, or it would lower the frame rate. A player arriving in third person or with the HUD hidden gets the normal view, and their own comes back afterwards. +- While a session is active, mixins hold the player still (`KeyboardInput`), stop every key that method handles (`Minecraft.handleKeybinds`: attack, items, hotbar, inventory, chat, F1, F5 and so on) and hotbar scrolling, keep vanilla's tutorial from starting, since it would end itself for good outside survival, and replace vanilla's pause menu. The camera turns with the mouse, but stops 1.54 blocks past the sky screen's edges (`Aim`, with the maths in `ScreenPlane` in `core`), so the player can't spin away from the stage. Vanilla's HUD stays apart from the hunger bar, which is hidden, and Hexium draws combo, judgement and score over it. While no screen is open, vanilla doesn't see lane keys at all, so the play loop tells it there was input, or it would lower the frame rate. A player arriving in third person or with the HUD hidden gets the normal view, and their own comes back afterwards. - A session ends when the connection closes, and also whenever the title screen or the Hexium menu opens, so a failed load can't leave one running. ## Audio and clock @@ -64,10 +64,10 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl ## Rendering -- `TrackRenderer` draws through Fabric's `LevelRenderEvents.COLLECT_SUBMITS` and `submitCustomGeometry`, never raw OpenGL, since 26.3 can run on Vulkan. Only notes inside the visible time window are drawn: `GroundTrack` in `core` holds them in time order and finds where to start, and every position is worked out fresh from draw time, so a note can't drift from the clock. `SkyTrack` does the same for sky taps, slides and flicks: it gives each note's hit radius from `JudgementConfig`, so the drawn size is the judged size, and a slide's position at any time from the same `SlidePath` the judge uses. A note's distance up the lane is `(note time − draw time) × note speed`, and speed never changes when it arrives. +- `TrackRenderer` draws through Fabric's `LevelRenderEvents.COLLECT_SUBMITS` and `submitCustomGeometry`, never raw OpenGL, since 26.3 can run on Vulkan. Only notes inside the visible time window are drawn: `GroundTrack` in `core` holds them in time order and finds where to start, and every position is worked out fresh from draw time, so a note can't drift from the clock. A note's distance up the lane is `(note time − draw time) × note speed`, and speed never changes when it arrives. - For now the render type doesn't write depth and, with classic transparency, sorts quads by their centres, so a long floor quad could paint over a note behind its middle. So the floor, hold bodies and notes are each submitted in their own order, which are drawn in turn, and a note only emits the faces the camera can see. Improved transparency (the Fabulous preset) draws these on a different path; the game test takes a screenshot of it to check by eye. A note goes once the judge has its head, and a hold's body stops at the line, shortening as it plays. Vertices are relative to the camera on an untransformed pose, as vanilla's entities are, so no matrix is applied per vertex. -- Notes are plain coloured cuboids until Milestone 5 brings block models (note block styles per type). Hold bodies are stretched quads, slide paths will be ribbons, and the screen will be a translucent pane with a frame. -- Note speed and visual offset A live in `PlaySettings`, changed from the pause screen, and A also by calibration. They reach only `TrackRenderer`, so the judge and replays never see them. Offset B is read when a play starts and goes in its replay. +- Notes are plain coloured shapes until Milestone 5 brings block models (note block styles per type). Ground notes are cuboids and hold bodies stretched quads. `SkyRenderer` draws after the ground, in orders of its own: the sky notes, then the screen as a faint pane with a frame in front of them, so they show through it, then the rings on the screen. `SkyTrack` in `core` holds sky taps, slides and flicks in time order the way `GroundTrack` holds ground notes, with each note's hit radius from `JudgementConfig` and a slide's position at any time from the same `SlidePath` the judge uses. A sky note flies down the depth axis at the note speed as a flat octagon facing the player, just covering its hit circle: taps orange (L) or blue (R), flicks magenta with an arrow when they need a direction. A slide is a trail of small beads on a fixed time grid down its path, with a ring where it crosses the screen now, white while its button is down. A tap or flick within 24 blocks also shows a faint ring on the screen where it will land, and a late one waits on the screen until it's judged or its window passes. During the rewind after a pause, the part of a slide before the pause point isn't drawn, as with hold bodies. +- Note speed and visual offset A live in `PlaySettings`, changed from the pause screen, and A also by calibration. They reach only `TrackRenderer` and `SkyRenderer`, so the judge and replays never see them. Offset B is read when a play starts and goes in its replay. - Hit effects are client-only particles and a short sound, with a hit-sound volume setting. - Performance budget: 240 FPS with 300 notes on screen on a mid-range GPU. F6 during a play shows a debug overlay with the song position, clock drift, frame time, the offsets, and input-to-judgement delay as `key stamp age`: how old a key's SDL timestamp is at the start of the frame that judges it (minimum, average, maximum). Judged times come from the stamp unless it's older than the judge's current time, which `late keys` counts, and it can't see the keyboard's own delay. It rebuilds its text every quarter second. It stays on across plays until the game closes, and F3+F6 still reaches vanilla. diff --git a/docs/CHART_FORMAT.md b/docs/CHART_FORMAT.md index 7187970..b0b29b9 100644 --- a/docs/CHART_FORMAT.md +++ b/docs/CHART_FORMAT.md @@ -69,7 +69,7 @@ Difficulties are `BASIC`, `ADVANCED`, `EXPERT` and `MASTER`. `dir` on a flick is optional, in degrees (0 = right, 90 = up). Leave it out to accept any direction. Difficulties BASIC and ADVANCED use the easy tap windows. `level` is a whole number. -`button` is required on sky taps and slides, and is `L` or `R`. Every other field in the example is required. `size` is a multiplier on the base hit area in `JudgementConfig`, so 1 is normal. `radius` is a fraction of the screen's height, so a slide's hit area is a circle: on a 6-block-tall screen, a `radius` of 0.06 is 0.36 blocks in every direction. +`button` is required on sky taps and slides, and is `L` or `R`. Every other field in the example is required. `size` is a multiplier on the base hit area in `JudgementConfig`, so 1 is normal. `radius` is a fraction of the screen's height, so a slide's hit area is a circle: on the 9.24-block-tall screen, a `radius` of 0.06 is about 0.55 blocks in every direction. `ease` is `linear`, `in`, `out` or `inOut`. It shapes the segment leaving that point, so the last point's `ease` is ignored (but still required). With `t` as the progress along the segment from 0 to 1, measured in beats so a BPM change doesn't bend the path, the position moves by `t` for `linear`, `t²` for `in`, `1 − (1 − t)²` for `out` and `3t² − 2t³` for `inOut`. diff --git a/docs/DESIGN.md b/docs/DESIGN.md index cef2055..cec74b5 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -34,11 +34,11 @@ Everything is judged on one plane: the transparent screen in front of the player ### Stage geometry (starting values, all tunable) - The player is locked on the stand spot (the red circle), on a platform 3 blocks above the floor so the lanes stay readable into the distance, in adventure mode. Movement, jumping, sneaking, hotbar and inventory keys are suppressed during play. The hunger bar is hidden. -- Screen plane: 6 blocks in front of the player's eyes, about 12 blocks wide and 6 tall, with its bottom edge on the floor, so the player's eyes are level with its upper half and the rest view looks slightly down. -- Ground lanes: 4 lanes, each 3 blocks wide so the track matches the screen's width, lie on the floor, starting just in front of the platform and running past the screen, 64 blocks beyond it, into the distance. Notes spawn far down the lanes and slide toward the bottom edge of the screen. +- Screen plane: twice as tall as the player's eyes are high (eyes 4.62 blocks above the floor, so 9.24 tall), 18.48 wide at the judge's 2:1 aspect, with its bottom edge on the floor, so the player's eyes are level with its middle and the rest view looks straight ahead. It stands as far in front of the player as it is tall, 9.24 blocks, so its sides are 45° either side of straight ahead and its top and bottom 26.6° up and down. +- Ground lanes: 4 lanes, each 4.62 blocks wide so the track matches the screen's width, lie on the floor, starting just in front of the platform and running past the screen, 64 blocks beyond it, into the distance. Notes spawn far down the lanes and slide toward the bottom edge of the screen. - Sky notes: they fly straight toward the screen along the depth axis, visible through it, and are judged when they reach their (x, y) spot on the screen. - Note speed ("HiSpeed") is a player setting in blocks per second, 25 by default. It changes how far away notes appear, never their timing. -- Rest view: centred on the screen with the judgement line and the track ahead of it fully visible. Yaw and pitch are clamped to the screen's edges plus a small margin, so the player can't spin away. +- Rest view: centred on the screen with the judgement line and the track ahead of it fully visible. Yaw and pitch are clamped to the screen's edges plus a small margin (1.54 blocks), so the player can't spin away. ### Note types diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 5fbd67e..d283741 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -76,7 +76,7 @@ Parallel lanes that work well: after Milestone 1, `server` can build auth and ch - **`core` unit tests:** one file of synthetic input per rule in `docs/JUDGEMENT.md`. For example: "tap 20 ms late → Justice Critical", "hold released 120 ms before a tick → Attack on that tick", "slide with crosshair outside radius → Miss on those ticks", "flick too slow → no hit". - **Golden replays:** replays with their known scores live in `core/src/test/resources/golden`. Any change to the judge must keep them identical, or update them on purpose in the same PR (and raise `JudgementConfig.JUDGE_VERSION`). So far they come from scripted players, with scores worked out by hand in `GoldenReplayTest`. Real plays recorded in the game live in `golden/recorded/`: they lock in what the judge gave, since nobody can work out a person's results by hand. To add one, copy a `.hexreplay` of the bundled test pack from `mod/run/hexium/replays` there, keeping its name, and regenerate. A judge change is accepted by regenerating, since these ignore the judge version. Editing a test pack chart means deleting its recordings and playing new ones. Editing an example chart changes its hash, so its golden replays must be regenerated too. - **Property tests (jqwik):** shifting every input by the judgement offset B leaves the score unchanged when B is set to match. A steady straight swipe gets the same judgement at every frame rate (other results can differ by what one frame's sampling can, see [JUDGEMENT.md](JUDGEMENT.md)). Random input never breaks the judge, and its replay always gives the same results. -- **Fabric client game tests:** the title button opens the menu; the menu loads the stage; the stage holds the player still and blocks action keys while the camera still turns, and a big swing stops at the sky screen's edges plus the margin; leaving ends the session; joining a normal singleplayer world creates no session and the player can move; a bot plays a short chart to the end, pausing three times with each resume rewinding and judging nothing until the pause point, changing the note speed, with notes drawn on the way and no Misses, and a click is recorded where the turned camera pointed; its saved replay file re-judges to the same result; Retry starts over from the results and pause screens; the debug overlay is drawn; the track is never drawn in a normal world; calibration sends uneven taps back, turns taps late by known amounts into the right offsets, saves them to `settings.json`, and the next play's replay records B. The bot pushes into `LaneInput` and `SkyInput` directly, so real key presses and clicks through SDL need a human. A button that disconnects must do it through the task queue (`StageWorld.leave` shows how): the test framework defers a disconnect made while handling a click, so the test would see a different order of events from the real game. +- **Fabric client game tests:** the title button opens the menu; the menu loads the stage; the stage holds the player still and blocks action keys while the camera still turns, and a big swing stops at the sky screen's edges plus the margin; leaving ends the session; joining a normal singleplayer world creates no session and the player can move; a bot plays a short chart to the end, pausing three times with each resume rewinding and judging nothing until the pause point, changing the note speed, with notes drawn on the way and no Misses, and a click is recorded where the turned camera pointed; its saved replay file re-judges to the same result; Retry starts over from the results and pause screens; the debug overlay is drawn; the track is never drawn in a normal world; Expert's sky notes are drawn and a bot hits its first two sky taps by turning the camera onto them and clicking; calibration sends uneven taps back, turns taps late by known amounts into the right offsets, saves them to `settings.json`, and the next play's replay records B. The bot pushes into `LaneInput` and `SkyInput` directly, so real key presses and clicks through SDL need a human. A button that disconnects must do it through the task queue (`StageWorld.leave` shows how): the test framework defers a disconnect made while handling a click, so the test would see a different order of events from the real game. - **Human playtest checklist per milestone:** offset calibration feels right; no drift after a 3-minute song; ground track readable while aiming at the corners; hold, slide and flick feel fair. ### Milestone 2 gate diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt index 3cc10fc..26f0ee3 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/HexiumClient.kt @@ -4,6 +4,7 @@ import net.fabricmc.api.ClientModInitializer import net.trilleo.hexium.Hexium import net.trilleo.hexium.client.play.PlayHud import net.trilleo.hexium.client.play.PlaySettings +import net.trilleo.hexium.client.play.SkyRenderer import net.trilleo.hexium.client.play.TrackRenderer import net.trilleo.hexium.client.screen.TitleScreenButton import net.trilleo.hexium.client.session.StageHud @@ -20,6 +21,7 @@ object HexiumClient : ClientModInitializer { StageHud.register() PlayHud.register() TrackRenderer.register() + SkyRenderer.register() LOGGER.info("Hexium loaded") } } diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/input/Aim.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/input/Aim.kt index d2c0a7d..2112e2a 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/input/Aim.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/input/Aim.kt @@ -1,6 +1,7 @@ package net.trilleo.hexium.client.input import net.minecraft.client.Minecraft +import net.minecraft.client.player.LocalPlayer import net.trilleo.hexium.client.session.StageGeometry import net.trilleo.hexium.core.aim.ScreenPlane @@ -30,13 +31,7 @@ object Aim { val yaw = player.yRot val pitch = player.xRot if (plane.clampLook(player.x, player.eyeY, player.z, yaw.toDouble(), pitch.toDouble(), StageGeometry.AIM_MARGIN / StageGeometry.SCREEN_WIDTH, StageGeometry.AIM_MARGIN / StageGeometry.SCREEN_HEIGHT)) { - val newYaw = plane.yaw.toFloat() - val newPitch = plane.pitch.toFloat() - // The previous frame's look moves by as much, so the camera doesn't swing back between ticks. - player.yRotO += newYaw - yaw - player.xRotO += newPitch - pitch - player.yRot = newYaw - player.xRot = newPitch + turn(player, plane.yaw.toFloat(), plane.pitch.toFloat()) } if (plane.aim(player.x, player.eyeY, player.z, player.yRot.toDouble(), player.xRot.toDouble())) { x = plane.x.toFloat() @@ -44,6 +39,25 @@ object Aim { } } + /** Turns the camera to look at a place on the screen, given as the chart's screen coordinates. */ + fun lookToward(screenX: Double, screenY: Double) { + val minecraft = Minecraft.getInstance() + val player = minecraft.player ?: return + val level = minecraft.level ?: return + val plane = planeFor((level.minY + StageGeometry.FLOOR_THICKNESS).toDouble()) + plane.lookToward(player.x, player.eyeY, player.z, screenX, screenY) + // On the camera's own whole turn, as the limit keeps it. + turn(player, (player.yRot + Math.IEEEremainder(plane.yaw - player.yRot, 360.0)).toFloat(), plane.pitch.toFloat()) + } + + /** The previous frame's look moves by as much, so the camera doesn't swing back between ticks. */ + private fun turn(player: LocalPlayer, yaw: Float, pitch: Float) { + player.yRotO += yaw - player.yRot + player.xRotO += pitch - player.xRot + player.yRot = yaw + player.xRot = pitch + } + /** Back to mid-screen, for a new play. */ fun reset() { x = 0.5f diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt index e369f48..f332123 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/play/PlaySession.kt @@ -23,6 +23,7 @@ import net.trilleo.hexium.core.chart.DifficultyChart import net.trilleo.hexium.core.chart.GroundTrack import net.trilleo.hexium.core.chart.Severity import net.trilleo.hexium.core.chart.SkyButton +import net.trilleo.hexium.core.chart.SkyTrack import net.trilleo.hexium.core.judge.Judge import net.trilleo.hexium.core.judge.JudgeChart import net.trilleo.hexium.core.replay.PlayInput @@ -53,6 +54,7 @@ class PlaySession private constructor( val judgementOffsetMs = PlaySettings.judgementOffsetMs.toDouble() val recorder = ReplayRecorder(judgeChart, Replay.hashOf(chartFile), judgementOffsetMs, expectedEvents()) val track = GroundTrack(chart) + val sky = SkyTrack(chart, judgeChart.config) private val endMs = chart.lastNoteEndMs() + TAIL_MS private val headJudged = BooleanArray(chart.notes.size) private var judgedSeen = 0 @@ -89,7 +91,7 @@ class PlaySession private constructor( val notesMoving: Boolean get() = state != State.WAITING_FOR_STAGE - /** True once a tap or hold head, by its index in the chart's notes, has been judged. A hold's ticks don't count. */ + /** True once a tap, hold head, sky tap or flick, by its index in the chart's notes, has been judged. Ticks don't count. */ fun isHeadJudged(chartNote: Int): Boolean = headJudged[chartNote] fun isLaneDown(lane: Int): Boolean = acceptingInput && input.isLaneDown(lane) diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/play/SkyRenderer.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/play/SkyRenderer.kt new file mode 100644 index 0000000..a452cf0 --- /dev/null +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/play/SkyRenderer.kt @@ -0,0 +1,303 @@ +package net.trilleo.hexium.client.play + +import com.mojang.blaze3d.vertex.VertexConsumer +import net.fabricmc.fabric.api.client.rendering.v1.level.LevelRenderContext +import net.fabricmc.fabric.api.client.rendering.v1.level.LevelRenderEvents +import net.minecraft.client.Minecraft +import net.minecraft.client.renderer.SubmitNodeCollector +import net.minecraft.client.renderer.rendertype.RenderTypes +import net.trilleo.hexium.client.session.HexiumSession +import net.trilleo.hexium.client.session.StageGeometry +import net.trilleo.hexium.core.chart.GroundTrack +import net.trilleo.hexium.core.chart.SkyButton +import net.trilleo.hexium.core.chart.SkyTrack + +/** + * Draws the sky screen and its notes, in world space, from the audio clock, as [TrackRenderer] does the + * ground. A note flies toward the screen down the depth axis at the note speed and is judged where it + * meets it. Every size is the judge's own hit area from [SkyTrack], so what's drawn is what counts. + * Notes face the player as flat octagons just around their hit circle: sky taps orange (L) or blue + * (R), flicks magenta with an arrow when they need a direction. A slide is a trail of beads down its + * path, with a ring where it crosses the screen now, brighter while its button is down. A tap or flick + * coming up also shows a faint ring on the screen where it will land. + * + * Like the ground, nothing here writes depth, so each layer is submitted in its own order, drawn in turn + * after the ground's: notes, then the pane in front of them, then marks on the screen. Geometry + * callbacks are made once and reused, so nothing allocates per frame. + */ +object SkyRenderer { + /** Notes are behind the pane, so they go first and show through it. Marks on the screen go last. */ + private const val NOTE_ORDER = 4 + private const val PANE_ORDER = 5 + private const val MARK_ORDER = 6 + + private const val PANE = 0x12FFFFFF + private const val FRAME = 0x50FFFFFF + private val FRAME_WIDTH = 0.08 * StageGeometry.SCALE + + private const val TAP_L = 0xE8FF8C1A.toInt() + private const val TAP_R = 0xE83C8CFF.toInt() + private const val FLICK = 0xE8E040E0.toInt() + private const val ARROW = 0xFFFFFFFF.toInt() + private const val SLIDE_HEAD_HELD = 0xFFFFFFFF.toInt() + + /** A slide's beads are this much of its hit radius, so the path reads as a line. */ + private const val BEAD_SCALE = 0.35 + + /** One bead every this many blocks down the path. */ + private val BEAD_SPACING = 0.75 * StageGeometry.SCALE + + /** How far away a coming note starts to show its landing ring. */ + private const val LANDING_RING_DISTANCE = 24.0 + private val RING_WIDTH = 0.12 * StageGeometry.SCALE + + /** Marks sit this far in front of the screen, so they draw over what's on it. */ + private const val MARK_LIFT = 0.02 + + /** The last stretch, where notes fade in instead of popping up. */ + private const val FADE_LENGTH = 10.0 + + /** A note stays this long after its last window, so it's judged before it goes. */ + private const val KEEP_AFTER_WINDOW_MS = 100.0 + + /** + * Corners of an octagon with flat sides facing each axis, counter-clockwise, far enough out that its + * sides touch a circle of radius 1, so a note drawn this way covers all of its hit circle. + */ + private val OCTAGON_REACH = 1.0 / Math.cos(Math.toRadians(22.5)) + private val OCTAGON_COS = DoubleArray(8) { OCTAGON_REACH * Math.cos(Math.toRadians(22.5 + 45.0 * it)) } + private val OCTAGON_SIN = DoubleArray(8) { OCTAGON_REACH * Math.sin(Math.toRadians(22.5 + 45.0 * it)) } + + private var cameraX = 0.0 + private var cameraY = 0.0 + private var cameraZ = 0.0 + private var floorY = 0.0 + private var songMs = 0.0 + private var drawMs = 0.0 + private var blocksPerSecond = 0.0 + + /** For the game test: how many sky notes, beads included, the last frame drew. */ + var notesDrawn = 0 + private set + + private val paneLayer = SubmitNodeCollector.CustomGeometryRenderer { _, buffer -> if (HexiumSession.play() != null) drawPane(buffer) } + private val noteLayer = SubmitNodeCollector.CustomGeometryRenderer { _, buffer -> HexiumSession.play()?.let { drawNotes(it, buffer) } } + private val markLayer = SubmitNodeCollector.CustomGeometryRenderer { _, buffer -> HexiumSession.play()?.let { drawMarks(it, buffer) } } + + fun register() { + LevelRenderEvents.COLLECT_SUBMITS.register(::collect) + } + + private fun collect(context: LevelRenderContext) { + if (!HexiumSession.active()) return + val play = HexiumSession.play() ?: return + val level = Minecraft.getInstance().level ?: return + val camera = context.levelState().cameraRenderState.pos + cameraX = camera.x + cameraY = camera.y + cameraZ = camera.z + floorY = (level.minY + StageGeometry.FLOOR_THICKNESS).toDouble() + songMs = play.clock.songTimeMs + drawMs = GroundTrack.drawTimeMs(songMs, PlaySettings.visualOffsetMs.toDouble()) + blocksPerSecond = PlaySettings.noteSpeed.toDouble() + val collector = context.submitNodeCollector() + val pose = context.poseStack() + val type = RenderTypes.debugQuads() + collector.order(PANE_ORDER).submitCustomGeometry(pose, type, paneLayer) + if (!play.notesMoving || play.sky.size == 0) { + notesDrawn = 0 + return + } + collector.order(NOTE_ORDER).submitCustomGeometry(pose, type, noteLayer) + collector.order(MARK_ORDER).submitCustomGeometry(pose, type, markLayer) + } + + private fun drawPane(buffer: VertexConsumer) { + val left = StageGeometry.STAND_X + StageGeometry.SCREEN_WIDTH / 2.0 + val right = StageGeometry.STAND_X - StageGeometry.SCREEN_WIDTH / 2.0 + val bottom = floorY + val top = floorY + StageGeometry.SCREEN_HEIGHT + val z = StageGeometry.JUDGEMENT_Z + rect(buffer, left, bottom, right, top, z, PANE) + rect(buffer, left, top - FRAME_WIDTH, right, top, z, FRAME) + rect(buffer, left, bottom, left - FRAME_WIDTH, top, z, FRAME) + rect(buffer, right + FRAME_WIDTH, bottom, right, top, z, FRAME) + } + + /** Song time, minus offset B, before which no slide is drawn: during the rewind after a pause, what was already played, as with hold bodies. */ + private fun hiddenBeforeMs(play: PlaySession): Double = + if (play.state == PlaySession.State.REWINDING) play.playedUntilMs - play.judgementOffsetMs else Double.NEGATIVE_INFINITY + + /** The oldest note time still drawn. The judge works in song time minus B and notes are drawn in draw time, so whichever is behind. */ + private fun oldestMs(play: PlaySession): Double { + val config = play.judgeChart.config + val window = maxOf(config.attackMs, config.easyAttackMs, config.flickJusticeMs) + return minOf(drawMs, songMs - play.judgementOffsetMs) - window - KEEP_AFTER_WINDOW_MS + } + + private fun drawNotes(play: PlaySession, buffer: VertexConsumer) { + val sky = play.sky + val oldest = oldestMs(play) + val hidden = hiddenBeforeMs(play) + var drawn = 0 + var i = sky.firstEndingFrom(oldest) + while (i < sky.size) { + val start = sky.startMs(i) + if (GroundTrack.distance(start, drawMs, blocksPerSecond) > StageGeometry.TRACK_LENGTH) break + if (sky.kind(i) == SkyTrack.Kind.SLIDE) { + drawn += drawBeads(play, buffer, i, hidden) + } else if (start >= oldest && !play.isHeadJudged(sky.chartNote(i))) { + // A late note waits on the screen rather than flying past it. + val distance = maxOf(GroundTrack.distance(start, drawMs, blocksPerSecond), 0.0) + val x = worldX(sky.x(i, start)) + val y = worldY(sky.y(i, start)) + val z = StageGeometry.JUDGEMENT_Z + distance + val radius = worldRadius(sky.radius(i)) + octagon(buffer, x, y, z, radius, faded(noteColor(sky, i), distance)) + // With its own note, so it sorts in front of that note and no other. + val direction = sky.directionDegrees(i) + if (!direction.isNaN()) arrow(buffer, x, y, z - MARK_LIFT, radius, direction, faded(ARROW, distance)) + drawn++ + } + i++ + } + notesDrawn = drawn + } + + /** The part of a slide still to come, as beads down its path. Returns how many it drew. */ + private fun drawBeads(play: PlaySession, buffer: VertexConsumer, i: Int, hidden: Double): Int { + val sky = play.sky + val from = maxOf(sky.startMs(i), drawMs, hidden) + val until = minOf(sky.endMs(i), drawMs + StageGeometry.TRACK_LENGTH * 1000.0 / blocksPerSecond) + if (until < from) return 0 + val stepMs = BEAD_SPACING * 1000.0 / blocksPerSecond + val radius = worldRadius(sky.radius(i)) * BEAD_SCALE + val color = noteColor(sky, i) + var drawn = 0 + // Beads sit on a fixed grid in time, so they don't crawl as the slide moves. + var t = sky.startMs(i) + Math.ceil((from - sky.startMs(i)) / stepMs) * stepMs + while (t <= until) { + val distance = GroundTrack.distance(t, drawMs, blocksPerSecond) + octagon(buffer, worldX(sky.x(i, t)), worldY(sky.y(i, t)), StageGeometry.JUDGEMENT_Z + distance, radius, faded(color, distance)) + drawn++ + t += stepMs + } + return drawn + } + + private fun drawMarks(play: PlaySession, buffer: VertexConsumer) { + val sky = play.sky + val oldest = oldestMs(play) + val hidden = hiddenBeforeMs(play) + val markZ = StageGeometry.JUDGEMENT_Z - MARK_LIFT + var i = sky.firstEndingFrom(oldest) + while (i < sky.size) { + val start = sky.startMs(i) + val distance = GroundTrack.distance(start, drawMs, blocksPerSecond) + if (distance > StageGeometry.TRACK_LENGTH) break + val radius = worldRadius(sky.radius(i)) + when (sky.kind(i)) { + SkyTrack.Kind.SLIDE -> { + // Where the slide crosses the screen now, from just before it starts until it ends. + val now = drawMs.coerceIn(start, sky.endMs(i)) + if (distance <= LANDING_RING_DISTANCE && drawMs <= sky.endMs(i) && now >= hidden) { + val held = play.isButtonDown(sky.button(i)!!) && drawMs >= start + val color = if (held) SLIDE_HEAD_HELD else ringColor(noteColor(sky, i), distance) + ring(buffer, worldX(sky.x(i, now)), worldY(sky.y(i, now)), markZ, radius, color) + } + } + else -> if (start >= oldest && distance > 0.0 && distance <= LANDING_RING_DISTANCE && !play.isHeadJudged(sky.chartNote(i))) { + ring(buffer, worldX(sky.x(i, start)), worldY(sky.y(i, start)), markZ, radius, ringColor(noteColor(sky, i), distance)) + } + } + i++ + } + } + + private fun noteColor(sky: SkyTrack, i: Int): Int = when (sky.button(i)) { + SkyButton.L -> TAP_L + SkyButton.R -> TAP_R + null -> FLICK + } + + /** A landing ring, fainter the further away its note still is. */ + private fun ringColor(color: Int, distance: Double): Int { + val near = 1.0 - (distance / LANDING_RING_DISTANCE).coerceIn(0.0, 1.0) + val alpha = (0x30 + (0xC0 - 0x30) * near).toInt() + return (alpha shl 24) or (color and 0xFFFFFF) + } + + /** Screen x, 0 on the left (+X, the player's left facing down the lanes), to world x. */ + private fun worldX(x: Double): Double = StageGeometry.STAND_X + (0.5 - x) * StageGeometry.SCREEN_WIDTH + + private fun worldY(y: Double): Double = floorY + y * StageGeometry.SCREEN_HEIGHT + + /** A hit radius, in screen heights and round on the screen, in blocks. */ + private fun worldRadius(radius: Double): Double = radius * StageGeometry.SCREEN_HEIGHT + + private fun faded(color: Int, distance: Double): Int { + val left = (StageGeometry.TRACK_LENGTH - distance) / FADE_LENGTH + if (left >= 1.0) return color + val alpha = ((color ushr 24) * left.coerceAtLeast(0.0)).toInt() + return (alpha shl 24) or (color and 0xFFFFFF) + } + + private fun octagon(buffer: VertexConsumer, x: Double, y: Double, z: Double, radius: Double, color: Int) { + // Three quads: the middle band and a cap either side. + corners(buffer, x, y, z, radius, 0, 1, 2, 3, color) + corners(buffer, x, y, z, radius, 0, 3, 4, 7, color) + corners(buffer, x, y, z, radius, 7, 4, 5, 6, color) + } + + private fun corners(buffer: VertexConsumer, x: Double, y: Double, z: Double, radius: Double, a: Int, b: Int, c: Int, d: Int, color: Int) { + val fz = (z - cameraZ).toFloat() + vertex(buffer, x + radius * OCTAGON_COS[a], y + radius * OCTAGON_SIN[a], fz, color) + vertex(buffer, x + radius * OCTAGON_COS[b], y + radius * OCTAGON_SIN[b], fz, color) + vertex(buffer, x + radius * OCTAGON_COS[c], y + radius * OCTAGON_SIN[c], fz, color) + vertex(buffer, x + radius * OCTAGON_COS[d], y + radius * OCTAGON_SIN[d], fz, color) + } + + /** An octagonal outline whose outside edge is [radius]. */ + private fun ring(buffer: VertexConsumer, x: Double, y: Double, z: Double, radius: Double, color: Int) { + // A tiny note keeps a ring half its size rather than one turned inside out. + val inner = maxOf(radius - RING_WIDTH / OCTAGON_REACH, radius * 0.5) + val fz = (z - cameraZ).toFloat() + for (k in 0 until 8) { + val n = (k + 1) % 8 + vertex(buffer, x + radius * OCTAGON_COS[k], y + radius * OCTAGON_SIN[k], fz, color) + vertex(buffer, x + radius * OCTAGON_COS[n], y + radius * OCTAGON_SIN[n], fz, color) + vertex(buffer, x + inner * OCTAGON_COS[n], y + inner * OCTAGON_SIN[n], fz, color) + vertex(buffer, x + inner * OCTAGON_COS[k], y + inner * OCTAGON_SIN[k], fz, color) + } + } + + /** A triangle pointing [degrees] across the screen (0 = right, 90 = up), as a quad with its tip twice. */ + private fun arrow(buffer: VertexConsumer, x: Double, y: Double, z: Double, radius: Double, degrees: Double, color: Int) { + val radians = Math.toRadians(degrees) + // The screen's right is world -X. + val dx = -Math.cos(radians) + val dy = Math.sin(radians) + val fz = (z - cameraZ).toFloat() + val tipX = x + dx * radius * 0.8 + val tipY = y + dy * radius * 0.8 + val baseX = x - dx * radius * 0.4 + val baseY = y - dy * radius * 0.4 + vertex(buffer, tipX, tipY, fz, color) + vertex(buffer, baseX - dy * radius * 0.5, baseY + dx * radius * 0.5, fz, color) + vertex(buffer, baseX + dy * radius * 0.5, baseY - dx * radius * 0.5, fz, color) + vertex(buffer, tipX, tipY, fz, color) + } + + /** An upright rectangle across the screen plane at [z], between two corners. */ + private fun rect(buffer: VertexConsumer, x0: Double, y0: Double, x1: Double, y1: Double, z: Double, color: Int) { + val fz = (z - cameraZ).toFloat() + vertex(buffer, x0, y0, fz, color) + vertex(buffer, x1, y0, fz, color) + vertex(buffer, x1, y1, fz, color) + vertex(buffer, x0, y1, fz, color) + } + + private fun vertex(buffer: VertexConsumer, x: Double, y: Double, cameraRelativeZ: Float, color: Int) { + buffer.addVertex((x - cameraX).toFloat(), (y - cameraY).toFloat(), cameraRelativeZ).setColor(color) + } +} diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/play/TrackRenderer.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/play/TrackRenderer.kt index 6af1d2b..a4df413 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/play/TrackRenderer.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/play/TrackRenderer.kt @@ -26,13 +26,15 @@ object TrackRenderer { private const val FLOOR_LIFT = 0.01 private const val LINE_LIFT = 0.02 private const val BODY_LIFT = 0.04 - private const val DIVIDER_WIDTH = 0.06 - private const val LINE_DEPTH = 0.3 - private const val NOTE_WIDTH = 2.6 - private const val NOTE_DEPTH = 0.8 - private const val NOTE_HEIGHT = 0.4 - private const val BODY_WIDTH = 2.0 - private const val GLOW_LENGTH = 16.0 + + // Sizes grow with the stage, so notes keep their shape in a lane. + private val DIVIDER_WIDTH = 0.06 * StageGeometry.SCALE + private val LINE_DEPTH = 0.3 * StageGeometry.SCALE + private val NOTE_WIDTH = 2.6 * StageGeometry.SCALE + private val NOTE_DEPTH = 0.8 * StageGeometry.SCALE + private val NOTE_HEIGHT = 0.4 * StageGeometry.SCALE + private val BODY_WIDTH = 2.0 * StageGeometry.SCALE + private val GLOW_LENGTH = 16.0 * StageGeometry.SCALE /** The last stretch of the track, where notes fade in instead of popping up. */ private const val FADE_LENGTH = 10.0 diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt index 318872c..d0edd9c 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/screen/HexiumMenuScreen.kt @@ -126,9 +126,7 @@ class HexiumMenuScreen(private val lastScreen: Screen) : Screen(TITLE) { private fun difficultyButton(pack: ChartPack, chart: DifficultyChart): Button { val difficulty = Component.translatable("hexium.difficulty.${chart.difficulty.name.lowercase()}") - val button = Button.builder(difficulty) { play(pack, chart) }.width(DIFFICULTY_WIDTH) - if (!chart.isGroundOnly) button.tooltip(Tooltip.create(Component.translatable("hexium.menu.sky_notes"))) - return button.build().also { it.active = chart.isGroundOnly } + return Button.builder(difficulty) { play(pack, chart) }.width(DIFFICULTY_WIDTH).build() } override fun onClose() { diff --git a/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt index 97c5f29..1212161 100644 --- a/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt +++ b/mod/src/client/kotlin/net/trilleo/hexium/client/session/StageGeometry.kt @@ -1,5 +1,6 @@ package net.trilleo.hexium.client.session +import net.minecraft.world.entity.Avatar import net.trilleo.hexium.core.judge.JudgementConfig /** Where things stand on the stage. Starting values from docs/DESIGN.md, all tunable. */ @@ -19,29 +20,44 @@ object StageGeometry { /** How far the platform reaches each side of the block the player is on. */ const val PLATFORM_REACH = 1 - /** Looking down at the middle of the screen, 3 blocks up and 6 away, from eyes 4.62 up. */ - const val REST_PITCH = 15.1f + /** Where the player's eyes are above the floor: on the platform, at a standing player's eye height, 4.62 blocks. */ + val EYE_HEIGHT = STAND_HEIGHT + Avatar.DEFAULT_EYE_HEIGHT.toDouble() - /** Where the screen's bottom edge is, 6 blocks in front of the player. */ - const val JUDGEMENT_Z = STAND_Z + 6.0 + /** + * The sky screen stands on the floor at the judgement line, twice as tall as the eyes are high, so the + * player's eyes are level with its middle: 9.24 blocks. + */ + val SCREEN_HEIGHT = 2.0 * EYE_HEIGHT - /** Four of these make the track as wide as the sky screen, 12 blocks. */ - const val LANE_WIDTH = 3.0 + /** From the judge's own aspect, so hit circles stay round on the screen: 18.48 blocks. */ + val SCREEN_WIDTH = SCREEN_HEIGHT * JudgementConfig.DEFAULT.screenAspect - /** The sky screen stands on the floor at the judgement line, as wide as the track, 12 blocks. */ - const val SCREEN_WIDTH = LANE_WIDTH * 4 + /** Four of these make the track as wide as the sky screen, 4.62 blocks. */ + val LANE_WIDTH = SCREEN_WIDTH / 4 - /** 6 blocks, from the judge's own aspect, so hit circles stay round on the screen. */ - val SCREEN_HEIGHT = SCREEN_WIDTH / JudgementConfig.DEFAULT.screenAspect + /** How much bigger the stage is than the 12 by 6 screen it started with. Sizes of drawn things grow by this. */ + val SCALE = SCREEN_HEIGHT / 6.0 + + /** + * Where the screen's bottom edge is: as far in front of the player as the screen is tall, 9.24 blocks, + * so its sides are 45 degrees either side of straight ahead and its top and bottom 26.6 degrees up and down. + */ + val JUDGEMENT_Z = STAND_Z + SCREEN_HEIGHT + + /** Looking straight at the middle of the screen, which is level with the eyes. */ + const val REST_PITCH = 0f /** How far past the screen's edges, in blocks, the camera can look before it stops. */ - const val AIM_MARGIN = 1.0 + val AIM_MARGIN = 1.0 * SCALE /** How far up the lanes the track runs from the judgement line. Notes appear at the far end. */ const val TRACK_LENGTH = 64.0 + /** Where the track starts, just in front of the platform. */ + const val TRACK_START_Z = 3.0 + /** How far the track carries on past the line, so a late note still has floor under it. */ - const val TRACK_BEFORE_LINE = 3.5 + val TRACK_BEFORE_LINE = JUDGEMENT_Z - TRACK_START_Z /** Facing +Z, the player's left is +X, so the first lane is on that side. */ fun laneCentreX(lane: Int, laneCount: Int): Double = STAND_X + ((laneCount - 1) / 2.0 - lane) * LANE_WIDTH diff --git a/mod/src/client/resources/assets/hexium/lang/en_us.json b/mod/src/client/resources/assets/hexium/lang/en_us.json index b788eb4..27aed19 100644 --- a/mod/src/client/resources/assets/hexium/lang/en_us.json +++ b/mod/src/client/resources/assets/hexium/lang/en_us.json @@ -3,7 +3,6 @@ "hexium.menu.title": "Hexium", "hexium.menu.no_charts": "No charts found. Put chart folders in .minecraft/hexium/charts.", "hexium.menu.broken": "Broken", - "hexium.menu.sky_notes": "This chart has sky notes, which can't be played yet.", "hexium.difficulty.basic": "Basic", "hexium.difficulty.advanced": "Advanced", "hexium.difficulty.expert": "Expert", diff --git a/mod/src/client/resources/assets/hexium/lang/zh_cn.json b/mod/src/client/resources/assets/hexium/lang/zh_cn.json index 73abc18..8db598d 100644 --- a/mod/src/client/resources/assets/hexium/lang/zh_cn.json +++ b/mod/src/client/resources/assets/hexium/lang/zh_cn.json @@ -3,7 +3,6 @@ "hexium.menu.title": "Hexium", "hexium.menu.no_charts": "没有找到谱面。请把谱面文件夹放到 .minecraft/hexium/charts。", "hexium.menu.broken": "已损坏", - "hexium.menu.sky_notes": "此谱面包含天空音符,目前还无法游玩。", "hexium.difficulty.basic": "Basic", "hexium.difficulty.advanced": "Advanced", "hexium.difficulty.expert": "Expert", diff --git a/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt b/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt index 2fda1b4..a0ee28f 100644 --- a/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt +++ b/mod/src/gametest/kotlin/net/trilleo/hexium/gametest/HexiumClientGameTest.kt @@ -18,6 +18,7 @@ import net.trilleo.hexium.client.input.LaneInput import net.trilleo.hexium.client.input.SkyInput import net.trilleo.hexium.client.play.PlayHud import net.trilleo.hexium.client.play.PlaySettings +import net.trilleo.hexium.client.play.SkyRenderer import net.trilleo.hexium.client.play.TrackRenderer import net.trilleo.hexium.client.play.PlaySession import net.trilleo.hexium.client.screen.CalibrationScreen @@ -28,9 +29,11 @@ import net.trilleo.hexium.client.session.HexiumSession import net.trilleo.hexium.client.session.StageGeometry import net.trilleo.hexium.core.chart.Note import net.trilleo.hexium.core.chart.SkyButton +import net.trilleo.hexium.core.chart.SkyTrack import net.trilleo.hexium.core.chart.TimingMap import net.trilleo.hexium.core.judge.ClearLamp import net.trilleo.hexium.core.judge.Judgement +import net.trilleo.hexium.core.judge.JudgementConfig import net.trilleo.hexium.core.replay.ReplayFile import net.trilleo.hexium.core.replay.ReplayEvent import net.trilleo.hexium.core.replay.ReplayJudge @@ -49,6 +52,7 @@ class HexiumClientGameTest : FabricClientGameTest { theStageLocksThePlayerAndLeavesCleanly(context) aChartPlaysToTheEndAndItsReplayMatches(context) notesDrawWithImprovedTransparency(context) + skyNotesDrawAndABotHitsThem(context) calibrationSuggestsAndSavesOffsets(context) normalWorldsAreUntouched(context) } @@ -176,7 +180,8 @@ class HexiumClientGameTest : FabricClientGameTest { check(player.y == standY.toDouble()) { "not on the platform: y ${player.y}" } check(player.onGround()) { "standing on nothing" } val floorY = minecraft.level!!.minY + StageGeometry.FLOOR_THICKNESS - val toMiddleOfScreen = Math.toDegrees(Math.atan((player.eyeY - floorY - SCREEN_MIDDLE_HEIGHT) / (StageGeometry.JUDGEMENT_Z - player.z))) + check(Math.abs(player.eyeY - floorY - StageGeometry.EYE_HEIGHT) < 1e-9) { "the eyes are ${player.eyeY - floorY} above the floor, not ${StageGeometry.EYE_HEIGHT}" } + val toMiddleOfScreen = Math.toDegrees(Math.atan((player.eyeY - floorY - StageGeometry.SCREEN_HEIGHT / 2.0) / (StageGeometry.JUDGEMENT_Z - player.z))) check(Math.abs(toMiddleOfScreen - StageGeometry.REST_PITCH) < MAX_PITCH_ERROR) { "the rest view isn't on the screen's middle, which is $toMiddleOfScreen down" } val reach = StageGeometry.PLATFORM_REACH check(!minecraft.level!!.getBlockState(BlockPos(reach, floorY, reach)).isAir) { "the platform has no corner" } @@ -229,7 +234,9 @@ class HexiumClientGameTest : FabricClientGameTest { context.runOnClient { val edgeX = 1.0 + StageGeometry.AIM_MARGIN / StageGeometry.SCREEN_WIDTH val edgeY = 1.0 + StageGeometry.AIM_MARGIN / StageGeometry.SCREEN_HEIGHT - check(StageGeometry.SCREEN_WIDTH == StageGeometry.LANE_WIDTH * 4 && StageGeometry.SCREEN_HEIGHT == 6.0) { "the sky screen isn't 12 by 6" } + check(StageGeometry.SCREEN_WIDTH == StageGeometry.LANE_WIDTH * 4 && StageGeometry.SCREEN_WIDTH == StageGeometry.SCREEN_HEIGHT * JudgementConfig.DEFAULT.screenAspect) { + "the sky screen isn't as wide as the track at the judge's aspect" + } check(Math.abs(Aim.x - edgeX) < MAX_AIM_ERROR && Math.abs(Aim.y - edgeY) < MAX_AIM_ERROR) { "the camera stopped at ${Aim.x}, ${Aim.y}" } } swing(context, -SWING_STEP_PIXELS, SWING_STEP_PIXELS) @@ -408,6 +415,53 @@ class HexiumClientGameTest : FabricClientGameTest { context.runOnClient { it.options.improvedTransparency().set(false) } } + /** The bot turns the camera onto each of Expert's first sky taps and clicks it, stamped on the note's time. */ + private fun skyNotesDrawAndABotHitsThem(context: ClientGameTestContext) { + context.clickScreenButton("hexium.title_button") + context.waitForScreen(HexiumMenuScreen::class.java) + context.clickScreenButton("hexium.difficulty.expert") + context.waitFor({ HexiumSession.play()?.state == PlaySession.State.PLAYING }, LOAD_TICKS) + val play = HexiumSession.play()!! + val sky = play.sky + check(sky.kind(0) == SkyTrack.Kind.TAP && sky.kind(1) == SkyTrack.Kind.TAP) { "Expert doesn't open with two sky taps" } + context.waitFor({ play.clock.songTimeMs >= sky.startMs(0) - SKY_NOTES_IN_VIEW_BEFORE_MS }, SONG_TICKS) + context.takeScreenshot("sky_notes") + context.runOnClient { check(SkyRenderer.notesDrawn > 0) { "no sky notes drawn on the way to the first one" } } + + var next = 0 + val bot = { song: Double -> + // One a tick: a click takes the crosshair's place when it's read, so the next note's turn must wait. + if (next < SKY_TAPS_HIT && sky.startMs(next) <= song + BOT_LOOKAHEAD_MS) { + val start = sky.startMs(next) + Aim.lookToward(sky.x(next, start), sky.y(next, start)) + val nowNs = SDLTimer.SDL_GetTicksNS() + val aheadNs = ((start - play.clock.songTimeAt(nowNs)) * NANOS_PER_MS).toLong() + SkyInput.push(sky.button(next)!!, true, nowNs + aheadNs) + SkyInput.push(sky.button(next)!!, false, nowNs + aheadNs + (TAP_LENGTH_MS * NANOS_PER_MS).toLong()) + next++ + } + } + context.waitFor({ + bot(play.clock.songTimeMs) + play.clock.songTimeMs >= sky.startMs(SKY_TAPS_HIT - 1) + SETTLE_MS + }, SONG_TICKS) + context.runOnClient { + val judge = play.judge + for (n in 0 until SKY_TAPS_HIT) { + val found = (0 until judge.judgedCount).firstOrNull { judge.judgedNote(it) == sky.chartNote(n) } ?: error("sky tap $n wasn't judged") + check(judge.judgement(found) == Judgement.JUSTICE_CRITICAL && Math.abs(judge.judgedDeltaMs(found)) < MAX_BOT_ERROR_MS) { + "sky tap $n was ${judge.judgement(found)}, ${judge.judgedDeltaMs(found)} ms off" + } + } + it.pauseGame(false) + } + context.waitForScreen(StageMenuScreen::class.java) + context.clickScreenButton("hexium.stage.leave") + context.waitForScreen(HexiumMenuScreen::class.java) + context.clickScreenButton("gui.back") + context.waitForScreen(TitleScreen::class.java) + } + private fun pauseAndCheckTimeStops(context: ClientGameTestContext, play: PlaySession, screenshot: String) { context.runOnClient { it.pauseGame(false) } context.waitForScreen(StageMenuScreen::class.java) @@ -525,6 +579,9 @@ class HexiumClientGameTest : FabricClientGameTest { const val AIM_TURN_PIXELS = 20.0 const val AIM_TURN_TICKS = 3 const val MIN_AIM_TURN = 0.02f + const val SKY_TAPS_HIT = 2 + const val SKY_NOTES_IN_VIEW_BEFORE_MS = 600.0 + const val SETTLE_MS = 300.0 const val TAP_LENGTH_MS = 30.0 const val SONG_TICKS = 1200 const val BOT_LOOKAHEAD_MS = 120.0 @@ -548,7 +605,6 @@ class HexiumClientGameTest : FabricClientGameTest { const val TAP_BEFORE_PAUSE_LANE = 3 const val MIN_REWIND_MS = 2000.0 - const val SCREEN_MIDDLE_HEIGHT = 3.0 const val MAX_PITCH_ERROR = 0.1 const val VISUAL_OFFSET_STEPS = 10 From 0ff65a27d51a7d5f74e7684a94dec3c8103610d9 Mon Sep 17 00:00:00 2001 From: Trilleo Date: Sun, 8 Nov 2026 10:23:15 +0800 Subject: [PATCH 30/34] Feature: Add play mouse sensitivity, play FOV and view assist to the pause screen --- CHANGELOG.md | 7 ++ .../hexium/core/settings/PlayerSettings.kt | 29 ++++++++- .../core/settings/PlayerSettingsTest.kt | 37 ++++++++++- docs/ARCHITECTURE.md | 3 +- docs/DESIGN.md | 2 +- docs/DEVELOPMENT.md | 2 +- .../hexium/client/mixin/CameraMixin.java | 18 +++++ .../client/mixin/MouseHandlerMixin.java | 15 +++++ .../net/trilleo/hexium/client/input/Aim.kt | 12 ++++ .../net/trilleo/hexium/client/play/Comfort.kt | 59 +++++++++++++++++ .../trilleo/hexium/client/play/PlaySession.kt | 10 +++ .../hexium/client/play/PlaySettings.kt | 20 ++++++ .../hexium/client/screen/StageMenuScreen.kt | 49 ++++++++++---- .../resources/assets/hexium/lang/en_us.json | 3 + .../resources/assets/hexium/lang/zh_cn.json | 3 + .../resources/hexium.client.mixins.json | 1 + .../hexium/gametest/HexiumClientGameTest.kt | 65 +++++++++++++++++++ 17 files changed, 315 insertions(+), 20 deletions(-) create mode 100644 mod/src/client/java/net/trilleo/hexium/client/mixin/CameraMixin.java create mode 100644 mod/src/client/kotlin/net/trilleo/hexium/client/play/Comfort.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a53fa4..2869f4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,13 @@ + Left and right clicks on the stage are now timed from when the button went down and placed where the crosshair meets the sky screen, ready for sky notes. + Pausing is fair for sky notes too: a mouse button you changed while paused counts from the moment you paused, and moving the mouse while paused never counts as a swipe through a flick. +#### Settings + ++ Added comfort settings to the pause screen, kept in `.minecraft/hexium/settings.json`. + + Mouse: your mouse sensitivity during play, on top of Minecraft's own, so menus feel the same. + + FOV: the field of view during play, 70 by default. + + View Assist: slowly brings the camera back to the middle of the sky screen when no sky notes are coming, off by default. + #### Online + Added replay files, which record every input of a play. diff --git a/core/src/main/kotlin/net/trilleo/hexium/core/settings/PlayerSettings.kt b/core/src/main/kotlin/net/trilleo/hexium/core/settings/PlayerSettings.kt index 6826bdd..e66a8d7 100644 --- a/core/src/main/kotlin/net/trilleo/hexium/core/settings/PlayerSettings.kt +++ b/core/src/main/kotlin/net/trilleo/hexium/core/settings/PlayerSettings.kt @@ -11,18 +11,27 @@ import kotlinx.serialization.json.put /** * What a player has set, as stored in `settings.json`. Note speed is in blocks per second. The offsets - * are A and B in docs/JUDGEMENT.md. Reading never fails: a player must always be able to start the game. + * are A and B in docs/JUDGEMENT.md. The comfort settings only change how the camera feels during play, + * never judging: mouse sensitivity is a percentage on top of vanilla's, play FOV is the field of view on + * the stage in degrees, and view assist is how strongly the camera eases back to the rest view when no + * sky notes are near, 0 for off. Reading never fails: a player must always be able to start the game. * A later format version must still read these fields the same way, since nothing here checks the version. */ data class PlayerSettings( val noteSpeed: Int = DEFAULT_NOTE_SPEED, val visualOffsetMs: Int = 0, val judgementOffsetMs: Int = 0, + val mouseSensitivity: Int = DEFAULT_MOUSE_SENSITIVITY, + val playFov: Int = DEFAULT_PLAY_FOV, + val viewAssist: Int = 0, ) { fun inRange() = PlayerSettings( noteSpeed.coerceIn(MIN_NOTE_SPEED, MAX_NOTE_SPEED), visualOffsetMs.coerceIn(-MAX_OFFSET_MS, MAX_OFFSET_MS), judgementOffsetMs.coerceIn(-MAX_OFFSET_MS, MAX_OFFSET_MS), + mouseSensitivity.coerceIn(MIN_MOUSE_SENSITIVITY, MAX_MOUSE_SENSITIVITY), + playFov.coerceIn(MIN_PLAY_FOV, MAX_PLAY_FOV), + viewAssist.coerceIn(0, MAX_VIEW_ASSIST), ) companion object { @@ -31,6 +40,18 @@ data class PlayerSettings( const val MAX_NOTE_SPEED = 120 const val MAX_OFFSET_MS = 500 + /** Percent of vanilla's mouse sensitivity. */ + const val DEFAULT_MOUSE_SENSITIVITY = 100 + const val MIN_MOUSE_SENSITIVITY = 10 + const val MAX_MOUSE_SENSITIVITY = 300 + + /** Degrees, vanilla's own range and default. The sky screen is 90 degrees wide, so a low FOV or a narrow window cuts its sides. */ + const val DEFAULT_PLAY_FOV = 70 + const val MIN_PLAY_FOV = 30 + const val MAX_PLAY_FOV = 110 + + const val MAX_VIEW_ASSIST = 5 + private const val FORMAT_VERSION = 1 private val JSON = Json { prettyPrint = true } @@ -49,6 +70,9 @@ data class PlayerSettings( number(root, "noteSpeed", DEFAULT_NOTE_SPEED), number(root, "visualOffsetMs", 0), number(root, "judgementOffsetMs", 0), + number(root, "mouseSensitivity", DEFAULT_MOUSE_SENSITIVITY), + number(root, "playFov", DEFAULT_PLAY_FOV), + number(root, "viewAssist", 0), ).inRange() } @@ -59,6 +83,9 @@ data class PlayerSettings( put("noteSpeed", settings.noteSpeed) put("visualOffsetMs", settings.visualOffsetMs) put("judgementOffsetMs", settings.judgementOffsetMs) + put("mouseSensitivity", settings.mouseSensitivity) + put("playFov", settings.playFov) + put("viewAssist", settings.viewAssist) }, ) diff --git a/core/src/test/kotlin/net/trilleo/hexium/core/settings/PlayerSettingsTest.kt b/core/src/test/kotlin/net/trilleo/hexium/core/settings/PlayerSettingsTest.kt index 8921884..82439e4 100644 --- a/core/src/test/kotlin/net/trilleo/hexium/core/settings/PlayerSettingsTest.kt +++ b/core/src/test/kotlin/net/trilleo/hexium/core/settings/PlayerSettingsTest.kt @@ -2,9 +2,10 @@ package net.trilleo.hexium.core.settings import kotlin.test.Test import kotlin.test.assertEquals +import kotlin.test.assertTrue class PlayerSettingsTest { - private val custom = PlayerSettings(noteSpeed = 60, visualOffsetMs = -35, judgementOffsetMs = 42) + private val custom = PlayerSettings(noteSpeed = 60, visualOffsetMs = -35, judgementOffsetMs = 42, mouseSensitivity = 150, playFov = 80, viewAssist = 3) @Test fun whatIsWrittenReadsBackTheSame() { @@ -61,7 +62,37 @@ class PlayerSettingsTest { @Test fun inRangeClampsEveryField() { - val clamped = PlayerSettings(noteSpeed = 1, visualOffsetMs = 9999, judgementOffsetMs = -9999).inRange() - assertEquals(PlayerSettings(PlayerSettings.MIN_NOTE_SPEED, PlayerSettings.MAX_OFFSET_MS, -PlayerSettings.MAX_OFFSET_MS), clamped) + val clamped = PlayerSettings(noteSpeed = 1, visualOffsetMs = 9999, judgementOffsetMs = -9999, mouseSensitivity = 1, playFov = 500, viewAssist = -2).inRange() + val expected = PlayerSettings( + PlayerSettings.MIN_NOTE_SPEED, PlayerSettings.MAX_OFFSET_MS, -PlayerSettings.MAX_OFFSET_MS, + PlayerSettings.MIN_MOUSE_SENSITIVITY, PlayerSettings.MAX_PLAY_FOV, 0, + ) + assertEquals(expected, clamped) + val high = PlayerSettings(mouseSensitivity = 9999, playFov = 1, viewAssist = 99).inRange() + assertEquals(PlayerSettings(mouseSensitivity = PlayerSettings.MAX_MOUSE_SENSITIVITY, playFov = PlayerSettings.MIN_PLAY_FOV, viewAssist = PlayerSettings.MAX_VIEW_ASSIST), high) + } + + /** A new player turns the camera as vanilla does, sees vanilla's default view, and gets no help. */ + @Test + fun comfortSettingsStartAsVanilla() { + val settings = PlayerSettings() + assertEquals(100, settings.mouseSensitivity) + assertEquals(70, settings.playFov) + assertEquals(0, settings.viewAssist) + } + + /** A file from before these settings existed still reads, with their defaults. */ + @Test + fun anOlderFileGetsTheComfortDefaults() { + val parsed = PlayerSettings.parse("""{ "formatVersion": 1, "noteSpeed": 40, "visualOffsetMs": 5, "judgementOffsetMs": -5 }""") + assertEquals(PlayerSettings(noteSpeed = 40, visualOffsetMs = 5, judgementOffsetMs = -5), parsed) + } + + @Test + fun comfortSettingsAreWrittenUnderTheirNames() { + val text = PlayerSettings.write(custom) + for (name in listOf("\"mouseSensitivity\": 150", "\"playFov\": 80", "\"viewAssist\": 3")) { + assertTrue(name in text, "$name in $text") + } } } diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index c088dda..bb15791 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -68,9 +68,10 @@ Hexium is client-only (`"environment": "client"` in `fabric.mod.json`), so nearl - For now the render type doesn't write depth and, with classic transparency, sorts quads by their centres, so a long floor quad could paint over a note behind its middle. So the floor, hold bodies and notes are each submitted in their own order, which are drawn in turn, and a note only emits the faces the camera can see. Improved transparency (the Fabulous preset) draws these on a different path; the game test takes a screenshot of it to check by eye. A note goes once the judge has its head, and a hold's body stops at the line, shortening as it plays. Vertices are relative to the camera on an untransformed pose, as vanilla's entities are, so no matrix is applied per vertex. - Notes are plain coloured shapes until Milestone 5 brings block models (note block styles per type). Ground notes are cuboids and hold bodies stretched quads. `SkyRenderer` draws after the ground, in orders of its own: the sky notes, then the screen as a faint pane with a frame in front of them, so they show through it, then the rings on the screen. `SkyTrack` in `core` holds sky taps, slides and flicks in time order the way `GroundTrack` holds ground notes, with each note's hit radius from `JudgementConfig` and a slide's position at any time from the same `SlidePath` the judge uses. A sky note flies down the depth axis at the note speed as a flat octagon facing the player, just covering its hit circle: taps orange (L) or blue (R), flicks magenta with an arrow when they need a direction. A slide is a trail of small beads on a fixed time grid down its path, with a ring where it crosses the screen now, white while its button is down. A tap or flick within 24 blocks also shows a faint ring on the screen where it will land, and a late one waits on the screen until it's judged or its window passes. During the rewind after a pause, the part of a slide before the pause point isn't drawn, as with hold bodies. - Note speed and visual offset A live in `PlaySettings`, changed from the pause screen, and A also by calibration. They reach only `TrackRenderer` and `SkyRenderer`, so the judge and replays never see them. Offset B is read when a play starts and goes in its replay. +- The comfort settings live in `PlaySettings` too and act only on the camera (`Comfort`): play sensitivity scales the turn vanilla's `MouseHandler.turnPlayer` hands the player, play FOV replaces `Camera.calculateFov`'s result, and view assist eases the camera toward the rest view in the play loop, by song time, before the camera limit, when no sky note is due within 1.5 seconds or can still be judged. Outside a play they do nothing, so menus and normal worlds feel the same. - Hit effects are client-only particles and a short sound, with a hit-sound volume setting. - Performance budget: 240 FPS with 300 notes on screen on a mid-range GPU. F6 during a play shows a debug overlay with the song position, clock drift, frame time, the offsets, and input-to-judgement delay as `key stamp age`: how old a key's SDL timestamp is at the start of the frame that judges it (minimum, average, maximum). Judged times come from the stamp unless it's older than the judge's current time, which `late keys` counts, and it can't see the keyboard's own delay. It rebuilds its text every quarter second. It stays on across plays until the game closes, and F3+F6 still reaches vanilla. ## Local data -`.minecraft/hexium/` holds `charts/` (one folder per chart package; the mod also bundles a test pack in `hexium_packs/`), `replays/` (one `---