Skip to content

Commit b02a0b7

Browse files
aradanmnclaude
andcommitted
docs: Add dynamic splitscreen documentation (Phase 6)
README.md updates: - New "Dynamic Splitscreen Mode (v3.0.0)" section with full feature docs - How it works: join/leave flow explanation - Window repositioning behavior for 1-4 players - Optional package requirements (inotify-tools, xdotool, etc.) - Limitations section (Wayland, Game Mode, max players) - Added to Recent Improvements section CLAUDE.md updates: - Version bump to 3.0.0 - Issue #5 added: Dynamic Splitscreen implementation details - Updated Implementation Order checklist Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent ee1e130 commit b02a0b7

2 files changed

Lines changed: 80 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This document provides essential context for AI assistants working on this codeb
66

77
**Minecraft Splitscreen Steam Deck & Linux Installer** - An automated installer for setting up splitscreen Minecraft (1-4 players) on Steam Deck and Linux systems.
88

9-
**Version:** 2.0.0
9+
**Version:** 3.0.0
1010
**Repository:** https://github.com/aradanmn/MinecraftSplitscreenSteamdeck
1111
**License:** MIT
1212

@@ -388,11 +388,36 @@ The installer generates `minecraftSplitscreen.sh` at runtime with:
388388

389389
---
390390

391+
### Issue #5: Dynamic Splitscreen Mode (v3.0.0) ✅ IMPLEMENTED
392+
**Feature:** Players can join and leave mid-session without coordinating start times.
393+
394+
**Technical Implementation:**
395+
- Controller monitoring via `inotifywait` with polling fallback
396+
- Process tracking with PID arrays for 4 instance slots
397+
- External window repositioning via `xdotool`/`wmctrl` on X11
398+
- Instance restart fallback for Game Mode (gamescope)
399+
- Event loop architecture in generated launcher script
400+
- Mode selection UI (static vs dynamic) at launch
401+
402+
**Files modified:**
403+
- `modules/launcher_script_generator.sh` - Major changes (dynamic mode logic, event handlers, window repositioning)
404+
- `modules/version_info.sh` - Version bump to 3.0.0
405+
- All module headers - Version update to 3.0.0
406+
- `README.md` - Feature documentation
407+
408+
**Optional dependencies for best experience:**
409+
- `inotify-tools` - Efficient controller hotplug detection
410+
- `xdotool`/`wmctrl` - Smooth window repositioning on X11
411+
- `libnotify` - Desktop notifications when players join/leave
412+
413+
---
414+
391415
### Implementation Order
392416
1.**Issue #3 (Logging)** - DONE. All print_* functions auto-log.
393417
2.**Issue #1 (User Input)** - DONE. All modules refactored to use `prompt_user()` and `prompt_yes_no()`.
394-
3.**Issue #2 (Controller Detection)** - Improves Steam Deck UX
395-
4.**Issue #4 (Versioning)** - Can wait until Minecraft actually releases new format
418+
3.**Issue #5 (Dynamic Splitscreen)** - DONE. Players can join/leave mid-session.
419+
4.**Issue #2 (Controller Detection)** - Improves Steam Deck UX
420+
5.**Issue #4 (Versioning)** - Can wait until Minecraft actually releases new format
396421

397422
## Useful Debugging
398423

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,54 @@ This project provides an easy way to set up splitscreen Minecraft on Steam Deck
1818
- **Automatic Dependency Resolution:** Uses live API calls to discover and install all mod dependencies without manual maintenance
1919
- **Smart Cleanup:** Automatically removes temporary files and directories after successful setup
2020

21+
## Dynamic Splitscreen Mode (v3.0.0)
22+
23+
Version 3.0.0 introduces **Dynamic Splitscreen** - players can now join and leave mid-session without everyone needing to start at the same time.
24+
25+
### How It Works
26+
27+
1. **Launch the game** - Choose "Dynamic" mode when prompted (or press 2)
28+
2. **Start playing** - The first controller detected launches Player 1 in fullscreen
29+
3. **Players join** - When a new controller connects, a new Minecraft instance launches and all windows reposition automatically
30+
4. **Players leave** - When a player quits Minecraft, remaining windows expand to use the available space
31+
5. **Session ends** - When all players have exited, the launcher closes
32+
33+
### Window Repositioning
34+
35+
The system automatically repositions windows based on player count:
36+
- **1 player**: Fullscreen
37+
- **2 players**: Top/Bottom split
38+
- **3-4 players**: Quad split (2x2 grid)
39+
40+
**Desktop Mode (X11)**: Uses `xdotool` or `wmctrl` for smooth, non-disruptive window repositioning.
41+
42+
**Steam Deck Game Mode**: Restarts instances with new positions (the splitscreen mod only reads configuration at startup).
43+
44+
### Requirements for Dynamic Mode
45+
46+
For the best experience, install these optional packages:
47+
48+
```bash
49+
# Debian/Ubuntu
50+
sudo apt install inotify-tools xdotool wmctrl libnotify-bin
51+
52+
# Fedora
53+
sudo dnf install inotify-tools xdotool wmctrl libnotify
54+
55+
# Arch
56+
sudo pacman -S inotify-tools xdotool wmctrl libnotify
57+
```
58+
59+
- `inotify-tools`: Efficient controller hotplug detection (falls back to polling if unavailable)
60+
- `xdotool`/`wmctrl`: Smooth window repositioning on X11
61+
- `libnotify`: Desktop notifications when players join/leave
62+
63+
### Limitations
64+
65+
- **Wayland**: External window management may not work on pure Wayland; XWayland apps typically work
66+
- **Game Mode**: Window repositioning requires restarting instances (brief interruption)
67+
- **Maximum 4 players**: Hardware and mod limitation
68+
2169
## Requirements
2270
- Linux (Steam Deck or any modern distro)
2371
- Internet connection for initial setup
@@ -226,6 +274,10 @@ Select your new Minecraft version when prompted. The installer will:
226274
- **Figure out preconfiguring controllers within controllable (if possible)** - Investigate automatic controller assignment configuration to avoid having Controllable grab the same controllers as all the other instances, ensuring each player gets their own dedicated controller
227275

228276
## Recent Improvements
277+
-**Dynamic Splitscreen (v3.0.0)**: Players can join and leave mid-session - no need for everyone to start at the same time
278+
-**Controller Hotplug**: Real-time detection of controller connections/disconnections
279+
-**Automatic Window Repositioning**: Windows automatically resize when player count changes
280+
-**Desktop Notifications**: Get notified when players join or leave
229281
-**Auto-Generated Launcher Script**: The splitscreen launcher is now generated at install time with correct paths baked in - no more hardcoded paths
230282
-**Flatpak Support**: Works with both Flatpak and AppImage installations of PollyMC and PrismLauncher
231283
-**Smart Launcher Detection**: Automatically detects existing launcher installations and uses them instead of downloading new ones

0 commit comments

Comments
 (0)