First commit

This commit is contained in:
Michele Rossi
2026-03-08 10:38:30 +01:00
commit bd11d2c037
27 changed files with 707 additions and 0 deletions

22
AGENTS.md Normal file
View File

@@ -0,0 +1,22 @@
# AGENTS.md
Godot 4.6 idle-game prototype; code is GDScript + `.tscn` scenes + JSON data at repo root.
## Build, Lint, And Test Commands
Use `GODOT_BIN` for your local editor binary (e.g. `godot`, `godot4`, or full path).
Run project: `"$GODOT_BIN" --path .`
Headless smoke/lint parse: `"$GODOT_BIN" --headless --path . --quit`
Script syntax check (single script): `"$GODOT_BIN" --headless --check-only --script res://big_number.gd`
Tests: no test framework is currently committed (`tests/` and `addons/gut` are absent).
Single-test command: N/A right now; if GUT is added, use `"$GODOT_BIN" --headless --path . -s res://addons/gut/gut_cmdln.gd -gtest=res://tests/<file>.gd`.
## Architecture And Structure
`project.godot` defines autoload singletons: `GameState` (runtime currency state + save/load) and `CurrencyGeneratorDatabase` (loads `generator_data.json`).
`big_number.gd` (`class_name BigNumber`) is the internal numeric API for huge-value math, comparisons, formatting, and serialization.
`big_number_museum.tscn` + `big_number_museum.gd` is the current main playable scene/prototype UI.
`currency_generator.gd`, `currency_label.gd`, and `big_number_progress_bar.gd` are UI/gameplay adapters that react to `GameState` signals.
Persistence is local JSON only: `user://idle_save.json`; there is no external DB/server/backend.
## Code Style And Conventions
Prefer typed GDScript (`var x: Type`, `func f() -> void`) and keep shared models/components as `class_name` scripts.
Naming: `snake_case` for vars/functions/signals, `PascalCase` for classes, `UPPER_SNAKE_CASE` for constants.
Follow existing Godot style: tabs/consistent indentation, early returns, and short functions grouped by purpose.
When reading files/JSON, always guard `FileAccess.open(...)` and validate parsed types before indexing.
Use signals (already in `GameState`) for UI updates instead of polling or cross-node direct mutation.
No Cursor/Claude/Windsurf/Cline/Goose/Copilot rule files were found in this repository, so this file is the canonical agent guidance.