4.0 KiB
4.0 KiB
Draugnorak Project Guidelines
Asset Usage
CRITICAL: The bloodshed/ directory is for reference only. DO NOT use any assets from the bloodshed directory in this game. It exists solely to help with coding examples and understanding patterns, but none of its files should be included or referenced in the actual game code.
Project Structure
src/- Game source code modulesconstants.nvgt- Game configuration and constantsplayer.nvgt- Player state and variablesworld_state.nvgt- World objects (snares, fires, firepits, herb gardens)inventory.nvgt- Inventory, crafting, equipment menusenvironment.nvgt- Trees and environmental interactionscombat.nvgt- Combat systemtime_system.nvgt- In-game time trackingaudio_utils.nvgt- Audio helper functionsnotify.nvgt- Notification system
sounds/- Game audio assetsdraugnorak.nvgt- Main game file
Game Mechanics
Inventory Limits
- All item stacks are capped at 9 until backpacks are implemented
Map Layout
- Base area: x 0-4 (wood terrain)
- Grass area: x 5-19 (grass terrain, contains trees)
- Gravel area: x 20-34 (gravel terrain, contains stones)
Healing System
- Base area provides passive healing when player health < max
- Without herb garden: 1 HP every 2.5 minutes (150000ms)
- With herb garden: 1 HP every 30 seconds (30000ms)
- Herb garden can only be built in base area (x <= 4)
- Only one herb garden allowed per base
Fire System
- Fires require a firepit to build
- New fires start with 12 minutes (720000ms) of fuel
- Warning at 30 seconds remaining
- Fire goes out when fuel depletes
- Fire sound plays within 2 tiles distance
- Jumping over fire prevents damage
Snare System
- Snares become active when player moves away
- Check every minute for catching/escaping rabbits
- Catch chance starts at 5%, increases by 5% per minute (max 75%)
- Escape chance starts at 5%, increases by 5% per minute (max 95%)
- Snare sound plays within 2 tiles distance
Tree System
- Trees regenerate after 4 minutes (240000ms) when depleted or chopped
- Tree ambient sound plays within 3 tiles distance
- Trees only play sound when not chopped
- Climb down only when in a tree (Down arrow does nothing during jumps or when not in a tree)
Notification System
- Important events use
notify()function (plays sounds/notify.ogg + speaks message) - Last 10 notifications stored in history
- Navigation keys:
\- Repeat most recent notification]- Next (newer) notification[(Shift+Comma) - Previous (older) notification
- Navigating history speaks message without notification sound
Search System
- Hold Shift for 1 second to search
- Search completes after 1-second delay
Undead System
- At night, zombies spawn (5 max) and wander outside the base
- Zombies cannot enter the base while barricade health > 0
- Zombies attack the barricade for 4-6 damage when they reach it; play
sounds/enemies/zombie_hit.ogg - Zombies vanish at daybreak
- Player can hit zombies with spear (1-tile range) or sling (5-tile range)
Barricade System
- Base starts with 100 barricade health, capped at 500
- In base, press B to report barricade health
- Crafting menu includes Barricade category for reinforcement
- Reinforcement costs and health: 3 sticks (+10), 5 vines (+15), 1 log (+30), 5 stones (+20)
- Barricade health does not reset during gameplay
Menu Structure
Crafting Menu (C key, base only)
Organized into three categories:
- Weapons: Spear
- Tools: Stone Knife, Snare, Stone Axe
- Buildings: Firepit, Fire, Herb Garden
Equipment Menu (E key)
- Only shows items player actually has
- Shows equipped status
- Says "Nothing to equip" if inventory is empty
Testing
- Always use
./nvgt -c draugnorak.nvgtto compile without opening the game window - This prevents the window from taking over the terminal during testing
Code Standards
- Use
notify()for important game events that should be reviewable - Use
screen_reader_speak()for immediate feedback that doesn't need to be stored