Skip to content

11a: Instantiate Players #33

Description

@JRustyHaner

11a: Instantiate Players

When the server reports a new player, instantiate a visual (a cube by default) in the scene so remote players are visible. When they leave, destroy it.

Acceptance Criteria

  • Joining player gets a GameObject (assigned prefab, or a default cube when no prefab is set)
  • Spawned at the server-reported position when available; otherwise at the next free spawn point (round-robin), or a default X-offset when no spawn points are configured
  • Duplicate join events do not double-spawn (idempotent)
  • Leaving player's GameObject is destroyed and its spawn slot freed
  • PlayerSpawner exposes lookup (GetPlayerObject/IsPlayerSpawned) used by MultiplayerController
  • EditMode tests cover spawn, placement, idempotency, and removal
  • Cube positions update as the server state is polled (existing MultiplayerController.UpdatePlayerPositions path)

Status

Implementation in PR #43 (branch iss33).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions