feat: Add core map generation and management system

- Introduced MapData, MapGenerator, and MapPainter classes for procedural map generation.
- Implemented LevelManager to handle level initialization and navigation.
- Created TurnManager for managing turn order in a turn-based system.
- Added Player and Enemy character classes with movement and turn-taking capabilities.
- Established pathfinding using AStar2D in PathfindingHandler.
- Integrated new scenes for player and enemy characters, along with world setup.
- Included a new tileset for futuristic Zelda-themed assets.
This commit is contained in:
2026-03-16 16:24:32 +11:00
parent f5e33fb8ea
commit bb1c9f9284
39 changed files with 2341 additions and 0 deletions
+53
View File
@@ -0,0 +1,53 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project
**Shadow Pixel Run** — a 2D pixel art game built with Godot 4.6 (Forward Plus renderer).
## Running the Game
```bash
# Launch the game
/home/stefwill/Applications/Godot/Godot_v4.6-stable_linux.x86_64 --path .
# Run headless (e.g. for script testing)
/home/stefwill/Applications/Godot/Godot_v4.6-stable_linux.x86_64 --path . --headless
```
There is no build step — Godot runs the project directly from source.
## Architecture
### Scene Structure
- **Main scene:** `scenes/world.tscn` — a `Node2D` containing two `TileMapLayer` nodes (`FloorLayer`, `WallLayer`) and a `Player` node.
- **Player:** `CharacterBody2D` at `scenes/world.tscn > Player`, driven by `scripts/actors/player.gd`.
### Scripts
All scripts live under `scripts/` organized by category:
- `scripts/actors/` — character scripts (`player.gd` defines `class_name Player extends CharacterBody2D`)
### Assets
All assets live under `assets/sprites/`. Godot auto-generates `.import` files alongside source assets — these are gitignored and should not be manually edited.
### Tilemaps
The world uses two `TileMapLayer` nodes with 32×32 tile atlases:
- `FloorLayer``office_floor.png`, simple single-tile floor atlas
- `WallLayer``office_walls.png`, terrain tileset with corner/edge peering bits for seamless auto-connected walls
### Input Map
Defined in `project.godot`:
- `move_left` → A / Left Arrow
- `move_right` → D / Right Arrow
- `move_up` → W / Up Arrow
- `move_down` → S / Down Arrow
### Viewport
640×360 with 4× window scale — targets a retro pixel art look. Default texture filter is **Linear** (set per-sprite if pixelated filtering is needed).