How andresit1524/beast_card_clash works
1. Project shape
- This is a Godot game repository centered on scene-based gameplay, with most runtime logic in GDScript and a few example scripts in C#.
- The repo is split cleanly into reusable engine-like addons, global singleton services, and game-specific content under assets/.
2. Core runtime boundaries
- addons/ contains reusable systems and editor extensions.
- autoload/ contains cross-scene singleton services that hold persistent state and shared managers.
- assets/ contains the actual game scenes, gameplay logic, resources, UI, and content.
- tests/ and .docs/ provide validation/demo material and design documentation, not runtime gameplay.
3. Global services and persistence
- The main architectural backbone is in autoload/: scene_manager, music_manager, flags_manager, and player_stats.
- These services provide scene transitions, background music control, game progression flags, and player state persistence across different scenes.
- This makes the game flow stateful without coupling individual scenes to each other directly.
4. Battle system as a self-contained subsystem
- The battle feature lives under assets/battle/ and is organized as a dedicated subsystem with its own scene (battle.tscn), manager, UI, world, states, and data resources.
- battle_manager.gd is the orchestration point that bridges battle state, UI, and world presentation.
5. Battle flow and state machine
- Battle logic is explicitly modeled as a state machine in assets/battle/states/.
- The concrete states are start, referee, turn, loop, and end, all derived from battle_state.gd.
- The state progression is the main control-flow path for a duel: initialize, arbitrate, resolve turns, repeat, and finish.
6. Battle data and gameplay model
- assets/battle/resources/battle_data.gd indicates the battle system is driven by resource data rather than hardcoded scene logic.
- This suggests the battle manager/state machine consumes structured battle configuration and outcome data, keeping logic and content separated.
7. Battle presentation split: UI vs world
- Presentation is divided into assets/battle/ui/ and assets/battle/world/.
- The UI layer includes panels and interaction surfaces like hands, player panels, podium/end UI.
- The world layer contains 3D/scene elements such as dice, rocks, players, and the battle world scene, implying a layered battle presentation where logic is separate from rendered combat objects.
8. Card, character, and team content
- assets/cards/, assets/elements/, assets/teams/, and assets/character_selector/ define the game’s collectible/combat identity.
- Cards and elemental lists appear to be resource-driven, while character/team selectors handle pre-battle setup and cosmetic or faction choices.
- This content likely feeds both the battle subsystem and the progression/menu flow.
9. Narrative and dialogue infrastructure
- The embedded addons/dialogue_manager/ is a substantial reusable subsystem that includes a compiler, runtime processors, editor UI, import/export plugins, and localization files.
- Game dialogue content is stored under assets/dialogues/ and likely flows through this addon at runtime.
- This is a major architectural boundary: narrative content is authored as dialogue resources and compiled/processed by the addon instead of being embedded in gameplay scripts.
10. Main menu, tutorial, and shell scenes
- assets/ui/start_menu/, assets/ui/tutorial/, and assets/ui/credits/ represent the non-battle shell of the game.
- Common UI elements such as back_button and upper_bar support navigation across these scenes.
- These screens likely act as entry points into character selection, dialogue, and battle scenes via the global scene manager.
11. Rendering, audio, and visual style
- The project relies on Godot assets for music, fonts, themes, and shaders.
- Custom shaders (blur, highlight, outline) and UI themes indicate a strong presentation layer, while music_manager centralizes soundtrack behavior.
- addons/vector_display_2d/ is another reusable visual addon, likely used for special 2D rendering or debug/visualization tooling.
12. Tooling, editor integration, and extensibility
- Several addons are editor-facing: inspector_plugin, import_plugin, export_plugin, and custom controls under components/ and views/.
- This means the project is not only a game but also an authoring environment for dialogue and content creation.
- The architecture therefore includes both runtime systems and in-editor tooling as first-class parts of the repository.
13. Documentation and verification
- .docs/ contains design notes such as battle state-machine and architecture documents, which are useful for understanding intended control flow.
- tests/3d_tests.tscn and tests/card_battle_demo.py provide smoke-test/demo style validation around rendering or combat behavior.
- These are supporting artifacts for development, not separate production subsystems.
Main entry points: battle_manager.gd Battle Manager · scene_manager.gd Scene Manager · battle.tscn Battle Scene · character_selector Character Select
Components 23
Addons
Reusable engine-like subsystems and editor tooling
- Dialogue Manager · Compiler, runtime, editor plugins, and localization for authored dialogue
addons/dialogue_manager - State Machine · Generic base state and state machine framework
addons/state_machine - Vector Display · Reusable 2D display and visualization tooling
addons/vector_display_2d
Autoload
Cross-scene singleton services and persistent state
- Scene Manager · Scene transition and navigation controller
autoload/scene_manager.gd - Music Manager · Persistent soundtrack and playlist control
autoload/music_manager.gd - Flags Manager · Progression flags and game-state persistence
autoload/flags_manager.gd - Player Stats · Persistent player state and statistics
autoload/player_stats.gd
Game Assets
Scenes, gameplay content, UI, audio, and visual resources
- Battle Manager · Coordinates battle flow across state, UI, and world
assets/battle/battle_manager.gd - Battle States · Battle state machine stages: start, referee, turn, loop, end
assets/battle/states - Battle UI · Battle-facing panels and interaction surfaces
assets/battle/ui - Battle World · World scene and combat objects rendered during battle
assets/battle/world - Battle Data · Resource-driven battle configuration and outcome data
assets/battle/resources/battle_data.gd - Battle Scene · Top-level battle scene entry point
assets/battle/battle.tscn - Cards · Card definitions, scenes, and card lists
assets/cards - Elements · Element list resources and associated sprites
assets/elements - Teams · Team list resources and faction identity data
assets/teams - Character Select · Pre-battle team and skin selection scenes
assets/character_selector - Start Menu · Entry shell scene for the game
assets/ui/start_menu - Tutorial · Tutorial and onboarding scene flow
assets/ui/tutorial - Credits · Credits screen scene
assets/ui/credits - Dialogue Content · Game dialogue resources consumed by the dialogue addon
assets/dialogues
Support
Documentation and validation artifacts
- Design Docs · Battle architecture and state-machine notes
.docs - Tests & Demo · Smoke tests and demo validation artifacts
tests
Connections 27
- Scene Manager → Start Menu: opens · Navigates into shell scenes and gameplay entry points
- Scene Manager → Battle Scene: loads · Transitions into battle scenes
- Scene Manager → Tutorial: loads · Transitions into tutorial flow
- Scene Manager → Credits: loads · Transitions into credits screen
- Music Manager → Start Menu: menu music · Drives menu soundtrack behavior
- Music Manager → Battle Scene: battle music · Switches audio context for combat
- Flags Manager → Character Select: progression · Controls unlocks and flow gating
- Player Stats → Character Select: load state · Provides persistent player state to setup screens
- Start Menu → Scene Manager: navigate · Starts scene transitions from the shell
- Character Select → Battle Scene: start battle · Sends chosen setup into combat flow
- Battle Scene → Battle Manager: hosts · Scene entry point for battle orchestration
- Battle Manager → Battle States: drives · Advances the battle state machine
- Battle Manager → Battle UI: updates · Synchronizes UI with battle state
- Battle Manager → Battle World: controls · Coordinates world presentation and combat objects
- Battle Manager → Battle Data: consumes · Uses resource-driven battle configuration
- Battle States → Battle Data: reads · States use structured battle data during progression
- Battle UI → Cards: shows cards · Battle UI presents card-based gameplay content
- Battle UI → Player Stats: reflects · Displays persistent player-related state when needed
- Battle World → Vector Display: uses visuals · May rely on shared visualization helpers
- Dialogue Manager → Dialogue Content: runs · Compiles and renders authored dialogue content
- Dialogue Manager → Tutorial: narrates · Supports onboarding and story presentation
- Dialogue Manager → Credits: presents text · Can power narrative UI screens if needed
- Design Docs → Battle States: describes · Documents intended battle control flow
- Tests & Demo → Battle Manager: exercises · Validates core battle behavior through demos
- Cards → Battle Data: feeds · Card content contributes to battle configuration
- Elements → Cards: supports · Element definitions underpin card identity
- Teams → Character Select: drives choice · Team resources populate selection screens