Bilingual policy
Beast Card Clash enforces a strict bilingual split:| What | Language |
|---|---|
| Code (identifiers, variables, functions, class names) | English |
| Comments | Spanish |
| Documentation strings | Spanish |
| Commit messages | Spanish or English |
C# follows its own standard conventions (Microsoft’s C# coding guidelines). The rules below apply primarily to GDScript.
Naming conventions
Variables and functions
Usesnake_case for all variables, function names, and parameters.
Classes and types
UsePascalCase for class names and type identifiers.
Constants
UseSCREAMING_SNAKE_CASE for constants.
Enums
Enum type names usePascalCase. Enum values use SCREAMING_SNAKE_CASE.
Summary table
| Identifier type | Convention | Example |
|---|---|---|
| Variable | snake_case | player_name, battle_ui |
| Function | snake_case | get_current_player() |
| Parameter | snake_case | card: Card, target: Character |
| Class / type | PascalCase | BattleManager, CardScene |
| Constant | SCREAMING_SNAKE_CASE | MAX_CARD_VALUE, ONDULATION_SPEED |
| Enum (name) | PascalCase | Elements, Teams |
| Enum (value) | SCREAMING_SNAKE_CASE | Elements.FIRE, Teams.ADN |
File and scene naming
| What | Convention | Example |
|---|---|---|
| GDScript files | snake_case.gd | battle_manager.gd, player_stats.gd |
| Scene files | snake_case.tscn | battle_scene.tscn, cards_list.tscn |
| C# files | PascalCase.cs | BattleManager.cs |
| Scene nodes | PascalCase | StateMachine, BattleUI, Dice |
Project folder structure
The project uses color-coded folders in the Godot editor to communicate the role of each directory at a glance.beast_card_clash
addons
assets
battle
cards
characters
elements
tests
ui
autoload
.vscode
| Folder | Color | Purpose |
|---|---|---|
res://addons/ | Teal | Godot plugins and third-party tools |
res://assets/ | Yellow | All game content: cards, characters, UI, music, shaders |
res://assets/tests/ | Red | Test scenes and assets — not shipped in release builds |
res://autoload/ | Blue | Singleton scripts loaded at startup (global state, managers) |
GDScript vs C#
- GDScript
- C#
GDScript is the primary language for Beast Card Clash. All rules on this page apply directly to GDScript files.
Consistency checklist
Before submitting a pull request, verify that your code follows these rules:Language and comments
Language and comments
- All identifiers (variables, functions, classes, files) are in English
- All inline comments are in Spanish
- Spelling is correct — double-check both English identifiers and Spanish comments
Naming conventions
Naming conventions
- Variables and functions use
snake_case - Classes and type names use
PascalCase - Constants use
SCREAMING_SNAKE_CASE - Enum names use
PascalCase, enum values useSCREAMING_SNAKE_CASE - Scene nodes use
PascalCase - Scene and script files use
snake_case
File and scene organization
File and scene organization
- New scripts are placed in the appropriate
assets/subfolder - Global singletons belong in
autoload/ - Test files go in
assets/tests/and are not mixed with production assets - The
.vscode/directory has not been modified
C# specifics
C# specifics
- C# files are named to match their class name (
BattleManager.cscontainsclass BattleManager) - C# follows Microsoft’s standard C# coding guidelines, not GDScript conventions
Related pages
Contributing
Branch naming, commit guidelines, and the pull request workflow.
Architecture overview
How the project is structured and how systems connect.