Commit Graph

11 Commits

Author SHA1 Message Date
foxtacles
ed4e248be4
Implement display actors (#6)
* Implement display actor override for multiplayer extension

Add displayActorIndex to the multiplayer protocol, allowing players to
choose any of the 66 character models from g_actorInfoInit via the
multiplayer:actor INI setting. The visual display is decoupled from the
gameplay actor ID while maintaining backward compatibility.

- Protocol: Add displayActorIndex field to PlayerStateMsg and validation helpers
- RemotePlayer: Use display actor name for cloning instead of actorId
- NetworkManager: Broadcast/handle displayActorIndex, respawn on display change
- ThirdPersonCamera: Create/manage display clone ROI for local player override
- INI: Read multiplayer:actor setting and resolve to g_actorInfoInit index

* Use array syntax for INI option access in display actor setup

Consistent with how relayUrl and room are read from options.

* Fix display actor ROI handling in 3rd person camera

- Fix direction flip targeting display clone instead of native ROI in
  Disable(), ReinitForCharacter(), and OnCamAnimEnd(). The native ROI is
  the source of truth for TransformPointOfView and Tick() sync.
- Fix use-after-free: DestroyDisplayClone() now nulls m_playerROI when
  it points to the destroyed clone, preventing dangling pointer access
  in BuildRideAnimation after a 3rd→1st→3rd person toggle on a vehicle.
- Recreate display clone in ReinitForCharacter() vehicle branch.
- Extract EnsureDisplayROI() helper to deduplicate clone setup pattern.
- Move IsValidDisplayActorIndex() to charactercloner.h, replacing magic
  number 66 with sizeOfArray(g_actorInfoInit).

* Remove display actors plan document
2026-03-07 18:02:53 +01:00
Christian Semmler
237dca8f51
Add plan for Display Actors 2026-03-06 20:50:17 -08:00
Christian Semmler
629378f148
Resolve open questions: ROI map caching, room full toast, leaning walk label
- Animation ROI maps: lazily built and cached, invalidated on world change
- Room full UX: toast style with sessionStorage to survive page reload
- Rename Sneaky walk animation to Leaning
2026-03-01 12:34:42 -08:00
Christian Semmler
42b5f436bb
Refine animation system: three categories, persistent walk/idle in state
- Three animation categories: walking (6 options), idle (3 options), one-off emotes (2 options)
- Walk/idle selections carried as uint8_t indices in PlayerStateMsg (auto-sync on join)
- Emotes remain one-shot MSG_EMOTE messages with emoji popup for local player
- WASM exports: mp_set_walk_animation, mp_set_idle_animation, mp_trigger_emote (index-based)
- Identified all CNs###xx animations with UI labels and descriptions
- Remote player state machine: walk → stationary → idle timeout → emote support
- CNs004xx excluded (duplicate of CNs001xx)
2026-03-01 12:27:27 -08:00
Christian Semmler
9eb5dbd664
Update Phase 1 plan: configurable rooms, animation research, INI config
- Configurable room size with relay-enforced ceiling (MAX_PLAYERS_CEILING)
- Room config written to isle.ini via OPFS (same pattern as existing settings)
- Multiplayer extension disabled in INI for solo play (zero overhead)
- Hash-based routing (#r/name) consistent with existing isle.pizza navigation
- Three-word Lego Island-themed room names (brave-red-brick style)
- Collapsible in-game overlay
- Animation research: identified CNs###xx generic animations, click body flip,
  disassemble/reassemble, and procedural flip; documented playback mechanisms
  and which are portable to remote players
- Animations broadcast-only (not played on local player)
- String-based animation names in protocol (matches internal lookup)
- Room full: game exits, frontend shows error modal on reload
- Removed future layers reference
2026-03-01 11:44:24 -08:00
Christian Semmler
fd3ce9f7a1
Add Phase 1 plan: URL rooms, animation triggers, and Svelte overlay 2026-03-01 10:54:05 -08:00
Christian Semmler
14d6bf8c8e
Update world state assessment: mark Tier 1 done, reassess Tiers 2 and 4
- Tier 1 (plants + buildings): marked as implemented
- Tier 2 (NPC customization): downgraded to low value because NPCs are
  randomly spawned and pathed per-session, so players never see the same
  NPCs in the same locations
- Tier 4 (vehicles): corrected to account for autonomous vehicle coasting
  after exit (m_worldSpeed is never reset), split into Tier 4a (visibility
  only) and 4b (coasting position sync), increased effort estimate
- Updated priority order, effort summary, and opinion sections
2026-03-01 10:50:43 -08:00
Christian Semmler
12a63c105c
Implement multiplayer world state sync for plants and buildings
Add serialization framework using C++ templates and table-driven lookup
to sync plant and building state between players. Includes world snapshot
routing to requesting peer, relay server Docker support, and fixes for
building color sync, ride vehicle visibility, and ARM compilation.
2026-03-01 09:48:03 -08:00
Christian Semmler
5c8a2ffd3b
Implement multiplayer MVP: WebSocket networking, remote player rendering, vehicle support
- WebSocket relay server (Cloudflare Worker + Durable Object)
- Remote player character cloning with walk/idle/ride animations
- Vehicle support for remote players
- INI config for relay URL
- Extension hook for world transition ROI management
2026-02-28 12:00:01 -08:00
Christian Semmler
4998bdaf65
Savegame: kaitai format (#1713)
* Add savegame.ksy

* Updates

* Updates
2026-01-11 00:27:44 +01:00
Christian Semmler
f52b275130
Add initial Kaitai formats to document LEGO Island file formats (#1712)
* Add initial Kaitai formats

* Update README with installation and command examples

Added installation instructions for Kaitai Struct Visualizer and updated ksdump command examples.

* Update README.md

* Update link to Kaitai Struct documentation

* Update installation link for Kaitai Struct Visualizer
2026-01-10 21:52:53 +01:00