How tateorrtot/foxbox works
Purpose and Runtime
This is a Godot project containing Foxbox, a modular GDScript framework for reusable 2D/3D gameplay systems, plus demo scenes and editor/developer addons. It runs inside the Godot Engine; the project/export boundary is project.godot and export_presets.cfg. No server-side runtime or external application service is evident.
Entry Points and Distribution
Foxbox’s main framework-facing entry is addons/foxbox/foxbox.gd, with addon metadata in addons/foxbox/plugin.cfg. Consumable behavior is demonstrated through independently runnable Godot scenes under foxbox_demos/, such as foxbox_demos/character/character_demo.tscn and foxbox_demos/shop/shop_demo.tscn. Prebuilt Windows and Android demo artifacts are committed under exports/.
Core Foundation and Composition
The framework establishes reusable Godot base types and value-model primitives:
• addons/foxbox/core/components/fox_node.gd
• addons/foxbox/core/components/fox_node_3d.gd
• addons/foxbox/core/math/fox_stat_pool.gd
These form a boundary between Godot node/resource lifecycle concerns and higher-level modules. Domain features are designed as attachable nodes, scenes, resources, and scripts rather than a single application flow.
Character Control Pipeline
The largest subsystem is 3D character composition. Input/ability intent is translated into motor movement and state transitions, then represented through model, animation, camera, accessories, shadows, and held items.
• Motors: addons/foxbox/character/components/motors/fox_character_motor_3d.gd, addons/foxbox/character/components/motors/fox_advanced_character_motor_3d.gd
• State/abilities: addons/foxbox/character/components/state_machine/fox_character_grounded_state.gd, addons/foxbox/character/components/abilities/fox_dash_ability.gd
• Presentation: addons/foxbox/character/refactor/model/fox_character_model.tscn, addons/foxbox/character/refactor/model/animation/fox_character_animation_tree.gd
The refactor/ model path and components/trash/ path indicate active replacement of an older character assembly.
Gameplay Interaction Modules
Independent modules expose physics- and scene-facing boundaries:
• Damage detection separates hit producers from hurt receivers: addons/foxbox/damage/fox_hit_area_3d.gd, addons/foxbox/damage/fox_hurt_area_3d.gd.
• Interaction separates targetable areas from raycast selection: addons/foxbox/interaction/fox_interactable_area_3d.gd, addons/foxbox/interaction/fox_interaction_raycast_3d.gd.
• Effects manage definitions, instances, and slot policies: addons/foxbox/effect/fox_effect.gd, addons/foxbox/effect/fox_effect_manager.gd.
• Generic behavior transitions use addons/foxbox/state_machine/fox_state_machine.gd.
Related optional capabilities include socket attachment, physics dragging, aim gimbals, camera zoom, and environmental scenes.
Economy and UI Boundary
The shop subsystem separates catalog/item/price/wallet domain objects from Godot UI:
• Domain: addons/foxbox/shop/core/fox_shop_catalog.gd, addons/foxbox/shop/core/fox_wallet.gd
• Concrete simple economy: addons/foxbox/shop/simple/fox_simple_wallet.gd
• Presentation: addons/foxbox/shop/gui/fox_shop_menu.gd
A shop scene consumes these abstractions in foxbox_demos/shop/shop_demo.tscn; there is no evidence of payment-provider or backend integration.
Development-Time Tooling and Documentation
Separate Godot editor addons provide signal graph visualization, TODO management, and project validation:
• Signal visualization: addons/SignalVisualizer/SignalVisualizer.gd, addons/SignalVisualizer/Visualizer/signal_visualizer_dock.gd
• Validation supports editor and CLI collection/reporting, including JUnit XML: addons/godot_doctor/core/godot_doctor_runner.gd, addons/godot_doctor/cli/godot_doctor_cli_runner.gd
• Generated API documentation is maintained under docs/xml_output/ and docs/web/; these are outputs/documentation infrastructure, not runtime framework modules.
Main entry points: foxbox.gd Foxbox entry · fox_character_motor_3d.gd Character motors · fox_node.gd Base node types · fox_shop_catalog.gd Shop domain
Components 21
Godot Runtime
- Godot Engine · Hosts project, scenes, addons, and exports.
- Project & export config
project.godot - Character demo
foxbox_demos/character/character_demo.tscn - Shop demo
foxbox_demos/shop/shop_demo.tscn
Foxbox Foundation
- Foxbox entry
addons/foxbox/foxbox.gd - Base node types · Reusable Godot lifecycle boundary for feature nodes.
addons/foxbox/core/components/fox_node.gd - Stat pools
addons/foxbox/core/math/fox_stat_pool.gd
Character Pipeline
- Character motors
addons/foxbox/character/components/motors/fox_character_motor_3d.gd - Grounded state & dash
addons/foxbox/character/components/state_machine/fox_character_grounded_state.gd - Character model
addons/foxbox/character/refactor/model/fox_character_model.tscn - Animation tree
addons/foxbox/character/refactor/model/animation/fox_character_animation_tree.gd
Gameplay Modules
- Damage areas
addons/foxbox/damage/fox_hit_area_3d.gd - Interaction
addons/foxbox/interaction/fox_interactable_area_3d.gd - Effects manager
addons/foxbox/effect/fox_effect_manager.gd - Generic state machine
addons/foxbox/state_machine/fox_state_machine.gd
Economy & UI
- Shop domain
addons/foxbox/shop/core/fox_shop_catalog.gd - Simple wallet
addons/foxbox/shop/simple/fox_simple_wallet.gd - Shop menu
addons/foxbox/shop/gui/fox_shop_menu.gd
Developer Tooling
- Signal Visualizer
addons/SignalVisualizer/SignalVisualizer.gd - Godot Doctor · Collects validation results and can report JUnit XML.
addons/godot_doctor/core/godot_doctor_runner.gd - Generated API docs
Connections 24
- Godot Engine → Project & export config: loads
- Project & export config → Foxbox entry: enables
- Foxbox entry → Base node types: builds on
- Foxbox entry → Stat pools: provides
- Foxbox entry → Character motors: provides
- Foxbox entry → Damage areas: provides
- Foxbox entry → Interaction: provides
- Foxbox entry → Effects manager: provides
- Foxbox entry → Shop domain: provides
- Grounded state & dash → Character motors: drives movement
- Character motors → Character model: updates
- Character model → Animation tree: uses
- Generic state machine → Grounded state & dash: supports
- Base node types → Damage areas: base lifecycle
- Base node types → Interaction: base lifecycle
- Shop domain → Simple wallet: implemented by
- Shop domain → Shop menu: presented by
- Character demo → Character motors: demonstrates
- Character demo → Character model: demonstrates
- Shop demo → Shop menu: runs
- Shop demo → Simple wallet: uses
- Godot Engine → Signal Visualizer: editor hosts
- Godot Engine → Godot Doctor: editor and CLI host
- Foxbox entry → Generated API docs: documented by