Skip to content

Conversation

@kenowagb
Copy link
Collaborator

Summary

Adds a full Player vs Bot mode that reuses the existing split screen Player vs Player layout, plus a polish pass so bot tier names are editable data and both synthwave floors react to the song.

What players get

  • Title tree flow: PLAY then VS Bot then Rookie / Rival / Ace (configurable labels), then the existing Tutorial? stub or song select
  • Split screen GameScene with a human on P1 and a rule based bot on P2
  • Bot accuracy and reaction delay driven by a ScriptableObject config (no inline rate hardcodes)
  • Song select hides the P2 difficulty row; the bot mirrors P1 chart difficulty
  • Transition screen and results banner show the chosen bot display name

File guide

Bot core

  • Assets/Bot/BotDifficulty.cs: enum tiers (Easy / Medium / Hard / Perfect). Enum names stay stable for serialization; display names live on the config.
  • Assets/Bot/BotDifficultySettings.cs: per tier display name, error rate, and decision delay range.
  • Assets/Bot/BotDifficultyDefaults.cs: seed and fallback values plus default labels (Rookie / Rival / Ace / Flawless).
  • Assets/Bot/BotDifficultyConfig.cs: ScriptableObject table. Gameplay calls GetSettings; UI calls GetDisplayName.
  • Assets/Bot/BotPlayerController.cs: decision loop. One roll per tree step, wait for delay and a hittable note, then submit through the same path as a human.
  • Assets/Bot/Editor/BotSetupEditorTools.cs: Rhythm menu item to create the config and wire it onto the coordinator and title screen.
  • Assets/Bot/Editor/BotDecisionSimulationTests.cs: editor sim for error rate sanity checks.
  • Assets/ScriptableObjects/Configs/BotDifficultyConfig.asset: shipped default rates and labels.

Session and integration

  • Assets/Session/GameMode.cs: adds PlayerVsBot.
  • Assets/Session/GameSession.cs: stores SelectedGameMode, SelectedBotDifficulty, and SelectedBotLabel across scenes.
  • Assets/Integration/TreeRhythmController.cs: bot API (OnBotDecisionPoint, GetRequiredAction, HasHittableRhythmNote, SubmitGameplayActionAsync) plus SongAudioSource for shared audio systems.
  • Assets/Integration/TwoPlayerGameCoordinator.cs: enables the bot, disables P2 human input, labels results, duplicates P2 synthwave, and wires P1 FFT and beat pulse so the player side background reacts too.
  • Assets/Scripts/AudioFFTAnalyzer.cs: SetSource so analysis can follow P1's playing clip (P2 PlaySync never starts audio).
  • Assets/Rhythm/Core/RhythmManager.cs: HasHittableNote for bot timing.
  • Assets/Tree/Navigation/TreeNavigator.cs: exposes GetRequiredAction for the bot.

Menu and UI

  • Assets/Menu/TitleScreen/TitleScreenController.cs: VS Bot node and difficulty sub tree with labels from the config.
  • Assets/Menu/SongSelect/*: hide P2 difficulty row in bot mode; transition screen uses SelectedBotLabel.
  • Assets/Menu/MenuSceneController.cs: StartTutorial stub hook kept from the original bot commit for the Tutorial? yes path.
  • Assets/UI/Style1/ResultScreenController.cs: identity label support for Bot display name.
  • Assets/Scenes/GameScene.unity: coordinator bot config wiring.

Docs

  • AI/components/PlayerVsBot.md: component doc and file map.
  • AI/CHANGELOG.md, AI/COMPONENT_INDEX.md, AI/INDEX.md, TitleScreen / MainMenu doc updates.

Test plan

  • Menu: PLAY then VS Bot shows Rookie / Rival / Ace (or renamed labels from the config asset)
  • Pick a tier, skip tutorial, pick a song: GameScene loads split screen, P2 acts without human input
  • Transition screen and results show the bot display name, not Easy / Medium / Hard
  • Both synthwave floors react to the song during the match
  • Human 2P still works (no bot spawned)
  • 1P still works
  • Edit Display Name on BotDifficultyConfig and confirm the title tree updates after re-entering the menu

Kenneth Enow and others added 2 commits July 25, 2026 19:35
…yout.

VS Bot on the title tree stores mode/difficulty on GameSession, drives the existing split-screen P2 side via BotPlayerController, and keeps error rates on BotDifficultyConfig (seeded from BotDifficultyDefaults) instead of inline hardcodes.

Co-authored-by: Cursor <cursoragent@cursor.com>
…action.

Adds Display Name on BotDifficultyConfig (defaults Rookie / Rival / Ace / Flawless) so bot labels no longer collide with song difficulties, stores the chosen label on GameSession for the menu, transition, and results, and points the shared FFT plus P1 beat pulse at P1's playing song so both split-screen floors react.

Co-authored-by: Cursor <cursoragent@cursor.com>
@kenowagb kenowagb force-pushed the feature/player-vs-bot branch from d5e6765 to 5d410ee Compare July 25, 2026 23:37
Sign in to join this conversation on GitHub.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant