feat: free-roam mode + fix multiplayer sync + remote player polish
Backend (ArenaRoom.js):
- Strip race state machine (lobby/countdown/playing/round/qualify). Persistent
"playing" phase, no rounds, no checkpoints. Free-roam multi.
- Spawn lowered to y=1.5 (was 5) + MIN_DIST raised to 5 (was 3) to avoid
ejecting overlapping players at connect.
- Schema kept intact (handshake-safe); deprecated fields default-valued.
- npm run schema:gen wired (anti-drift codegen).
Unity client:
- C# schema generated by schema-codegen into RolldSchema namespace
(Generated/GameState.cs, Generated/Player.cs). NetworkSchema.cs removed —
handshake no longer scans global namespace.
- NetworkManager: typed Room<GameState>, callbacks rebound, seeds players
already in room on join.
- RemotePlayerController:
* Post-spawn 1.5s grace window (BumpReady) — local PlayerController.HandleBump
ignores remotes during grace.
* Solid SphereCollider disabled during grace, re-enabled afterwards — fixes
the kinematic-vs-dynamic eject when a new client spawns inside someone.
* NPCBall prefab material switched from invisible-in-URP Default-Material to
BallShader.shadergraph.
* TrailRenderer added, tinted with player's chosen color.
* Name label distance-scales (1x-8x) so pseudos remain readable far away.
- GameHUD: OnGUI emptied — race UI (rounds, mode, timer, playersAlive) gone.
- GameCanvas.jsx: BUILD_PREFIX/VERSION bumped for cache-bust.
Frontend WebGL build (pretty_build): final build with all the above.
This commit is contained in:
43
game/Assets/Scripts/Network/Generated/GameState.cs
Normal file
43
game/Assets/Scripts/Network/Generated/GameState.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// THIS FILE HAS BEEN GENERATED AUTOMATICALLY
|
||||
// DO NOT CHANGE IT MANUALLY UNLESS YOU KNOW WHAT YOU'RE DOING
|
||||
//
|
||||
// GENERATED USING @colyseus/schema 4.0.15
|
||||
//
|
||||
|
||||
using Colyseus.Schema;
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
using UnityEngine.Scripting;
|
||||
#endif
|
||||
|
||||
namespace RolldSchema {
|
||||
public partial class GameState : Schema {
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
[Preserve]
|
||||
#endif
|
||||
public GameState() { }
|
||||
[Type(0, "map", typeof(MapSchema<Player>))]
|
||||
public MapSchema<Player> players = null;
|
||||
|
||||
[Type(1, "string")]
|
||||
public string phase = default(string);
|
||||
|
||||
[Type(2, "float32")]
|
||||
public float countdown = default(float);
|
||||
|
||||
[Type(3, "int8")]
|
||||
public sbyte roundNumber = default(sbyte);
|
||||
|
||||
[Type(4, "int8")]
|
||||
public sbyte totalRounds = default(sbyte);
|
||||
|
||||
[Type(5, "int8")]
|
||||
public sbyte playersAlive = default(sbyte);
|
||||
|
||||
[Type(6, "string")]
|
||||
public string gameMode = default(string);
|
||||
|
||||
[Type(7, "string")]
|
||||
public string winnerName = default(string);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user