Development Notes & TODOs
Immediate Tasks
Core Gameplay (Priority 1)
0 of 1 tasks completed
- Implement HuntingEvent logic
- Roll for success based on tribe member stats
- Can result in: food found, injuries, deaths
- Generate narrative description
0 of 1 tasks completed
- Implement ExplorationEvent logic
- Discover items
- Meet NPCs
- Find new areas
0 of 1 tasks completed
- Implement FarmingEvent logic
- Produce food
- Can fail causing injuries
- Seasonal variation
Month Progression (Priority 2)
0 of 1 tasks completed
- Implement seasonal events
- Spring: breeding season, new births
- Summer: abundance, good hunting
- Autumn: preparation, gathering
- Winter: hardship, cold injuries
0 of 1 tasks completed
- Implement birth system
- Parents pass stats to offspring
- Genetic inheritance up to 3 levels
- New age tiers for babies
Story Generation (Priority 3)
0 of 4 tasks completed
- Narrative templates for events
- Dynamic story building based on outcomes
- Age progression narratives
- Death narratives
Medium Priority
Sprite System
0 of 4 tasks completed
- Implement transformSprite() method
- Create sprite modification pipeline
- Per-kobold sprite storage
- Damage/scar visualization
NPC System
0 of 4 tasks completed
- Implement NPC interactions
- Trade system
- Diplomacy (rival vs friendly)
- NPC tribes can affect game
Item System
0 of 4 tasks completed
- More item types
- Item durability
- Crafting system (use Crafting stat)
- Inheritance of items between generations
Lower Priority (Nice-to-Have)
UI Enhancements
0 of 5 tasks completed
- Sprite rendering in HTML5 Canvas/WebGL
- Better visual feedback
- Sound effects
- Drag-and-drop for items
- Detailed stat viewer
Gameplay Balance
0 of 4 tasks completed
- Tune event success rates
- Balance injury frequency
- Adjust birth rates
- Fine-tune seasonal modifiers
Administration
0 of 4 tasks completed
- Admin panel for content
- Event editor
- Item templates
- Balance tweaking tools
Code Quality
Testing
0 of 4 tasks completed
- Unit tests for stat system
- Integration tests for events
- Database transaction tests
- Frontend interaction tests
Documentation
0 of 4 tasks completed
- API documentation (OpenAPI/Swagger)
- Event creation guide
- Extension guide
- Database schema documentation
Performance
0 of 4 tasks completed
- Database query optimization
- Frontend state management
- Lazy loading for large tribes
- Caching strategy
Known Limitations
1. Sprite System Not Implemented
- Placeholder sprite handling in place
- transformSprite() is empty
- No pixel-level modifications yet
2. Event Logic Incomplete
- Event framework ready
- Individual event logic needs implementation
- Story generation is basic
3. Frontend State
- Currently loads from server each time
- Could optimize with local caching
- No auto-save yet
4. NPC System
- Stored but not actively used
- No NPC interactions yet
Architecture Improvements Possible
1. Event Outcomes
- Create outcome system for events
- Define possible outcomes
- Weight-based selection
2. Stat Modifiers
- Item system uses flat modifiers
- Could add percentages/multipliers
- Equipment slots for optimization
3. Genetic Algorithm
- Could improve inheritance system
- Stat averaging from parents
- Mutation rates
4. Seasonal Modifiers
- Events have seasonal variants
- Different injury types per season
- Seasonal stat bonuses/penalties
Future Expansion Ideas
1. Achievements/Progression
- Unlock new events
- Cosmetic rewards
- Stats tracking
2. Difficulty Settings
- Hardcore mode (permadeath)
- Easy mode (reduced injuries)
- Sandbox mode (no aging)
3. Multiplayer
- Trading between players
- Rival tribes (PvP events)
- Shared events/server events
4. Mod Support
- Custom event loading
- Custom injury types
- Custom items
5. Mobile Version
- Responsive UI done
- Simplified controls
- Mobile-optimized
Testing Commands
// In PHP console to test database initialization
php -r "require 'vendor/autoload.php'; \TribeGen\Database\Database::getInstance()->initializeTables(); echo 'OK';"
// Generate test tribe
php -r "
require 'vendor/autoload.php';
use TribeGen\Classes\User;
use TribeGen\Classes\Tribe;
use TribeGen\Classes\Kobold;
// Create user
\$user = User::register('test@example.com', 'password123');
// Create tribe
\$tribe = Tribe::create(\$user->getId(), 'Test Tribe');
// Generate kobolds
for (\$i = 0; \$i < 20; \$i++) {
\$k = Kobold::generate(\$tribe->getSaveId());
\$k->save();
}
echo 'Test tribe created with ID: ' . \$tribe->getSaveId();
"
File Size Reference
Approximate file sizes for optimization:
public/js/app.js: ~12KB (minified: ~4KB)public/css/style.css: ~8KB (minified: ~5KB)- Database per save: ~50KB average
- Sprites per morph: ~200KB (PNG files)
Version History
- v0.1.0 - Initial project setup
- Project structure created
- Database schema designed
- Core classes implemented
- Frontend scaffolding complete
- Event system framework ready
Source
| 1 | # Development Notes & TODOs |
| 2 | |
| 3 | ## Immediate Tasks |
| 4 | |
| 5 | ### Core Gameplay (Priority 1) |
| 6 | - [ ] Implement HuntingEvent logic |
| 7 | - Roll for success based on tribe member stats |
| 8 | - Can result in: food found, injuries, deaths |
| 9 | - Generate narrative description |
| 10 | |
| 11 | - [ ] Implement ExplorationEvent logic |
| 12 | - Discover items |
| 13 | - Meet NPCs |
| 14 | - Find new areas |
| 15 | |
| 16 | - [ ] Implement FarmingEvent logic |
| 17 | - Produce food |
| 18 | - Can fail causing injuries |
| 19 | - Seasonal variation |
| 20 | |
| 21 | ### Month Progression (Priority 2) |
| 22 | - [ ] Implement seasonal events |
| 23 | - Spring: breeding season, new births |
| 24 | - Summer: abundance, good hunting |
| 25 | - Autumn: preparation, gathering |
| 26 | - Winter: hardship, cold injuries |
| 27 | |
| 28 | - [ ] Implement birth system |
| 29 | - Parents pass stats to offspring |
| 30 | - Genetic inheritance up to 3 levels |
| 31 | - New age tiers for babies |
| 32 | |
| 33 | ### Story Generation (Priority 3) |
| 34 | - [ ] Narrative templates for events |
| 35 | - [ ] Dynamic story building based on outcomes |
| 36 | - [ ] Age progression narratives |
| 37 | - [ ] Death narratives |
| 38 | |
| 39 | ## Medium Priority |
| 40 | |
| 41 | ### Sprite System |
| 42 | - [ ] Implement transformSprite() method |
| 43 | - [ ] Create sprite modification pipeline |
| 44 | - [ ] Per-kobold sprite storage |
| 45 | - [ ] Damage/scar visualization |
| 46 | |
| 47 | ### NPC System |
| 48 | - [ ] Implement NPC interactions |
| 49 | - [ ] Trade system |
| 50 | - [ ] Diplomacy (rival vs friendly) |
| 51 | - [ ] NPC tribes can affect game |
| 52 | |
| 53 | ### Item System |
| 54 | - [ ] More item types |
| 55 | - [ ] Item durability |
| 56 | - [ ] Crafting system (use Crafting stat) |
| 57 | - [ ] Inheritance of items between generations |
| 58 | |
| 59 | ## Lower Priority (Nice-to-Have) |
| 60 | |
| 61 | ### UI Enhancements |
| 62 | - [ ] Sprite rendering in HTML5 Canvas/WebGL |
| 63 | - [ ] Better visual feedback |
| 64 | - [ ] Sound effects |
| 65 | - [ ] Drag-and-drop for items |
| 66 | - [ ] Detailed stat viewer |
| 67 | |
| 68 | ### Gameplay Balance |
| 69 | - [ ] Tune event success rates |
| 70 | - [ ] Balance injury frequency |
| 71 | - [ ] Adjust birth rates |
| 72 | - [ ] Fine-tune seasonal modifiers |
| 73 | |
| 74 | ### Administration |
| 75 | - [ ] Admin panel for content |
| 76 | - [ ] Event editor |
| 77 | - [ ] Item templates |
| 78 | - [ ] Balance tweaking tools |
| 79 | |
| 80 | ## Code Quality |
| 81 | |
| 82 | ### Testing |
| 83 | - [ ] Unit tests for stat system |
| 84 | - [ ] Integration tests for events |
| 85 | - [ ] Database transaction tests |
| 86 | - [ ] Frontend interaction tests |
| 87 | |
| 88 | ### Documentation |
| 89 | - [ ] API documentation (OpenAPI/Swagger) |
| 90 | - [ ] Event creation guide |
| 91 | - [ ] Extension guide |
| 92 | - [ ] Database schema documentation |
| 93 | |
| 94 | ### Performance |
| 95 | - [ ] Database query optimization |
| 96 | - [ ] Frontend state management |
| 97 | - [ ] Lazy loading for large tribes |
| 98 | - [ ] Caching strategy |
| 99 | |
| 100 | ## Known Limitations |
| 101 | |
| 102 | 1. **Sprite System Not Implemented** |
| 103 | - Placeholder sprite handling in place |
| 104 | - transformSprite() is empty |
| 105 | - No pixel-level modifications yet |
| 106 | |
| 107 | 2. **Event Logic Incomplete** |
| 108 | - Event framework ready |
| 109 | - Individual event logic needs implementation |
| 110 | - Story generation is basic |
| 111 | |
| 112 | 3. **Frontend State** |
| 113 | - Currently loads from server each time |
| 114 | - Could optimize with local caching |
| 115 | - No auto-save yet |
| 116 | |
| 117 | 4. **NPC System** |
| 118 | - Stored but not actively used |
| 119 | - No NPC interactions yet |
| 120 | |
| 121 | ## Architecture Improvements Possible |
| 122 | |
| 123 | 1. **Event Outcomes** |
| 124 | - Create outcome system for events |
| 125 | - Define possible outcomes |
| 126 | - Weight-based selection |
| 127 | |
| 128 | 2. **Stat Modifiers** |
| 129 | - Item system uses flat modifiers |
| 130 | - Could add percentages/multipliers |
| 131 | - Equipment slots for optimization |
| 132 | |
| 133 | 3. **Genetic Algorithm** |
| 134 | - Could improve inheritance system |
| 135 | - Stat averaging from parents |
| 136 | - Mutation rates |
| 137 | |
| 138 | 4. **Seasonal Modifiers** |
| 139 | - Events have seasonal variants |
| 140 | - Different injury types per season |
| 141 | - Seasonal stat bonuses/penalties |
| 142 | |
| 143 | ## Future Expansion Ideas |
| 144 | |
| 145 | 1. **Achievements/Progression** |
| 146 | - Unlock new events |
| 147 | - Cosmetic rewards |
| 148 | - Stats tracking |
| 149 | |
| 150 | 2. **Difficulty Settings** |
| 151 | - Hardcore mode (permadeath) |
| 152 | - Easy mode (reduced injuries) |
| 153 | - Sandbox mode (no aging) |
| 154 | |
| 155 | 3. **Multiplayer** |
| 156 | - Trading between players |
| 157 | - Rival tribes (PvP events) |
| 158 | - Shared events/server events |
| 159 | |
| 160 | 4. **Mod Support** |
| 161 | - Custom event loading |
| 162 | - Custom injury types |
| 163 | - Custom items |
| 164 | |
| 165 | 5. **Mobile Version** |
| 166 | - Responsive UI done |
| 167 | - Simplified controls |
| 168 | - Mobile-optimized |
| 169 | |
| 170 | ## Testing Commands |
| 171 | |
| 172 | ```php |
| 173 | // In PHP console to test database initialization |
| 174 | php -r "require 'vendor/autoload.php'; \TribeGen\Database\Database::getInstance()->initializeTables(); echo 'OK';" |
| 175 | |
| 176 | // Generate test tribe |
| 177 | php -r " |
| 178 | require 'vendor/autoload.php'; |
| 179 | use TribeGen\Classes\User; |
| 180 | use TribeGen\Classes\Tribe; |
| 181 | use TribeGen\Classes\Kobold; |
| 182 | |
| 183 | // Create user |
| 184 | \$user = User::register('test@example.com', 'password123'); |
| 185 | |
| 186 | // Create tribe |
| 187 | \$tribe = Tribe::create(\$user->getId(), 'Test Tribe'); |
| 188 | |
| 189 | // Generate kobolds |
| 190 | for (\$i = 0; \$i < 20; \$i++) { |
| 191 | \$k = Kobold::generate(\$tribe->getSaveId()); |
| 192 | \$k->save(); |
| 193 | } |
| 194 | |
| 195 | echo 'Test tribe created with ID: ' . \$tribe->getSaveId(); |
| 196 | " |
| 197 | ``` |
| 198 | |
| 199 | ## File Size Reference |
| 200 | |
| 201 | Approximate file sizes for optimization: |
| 202 | - `public/js/app.js`: ~12KB (minified: ~4KB) |
| 203 | - `public/css/style.css`: ~8KB (minified: ~5KB) |
| 204 | - Database per save: ~50KB average |
| 205 | - Sprites per morph: ~200KB (PNG files) |
| 206 | |
| 207 | ## Version History |
| 208 | |
| 209 | - **v0.1.0** - Initial project setup |
| 210 | - Project structure created |
| 211 | - Database schema designed |
| 212 | - Core classes implemented |
| 213 | - Frontend scaffolding complete |
| 214 | - Event system framework ready |