Developers
Edit on GitHubDevelopment
Build and run Riffover from source: what you need, the repository's layout, the game and the website, tests, CI and dev builds.
On this page
Riffover is a Godot 4 game written in C#, plus a Next.js website, in one repository. This page gets both running and explains how builds are made. How the game works inside is in Architecture.
What you need#
| Tool | Version | Notes |
|---|---|---|
| Windows, macOS or Linux | Windows 10 (2004+) or 11; macOS 11+; Linux x86_64 | Following the music app (the media bridge and audio capture) is Windows-only for now (game/src/Platform/Capabilities.cs); the game builds and runs everywhere |
| Godot .NET | 4.7.x | Must be the .NET build. See Godot version |
| .NET SDK | 11.0 | winget install Microsoft.DotNet.SDK.11 on Windows |
| Node.js | 22+ | Only for the website |
| Python | 3.x | Optional: only to publish the song catalog (tools/catalog) |
| VS Code | Optional, but the repo is set up for it |
Repository layout#
game/ Godot 4 (.NET / C#) game
src/Bridge/ Media bridge: picks a media session, reads it, sends play/pause/skip (Windows SMTC); the in-game player for songs with their own audio
src/Catalog/ The free song catalog: fetch, download (SHA-256 checked), install, decode for charting
src/Audio/ Learn-pass audio capture (per-app WASAPI loopback), crowd audio, synthesized sounds
src/Charts/ Chart model, track keys, song library, the charter (Charts/Learn: audio -> chart), community chart import (Charts/Import)
src/Explore/ Explore's sources: browse, search, saved copies
src/Game/ Song clock, input (keyboard, guitars, drum kits), judging and scoring, seats and the lobby, settings, scores
src/Online/ Accounts: sign-in with a code, replays and their background upload
src/Platform/ Per-OS capabilities, riffover:// links, single instance, token storage
src/Stage/ The 3D stage (highways, gems, crowd, band, lights, Surge)
src/UI/ HUD and menus
src/Update/ Build info and the dev-build updater
src/Main*.cs The show runner (state machine), split by area
tests/ xUnit tests for the engine-free code
tools/installer/ Inno Setup script for RiffoverSetup.exe
tools/eval/ Scores the charter against hand-made charts (see tools/eval/README.md)
tools/catalog/ The free song catalog on cdn.riffover.com and its publish script
tools/chartexport/ Converts songs between notes.chart, notes.mid and .sng with the game's own readers and exporter
web/ The website and API (Next.js App Router), deployed on Vercel
docs/ These docs (also published at riffover.com/docs)The game#
Build and test#
git clone https://github.com/flagon-io/riffover
cd riffover
dotnet build game/Riffover.csproj
dotnet test game/tests/Riffover.TestsWarnings fail the build in CI (-warnaserror), and nullable warnings fail it everywhere, so keep it at zero.
The game charts songs itself, in C# (game/src/Charts/Learn/). That code is the one and only charter: improve it there, and measure it against hand-made charts with tools/eval.
Run it from VS Code#
Open the repository with code . and install the recommended extensions when prompted (C#, C# Dev Kit, godot-tools). Point the GODOT4 environment variable at your Godot .NET executable, then restart VS Code so it picks it up:
setx GODOT4 "C:\Tools\Godot\Godot_v4.7.2-stable_mono_win64.exe"- F5 → "Play (Godot .NET)" builds the C# project and runs the game with the debugger attached. Breakpoints work.
- "Open Godot editor" opens the project in the editor.
- Ctrl+Shift+B runs
dotnet buildonly.
Or from the Godot editor#
Run Godot (.NET), click Import, select game/project.godot, then press Build (the hammer, top right) and Run (F5).
Godot version#
game/Riffover.csproj pins Godot.NET.Sdk/4.7.2, which has to match your editor's version exactly. On a different 4.x .NET build, edit that line to match. The game targets .NET 11 (net11.0), which Godot 4.7+ loads fine: the engine uses whatever runtime the project's build asks for.
First run against real hardware#
What's most likely to need a look the first time the game meets a new PC or music app:
- The bridge sees your app. Press
F3: the debug line should sayWindows media controlswith no error and show the app id. If nothing shows up, play something once so the app registers a media session. - Pause, skip and play work. The app must honor pause and play from Windows' media controls. Seeking is optional: if it's unsupported or ignored, restarting falls back to Previous (and Next, if Previous went back a track).
- The WinRT projection loads inside Godot. On Windows the project targets
net11.0-windows10.0.19041.0. If the editor complains aboutMicrosoft.Windows.SDK.NETorWinRT.Runtime, check that both DLLs end up ingame/.godot/mono/temp/bin/Debug/. - Timing. Run CALIBRATE once, and set the app's start delay in Settings if the song comes in late. The debug line shows the media position, the clock position and the last drift correction.
- Charts look right. If charting fails, Godot's output panel shows why. To debug the charter on a real song, set
"keepRecordings": trueinsettings.json(it isn't in the settings menu): each pass's audio is also saved to%TEMP%\Riffover\recordings\.
The website#
The site, its accounts and the API are a Next.js App Router app in web/. Locally it needs no configuration: it uses a PGlite database in .data/pglite, files in .data/storage, and prints emails to the console.
cd web
npm install
npm run dev # http://localhost:3000
npm run lint
npm test
npm run build- Copy (features, steps, FAQ, requirements) is in
web/lib/content.ts, the changelog inweb/lib/changelog.ts, and the shop's gear list inweb/lib/shop.ts. - The download page reads the newest dev build's
latest.jsonfrom GitHub (web/lib/builds.ts, cached for a minute), so new builds show up without a deploy. - The hero and gameplay scenes are a real-time three.js stage in
web/components/stage/. It mirrors the game's look, loads after the page is interactive, pauses offscreen, and shows one still frame to visitors who prefer reduced motion. - Production configuration is listed in
web/.env.example; accounts and uploads are in Accounts and Explore uploads, support payments in Supporting Riffover, and what's left to switch on in production in the Go-live checklist.
Deploys: the Vercel project builds web/ on every push. Pushes to main go to production at www.riffover.com, and the bare domain redirects there; other branches get preview URLs behind Vercel Authentication. DNS is on Cloudflare, with the records pointing at Vercel kept DNS-only so Vercel can issue and renew the certificate.
CI#
.github/workflows/ci.yml runs on pushes to main and on pull requests:
- Game:
dotnet buildand the xUnit tests on Windows, and again on Linux (noWINDOWSsymbol, a case-sensitive file system), both with-warnaserror. Godot's SDK restores from NuGet, so the C# compiles without the editor. The tests chart synthesized songs and check the charter against golden results ingame/tests/Riffover.Tests/Learn/Golden/. CI also buildstools/eval. - Website:
npm ci, ESLint, the tests andnext build, then an accessibility pass (axe, WCAG 2.2 AA) over the public pages.
Dev builds#
.github/workflows/dev-build.yml cuts a dev build, only when started by hand (Actions → Dev build → Run workflow, or gh workflow run dev-build.yml -f notes="what changed"):
- Stamps one version, build number (the run number), commit and time for every platform.
- On Windows, macOS and Linux runners: downloads Godot .NET and that OS's export templates (cached), writes
game/build_info.jsonso the game knows which build it is, and exports with theWindows Desktop,macOSorLinuxpreset ingame/export_presets.cfg. Windows first builds with-warnaserrorand runs the tests, then packages a portable zip and an Inno Setup installer (tools/installer/riffover.iss); macOS signs the universal app ad hoc (not notarized) and zips it; Linux tars the x86_64 build with its executable bit. - A publish job writes
latest.json: the build number, Windows'installerandportable(where the game's updater reads them), anddownloads, one entry per file with itsplatform,kind, name, URL, size and SHA-256. - Updates the
devpre-release in place: new title and notes, then every file, thenlatest.jsonlast, so it never points at a file still uploading. The links stay the same from build to build. With-f publish=falseit skips this step: a dry run that keeps the files as workflow artifacts.
The game checks latest.json at launch and every four hours; the installed build shows UPDATE on the main menu when a newer one is out. See Updates.