Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1be2725
Feature: Define chart format v1 with exact-fraction beats, the five n…
Trilleo Nov 3, 2026
d7b6331
Feature: Read and write Hexium chart files with clear errors for brok…
Trilleo Nov 3, 2026
f3af2a5
Feature: Check charts against the format rules and warn about one-han…
Trilleo Nov 3, 2026
2c17fac
Feature: Add basic, advanced and expert example charts for charters t…
Trilleo Nov 3, 2026
4d40d94
Fix: Stop oversized chart files running out of memory and define how …
Trilleo Nov 3, 2026
9e5ac70
Feature: Judge ground taps and holds with CHUNITHM's windows and add …
Trilleo Nov 3, 2026
f4c10d1
Feature: Judge sky taps, slides and flicks, with fast swipes still hi…
Trilleo Nov 3, 2026
dc2de59
Feature: Record plays as replay files and re-judge them to exactly th…
Trilleo Nov 3, 2026
d030ed8
Feature: Add chart lint, replay re-judge and dump commands, guard the…
Trilleo Nov 3, 2026
384f951
Internal: Move the project status to Milestone 2 after passing the co…
Trilleo Nov 4, 2026
691f225
Feature: Add the title screen button and a menu that lists chart fold…
Trilleo Nov 4, 2026
53f5d22
Improvement: Change the main button to be full width
Trilleo Nov 4, 2026
115d323
Feature: Add song playback on Hexium's own audio clock, a debug overl…
Trilleo Nov 4, 2026
c8565e7
Feature: Add the stage world with a locked player, its own pause scre…
Trilleo Nov 4, 2026
b832028
Feature: Play ground charts on the stage with SDL-timed lane keys, re…
Trilleo Nov 4, 2026
54fa5bb
Feature: Draw the ground track with taps, holds, note speed and a vis…
Trilleo Nov 4, 2026
91230f0
Improvement: Raise the player on a platform and widen the track to th…
Trilleo Nov 4, 2026
388f3e3
Feature: Add the pause rewind and countdown, a results screen, Retry …
Trilleo Nov 4, 2026
9f986c4
Feature: Add two-step offset calibration and save settings to setting…
Trilleo Nov 4, 2026
973b921
Feature: Add the stage debug overlay, recorded golden replays, the cl…
Trilleo Nov 4, 2026
fdeecef
Internal: Add a recorded Basic play as a golden replay
Trilleo Nov 4, 2026
3fdd6d1
Fix: Keep lane keys' real timestamps when they arrive after the frame…
Trilleo Nov 4, 2026
4812116
Improvement: Move the player closer to the judgement line
Trilleo Nov 4, 2026
5a828c5
Internal: Add recorded Basic and Advanced plays as golden replays
Trilleo Nov 4, 2026
3568b54
Internal: Mark Milestone 2 as passed
Trilleo Nov 6, 2026
b3892ff
Feature: Send sky buttons through the pause rule and stop paused mous…
Trilleo Nov 6, 2026
6c8005d
Feature: Add a sky readability chart to the Test Pattern and a sky no…
Trilleo Nov 8, 2026
449df49
Feature: Aim at the sky screen with the camera, stop it past the scre…
Trilleo Nov 8, 2026
4aeb36b
Feature: Draw sky notes on the sky screen and scale the stage so the …
Trilleo Nov 8, 2026
0ff65a2
Feature: Add play mouse sensitivity, play FOV and view assist to the …
Trilleo Nov 8, 2026
fa72bd8
Internal: Add the Milestone 3 readability playtest checklist
Trilleo Nov 8, 2026
39b2c1b
Internal: Keep real camera rotation after the Milestone 3 readability…
Trilleo Nov 8, 2026
5322d5b
Improvement: Let flicks be hit from any direction and drop dir from t…
Trilleo Nov 8, 2026
2725a19
Internal: Mark Milestone 3 as passed
Trilleo Nov 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .claude/agents/core-engineer.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ 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.
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.
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.
2 changes: 1 addition & 1 deletion .claude/agents/reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +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
46 changes: 36 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,45 @@ 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:
name: hexium-dev-build
path: mod/build/libs/

