This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a 3D survival game built in Godot 4.4 following a course by Eerik Hirvonen. The game features resource gathering, crafting, construction, and survival mechanics on an island setting.
Since this is a Godot project, development is primarily done through the Godot editor rather than command line tools. The project uses:
- Engine: Godot 4.4 (Forward Plus rendering)
- Main Scene:
res://game/main_game.tscn - Project Config:
project.godotcontains input maps and layer configurations
The game uses a centralized event system (game/event_system.gd) that acts as a global autoload. All major game systems communicate through signals with specific prefixes:
BUL_*- Bulletin/UI systemINV_*- Inventory systemPLA_*- Player actions and statsEQU_*- Equipment systemSFX_*- Sound effectsMUS_*- Music systemSTA_*- Stage/scene management
Player System (actors/player/)
Playerclass handles movement, input, and basic interactions- Uses
InteractionRayCastfor object interaction ItemHoldermanages equipped items
Inventory System (game/managers/inventory_manager.gd)
- Fixed-size inventory (28 slots) and hotbar (9 slots)
- Uses
ItemConfig.Keysenum for item identification - Supports drag-and-drop between inventory and hotbar
Item System (game/configs/item_config.gd)
- Central configuration for all items using enum-based keys
- Separates pickuppable, equippable, craftable, and constructable items
- Maps item keys to their respective resource files and scenes
Crafting System (resources/crafting_blueprints/)
- Blueprint-based crafting with cost requirements
- Some items require tools (multitool, tinderbox)
- Managed through dedicated UI systems
Interactable System (interactables/)
- Base
Interactableclass for all interactive objects - Includes pickuppables, hittable objects, and constructables
- Uses Area3D for interaction detection
Game uses multiple manager classes in game/managers/:
InventoryManager- Item storage and manipulationEquippedItemManager- Currently held itemsPlayerStatsManager- Health, energy trackingBulletinController- UI state managementSFXController- Audio managementStageController- Scene transitions
The game uses a "bulletin" system for UI management:
BulletinControllercreates/destroys UI panels- Player menus inherit from
PlayerMenuBase - Includes crafting, cooking, settings, and pause menus
Defined in project.godot:
- ground
- actor
- interactable
- hitbox
- big_rigid_pickuppable
- small_rigid_pickuppable
- static_body
- water
Proton Scatter (addons/proton_scatter/)
- Used for procedural placement of foliage and environmental objects
- Provides modifier-based scattering system
- Includes various creation and transformation modifiers
- All items are defined in
ItemConfig.Keysenum and mapped to resources - Scene files use
.tscnextension, scripts use.gd - Audio files are in
audio/with separate music and SFX folders - 3D models and textures are in
meshes/andtextures/ - The game uses a day/night cycle system
- Player stats include energy consumption for movement
- Construction system allows building tents, campfires, and rafts