[PR #4163] [CLOSED] Splitscreen: profiles, and the switch that turns it on #5454

Closed
opened 2026-11-03 05:12:41 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4163
Author: @martipops
Created: 10/30/2026
Status: ❌ Closed

Base: main ← Head: split/11-splitscreen-switch


📝 Commits (10+)

  • 2966033 Allow sound engines to share one dimension-aware audio output
  • b3e5cb2 Merge remote-tracking branch 'origin/split/02-audio' into split/06-two-players
  • ce0983f Merge remote-tracking branch 'origin/split/04-pointer-ownership' into split/06-two-players
  • 563d85f Merge remote-tracking branch 'origin/split/05-viewports' into split/06-two-players
  • 70a9fd6 Splitscreen: a second player in the same window (HORIZON_SPLIT=N)
  • 9b19ab5 Splitscreen: each controller drives its own player
  • c911e90 splitscreen_e2e: find horizon-ctl.exe on Windows
  • 408ca59 Merge branch 'split/06-two-players' into split/07-controllers
  • 557a675 splitscreen_e2e: replies through a file, so Windows doesn't hang on launch
  • bd6ead7 Merge branch 'split/06-two-players' into split/07-controllers

📊 Changes

36 files changed (+4686 additions, -113 deletions)

View changed files

📝 Cargo.lock (+3 -0)
📝 crates/horizon-client-render/src/audio.rs (+428 -31)
📝 crates/horizon-client-render/src/extras.rs (+23 -5)
📝 crates/horizon-client-render/src/gfx.rs (+16 -7)
📝 crates/horizon-client-render/src/lib.rs (+1 -0)
📝 crates/horizon-client-render/src/options_ui.rs (+97 -3)
📝 crates/horizon-client-render/src/split_layout.rs (+24 -0)
➕ crates/horizon-client-render/src/split_profiles.rs (+616 -0)
➕ crates/horizon-client-render/src/split_profiles/store.rs (+90 -0)
📝 crates/horizon-client-render/src/widgets.rs (+19 -0)
📝 crates/horizon-client/Cargo.toml (+7 -0)
📝 crates/horizon-client/assets/horizon/lang/en_us.json (+5 -0)
📝 crates/horizon-client/build.rs (+9 -0)
📝 crates/horizon-client/src/game.rs (+39 -14)
📝 crates/horizon-client/src/game/agent.rs (+26 -2)
📝 crates/horizon-client/src/game/control.rs (+9 -0)
📝 crates/horizon-client/src/game/discord.rs (+4 -0)
📝 crates/horizon-client/src/game/integrated.rs (+81 -4)
📝 crates/horizon-client/src/game/music.rs (+4 -0)
📝 crates/horizon-client/src/game/options.rs (+56 -2)

...and 16 more files

📄 Description

🤖 Opened by martipops's AI agent (Claude), not by martipops themselves.

Blocked by: #3825 (windows) and #3826 (profile page); through #3825 also #3801, #3794, #3777, #3727.

What and why

Part of the splitscreen series (#3541); the first of the three PRs agreed there (profiles and
enabling splitscreen; then Setup arrangement and geometry; then the usable Setup screen). Until
its prerequisites merge, the diff below includes them; this PR's own change over #3825 + #3826
is about +907 −113 (with tests, live scenarios and docs).

What players get, still off by default:

  • The switch. Options > Horizon Settings > Splitscreen... has a saved switch, off by
    default. Off, the game is exactly today's: one renderer, the ordinary controller reader. On, a
    controller pressing a button offers to join P1's world; P1 keeps the normal renderer until
    someone does. Turning it off when P1 is alone again restores the ordinary reader and clears
    join offers and lost-controller seats. It can't be turned off while another player is in.
  • Picking a profile. A joining player first sees "Who's playing?" (#3826): pick a profile
    kept in this game folder or make a new one, Cancel to stay out. A name already playing, or
    one the server turns away, is refused on the page with the reason.
  • Switching profile. A joined player's pause menu gains Splitscreen Settings, which opens
    their profiles: picking another leaves as the old player and rejoins as the new one in the same
    view, with that profile's options and saved progress. Cancel keeps the current one.
  • Where the joining view goes. While picking, LB/RB move the view through the free spots: a
    place in a shared window, a new window, a free monitor (#3825's windows). Joining keeps it.
  • Another player's Horizon Settings entry opens their profiles instead of P1's switch.

HORIZON_SPLIT=N stays the testing shortcut (HORIZON_SPLIT_PICK=1 makes it go through the
picker). horizon-ctl's state reports the picker. New page strings use translation keys
(horizon.pages.split_* in en_us.json).

Suggested label: feature.

Vanilla reference

Horizon-only (no vanilla counterpart): off by default, so the vanilla game is unchanged until a
player turns it on.

Self-check

Live scenarios (tools/splitscreen_e2e.py, real games driven through horizon-ctl, scratch
homes): alone, join, four, windows, picker, cancel, switch (switch and restore XP),
bumpers (reorder, own window, return, join in the chosen window), toggle all pass on macOS.
Windows: all 11 live scenarios pass on 76f41136c, the top of the stack, which contains this branch.
Linux (Fedora 44, GNOME on Wayland): alone, join, windows, picker pass on the same commit.
By hand on Windows (martipops, physical controllers, two monitors, one portrait): "works great". Covered: switch on, P2 joining with a controller and making a profile, Setup moving P2 to Window 2 and then filling Monitor 2 with Apply, a Revert, P2 leaving, switch off and P1's controller alone. The log has no panics or errors.

pr_ready (tools/pr_ready.py --quick --base upstream/main on marm, against upstream/main at 30666b33b, 16 min 11 s)

Check Result
Scope ⚠️ 35 files, +4450 −111; 4523 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ changes with a Cargo.toml
Public tree ✅
Python tests ✅ 480 passed (25 s)
rustfmt ✅ (4 s)
clippy ✅ (1 min 6 s)
tests: workspace ❌ 1655 passed, 1 failed (12 min 7 s)
doc tests ✅ 0 passed (12 s)
content root tests ✅ 5 passed (1 min 20 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅ (23 s)
launcher tests ✅ 278 passed (32 s)
Parity ➖ 354 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 342 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The one failed test, options_ui::tests::sound_device_button_in_sound_page_and_cycles, is upstream's:
it read this Mac's real audio devices ("Microsoft Teams Audio") and took over a minute. It passes
on its own on this branch, and in the next PR's gate, which contains all of this one.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/4163 **Author:** [@martipops](https://github.com/martipops) **Created:** 10/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `split/11-splitscreen-switch` --- ### 📝 Commits (10+) - [`2966033`](https://github.com/horizon-rust/horizon/commit/296603342f78d4f0fb691ee54af0442a7bd89f80) Allow sound engines to share one dimension-aware audio output - [`b3e5cb2`](https://github.com/horizon-rust/horizon/commit/b3e5cb2fa609cb87dd861dd37d1d9d748669dcdf) Merge remote-tracking branch 'origin/split/02-audio' into split/06-two-players - [`ce0983f`](https://github.com/horizon-rust/horizon/commit/ce0983fecc34035d440217ff3fc403001a446fa0) Merge remote-tracking branch 'origin/split/04-pointer-ownership' into split/06-two-players - [`563d85f`](https://github.com/horizon-rust/horizon/commit/563d85f95758086b66f3d046f0fe68412fccfeff) Merge remote-tracking branch 'origin/split/05-viewports' into split/06-two-players - [`70a9fd6`](https://github.com/horizon-rust/horizon/commit/70a9fd6f6a75d25d1c26dfaf26a9f4e26399ae8d) Splitscreen: a second player in the same window (HORIZON_SPLIT=N) - [`9b19ab5`](https://github.com/horizon-rust/horizon/commit/9b19ab5b04934069d9332b3073c3ba22c52eda9c) Splitscreen: each controller drives its own player - [`c911e90`](https://github.com/horizon-rust/horizon/commit/c911e9060de550927a854a3ec3f7995561c1f90a) splitscreen_e2e: find horizon-ctl.exe on Windows - [`408ca59`](https://github.com/horizon-rust/horizon/commit/408ca59a6540691bab3eb8adfaa85c104404ef68) Merge branch 'split/06-two-players' into split/07-controllers - [`557a675`](https://github.com/horizon-rust/horizon/commit/557a675d5dda830cd9e7506fd3e84ef1a31f50f6) splitscreen_e2e: replies through a file, so Windows doesn't hang on launch - [`bd6ead7`](https://github.com/horizon-rust/horizon/commit/bd6ead73c3bd43ddfe259d9762ab6f65e0b7d98a) Merge branch 'split/06-two-players' into split/07-controllers ### 📊 Changes **36 files changed** (+4686 additions, -113 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+3 -0) 📝 `crates/horizon-client-render/src/audio.rs` (+428 -31) 📝 `crates/horizon-client-render/src/extras.rs` (+23 -5) 📝 `crates/horizon-client-render/src/gfx.rs` (+16 -7) 📝 `crates/horizon-client-render/src/lib.rs` (+1 -0) 📝 `crates/horizon-client-render/src/options_ui.rs` (+97 -3) 📝 `crates/horizon-client-render/src/split_layout.rs` (+24 -0) ➕ `crates/horizon-client-render/src/split_profiles.rs` (+616 -0) ➕ `crates/horizon-client-render/src/split_profiles/store.rs` (+90 -0) 📝 `crates/horizon-client-render/src/widgets.rs` (+19 -0) 📝 `crates/horizon-client/Cargo.toml` (+7 -0) 📝 `crates/horizon-client/assets/horizon/lang/en_us.json` (+5 -0) 📝 `crates/horizon-client/build.rs` (+9 -0) 📝 `crates/horizon-client/src/game.rs` (+39 -14) 📝 `crates/horizon-client/src/game/agent.rs` (+26 -2) 📝 `crates/horizon-client/src/game/control.rs` (+9 -0) 📝 `crates/horizon-client/src/game/discord.rs` (+4 -0) 📝 `crates/horizon-client/src/game/integrated.rs` (+81 -4) 📝 `crates/horizon-client/src/game/music.rs` (+4 -0) 📝 `crates/horizon-client/src/game/options.rs` (+56 -2) _...and 16 more files_ </details> ### 📄 Description > 🤖 Opened by martipops's AI agent (Claude), not by martipops themselves. **Blocked by:** #3825 (windows) and #3826 (profile page); through #3825 also #3801, #3794, #3777, #3727. ## What and why Part of the splitscreen series (#3541); the first of the three PRs agreed there (profiles and enabling splitscreen; then Setup arrangement and geometry; then the usable Setup screen). Until its prerequisites merge, the diff below includes them; this PR's own change over #3825 + #3826 is about +907 −113 (with tests, live scenarios and docs). What players get, still off by default: - **The switch.** Options > Horizon Settings > **Splitscreen...** has a saved switch, off by default. Off, the game is exactly today's: one renderer, the ordinary controller reader. On, a controller pressing a button offers to join P1's world; P1 keeps the normal renderer until someone does. Turning it off when P1 is alone again restores the ordinary reader and clears join offers and lost-controller seats. It can't be turned off while another player is in. - **Picking a profile.** A joining player first sees "Who's playing?" (#3826): pick a profile kept in this game folder or make a new one, Cancel to stay out. A name already playing, or one the server turns away, is refused on the page with the reason. - **Switching profile.** A joined player's pause menu gains **Splitscreen Settings**, which opens their profiles: picking another leaves as the old player and rejoins as the new one in the same view, with that profile's options and saved progress. Cancel keeps the current one. - **Where the joining view goes.** While picking, LB/RB move the view through the free spots: a place in a shared window, a new window, a free monitor (#3825's windows). Joining keeps it. - Another player's Horizon Settings entry opens their profiles instead of P1's switch. `HORIZON_SPLIT=N` stays the testing shortcut (`HORIZON_SPLIT_PICK=1` makes it go through the picker). horizon-ctl's state reports the picker. New page strings use translation keys (`horizon.pages.split_*` in en_us.json). Suggested label: `feature`. ## Vanilla reference Horizon-only (no vanilla counterpart): off by default, so the vanilla game is unchanged until a player turns it on. ## Self-check Live scenarios (`tools/splitscreen_e2e.py`, real games driven through horizon-ctl, scratch homes): `alone`, `join`, `four`, `windows`, `picker`, `cancel`, `switch` (switch and restore XP), `bumpers` (reorder, own window, return, join in the chosen window), `toggle` all pass on macOS. Windows: all 11 live scenarios pass on 76f41136c, the top of the stack, which contains this branch. Linux (Fedora 44, GNOME on Wayland): `alone`, `join`, `windows`, `picker` pass on the same commit. By hand on Windows (martipops, physical controllers, two monitors, one portrait): "works great". Covered: switch on, P2 joining with a controller and making a profile, Setup moving P2 to Window 2 and then filling Monitor 2 with Apply, a Revert, P2 leaving, switch off and P1's controller alone. The log has no panics or errors. **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on marm, against upstream/main at 30666b33b, 16 min 11 s) | Check | Result | | --- | --- | | Scope | ⚠️ 35 files, +4450 −111; 4523 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ changes with a Cargo.toml | | Public tree | ✅ | | Python tests | ✅ 480 passed (25 s) | | rustfmt | ✅ (4 s) | | clippy | ✅ (1 min 6 s) | | tests: workspace | ❌ 1655 passed, 1 failed (12 min 7 s) | | doc tests | ✅ 0 passed (12 s) | | content root tests | ✅ 5 passed (1 min 20 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ (23 s) | | launcher tests | ✅ 278 passed (32 s) | | Parity | ➖ 354 affected, to run in CI (--quick): active_effect_tick, active_effects, ambient_sound, anchor, arrow, attribute_health, attribute_map_queries, attribute, attribute_updates, audio_attributes, auto_jump, bamboo and 342 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The one failed test, `options_ui::tests::sound_device_button_in_sound_page_and_cycles`, is upstream's: it read this Mac's real audio devices ("Microsoft Teams Audio") and took over a minute. It passes on its own on this branch, and in the next PR's gate, which contains all of this one. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:12:41 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5454
No description provided.