# Turn on from M2, once client game tests exist. Check the task name
# Loom creates for client game tests in the 26.3 toolchain.
# client-gametest:
# runs-on: ubuntu-24.04
# steps:
# - uses: actions/checkout@v6
# - uses: actions/setup-java@v5
# with: { java-version: '25', distribution: 'microsoft' }
# - run: chmod +x ./gradlew
# - run: xvfb-run -a ./gradlew :mod:runClientGameTest
# Runs the game itself on a virtual display with a fake audio device. It
# hasn't passed on a CI machine yet, and a slow software renderer may upset
# its timing, so it can't fail the build until it has proved reliable.
client-gametest:
runs-on: ubuntu-24.04
continue-on-error: true
timeout-minutes: 30
steps:
- name: checkout repository
uses: actions/checkout@v6
- name: validate gradle wrapper
uses: gradle/actions/wrapper-validation@v6
- name: setup jdk
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'microsoft'
- name: install virtual display
run: sudo apt-get update && sudo apt-get install -y xvfb xauth libgl1 libglx-mesa0 libgl1-mesa-dri libx11-6 libxext6 libxcursor1 libxi6 libxrandr2 libxfixes3 libxss1
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: run client game tests
run: xvfb-run -a ./gradlew :mod:runClientGameTest
env:
ALSOFT_DRIVERS: 'null'
- name: keep screenshots and logs
if: always()
uses: actions/upload-artifact@v7
with:
name: hexium-gametest-output
path: |
mod/build/run/clientGameTest/screenshots/
mod/build/run/clientGameTest/crash-reports/
mod/build/run/clientGameTest/logs/
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
109 changes: 109 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,112 @@
# Hexium - Change Log

## Unreleased

### 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.
+ Choosing a difficulty now plays it on the stage, and Esc offers a way back to the menu.

#### 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.
+ 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.
+ 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

+ 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.
+ 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.
+ 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`.
+ F6 during a play shows timing numbers: clock drift, frame time, how long key presses waited to reach the judge, how many arrived too late to keep their own time, and your offsets.
+ Added calibration, from the Calibrate button in Hexium's menu.
+ 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 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 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.
+ Added scoring up to 1,010,000, combo and clear lamps (Full Combo, All Justice, All Justice Critical).

#### 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: swipe through them from any direction.
+ 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.
+ 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.
+ Re-judging a replay gives exactly the result of the live play, so scores can be checked.

### 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.
+ 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.
+ Fixed charts with notes too far away to have a time passing validation.
+ Fixed difficulty files named for another difficulty passing the linter.

#### Gameplay

+ Fixed most key presses being timed by the frame that noticed them instead of when they happened.
+ Misses and hold ticks now show up to 50 ms later, while hits show as fast as before.

#### 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 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.
+ The build now lints the example charts.
13 changes: 8 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 0 (set-up done); see the roadmap in
docs/DESIGN.md.
It is client-only. Milestone 3 (sky layer) has passed its gate, so the project is at
Milestone 4 (content loop); see the roadmap in docs/DESIGN.md.

## Working with me
- Before any non-trivial task, ask clarifying questions about the idea and design
Expand All @@ -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
Expand All @@ -25,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
Expand All @@ -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.
Expand Down Expand Up @@ -78,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"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -19,7 +19,7 @@ Hexium has its own menu on the title screen. Your normal worlds and servers are
2. Put these in your `mods` folder: Hexium, [Fabric API](https://modrinth.com/mod/fabric-api) and [Fabric Language Kotlin](https://modrinth.com/mod/fabric-language-kotlin).
3. Start Minecraft and open **Hexium** from the title screen.

For the smoothest timing, play at 240 FPS or more and run the offset calibration in Hexium's settings once.
For the smoothest timing, play at 240 FPS or more and press Calibrate in Hexium's menu once.

## Links

Expand Down
14 changes: 14 additions & 0 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,19 @@ plugins {
}

dependencies {
// Chart and settings 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"))
testImplementation("net.jqwik:jqwik:${providers.gradleProperty("jqwik_version").get()}")
}

tasks.test {
// 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"))
}
Loading
Loading