Commit Graph
36 Commits
Author SHA1 Message Date
admin b091f1175b Add camo sliders to the paint HUD and tune the player
Add the HalfLambert, HalfLambert brightness and specular-damp sliders to the paint HUD panel, dial the camo values on Player.mat, and disable shadow casting on the Paintman renderer so the player's cast shadow no longer gives away its position.
2026-06-29 20:12:44 +02:00
admin 4da2e3a70c Update scenes, lighting and glass materials
Heavy authoring pass on The Room scene plus lighting/render tuning across
scenes: Lobby gets lower ambient/reflection intensity, softer shadow
strength and a baked lighting data asset; Main and Test Map drop their
lighting data/settings links. Replace the living-room Glass materials with
reworked versions under Assets/Materials, update BrightDaySettings, and set
hunterCount to 0 in Main.
2026-06-29 16:24:12 +02:00
admin 42c5fcc323 Apply camouflage material to the player
New Player.mat using Custom/PlayerCamoLit, assigned to the Paintman renderer
on the Player prefab so the camo shader is active on hunters and hiders.
2026-06-29 16:23:14 +02:00
admin 3f48823513 Remove second-pipette toggle and preview from paint HUD
Drop the now-unused Toggle_PipetteScreen and the Preview element from the
paint HUD panel after consolidating back to a single (hybrid) pipette.
2026-06-29 16:23:03 +02:00
admin fd869c9cf8 set living room prefabs as static for lightmap baking 2026-06-29 12:16:39 +02:00
admin 054cadbd80 Tune player role scales, poses and render settings
Hunter scale 2.4 -> 1.5 and Hider 0.7 -> 0.5; Player prefab character
controller step offset and skin width tweaks (plus Unity field reserialization).
Pose assets get fall-clip fields and slightly lower controller height/center.
Lower SSAO intensity and radius in PC_Renderer; QualitySettings reserialized
by Unity (mesh LOD threshold, Switch 2 target).
2026-06-28 21:40:27 +02:00
admin 604adcdfd4 Add The Room scene with living room environment, use it as the match scene
New The Room scene built from the Barking_Dog living room asset: prefab
variants under Assets/Prefabs/3D Living Room, an Environment Light prefab and
baked lighting settings. Point MatchManager at The Room (was Test Map) and
swap it into the build settings scene list. Floor_Wood material and the
living room meta files are reserialized by the URP/Unity importer. Main.unity
also carries the inspector-pinned defaults of the orbit-zoom and hunter-count
fields (matching the C# defaults, no behavior change).
2026-06-28 21:40:18 +02:00
admin 4e27b1e729 Disable editor network bootstrap in builds; tune scenes and paint HUD panel
NetworkBootstrap now destroys itself outside the editor. Camera FOV/background
tweaks in Main, lobby light intensity, and paint HUD panel font/color polish.
2026-06-28 15:51:49 +02:00
adminandClaude Opus 4.8 198db9a3ee Add NoClimb climb filter and kill-plane rescue to player controller
Two player-controller additions:

NoClimb: colliders tagged "NoClimb" are now invisible to wall-climb and
ceiling-grab. The grab detector (OnControllerColliderHit) and all three
climb probes (ProbeWall, ProbeCeiling, WallInFront) skip them, so such a
surface still blocks the capsule physically but can never be grabbed,
re-probed onto, or treated as a ceiling. WalkableGroundBelow is left
untouched (it only accepts walkable ground). The tag is read from a
serialized field (default "NoClimb"); an empty tag disables the check.

Rescue: a kill-plane fail-safe. The owner captures its spawn point on the
first Update frame (after OnNetworkSpawn's ring offset has landed) and,
if it falls below rescueMinY (-100), teleports back there with all
momentum cleared, toggling the CharacterController around the write like
PlaceOnSpawnRing. Owner-only; the authoritative NetworkTransform
replicates the reset. Runs ahead of the control gate so it rescues in any
mode.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 15:15:45 +02:00
admin da3938d089 edit paint hud dialogs 2026-06-28 13:57:12 +02:00
adminandClaude Opus 4.8 2a6fc163b1 Add persistent global mouse sensitivity setting with slider
MouseSensitivity is a static, PlayerPrefs-backed multiplier (default 1,
clamped 0.1-4.0) that scales the mouse-look delta in the FreeCam,
FirstPerson and ThirdPerson controllers. Writes flush immediately so the
value survives a hard build exit. MouseSensitivitySlider binds the
Settings-panel slider to it (range read from the inspector) and mirrors
the value into its label, syncing on panel open via OnEnable.

Main.unity now contains the session-manager canvas directly (the
Online Session Manager prefab was unpacked) and wires the slider binder.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 13:55:53 +02:00
admin 0df37b8e4a First working windows build 2026-06-28 13:16:21 +02:00
adminandClaude Opus 4.8 d27ee16004 Bind online session browser to canvas, drop IMGUI
- OnlineSessionManager: remove OnGUI/IMGUI state; now a logic-only layer
  exposing Host/Refresh/Join/Disconnect plus Status/IsBusy/IsConnected/
  InSession/Sessions and Changed/SessionsChanged events
- OnlineSessionBrowserUI (new): drives the Servers canvas — 4 buttons,
  session list from Entry Template clones (name + players), row selection,
  state-driven interactability, status footer
- Main scene: attach binder, add status footer line, wire 8 refs; dev
  bootstrap panel disabled
- Online Session Manager.prefab (new)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 11:03:26 +02:00
adminandClaude Opus 4.8 91ce8ff329 Replace stripped-player spectator with a minimal dedicated prefab
Mid-match joiners now spawn a dedicated empty Spectator prefab (NetworkObject
+ SpectatorSetup only) instead of a fully stripped Player prefab. The FreeCam
rig is a standalone scene object in Main, so the spectator needs no avatar body,
renderer, collider, or CharacterController -- eliminating the leftover-body
artifact and the fragile per-peer strip path entirely.

- SpectatorSetup.cs (new): owner binds GameModeManager.BindSpectator (FreeCam-only)
- Spectator.prefab (new): empty avatar (Transform + NetworkObject + SpectatorSetup),
  registered in DefaultNetworkPrefabs, wired on MatchManager in Main
- GameModeManager: add BindSpectator/BuildSpectatorModes; drop the spectator
  branch from BindLocalPlayer; ReleaseToNoPlayer frees the cursor on teardown
- MatchManager: independent entropy-seeded RNG for fair hunter pick (was sharing
  the global engine RNG and always landing on the same client); spawn the
  spectator prefab for mid-match joiners; cursor-safe return-to-Main teardown
- FreeCamController: guard IgnorePlayerCollision against a disabled capsule

Also bundled (unrelated user asset/UI edits): PaintHudPanel layout tuning,
font atlas (arialroundedmtprocyr_bold SDF), forestpack_foliage material.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 00:31:49 +02:00
adminandClaude Opus 4.8 bd70f3b8b9 Add lobby/match-start matchmaking flow with additive scene management
Replace the connection-approval role selection with a server-authoritative
match flow built on NGO additive scene management:

- Scenes: Main is the persistent foundation (NetworkManager, GameModeManager,
  cameras, HUD); Lobby and Test Map load/unload additively. Add Lobby + Test Map
  to the build settings; remove the obsolete SampleScene.
- MatchManager (plain MonoBehaviour singleton): loads Lobby on server start,
  StartMatchTrigger lets the host start the match, rolls one random Hunter (rest
  Hider), swaps Lobby -> Test Map (strictly serialized per NGO), respawns each
  player as its role variant. Forces additive client sync mode so clients keep
  Main instead of single-loading it (fixes "Destination scene is not valid").
- Server-driven spawning: null out NetworkConfig.PlayerPrefab at runtime to
  disable auto-spawn, then spawn players after the lobby floor exists (fixes
  falling through the floor) with double-spawn and transition guards.
- StartMatchTrigger: server-gated OnTriggerEnter, only the host's own player
  starts the match.
- NetworkBootstrap: drop role selection / connection approval; everyone spawns
  as the neutral Player prefab. Host/Client/Server/Shutdown buttons stay.
- NetworkPlayerSetup.ScopedModes flag (baked on Hunter/Hider prefabs): lobby
  avatar gets the full mode set, match variants get the role-scoped set.
- GameModeManager.BindLocalPlayer reads ScopedModes and rebinds the painter
  unconditionally (fixes stale painter binding on respawn -> brush painting in
  every mode).
- MeshPainter.PaintingEnabled defaults to false (unbound/pre-spawn/remote never
  paints); PaintHud visibility now also gates on a bound painter (fixes the HUD
  showing at startup before any avatar exists).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 22:44:18 +02:00
adminandClaude Opus 4.8 301f7e64cb Add Ctrl+Z/Ctrl+Y undo/redo with command-based network sync
Pointer-based per-painter history of the canonical maps with copy-on-write
sharing (only maps touched by a stroke are cloned). A stroke (press..release)
is one step; a Load resets the history to the loaded maps as the sole baseline.

Network sync replicates undo/redo as tiny checkpoint/restore commands instead
of broadcasting full map snapshots: every peer runs the same COW history keyed
by owner-assigned checkpoint ids and reproduces restores locally. A peer that
cannot reproduce a target (undo across its join boundary) requests a targeted
snapshot from the owner as fallback.

Hardening: ordered send FIFO keeps stamps + checkpoints + restores in
production order (a marker never overtakes the stamps it finalizes); stamp
overflow carries over to the next frame instead of being decimated, so remote
content matches the owner; remote always inserts the checkpoint id to stay
1:1 aligned. Owner-authoritative snapshot fallback replaces the silent
host no-op. Adds a logSync toggle (default on) tracing when each
checkpoint/restore/snapshot is sent, applied, or falls back.

Also includes paintings-panel layout tuning in PaintHudPanel.prefab
(inspector edits).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 20:19:36 +02:00
adminandClaude Opus 4.8 ee482905f9 Replace auto paint persistence with a named painting library
Persistence rework:
- Drop auto-load on setup and auto-save on teardown; the painter now always
  seeds fresh from the material.
- Named slots under MeshPaint/Saved/<name>.paint via the existing CHMP
  machinery: SavePaintAs / LoadPaintByName / DeletePaint / ListSavedPaintings /
  PaintExists. Slot files carry the display name in the header.
- Remove the obsolete persistence partials (PlayerCharacterController,
  PlayerPoseController, ThirdPersonOrbitInput) and their references.

Paintings HUD panel:
- Authored Panel_Paintings + Save/Load/Delete dialogs into PaintHudPanel.prefab
  (TMP throughout); PaintHud.Library.cs is now a pure binder that clones the
  entry template per slot.
- Save dialog blocks empty/existing names; Load and Delete confirm first.
- Fix dialog z-order: open dialogs SetAsLastSibling so a dragged panel can no
  longer cover them.
- Lib_ListContent horizontal offsets corrected to 0 (was clipping entry labels
  out of the masked viewport).

Multiplayer:
- Loading a painting re-syncs to all peers via the snapshot broadcast path
  (BroadcastLoadedPaint), covering later late-joiners for free.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 18:39:20 +02:00
adminandClaude Opus 4.8 56caa0edd8 Add Hunter/Hider role selection on connect with role-scoped modes
Roles are chosen in the bootstrap dev panel before Host/Client. NGO
ConnectionApproval is enabled at runtime and maps the role payload to
the matching prefab variant per connection (Hunter/Hider), so each peer
spawns the correct avatar including the host.

- PlayerRole.cs (new): single source of truth enum { Hider, Hunter }.
- NetworkBootstrap.cs: role toggle, ConnectionApproval + role payload,
  server ApprovalCheck mapping role -> PrefabIdHash.
- NetworkPlayerSetup.cs: serialized PlayerRole field + Role property.
- GameModeManager.cs: BuildModes(role) - Hunter -> [First Person, Paint],
  Hider -> [Third Person, Paint, Free Cam]; binds role from spawned avatar.
- Hunter.prefab: role = Hunter override.
- SampleScene.unity: NetworkBootstrap prefab references wired.

Also includes user inspector scale tuning (Hunter 2.5->2.4, Hider 0.5->0.7).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 17:01:43 +02:00
admin 10f2518640 Exclude other players from climb probes and spread network spawns
Wall/ceiling/ground climb probes now skip any player collider (own and
remote) instead of only the local hierarchy, so running into another
chameleon no longer triggers the climb mechanic. New players are placed
on a per-clientId ring at spawn (host stays at origin) to avoid stacking
into one collision pile.

Also persists the serialized defaults of the recent network fields into
the Player prefab (incl. the spawnRingRadius inspector tuning) and a TMP
dynamic-atlas reset artifact.
2026-06-27 16:26:54 +02:00
adminandClaude Opus 4.8 e04868f9c0 Fix first-person camera target and paint HUD rebind after networked spawn
Point the first-person camera at the dedicated FirstPersonTarget anchor
(eye height) instead of the shared CameraTarget, in both the runtime
SetPlayer rebind and the editor ResolveReferences fallback.

Rebind the paint HUD to the locally spawned avatar's MeshPainter via a
new GameModeManager.PainterChanged event. Since the spawn-on-connect
refactor, no player exists at PaintHud.Start(), so the HUD bound to a
null painter (no brush masks shown, color/settings were no-ops).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 15:22:23 +02:00
adminandClaude Opus 4.8 69e185d969 Sync paint strokes across the network via command replication
Replicate brush strokes as self-contained commands instead of texture
pixels: the owner emits each committed stamp (local placement plus brush
state, byte-quantized) and remotes replay it through the same draw path,
reproducing identical maps without streaming megabytes.

- MeshPainter.Net.cs: PaintStampNet serializable stamp, OnStampCommitted
  owner-capture event (no-op without listener), ApplyNetworkStamp remote
  replay, seedable spray for deterministic speckle.
- MeshPainter.cs: emit stamp after drawing, seed spray only when synced.
- PlayerPaintSync.cs: NetworkBehaviour batching owner stamps reliably
  (ServerRpc -> ClientRpc) with echo guard; remote disables local painting.
- Player/Hider/Hunter prefabs: PlayerPaintSync plus NGO GlobalObjectIdHash.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 15:02:33 +02:00
adminandClaude Opus 4.8 7f2f4e5999 Sync per-pose index and locomotion state across the network
Add PlayerAnimationSync NetworkBehaviour with owner-authoritative
NetworkVariables for pose index and locomotion category (idle/walk/run/fall).
Remote avatars switch their PlayerPoseController into network-controlled mode,
skipping local input, sprint reset, capsule resize and camera framing, and
take pose index plus locomotion externally. Disable pose persistence on
network-driven remotes so foreign avatars can't overwrite the local save.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 14:44:11 +02:00
adminandClaude Opus 4.8 4fa443f630 Add NGO networking with owner-authoritative player position sync
Install Netcode for GameObjects 2.13.0 + Unity Transport 2.6.0 and wire up
the first networking milestone: syncing player position/rotation across clients.

- NetworkBootstrap: Host/Client/Server controls (OnGUI + H/C hotkeys) for
  local clone testing over loopback 127.0.0.1:7777.
- NetworkPlayerSetup: per-avatar owner gating. The local owner binds the
  GameModeManager and cameras to itself; remote avatars disable their
  controller/CharacterController and receive transform via NetworkTransform.
- GameModeManager.BindLocalPlayer: central runtime rebind to the locally
  spawned player.
- FirstPersonController.SetPlayer: explicit runtime rebind hook.
- Player prefab: NetworkObject + NetworkTransform (owner-authoritative,
  position + rotation) + NetworkPlayerSetup; registered as PlayerPrefab.
- Scene: NetworkManager + UnityTransport added; the fixed scene player
  instance removed in favor of spawn-on-connect.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 14:33:18 +02:00
adminandClaude Opus 4.8 3b26f2e622 Add per-pose fall animation state and clip
Play a dedicated falling animation when the player is airborne and
descending past a scale-aware velocity threshold.

- PlayerCharacterController: new IsFalling state + Fall Animation Speed
  threshold (true only when !grounded && !wallClimbing && descending,
  scaled via CapsuleScale); explicitly false during wall/ceiling climb.
- PlayerPose: per-pose Fall Clip + Fall Clip Speed (mirrors walk/run).
- PlayerPoseController: select the fall clip while falling, fall back to
  the idle clip when a pose has none (no regression).
- Author content: Paintman-Fall.anim assigned to Pose_Idle; UMotion
  project, Player prefab and scene authoring.
- Docs: check off the fall animation in GAME_DESIGN.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 13:49:16 +02:00
adminandClaude Opus 4.8 fc73e26da1 Update Hunter sprint tuning, animations and scene authoring
Content/authoring changes:
- Hunter prefab: set sprintSpeedMultiplier override to 2
- Paintman-Star animation + UMotion project edits
- SampleScene: prefab override / FirstPersonTarget cleanup

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 13:25:56 +02:00
adminandClaude Opus 4.8 0a1859cab1 Camera-relative wall climb up/down keys to fix grab/release twitch
When running backwards toward the camera into a wall, the grab decided on
the camera-relative world direction (S pushes into the wall -> grab) while
the base release decided on the raw S axis (v < 0 -> immediately let go),
causing a per-frame grab/release flicker.

Mirror the existing _wallStrafeSign A/D latch with a new _wallClimbSign:
the camera picks, per climb-key press, which of W/S climbs up (the one
pushing into the wall) via Dot(camForward, wallNormal) and latches it.
All up/down tests now run through the effective climb axis vEff -
wall->ceiling handoff, top-out detach/hop, the alongSurface mapping and
the base release - so grab and release can no longer contradict each
other. Reset on grab and in ExitWallClimb. Facing the wall and grabbing
with W is unchanged (vEff == v).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 13:20:15 +02:00
adminandClaude Opus 4.8 cfb767f6cb Add first-person camera mode with pose-aware eye offset and yaw facing
Introduce a FirstPersonController / FirstPersonMode pair (mirroring the
free-cam mode) wired into the GameModeManager Tab cycle. In first person the
mesh is hidden, the eye sits on CameraTarget plus a per-pose
firstPersonCameraTargetYOffset, and the character body yaw is driven to match
the camera via a new single-writer FaceYaw hook on PlayerCharacterController.

Also includes user content edits (poses, prefabs, scene) carried along.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 13:03:52 +02:00
adminandClaude Opus 4.8 8c89e95014 Smooth free-camera flight and look
FreeCamController: ease movement via dt-correct Vector3.SmoothDamp on a world-space velocity (accel/decel ramp) and lag the look with Mathf.SmoothDampAngle. Both are framerate-independent and collapse to instant at smoothTime 0; smoothed state is snapped on activation (SyncToCurrentView) so entering freecam never jumps to catch up.

Bundles accumulated deferred work: PlayerScaler uniform-scale helper, scale-aware wall/ceiling climb probes and the double-scale skinned-collider bake fix, plus user content authoring (Sit pose + animation, font SDF, scene/prefab edits).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 11:49:43 +02:00
admin f66ebbf10a Player prefab 2026-06-27 10:51:32 +02:00
adminandClaude Opus 4.8 fa7082817e Fix frozen rim pixels via GPU coverage stamp; add brush masks
Replace the CPU island-mask dilation guard on the GPU backend with a
coverage pass rendered through the same brush rasterizer, so sub-pixel
rim texels that the GPU brush can never reach fall into the gutter and
stay paintable (no more frozen loaded pixels at island edges).

Also includes user content: additional brush masks (dirt) with an
expanded mask selector in the HUD prefab, and CharacterController /
wall-climb inspector tuning.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 07:11:27 +02:00
adminandClaude Opus 4.8 c14525a2c8 Add HUD brush mask selector and fix dilation seam artifacts
- Add mask selector with previews to the brush card (data-driven from
  painter.brushMasks); persist activeBrushIndex with HUD layout.
- Fix alpha/coverage artifacts when overpainting after load or backend
  switch: derive the dilation source marker from a deterministic UV island
  mask instead of resetting it to "unpainted" on every seed.
- Import the two final brush mask textures (Brushes/).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 06:23:08 +02:00
adminandClaude Opus 4.8 24a36c0e61 Add pipette (eyedropper) brush mode and wire it into the HUD
Pipette samples all painted channel values (albedo, metallic, smoothness,
occlusion, emission) at the clicked texel and adopts them into the brush
with every opacity forced to 1, instead of painting. The screen raycast is
extracted into a shared TryRaycastPaintMesh helper used by painting, preview
and the pipette. A pipette toggle is added to the HUD panel prefab and wired
in PaintHud.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 20:25:14 +02:00
admin cdeebf9243 Add Spray to ingame panel 2026-06-24 19:55:18 +02:00
adminandClaude Opus 4.8 b07d9a22d2 Add spray brush, paint interval, and per-channel paint opacity
Spray brush mode: bakes a procedural scattered-dot mask per stamp (random
position, size, alpha within the brush disc) and paints it through the
existing single-stamp pipeline; dot centers clamped to (0.5 - dotR) so the
spray footprint matches the solid brush radius.

Paint interval: float on MeshPainter; 0 keeps the continuous interpolated
stroke, >0 emits a single timed dab every x.xx seconds.

Color picker alpha: horizontal alpha bar on both HSV pickers, runtime-built
in Rebind (no prefab re-bake), passed through to brushColor.a / emissionColor.a.

Metallic/smoothness + occlusion paint opacity: new opacity fields applied in
both CPU and GPU backends (GPU MSO draw split into MS and occlusion sub-stamps
for independent opacity), with cloned alpha sliders wired into the HUD.

Also includes the prefab layout tweaks and scene adjustments.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 19:07:28 +02:00
adminandClaude Opus 4.8 8f45aa1537 Update HUD panel layout and reorder brush masks in scene
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 15:31:59 +02:00
adminandClaude Opus 4.8 ace1f949dc Bake paint HUD layout into a prefab with separate channel panels
Split the single HUD panel into four independent per-channel sub-panels
plus a global brush-size panel, each a standalone RectTransform with its
own header (drag-handle ready). PaintHud now binds to a baked layout
prefab via recursive name lookup instead of building everything in code,
with a code-gen fallback. HsvColorPicker gains Rebind() to re-apply the
procedural gradient sprites and drag relays that a prefab cannot serialize.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 12:35:36 +02:00