|
|
||
|---|---|---|
| .. | ||
| README.md | ||
📦 Resources Directory - Isla Apocalypse
Overview
The /Resources directory acts as the game's central library for all static assets and Godot-specific data containers (primarily .tres files, 3D models, textures, and audio).
Core Philosophy: "The Reusable Building Blocks."
If the Server is the brain and the Client is the eyes, Resources are the memories. They define the properties of things in the world. If there are 50 zombies on screen, you don't want 50 copies of their texture and max health data in your RAM. Instead, all 50 zombies reference a single ZombieBase.tres resource.
🧩 Core Systems (Phase 2 & 3)
1. Voxel & Block Definitions
- Format: Custom
.tresfiles based on aBlockDataC# script (located in/Core). - Function: Defines the properties of every voxel in the game.
- Examples:
Dirt.tres(Texture: brown_dirt.png, Durability: 100, StepSound: dirt_crunch.ogg),Asphalt.tres(Texture: road.png, Durability: 500, StepSound: hard_step.ogg). Both the Client and Server read these to know how a block looks and behaves.
2. Item & Inventory Data
- Format: Custom
.tresfiles forItemData. - Function: Defines every item a player can hold, craft, or drop.
- Examples:
StoneAxe.tres(Icon: axe.png, Damage: 15, BlockDamage: 40, MaxStack: 1). The Server uses this to calculate damage; the Client uses this to draw the icon in your hotbar.
3. Audio & Visual Assets
- Materials & Shaders: The
.materialand.gdshaderfiles used by the Client's chunk mesher (e.g.,TerrainMaterial.tres). - 3D Models: The
.glbor.gltffiles for weapons, dropped items, and entities. - Audio Streams: The
.wavor.oggfiles for ambient wind, UI clicks, and zombie attacks.
4. UI Themes & Fonts
- Godot
Themeresources that dictate the colors, fonts, and border styles of the entire user interface, ensuring the inventory menus match the main menu.
🚀 Directory Organization Strategy
To prevent this folder from turning into a massive junk drawer, it must be strictly subdivided:
/Resources/Blocks//Resources/Items//Resources/Models//Resources/Audio//Resources/UI/
⚠️ Directory Rules & Best Practices
- Text Over Binary: Always save custom Godot resources as
.tres(Text Resource) rather than.res(Binary Resource). Text resources can be read by version control (Git), allowing you to see exactly when someone changed the damage of a Stone Axe from 15 to 20. - Stateless Data Only: A Resource should never track live game state. For example,
Pistol.tresholds the Max Ammo capacity (15), but it should NEVER hold the Current Ammo (7). Current ammo is a live state tracked by the Server. - Shared Access: Because Resources are just data, they are completely safe to be referenced by both the
/Serverand the/Client.