51 lines
2.2 KiB
Markdown
51 lines
2.2 KiB
Markdown
# Godot Game Development - GEMINI.md
|
|
|
|
This directory contains the Godot 4.6 game project for "Promiscuity".
|
|
|
|
## Core Mandates
|
|
|
|
- **Engine Version**: Godot 4.6 (Forward Plus).
|
|
- **Language**: GDScript is the primary scripting language. C# is enabled but used only when performance or specific library needs arise.
|
|
- **Naming Conventions**:
|
|
- Files/Folders: `snake_case.gd`, `snake_case.tscn`.
|
|
- Variables/Functions: `snake_case`.
|
|
- Constants: `SCREAMING_SNAKE_CASE`.
|
|
- Classes: `PascalCase`.
|
|
- **Autoloads**: Use the established singletons for global state and services:
|
|
- `AuthState`: JWT authentication and session.
|
|
- `CharacterService`: API calls for character management.
|
|
- `SelectedCharacter`: Tracking the currently active character.
|
|
- `QuestManager`: Game quest progression.
|
|
- `DialogSystem`: UI dialog and interaction.
|
|
- `TeleportState`: Handling transitions between levels.
|
|
- `MenuMusic` / `MenuSfx`: Audio management.
|
|
- `SimpleGrass`: Singleton for grass rendering.
|
|
- **Node Paths**: Prefer `unique names` (%NodeName) or `@onready` variables for node references. Avoid fragile string paths.
|
|
|
|
## Asset Pipeline
|
|
|
|
- **Models**: Blender files (`.blend`) and GLB files are supported. Blender integration is preferred for easy editing.
|
|
- **Audio**: Use `.ogg` for music/loops and `.wav` for short sound effects.
|
|
- **UI**: Themes are stored in `themes/`. Adhere to established UI patterns.
|
|
|
|
## Project Organization
|
|
|
|
- `scenes/`: Scene files and associated scripts.
|
|
- `Characters/`: Player and NPC scenes.
|
|
- `Levels/`: Game world/environments.
|
|
- `UI/`: Menus, HUDs, and UI components.
|
|
- `Interaction/`: Interactive objects and systems (e.g., RadialCommandMenu).
|
|
- `Projectiles/`: Projectiles like fireballs.
|
|
- `Quests/`: Quest-related scenes and logic.
|
|
- `Vehicles/`: Controllable vehicles.
|
|
- `CardGame/`: Minigame components.
|
|
- `assets/`: Raw assets (textures, models, audio).
|
|
- `addons/`: Third-party plugins (e.g., `simplegrasstextured`, `godot_mcp`).
|
|
|
|
## Best Practices
|
|
|
|
- **Signals**: Use signals for decoupled communication between nodes.
|
|
- **Resources**: Encapsulate data in custom `Resource` scripts for modularity.
|
|
- **Tool Scripts**: Use `@tool` carefully for editor-side logic.
|
|
- **Physics**: Use `_physics_process` for movement and interaction logic.
|