[PR #3775] [MERGED] Render: the splitscreen layout model (where each player's view goes) #5210

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3775
Author: @martipops
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

Base: main ← Head: split/05-viewports


📝 Commits (1)

  • db34a74 Render: viewports and layout model for shared windows (split_layout)

📊 Changes

3 files changed (+275 additions, -2 deletions)

View changed files

📝 crates/horizon-client-render/src/lib.rs (+1 -0)
➕ crates/horizon-client-render/src/split_layout.rs (+272 -0)
📝 crates/horizon-client/src/lib.rs (+2 -2)

📄 Description

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

Blocked by: none (independent)

What and why

Part of the splitscreen series (#3541; parts so far: #3726 compositor, #3727 audio). Where each
player's view goes in a window, as pure data (horizon-client-render/src/split_layout.rs), so it
can be reviewed and tested without a window:

  • one player: the whole window; two: halves (side by side when wider than tall, or as asked);
    three: one wide on top and two below, one tall on the left, or three columns; four: quarters;
    five to sixteen: balanced rows that keep each view near a screen's shape.
  • place_ordered / ordered: who comes first in a shared window.

Nothing calls it yet; #3777 (a second player in the same window) does. Normal play is unchanged.

Suggested label: skip-release.

Self-check

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

Check Result
Scope ✅ 3 files, +275 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 416 passed (34 s)
rustfmt ✅ (10 s)
clippy ✅ (3 s)
tests: horizon-client, horizon-client-render ✅ 1365 passed (19 s)
doc tests ✅ 0 passed (4 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

8 unit tests: every count from 5 to 16 tiles the window exactly (no gap, no overlap, area kept)
in wide, tall and odd sizes; halves, thirds, quarters, a 4x4 grid; ordering.

🤖 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/3775 **Author:** [@martipops](https://github.com/martipops) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `split/05-viewports` --- ### 📝 Commits (1) - [`db34a74`](https://github.com/horizon-rust/horizon/commit/db34a746d19508a4ad746cc3721c08ffc3355c7c) Render: viewports and layout model for shared windows (split_layout) ### 📊 Changes **3 files changed** (+275 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/lib.rs` (+1 -0) ➕ `crates/horizon-client-render/src/split_layout.rs` (+272 -0) 📝 `crates/horizon-client/src/lib.rs` (+2 -2) </details> ### 📄 Description > 🤖 Opened by martipops's AI agent (Claude), not by martipops themselves. **Blocked by:** none (independent) ## What and why Part of the splitscreen series (#3541; parts so far: #3726 compositor, #3727 audio). Where each player's view goes in a window, as pure data (`horizon-client-render/src/split_layout.rs`), so it can be reviewed and tested without a window: - one player: the whole window; two: halves (side by side when wider than tall, or as asked); three: one wide on top and two below, one tall on the left, or three columns; four: quarters; five to sixteen: balanced rows that keep each view near a screen's shape. - `place_ordered` / `ordered`: who comes first in a shared window. Nothing calls it yet; #3777 (a second player in the same window) does. Normal play is unchanged. Suggested label: `skip-release`. ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on Mac, against upstream/main at 7e42cc8ec, 1 min 11 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +275 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 416 passed (34 s) | | rustfmt | ✅ (10 s) | | clippy | ✅ (3 s) | | tests: horizon-client, horizon-client-render | ✅ 1365 passed (19 s) | | doc tests | ✅ 0 passed (4 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 8 unit tests: every count from 5 to 16 tiles the window exactly (no gap, no overlap, area kept) in wide, tall and odd sizes; halves, thirds, quarters, a 4x4 grid; ordering. 🤖 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:00 +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#5210
No description provided.