X-Git-Url: https://vilimpoc.org/repos/bl2-split/blobdiff_plain/948cce3bcb1068f479c61d99526fe7ad69bf815f..320d816d9d10f21981e28b0a82e4808eacb7845c:/README.md diff --git a/README.md b/README.md index 2ce0f74..0e9eed8 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ their own controller, save, and screen. Tested on **Arch + KDE Plasma 6 (Wayland ``` sudo pacman -S umu-launcher qt6-tools bubblewrap libarchive curl binutils ``` +- *Optional:* `gamemode` (+ `lib32-gamemode`) — the script runs each game under + `gamemoderun` if present (performance CPU governor while playing). Not required. - Two Xbox controllers (any two distinguishable pads). ## Setup @@ -48,9 +50,11 @@ their own controller, save, and screen. Tested on **Arch + KDE Plasma 6 (Wayland ``` ./bl2-splitscreen.sh run ``` - With two monitors each game opens fullscreen on its own display; with one, they - tile side-by-side. In-game: **Player 1** *Play → host over LAN*; **Player 2** - *Play → Join → pick the LAN game*. `Ctrl-C` kills both. + Both instances launch at once. While they load, **wiggle the mouse** until both + reach the main menu (the script prints a loud reminder), and leave the windows + alone — after ~30 s the script moves each onto its screen (fullscreen per monitor + with two displays, side-by-side with one). In-game: **Player 1** *Play → host over + LAN*; **Player 2** *Play → Join → pick the LAN game*. `Ctrl-C` kills both. ## Commands @@ -61,7 +65,8 @@ their own controller, save, and screen. Tested on **Arch + KDE Plasma 6 (Wayland | `./bl2-splitscreen.sh setup` | fetch Goldberg + build `p1/`, `p2/` | | `./bl2-splitscreen.sh run` | launch both instances + place windows | | `./bl2-splitscreen.sh tile` | re-place the two windows | -| `./bl2-splitscreen.sh clean` | remove `p1/`, `p2/` (copies + saves + prefixes) | +| `./bl2-splitscreen.sh kill` | terminate all running Borderlands 2 instances | +| `./bl2-splitscreen.sh clean` | kill instances, then remove `p1/`, `p2/` (copies + saves + prefixes) | Useful env overrides: `MODE=native|proton`, `DISPLAY_MODE=dual|split`, `ISOLATION=bwrap|sdl`, `SPLASH_WAIT=`, `STAGGER=`. @@ -117,6 +122,24 @@ So another person clones the repo, forces Proton on their own BL2 in Steam, runs `rm p{1,2}/game/Binaries/Win32/steam_settings/configs.main.ini` - **They don't see each other on LAN:** Player 1 hosts first (the script staggers launches). Discovery uses `custom_broadcasts.txt` (localhost). +- **The 2nd instance is visible but stuck on the loading screen — and only advances + when you jiggle the mouse.** Root cause: BL2's `bPauseOnLossOfFocus=TRUE` — the + game **pauses itself whenever its window isn't focused**. In split-screen only one + window is focused at a time, so the unfocused instance freezes until an input event + wakes it. `setup`/`run` patch each prefix's `WillowEngine.ini` to + `bPauseOnLossOfFocus=FALSE` so every instance keeps running unfocused. (This was + *not* CPU scaling, entropy, or window occlusion — those were dead ends.) The + instances also share a DXVK shader cache so the 2nd reuses the 1st's compiled + shaders; `STAGGER=45` further separates their loads if a cold first run is slow. +- **Two soundtracks at once:** each instance sets `bMuteAudioWhenNotInFocus=TRUE`, so + only the focused window plays audio — the sound follows whichever instance you're + focused on, instead of both playing together. +- **In-game "Quit Borderlands 2 → Yes" does nothing / hangs:** the game's shutdown + path stalls under Goldberg (Steam-networking cleanup, worse with offline mode). + Don't use in-game Quit — close with **`./bl2-splitscreen.sh kill`** or **Ctrl-C** + in the run terminal (safe: you're at the menu, nothing is saving). +- **Ctrl-C / kill left something running:** `./bl2-splitscreen.sh kill` tears down + the whole game + Proton/Wine tree. - **A window won't sit on its monitor:** re-run `./bl2-splitscreen.sh tile`; raise `SPLASH_WAIT` if it fires before the game settles. - **Reset everything:** `./bl2-splitscreen.sh clean` (removes copies + saves; the