Skip to content

Releases

v1.2.0 — full-fidelity client rendering

Choose a tag to compare

@LeifsterNYC LeifsterNYC released this 05 Jul 08:22
2daf322

Full-fidelity client rendering. This is the "implement everything" release — every gap reported against v1.1.0 is addressed, and the whole build is verified end-to-end by an autonomous two-instance headless test run (16/16 checks passing) before this release was cut.

Both sides must run v1.2.0 — the wire protocol is now v13 and older versions will refuse the handshake.

What's new

  • Real player animations on the client. The client no longer scrubs animator states from the network; it runs the game's own animation controllers, fed by streamed motor state. Walking left and right, aiming, shooting (muzzle flash included), and damage reactions all animate exactly like local play.
  • Game-over and win mirroring. When both players die on the host, the client now shows the stock retry card. Wins play the KNOCKOUT flow on the client. Includes a host-side watchdog that recovers a vanilla Cuphead edge case where ghost-revive timing can deadlock the game-over screen entirely.
  • Lives HUD on the client. Health changes flow through the game's real stat events, so the HUD counts down (and the client's HUD initializes reliably even when joining mid-load).
  • Death ghosts. The floating ghost animation now appears on the client when a player dies.
  • Sound effects. Gameplay SFX are captured on the host and streamed to the client; the client mutes its own desynced local SFX and plays the host's stream instead.
  • Save safety. The client never writes save files from mirrored win/lose flows — progression is recorded on the host only, as designed.

