106 lines
4.5 KiB
Markdown
106 lines
4.5 KiB
Markdown
# Brogether
|
|
|
|
Brogether is an experimental Brotato mod project that prepares real online multiplayer for 2 players first. Brotato already supports local co-op and Steam Remote Play; Brogether explores native Steam lobby and P2P networking instead.
|
|
|
|
This is a technical prototype, not a finished multiplayer mod. The current focus is mod loading, Steam lobby flow, debug logging, local packaging, lobby UI, and early hooks into Brotato runs.
|
|
|
|
## What Works Right Now
|
|
|
|
- The mod loads through Brotato's Godot Mod Loader.
|
|
- Steam is accessed through the Steam singleton already available in the game.
|
|
- Public development Steam lobbies can be created.
|
|
- Basic handshake, ping, pong, and ready-state packets are implemented.
|
|
- A local loopback test simulates packet flow without a second Steam client.
|
|
- Brotato's run scene is observed through a script extension.
|
|
- Run start, player spawn, and basic player snapshots are logged or prepared for P2P transfer.
|
|
- The Brogether modal is hidden by default and opens from the main menu or with `F5`.
|
|
- The UI includes a first lobby browser, lobby creation with optional password, and a waiting room with player cards.
|
|
- The waiting room has ready states and a fake peer mode for local testing without a second client.
|
|
|
|
## What Is Not Finished Yet
|
|
|
|
- A real second Steam client has not been tested yet.
|
|
- Remote players are not fully playable or synchronized yet.
|
|
- Shop, item, enemy, wave, and RNG synchronization are missing.
|
|
- Applying remote snapshots to a second local player is only experimentally prepared.
|
|
|
|
## Project Structure
|
|
|
|
```text
|
|
src/mods-unpacked/Brogether-Brogether/
|
|
manifest.json Godot Mod Loader metadata
|
|
mod_main.gd Steam lobby, P2P packets, Brogether modal, logging
|
|
extensions/main_ext.gd Hook into Brotato's run scene
|
|
extensions/main_menu_ext.gd Brogether main menu button
|
|
|
|
scripts/
|
|
package.ps1 Builds the mod ZIP
|
|
install-local.ps1 Installs the ZIP for local Brotato tests
|
|
|
|
docs/
|
|
setup.md Setup and test notes
|
|
brotato-multiplayer-modding-research.md
|
|
workshop-upload.md Step-by-step Steam Workshop upload guide
|
|
```
|
|
|
|
`.tools/`, `recovered/`, and `dist/` are intentionally not committed. They contain local tools, recovered Brotato files, and built ZIPs.
|
|
|
|
## Local Test
|
|
|
|
Brotato's Steam build only loads Workshop folders that Steam considers subscribed. The install script therefore places the built Brogether ZIP next to an already subscribed Brotato Workshop mod for local testing.
|
|
|
|
```powershell
|
|
.\scripts\install-local.ps1
|
|
```
|
|
|
|
Then fully restart Brotato.
|
|
|
|
Brogether stays hidden until opened. The main menu gets a new `BROGETHER` button; `F5` opens the same modal. The modal pauses the game like Brotato's own F8 feedback window and can be closed with `Escape`, `F5`, or the close button.
|
|
|
|
The modal currently has two main areas:
|
|
|
|
- Lobby Browser: shows discovered Brogether lobbies with name, host, player count, and password status.
|
|
- Waiting Room: shows players in the current lobby as cards with Steam name, static initials avatar, and ready state.
|
|
|
|
## Debug Hotkeys
|
|
|
|
```text
|
|
F5 Toggle Brogether modal
|
|
F6 Create Steam lobby
|
|
F7 Search / join lobby
|
|
F9 Leave lobby
|
|
F10 Send ping
|
|
F11 Run local loopback test
|
|
```
|
|
|
|
The Brogether modal contains buttons for Host, Join, Leave, and Ping. It is intended for the next two-client tests and replaces most hotkey actions. Password lobbies are currently a mod-side access check: the lobby stays visible, but Brogether checks the entered password before joining.
|
|
|
|
For testing without a second Steam client, use `Add Fake` in the waiting room. This adds a local fake peer whose ready state can be toggled with `Fake Ready`. There is intentionally no Brogether start button yet; until real run synchronization exists, start Brotato through the normal game flow.
|
|
|
|
Brogether writes its own log to:
|
|
|
|
```text
|
|
C:\Users\tommi\AppData\Roaming\Brotato\brogether.log
|
|
```
|
|
|
|
## Next Useful Test
|
|
|
|
Once a second Steam client is available:
|
|
|
|
1. Start both clients with the exact same Brogether version.
|
|
2. Host opens `BROGETHER` from the main menu or presses `F5`.
|
|
3. Host clicks `Host` or presses `F6`.
|
|
4. Client clicks `Refresh`, selects the lobby, then clicks `Join`.
|
|
5. Test ping/pong with `Ping` or `F10`.
|
|
6. Start a Brotato run normally and check whether `run_started`, `players_spawned`, and snapshot packets appear in both logs.
|
|
|
|
If that works reliably, the next development step is real remote player control based on snapshot and input packets.
|
|
|
|
## Steam Workshop Upload
|
|
|
|
The simple upload guide is here:
|
|
|
|
```text
|
|
docs/workshop-upload.md
|
|
```
|