Add Needle Thread arcade game mode#427
Open
Shombith03 wants to merge 10 commits into
Open
Conversation
New multiplayer game mode where Dolphin players race along a track, collect crystals to charge explosions, and destroy dartboard structures. Winner is first to reach hostile volume destruction threshold. New scripts: - NeedleThreadController: multiplayer race controller with volume-based win - NeedleThreadScoreTracker: tracks elapsed time and volume destroyed - VolumeDestructionTurnMonitor: ends turn when volume threshold reached - NeedleThreadEndGameController: victory/defeat with time or echo hits left - NeedleThreadScoreboard: formats winner time and loser echo hits - NeedleThreadHUD/HUDView: live hostile volume destroyed display - NeedleThreadStatsReporter: UGS telemetry reporting Modified: - GameModes enum: added NeedleThread = 39 - CallToActionTargetType: added PlayGameNeedleThread = 435 - UGSStatsManager: added ReportNeedleThreadStats method - ArcadeGameNeedleThreader.asset: updated Mode, DisplayName, Description, SceneName, Vessels (Dolphin), and CTA target https://claude.ai/code/session_01DgiJuVhagfk4BufQqsrrB8
GameDataSO lives in CosmicShore.Soap namespace. The stats reporter references it directly as a serialized field, unlike the controller and score tracker which inherit it from base classes. https://claude.ai/code/session_01DgiJuVhagfk4BufQqsrrB8
- SkimmerImpactor.OwnDomain and isInitialized now null-check the skimmer reference before accessing Domain/IsInitialized, preventing NullRef when collisions happen before VesselController.Initialize() completes - Create DolphinVesselTelemetry with ExplosionsTriggered and VolumeDestroyed tracking (Dolphin previously fell through to DefaultVesselTelemetry) - Register DolphinVesselTelemetry in VesselTelemetryBootstrapper switch https://claude.ai/code/session_01DgiJuVhagfk4BufQqsrrB8
The Dolphin's charge→explosion ability was completely broken: 1. VesselChangeResourceByPrismEffectSO: Script used old API (halved resource instead of adding charge). Now uses ResourceChangeSpec matching the asset's _change field (adds 0.5 to Energy per prism hit) 2. DolphinVesselChangeResourceByCrystalEffect: Wrong resource index (1=Boost instead of 0=Energy). Fixed to consume Energy when hitting crystal. 3. DolphinVesselExplosionByCrystalEffect: Wrong resource index (1=Boost instead of 0=Energy). Fixed so explosion scales off accumulated charge. 4. NeedleThread scene: Added DartBoard prefab to SegmentSpawner's guaranteedSpawnables so dartboard structures spawn alongside the track. https://claude.ai/code/session_01DgiJuVhagfk4BufQqsrrB8
The DartBoard prefab had a stale 'trailBlock' field name that didn't match
the renamed 'greenPrism' (via FormerlySerializedAs("greenTrailBlock")),
causing both greenPrism and redPrism to be null at runtime. This produced
"The Object you want to instantiate is null" in SpawnLeafObjects.
Now correctly references GreenDartBlock and RedDartBlock prefabs.
https://claude.ai/code/session_01DgiJuVhagfk4BufQqsrrB8
- GreenDartBlock: fix null onPrismVolumeModified and onPrismStolen SO refs that caused NullReferenceException in PrismScaleAnimator.ExecuteOnScaleComplete - PrismScaleAnimator: add null-safety for onPrismVolumeModified.Raise() - SpawnableDartBoard: add hostileToAll flag (Domains.None) so all prisms are hostile to every player's explosions - DartBoard.prefab: enable hostileToAll by default - SegmentSpawner: add ConfigureGuaranteedDistribution() for distributing guaranteed shapes along the track at each segment position - NeedleThreadController: distribute DartBoards along track at 0.2x scale instead of one large cluster 420 units from origin https://claude.ai/code/session_01DgiJuVhagfk4BufQqsrrB8
- NeedleThreadController: change dartBoardScaleFactor from 0.2 to 0.5 (half of original size, not 5x smaller which made them invisible) - PrismEffectHelper: silently skip damage when Player is null instead of spamming LogError — this happens when vessel collides with prisms before player assignment completes during game start https://claude.ai/code/session_01DgiJuVhagfk4BufQqsrrB8
The previous approach called Spawn() repeatedly on the same prefab-based SpawnableBase reference, which caused cache/state issues resulting in only one DartBoard appearing. Now instantiates an independent copy of the SpawnableDartBoard for each segment position, calls Spawn() on the fresh instance, then destroys the temporary spawnable. Each Spawn() call has clean state and produces a fully initialized DartBoard. https://claude.ai/code/session_01DgiJuVhagfk4BufQqsrrB8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the complete Needle Thread arcade game mode, a multiplayer racing game where players navigate a procedurally-generated helix course at high speed, destroy hostile structures through drift collisions, and compete to finish first while meeting volume destruction targets.
Key Changes
Core Game Logic
Scoring & Tracking
NeedleThreadScoreTracker: Monitors race progression and calculates final scores
VolumeDestructionTurnMonitor: Tracks hostile structure destruction progress
UI & Presentation
NeedleThreadScoreboard: Custom scoreboard formatting
NeedleThreadHUD: Real-time player card updates
NeedleThreadEndGameController: End-game cinematic integration
Analytics & Reporting
NeedleThreadStatsReporter: Submits race statistics to UGS
UGSStatsManager: Extended with
ReportNeedleThreadStats()methodGame Configuration
NeedleThreadgame mode enum (value 39)PlayGameNeedleThreadcall-to-action target typeNotable Implementation Details
https://claude.ai/code/session_01DgiJuVhagfk4BufQqsrrB8