Reorganize project into autoload/, menu/, ships/, world/, assets/
Move flat top-level files into topic folders and rewrite every res:// path reference (scenes, scripts, project.godot) accordingly. Rename node_2d.tscn -> ships/ship.tscn and lowercase images/ships/Example_ships -> assets/images/ships/example_ships for naming consistency. Update overview/structure.md to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+29
-19
@@ -6,40 +6,50 @@
|
||||
spacewar/ ← repo root
|
||||
└── spacewar/ ← Godot project root (open this in Godot editor)
|
||||
├── project.godot
|
||||
├── game_config.gd ← autoload singleton (tuning values, player state, signals)
|
||||
├── main_menu.tscn/gd ← entry point / main scene
|
||||
├── server_browser.tscn/gd ← server browser UI (built, not in active flow yet)
|
||||
├── world.tscn ← game world
|
||||
├── node_2d.tscn ← player ship scene
|
||||
├── ship_movement.gd ← player ship logic
|
||||
├── bullet.tscn/gd ← projectile
|
||||
├── pause_menu.tscn/gd ← in-game pause overlay (ESC / Start button)
|
||||
├── team_select.tscn/gd ← race + ship selection overlay (shown on world load)
|
||||
├── asteroid_movement.gd ← stub
|
||||
└── images/
|
||||
├── background/skybox/ ← 6 space background PNGs (1.png – 6.png)
|
||||
└── ships/Example_ships/ ← 4 placeholder ship sprites (1.png, 1B.png, 2a.png, 3b.png)
|
||||
├── autoload/
|
||||
│ └── game_config.gd ← autoload singleton (tuning values, player state, signals)
|
||||
├── menu/
|
||||
│ ├── main_menu.tscn/gd ← entry point / main scene
|
||||
│ ├── server_browser.tscn/gd ← server browser UI (built, not in active flow yet)
|
||||
│ ├── pause_menu.tscn/gd ← in-game pause overlay (ESC / Start button)
|
||||
│ └── team_select.tscn/gd ← race + ship selection overlay (shown on world load)
|
||||
├── ships/
|
||||
│ ├── ship.tscn ← player ship scene (formerly node_2d.tscn)
|
||||
│ ├── ship_movement.gd ← player ship logic
|
||||
│ └── bullet.tscn/gd ← projectile
|
||||
├── world/
|
||||
│ ├── world.tscn ← game world
|
||||
│ └── tile_map.tscn ← unused prototype tilemap
|
||||
└── assets/
|
||||
├── icon.svg
|
||||
└── images/
|
||||
├── background/skybox/ ← 6 space background PNGs (1.png – 6.png)
|
||||
├── effects/ ← explosion1.png
|
||||
├── ships/example_ships/ ← 4 placeholder ship sprites (1.png, 1B.png, 2a.png, 3b.png)
|
||||
└── tiles/ ← bwQ7rQ.png, used by tile_map.tscn
|
||||
```
|
||||
|
||||
> **Note:** `asteroid_movement.gd` referenced in an earlier version of this doc does not exist yet — it's still an open task (see `CLAUDE.md`).
|
||||
|
||||
## Scene Graph
|
||||
|
||||
### `main_menu.tscn` — entry point
|
||||
### `menu/main_menu.tscn` — entry point
|
||||
```
|
||||
MainMenu (Control) ← main_menu.gd builds all UI in _ready()
|
||||
```
|
||||
|
||||
### `world.tscn` — game world
|
||||
### `world/world.tscn` — game world
|
||||
```
|
||||
World (Node2D)
|
||||
├── TextureRect ← static space background (skybox/1.png)
|
||||
├── Player ← instance of node_2d.tscn
|
||||
├── Player ← instance of ships/ship.tscn
|
||||
├── HUD (CanvasLayer)
|
||||
│ └── HealthLabel
|
||||
├── PauseMenu (CanvasLayer, layer=10) ← pause_menu.tscn
|
||||
└── TeamSelect (CanvasLayer, layer=20) ← team_select.tscn; queue_free()s after selection
|
||||
├── PauseMenu (CanvasLayer, layer=10) ← menu/pause_menu.tscn
|
||||
└── TeamSelect (CanvasLayer, layer=20) ← menu/team_select.tscn; queue_free()s after selection
|
||||
```
|
||||
|
||||
### `node_2d.tscn` — player ship
|
||||
### `ships/ship.tscn` — player ship
|
||||
```
|
||||
Player (CharacterBody2D) ← ship_movement.gd
|
||||
├── CollisionShape2D ← CircleShape2D
|
||||
|
||||
Reference in New Issue
Block a user