[PR #3825] [MERGED] Splitscreen: players in windows of their own, or filling a monitor #5237

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3825
Author: @martipops
Created: 10/29/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: split/09-windows


📝 Commits (10+)

  • 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
  • 2edc3b5 Splitscreen: join with a controller; a lost controller's player waits

📊 Changes

24 files changed (+2736 additions, -67 deletions)

View changed files

📝 Cargo.lock (+3 -0)
📝 crates/horizon-client-render/src/gfx.rs (+16 -7)
📝 crates/horizon-client-render/src/split_layout.rs (+24 -0)
📝 crates/horizon-client-render/src/widgets.rs (+19 -0)
📝 crates/horizon-client/Cargo.toml (+7 -0)
📝 crates/horizon-client/build.rs (+9 -0)
📝 crates/horizon-client/src/game.rs (+42 -13)
📝 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 (+88 -6)
📝 crates/horizon-client/src/game/music.rs (+4 -0)
📝 crates/horizon-client/src/game/options.rs (+60 -2)
📝 crates/horizon-client/src/game/packs.rs (+6 -1)
📝 crates/horizon-client/src/game/pad.rs (+46 -1)
📝 crates/horizon-client/src/game/pad/hardware.rs (+161 -33)
📝 crates/horizon-client/src/game/remote.rs (+6 -2)
📝 crates/horizon-client/src/game/server_packs.rs (+1 -0)
➕ crates/horizon-client/src/game/split.rs (+737 -0)
➕ crates/horizon-client/src/game/split/hud.rs (+225 -0)
➕ crates/horizon-client/src/game/split/pads.rs (+410 -0)

...and 4 more files

📄 Description

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

Blocked by: #3801 (and through it #3794, #3777, #3727)

What and why

Part of the splitscreen series (#3541). Built on #3801, so until it lands the diff below includes
it and the parts it depends on. This part's own commit is 685548932, +637 −60.

Players in windows of their own, or filling a monitor:

  • each player plays in a window: Window 1 (the game's), Window 2, 3... opened for the players put
    there, or a borderless window filling a monitor (over the menu bar on macOS, the system's
    borderless fullscreen elsewhere); players in one window share it (#3775's layout per window);
  • closing a player's own window drops its players; the game's window hides while nobody plays
    in it; each title says who plays there; a window reopens where it was (this session); new
    windows cascade so they never open exactly on one another;
  • each window has its compositor (#3726); only the game's waits for vsync (windows each waiting
    would divide the rate); keyboard and mouse follow the view clicked, per window;
  • another player's F11 toggles its own window, kept out of its options; out of fullscreen a
    monitor's borderless window gets its border back at 854x480 in the middle of that monitor.

Until the Setup screen (a later part), HORIZON_SPLIT_WINDOWS (testing) says each seat's window:
1,1,2 (P1 and P2 in Window 1, P3 in Window 2), m2 for a window filling monitor 2 (left to
right). macOS needs objc2 / objc2-app-kit / objc2-foundation for the monitor window over the
menu bar; all three are already in the tree through winit and wgpu.

Suggested label: skip-release (only reachable with the testing variables).

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on Mac, against upstream/main at 7e42cc8ec, 9 min 25 s)

Check Result
Scope ⚠️ 32 files, +3617 −90; 3631 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ changes with a Cargo.toml
Public tree ✅
Python tests ✅ 416 passed (23 s)
rustfmt ✅ (3 s)
clippy ✅ (1 min 12 s)
tests: workspace ✅ 2478 passed (4 min 37 s)
doc tests ✅ 2 passed (16 s)
content root tests ✅ 5 passed (1 min 16 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ✅ (1 s)
launcher clippy ✅ (38 s)
launcher tests ✅ 272 passed (59 s)
Parity ➖ 351 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 339 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

The scope line counts #3801 and the parts below it as well.

Live, tools/splitscreen_e2e.py, new windows (P3 in Window 2 to itself, P1 and P2 in halves of
Window 1; P3 quits and Window 1 keeps its halves) with alone, join, four: pass on macOS,
Linux (Fedora 44, GNOME Wayland: Window 2 opens and draws) and Windows 11.
Windows by hand (martipops, a 2560x1440 monitor and a 1200x1920 portrait one): three players over
two windows; P2 filling the portrait monitor borderless, F11 to a window and back; P1 alone in
Window 2 with P2 in Window 1. Logs clean. Not confirmed by hand: closing Window 2 with its close
button (the code path close_window, the same as the player leaving in windows).

🤖 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/3825 **Author:** [@martipops](https://github.com/martipops) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `split/09-windows` --- ### 📝 Commits (10+) - [`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 - [`2edc3b5`](https://github.com/horizon-rust/horizon/commit/2edc3b57a46480410ec0726dc34190a444bee771) Splitscreen: join with a controller; a lost controller's player waits ### 📊 Changes **24 files changed** (+2736 additions, -67 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+3 -0) 📝 `crates/horizon-client-render/src/gfx.rs` (+16 -7) 📝 `crates/horizon-client-render/src/split_layout.rs` (+24 -0) 📝 `crates/horizon-client-render/src/widgets.rs` (+19 -0) 📝 `crates/horizon-client/Cargo.toml` (+7 -0) 📝 `crates/horizon-client/build.rs` (+9 -0) 📝 `crates/horizon-client/src/game.rs` (+42 -13) 📝 `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` (+88 -6) 📝 `crates/horizon-client/src/game/music.rs` (+4 -0) 📝 `crates/horizon-client/src/game/options.rs` (+60 -2) 📝 `crates/horizon-client/src/game/packs.rs` (+6 -1) 📝 `crates/horizon-client/src/game/pad.rs` (+46 -1) 📝 `crates/horizon-client/src/game/pad/hardware.rs` (+161 -33) 📝 `crates/horizon-client/src/game/remote.rs` (+6 -2) 📝 `crates/horizon-client/src/game/server_packs.rs` (+1 -0) ➕ `crates/horizon-client/src/game/split.rs` (+737 -0) ➕ `crates/horizon-client/src/game/split/hud.rs` (+225 -0) ➕ `crates/horizon-client/src/game/split/pads.rs` (+410 -0) _...and 4 more files_ </details> ### 📄 Description > 🤖 Opened by martipops's AI agent (Claude), not by martipops themselves. **Blocked by:** #3801 (and through it #3794, #3777, #3727) ## What and why Part of the splitscreen series (#3541). Built on #3801, so until it lands the diff below includes it and the parts it depends on. This part's own commit is 685548932, +637 −60. Players in windows of their own, or filling a monitor: - each player plays in a window: Window 1 (the game's), Window 2, 3... opened for the players put there, or a borderless window filling a monitor (over the menu bar on macOS, the system's borderless fullscreen elsewhere); players in one window share it (#3775's layout per window); - closing a player's own window drops its players; the game's window hides while nobody plays in it; each title says who plays there; a window reopens where it was (this session); new windows cascade so they never open exactly on one another; - each window has its compositor (#3726); only the game's waits for vsync (windows each waiting would divide the rate); keyboard and mouse follow the view clicked, per window; - another player's F11 toggles its own window, kept out of its options; out of fullscreen a monitor's borderless window gets its border back at 854x480 in the middle of that monitor. Until the Setup screen (a later part), `HORIZON_SPLIT_WINDOWS` (testing) says each seat's window: `1,1,2` (P1 and P2 in Window 1, P3 in Window 2), `m2` for a window filling monitor 2 (left to right). macOS needs `objc2` / `objc2-app-kit` / `objc2-foundation` for the monitor window over the menu bar; all three are already in the tree through winit and wgpu. Suggested label: `skip-release` (only reachable with the testing variables). ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on Mac, against upstream/main at 7e42cc8ec, 9 min 25 s) | Check | Result | | --- | --- | | Scope | ⚠️ 32 files, +3617 −90; 3631 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ changes with a Cargo.toml | | Public tree | ✅ | | Python tests | ✅ 416 passed (23 s) | | rustfmt | ✅ (3 s) | | clippy | ✅ (1 min 12 s) | | tests: workspace | ✅ 2478 passed (4 min 37 s) | | doc tests | ✅ 2 passed (16 s) | | content root tests | ✅ 5 passed (1 min 16 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ✅ (1 s) | | launcher clippy | ✅ (38 s) | | launcher tests | ✅ 272 passed (59 s) | | Parity | ➖ 351 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 339 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | The scope line counts #3801 and the parts below it as well. Live, `tools/splitscreen_e2e.py`, new `windows` (P3 in Window 2 to itself, P1 and P2 in halves of Window 1; P3 quits and Window 1 keeps its halves) with `alone`, `join`, `four`: pass on macOS, Linux (Fedora 44, GNOME Wayland: Window 2 opens and draws) and Windows 11. Windows by hand (martipops, a 2560x1440 monitor and a 1200x1920 portrait one): three players over two windows; P2 filling the portrait monitor borderless, F11 to a window and back; P1 alone in Window 2 with P2 in Window 1. Logs clean. Not confirmed by hand: closing Window 2 with its close button (the code path `close_window`, the same as the player leaving in `windows`). 🤖 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:11:10 +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#5237
No description provided.