Known limitations

  • Ms. Chalice, EX moves, supers, and parry animations are lower fidelity (position/state still sync).
  • Dynamic boss-music phase changes aren't forwarded; the client hears the base track.
  • The win-screen scoreboard on the client shows placeholder stats (the real results are the host's).

Install

Same as v1.1.0 — full instructions in the README. Windows: unzip CupheadCoop-windows-v1.2.0.zip into the game folder. Mac: setup-mac.sh from CupheadCoop-mac-v1.2.0.tar.gz.

v1.1.0 — smooth sync: interpolation, animator scrubbing, death mirroring

Choose a tag to compare

@LeifsterNYC LeifsterNYC released this 04 Jul 15:33
065e6e2

@
Fixes the rough gameplay sync from the first real two-PC session. The connection layer is unchanged from v1.0.0 (Steam P2P by default); everything below is about how the client renders the host's world.

Fixed

  • 30 Hz stepping — the client now buffers snapshots and renders ~60ms behind the newest, interpolating player/boss/projectile positions between snapshots ([State] InterpDelayMs, default 60). Previously every position hard-snapped to the latest snapshot, and two writers fought over player positions.
  • Animation stutter — animator state is scrubbed to the host's exact timeline every frame. The old drift-resync rewound looping animations at every loop boundary and endlessly replayed finished one-shots (death poses, attack windups).
  • Projectile ghosting — leftover path-hash projectile tracking could freeze/hide the client's own shots; removed. NetworkID sync owns all projectiles.
  • Actual send rate — a send-timer bug meant the host streamed at ~20 Hz instead of the configured 30 in every version to date. Fixed and verified at a steady 30.0 Hz.

Added

  • Minimal death mirroring — when a player dies on the host, the client hides that cup instead of showing it frozen alive, and restores it on revive/respawn. Verified live in an automated boss-fight test. Ghost/parry-revive visuals are still host-only. Kill switch: [Sync] EnableDeathSync.
  • Sync-health log line — the client logs CoopClient sync: rx=…Hz age=…ms … every 10s at Info level, so problem reports need no config changes.
  • Automated-test hooks — [Debug] BlockSaves / AutoLoadLevel / AutoPlay / KillP2AfterSec, all default off; used for headless gameplay verification. No effect in normal play.

Compatibility

Protocol v12 — both PCs must update to v1.1.0 (the handshake refuses mismatched versions). Configs are backward compatible; new entries appear with defaults on first launch.
@

v1.0.0 — Steam P2P transport

Choose a tag to compare

@LeifsterNYC LeifsterNYC released this 04 Jul 13:09

Steam P2P transport

The mod now connects over Steam's network by default — no IPs, no ZeroTier, no port forwarding. The client dials the host's SteamID64 and Steam handles NAT traversal (direct when possible, Valve relay otherwise).

New config ([Network] section)

  • Transport = Steam | Udp — Steam is the default; Udp keeps the pre-1.0 LiteNetLib direct-IP path for LAN/fallback.
  • HostSteamId — the client puts the host's 17-digit SteamID64 here. The host reads it off the overlay/log when hosting.
  • AutoStart = Off | Host | Connect — auto-assume a role a few seconds after boot. Connect retries until the host is up, so launch order doesn't matter.

Under the hood

  • Transport abstraction (IHostTransport/IClientTransport) — CoopHost/CoopClient are now wire-agnostic protocol layers.
  • Steam path rides Cuphead's own bundled Steamworks.NET (no extra native DLLs). Session framing (HELLO/BYE/PING/PONG) synthesized over connectionless SteamNetworking P2P; snapshots use latest-wins sequencing; oversized snapshots automatically go reliable.
  • Wire protocol v11 — both sides must run v1.0.0.

Files

  • CupheadCoop-mac-v1.0.0.tar.gz — macOS client bundle (see CLIENT-INSTRUCTIONS.md)
  • CupheadCoop-windows-v1.0.0.zip — Windows bundle (plugin + BepInEx-ready layout)
  • CupheadCoop-v1.0.0.zip — plugin-only

v0.9.1 - remote-player motor bypass (Germanized-architecture adoption, phase 1)

Choose a tag to compare

@LeifsterNYC LeifsterNYC released this 10 May 16:12

First phase of adopting Germanized/CupHeads' architecture (clean-room re-implementation, no code copied). Their key insight: don't run a parallel sim of the remote player on client and try to correct via snapshots — just bypass the motor entirely.

What changed

New file CupheadCoop/src/Coop/PlayerMotorBypass.cs — Harmony prefix patches on:

  • LevelPlayerMotor.FixedUpdate (used in boss + run-and-gun scenes)
  • ArcadePlayerMotor.FixedUpdate (used in arcade scenes)

When in client mode, both patches return false (skip the original FixedUpdate body) and instead:

  1. Lerp transform.position toward the host-streamed CoopState.RemoteP1X/Y or RemoteP2X/Y (interpolation rate 20 unit/sec, ~3 ticks to converge — visually smooth, not snappy)
  2. Force LookDirection / TrueLookDirection / MoveDirection (Cuphead's Trilean2 type) via HarmonyLib.Traverse on the motor's private-set properties, so animators / aim logic / weapon manager read coherent direction state
  3. Force Grounded = true (we don't have a Grounded bit in PlayerSnapshot yet — coming in v1.0.0; for now, assume grounded so cup doesn't animate as airborne)

Result: client's local Cuphead never simulates either player motor. Both cups become pure puppets driven by host's transform + animator stream. Eliminates the parallel-sim divergence that input mirroring (v0.8.3), NetworkID-binding (v0.8.2), and AI-suppression (v0.9.0) couldn't fully fix.

Trade-offs

  • Client user's input now has full network round-trip latency before their cup visually responds (input → upload to host → host runs P2 motor → next snapshot → client renders). This matches Germanized's default behavior. Future work: client could run its local cup's motor directly with local-first prediction, soft-correcting when host disagrees (Germanized has this in their PlayerMotorPatch postfix).
  • Grounded is hard-coded to true on client. Will look slightly wrong if cups are airborne for sustained periods (jump animation might cut to idle). Not enough to break gameplay; v1.0.0 will fix.
  • LookY (vertical aim) not in PlayerSnapshot yet — only LookX (Facing) is streamed. Cuphead's vertical-aim shooting will look slightly off until v1.0.0 wire format extension.

Kill switch

[Sync] EnableRemoteMotorBypass = true. Flip false in BepInEx/config/leif.cupheadcoop.cfg if both cups go visually static / jitter weirdly.

Coming next (v1.0.0)

  • Extend PlayerSnapshot with Grounded/Dashing flags + LookY (proper motor state stream)
  • WeaponEventReplicator: broadcast OnWeaponFire events instead of replicating projectiles (host's projectile stream becomes sole source on client; client never spawns local player projectiles)
  • Improved enemy sync: adaptive 1-3 frame rate, soft lerp at 0.3 alpha, lazy registry rebuild

Architecture credit: github.com/Germanized/CupHeads — particularly PlayerMotorPatch.cs which inspired this approach. Their mod uses Steam P2P transport + MUCH more extensive feature surface; we're adopting the architectural patterns into our LiteNetLib UDP / LAN / ZeroTier stack.

v0.9.0 - HKMP-style enemy AI suppression + spawn-from-host

Choose a tag to compare

@LeifsterNYC LeifsterNYC released this 10 May 15:49

Phase 2 of the architectural plan. Adopts the HKMP (Hollow Knight Multiplayer) pattern: client stops running enemy AI in parallel with host, and instead instantiates entities from a local prefab registry when host streams something client doesn't have.

What changed

Enemy AI suppression on client. EntitySync.RefreshCache now sets each AbstractLevelEntity's MonoBehaviour.enabled = false when in client mode. Unity stops calling Update/FixedUpdate on the AI script. Transforms, animators, sprite renderers stay alive (driven by host's stream). Eliminates RNG-driven attack-pattern divergence — both sides can no longer disagree because client isn't simulating that entity.

Spawn-from-host prefab registry. TypeRegistry.cs maintains Dictionary<uint, GameObject> on client, populated as we walk the scene at refresh time. Each AbstractLevelEntity / AbstractProjectile contributes its first-seen GameObject as a 'template' for its concrete runtime type. When host streams an entity client doesn't have locally (path-hash miss / unbound NetworkID), client looks up the TypeId in the registry and Object.Instantiate's a clone — placed at host's position, AI immediately disabled. This is what lets boss-summoned minions and host-fired-but-client-AI-suppressed boss projectiles still appear on client.

Wire format v10 → v11. EntitySnapshot and ProjectileSnapshot each gain a uint TypeId (FNV1a32 of Type.FullName). Both PCs need v0.9.0 to handshake.

TypeId is deterministic. Both host and client compute the same hash from the same Type.FullName — no registry-sync packet needed. Cuphead types are stable across runs of the same build.

AI restoration on disconnect. CoopState.Reset (called on F11 or socket close) walks _clientDisabled and re-enables every AbstractLevelEntity we touched. Single-player after disconnect won't have dead bosses.

New kill switches in [Sync] section of leif.cupheadcoop.cfg:

  • EnableClientEntityAISuppress (default true) — flip false if a specific boss visually freezes / behaves wrong on client
  • EnableSpawnFromHost (default true) — flip false if Object.Instantiate'd clones cause Unity errors

Overlay diagnostics

Client line 3 now shows: ents=N/M hit=H miss=K spawn=S off=D types=T proj=P bound=B unb=U

  • spawn = entities Instantiate'd from local templates this tick (shows the spawn-from-host fallback firing)
  • types = how many distinct types are in client's prefab registry (sanity check that scene-load population worked)

Known limits / deferred

  • Type.FullName must match between host's Cuphead build and client's. Different builds → different types → registry misses. Probably not an issue in practice (Cuphead doesn't update often).
  • Some entities might have AI logic in components OTHER than the AbstractLevelEntity-derived component (e.g., a separate AttackController MonoBehaviour). Those still run on client. If you see a specific boss misbehaving, that's the place to look.
  • Character selection (Cuphead vs Mugman vs Chalice) still not synced — separate problem.

v0.8.4 - floating projectile debris fix

Choose a tag to compare

@LeifsterNYC LeifsterNYC released this 10 May 15:41

Hotfix on top of v0.8.3.

v0.8.3 input mirroring is working — projectiles appear, enemies sync at 88%, jump fires correctly. But local-sim spawned client projectiles that didn't bind to a host NetworkID got STUCK in place because we Harmony-blocked AbstractProjectile.Update + FixedUpdate + BasicProjectile.Move on all client projectiles. The block was meant to prevent jitter on bound projectiles (where local sim would move them between LateUpdate position-forces from host), but the side effect was: unbound projectiles never had their lifetime/distance auto-destroy logic run, so they accumulated as visible 'floating debris' near the cup.

Fix: ProjectileSync.IsBoundClient(p) now exposes whether the projectile is currently bound to a host NetworkID. The three lifecycle Harmony patches gate on that — bound ones get suppressed (no jitter), unbound ones run their normal Update/FixedUpdate/Move so AbstractProjectile.Update can self-destroy them via DestroyDistance / DestroyLifetime / DestroyedAfterLeavingScreen. Ships as v0.8.4. No wire format change — both PCs need v0.8.4 only because the version string changed (handshake checks Protocol.Version which is still 10).

Coming next in v0.9.0: HKMP-style architecture pivot — disable AbstractLevelEntity AI on client + build prefab registry so host-streamed entities client doesn't have locally can be instantiated. This is the proper 'two sims don't fight each other' fix that addresses remaining attack-pattern divergence.

v0.8.3 - input mirroring (M7 v3)

Choose a tag to compare

@LeifsterNYC LeifsterNYC released this 10 May 15:29

Architectural pivot informed by HKMP (Hollow Knight Multiplayer) prior art and a deeper read of why v0.4.0..v0.8.2 kept fighting Cuphead.

The fix

Host streams its actual per-frame Rewired input (Buttons bitmask + Axes) for both P1 and P2 in PlayerSnapshot. Client's local sim reads from those mirrored values via Harmony patches on Rewired.Player.GetButton/GetButtonDown/GetButtonUp/GetAxis. Both sides run the simulation with the same inputs and produce nearly identical results.

Why this matters

Pre-v0.8.3, client's local Rewired reads returned ZERO when Mode == Client (focus-gate fallback). Consequence: client's local P1 had no input source. It never fired weapons, never walked through run-and-gun trigger zones, never jumped. Result:

  • Player projectiles invisible on client (no AbstractProjectile.Awake firing locally → ProjectileSync had no unbound candidates to bind host's NetworkID stream against).
  • Run-and-gun progression diverged catastrophically (host walked forward, client stayed at the start segment, scene state never matched).
  • Enemies that spawn on trigger zones never appeared on client.

With input mirroring, client's local P1 walks/shoots/jumps in lockstep with host's P1. Local AbstractProjectiles spawn in roughly-the-same-position as host's, get bound to NetworkIDs, and stream-corrected. Trigger zones activate on both sides simultaneously. Path-hash entity sync starts working because scene state actually matches.

Wire protocol bumped 9 -> 10

PlayerSnapshot gains 5 bytes per player: uint Buttons + sbyte AxisX_q + sbyte AxisY_q.

Both PCs need v0.8.3 to handshake.

Implementation summary

  • src/Net/Protocol.cs — PlayerSnapshot Read/Write extended with Buttons + axes; Version = 10.
  • src/Coop/CoopState.cs — added MirroredP1/P2 Buttons + Axes + edge state (Previous + PressedThisFrame); ApplyMirroredInputs accumulates newly-pressed bits across multi-packet frames; AdvanceClientInputs zeros PressedP*ThisFrame at LateUpdate end. New IsClientP1/P2 ButtonHeld/Down/Up accessors.
  • src/Coop/ScenePuppetry.cs — CaptureInputs() in HostCapture samples local P1 Rewired (with IsCapturingLocalInput bypass) and re-reads CoopState.CurrentButtons for P2 (which was already populated by ApplyRemoteFrame from the client's upload).
  • src/Net/CoopHost.cs — TickStateSnapshot packs Buttons + Axes into both P1 and P2 PlayerSnapshot.
  • src/Coop/RewiredPatches.cs — RewiredFocusGate now THREE-layer: focus suppression, client mirror dispatch (returns IsClientP1/P2 ButtonHeld/Down/Up + Axes for the matching player id), and host's existing P2 postfix override (unchanged).
  • src/CoopLateApply.cs — calls AdvanceClientInputs() alongside AdvanceFrame at end of LateUpdate.

Acknowledged limits (deferred to Phase 2 / v0.9.0)

  • RNG divergence: Cuphead uses UnityEngine.Random with separate seeds per process. Client and host will SLIGHTLY diverge on randomized boss attacks even with identical inputs. Position-bind heuristic + 30Hz transform stream correct most of it.
  • Enemy AI still runs on client. Boss state machines on both sides may drift during long fights. Phase 2 will move enemies to host-authoritative render-only (HKMP-style scene-host pattern).
  • Character selection sync (Cuphead vs Mugman vs Chalice). Each PlayerManager picks its own default. If host has Mugman P2 but client auto-joined as Chalice P2, the cups visually differ even though positions sync.

v0.8.2 - NetworkID projectile sync + animation flicker fix

Choose a tag to compare

@LeifsterNYC LeifsterNYC released this 10 May 15:05

Two architectural fixes:

M7 v2: NetworkID-based projectile sync. v0.4.0..v0.8.1 used path-hash with sibling-index for runtime clones (projectiles). That approach was fundamentally broken because spawn order isn't synchronized between host and client - boss state machine timing drift, RNG, gated client input all mean projectile #3 on host is a different projectile than #3 on client. So path-hashes never aligned and projectiles were invisible on client.

New approach: host's Harmony postfix on AbstractProjectile.Awake assigns a monotonically increasing uint NetworkID. Each StateSnapshot carries a list of (NetworkID, x, y, scaleX, scaleY, animHash, animTime) per active projectile, capped at 32. Client side:

  • Same Awake hook registers local AbstractProjectile instances as 'unbound candidates'.
  • On snapshot apply, for each NetworkID we either update the already-bound local, or pick the closest unbound candidate within an 80-unit radius and bind it.
  • NetworkIDs that disappear from snapshots for >0.4s = host destroyed them = destroy bound local too.

To prevent local-sim from moving bound projectiles between LateUpdate frames, AbstractProjectile.Update + FixedUpdate + BasicProjectile.Move are all Harmony-prefix-blocked when Mode==Client. Bound projectile's position comes only from host's stream.

Animation flicker fix. Cuphead's ArcadePlayerAnimationController + LevelPlayerAnimationController + MapPlayerAnimationController all call animator.Update(deltaTime) FOUR TIMES per frame from inside their own Update. That advances time-based transitions on the animator's state machine REGARDLESS of whether parameters changed. Our v0.7.6 parameter-setter block had no effect on time-based transitions, so client cup kept transitioning to exit states even when not moving, and our LateUpdate Animator.Play would force it back, producing visible 2-frame flicker.

Fix: Harmony-prefix-block the three animation controllers' Update entirely on client. Animator state comes purely from host's stream via ScenePuppetry.ApplyTo, no local advancement. Eliminates the flicker source.

Wire protocol bumped 8 -> 9. Both PCs need v0.8.2 to handshake.

Overlay diagnostics extended. Host: line 3 now shows proj=N (host-tracked count). Client: bound=N unb=M (currently bound, unbound candidates available).

Kill switch added. [Sync] EnableProjectileSync = true by default; flip false if it causes issues.

v0.8.1 — fix dead EntitySync + FixedUpdate input pump

Choose a tag to compare

@LeifsterNYC LeifsterNYC released this 10 May 14:42

Two critical fixes on top of v0.8.0:

  • EntitySync._cacheValid was never set to true, silently dead-stopping the entire entity sync layer since v0.4.0. The cache built fine, host log showed 'cached N entities', but tx ents was always 0 and ApplyToClient/ApplyAliveSet early-returned. Fixed: flip true on successful RefreshCache.
  • Jump button didn't fire on host's P2 because Cuphead's ArcadePlayerMotor.HandleInput runs in FixedUpdate (which fires before Update in a Unity frame). Plugin.Update was the only network pump, so packets sat unprocessed when HandleInput read actions.GetButtonDown(2) — the down-edge was visible only one phase too late and got eaten by AdvanceFrame. Added Plugin.FixedUpdate that pumps the host network. Held buttons (Shoot uses GetButton, not GetButtonDown) didn't have this problem because CurrentButtons stays valid across frames.
  • Added overlay hit/miss/off counters to client's line 3 so we can see if entity hashes line up between host and client (helps diagnose remaining position-sync issues).

v0.8.0 — auto P2 join, animator fix, projectile/alive sync, reconnect

Choose a tag to compare

@LeifsterNYC LeifsterNYC released this 10 May 14:08

Wire protocol bumped 7 -> 8; both PCs need this build to handshake.

Big release — fixes the major issues from solo dev-loop testing:

  • Auto P2 join on both host AND client (no controller needed on host; client's local sim spawns the second cup)
  • Animator flicker resolved (split execution order so transform/animator overrides win the LateUpdate phase)
  • EntitySync now also tracks AbstractProjectile, refreshes every 0.5s, uses sibling-index hashing for runtime clones
  • Alive-hash list (host-killed enemies / despawned projectiles disappear on client)
  • Auto-reconnect on disconnect (3s retry, cancel with disconnect hotkey)
  • Overlay shows ping, reconnect countdown, dialing state
  • Launcher script kills existing Cuphead processes first

Same install procedure as v0.7.x — re-run setup-mac.sh on Mac, drop new windows zip on Windows.