# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Project Overview This is a Cocos Creator 3.8.7 2D game project focused on pathfinding mechanics. The game implements A* pathfinding with camera following behavior in a tile-based environment. ## Project Structure - `assets/scripts/` - Core game logic TypeScript files - `assets/scenes/` - Cocos Creator scene files (main.scene) - `assets/resources/` - Game assets including tile maps and animations - `settings/v2/packages/` - Cocos Creator engine and project configuration ## Key Components ### GameController (`assets/scripts/GameController.ts`) - Main game logic handling player movement, pathfinding, and camera control - Implements A* pathfinding algorithm for grid-based navigation - Manages touch input for player movement commands - Contains hardcoded map data (5x10 grid with obstacles) ### CameraFollow2D (`assets/scripts/CameraFollow2D.ts`) - Dedicated camera following component with smooth interpolation - Provides map boundary constraints to prevent camera from going outside map limits - Configurable offset and smoothing parameters ### Manager (`assets/scripts/Manager.ts`) - Currently minimal/empty - likely intended for game state management ## Engine Configuration - **Engine Version**: Cocos Creator 3.8.7 - **Design Resolution**: 720x1334 (mobile portrait) - **Enabled Modules**: 2D rendering, UI, animation, audio, physics-2d, tiled-map, spine-3.8, dragon-bones - **TypeScript**: Uses strict mode disabled for development flexibility ## Development Notes - The project uses a grid-based coordinate system with 32px grid size - Map data is currently hardcoded in GameController - consider externalizing for level design - Camera movement uses lerp interpolation with configurable smoothing - Pathfinding supports 4-directional movement (no diagonal)