171 lines
5.1 KiB
Markdown
171 lines
5.1 KiB
Markdown
# Game Generation Guide for AI
|
|
|
|
This guide helps Haiku (Claude AI) select appropriate assets when generating games.
|
|
|
|
## Decision Tree
|
|
|
|
### Step 1: Identify Game Style
|
|
|
|
Based on user's prompt, classify into one of 11 styles:
|
|
|
|
| Keywords | Game Style |
|
|
|----------|------------|
|
|
| shoot, space, action, fast, arcade | action-arcade |
|
|
| puzzle, match, brain, logic | puzzle |
|
|
| story, adventure, narrative, choice | story-adventure |
|
|
| race, car, speed, run | racing |
|
|
| pet, animal, care, farm | pet-simulator |
|
|
| quiz, trivia, question, knowledge | trivia-quiz |
|
|
| music, rhythm, dance, beat | music-rhythm |
|
|
| draw, create, art, design | creative-drawing |
|
|
| rpg, battle, quest, dungeon | rpg-battle |
|
|
| sports, ball, soccer, basketball | sports |
|
|
| physics, pinball, bounce, gravity | physics-pinball |
|
|
|
|
### Step 2: Detect Theme
|
|
|
|
| Theme Keywords | Background Theme |
|
|
|----------------|-----------------|
|
|
| space, alien, star, galaxy | space |
|
|
| forest, nature, tree, outdoor | nature |
|
|
| city, street, building, urban | urban |
|
|
| magic, wizard, dragon, castle | fantasy |
|
|
| ghost, haunted, scary, dark | spooky |
|
|
| ocean, fish, underwater, sea | underwater |
|
|
| retro, pixel, arcade, classic | retro |
|
|
| sports, stadium, field, court | sports |
|
|
| sky, flying, clouds, air | sky |
|
|
| rainbow, colorful, bright, party | colorful |
|
|
| robot, machine, factory, tech | mechanical |
|
|
| home, room, kitchen, office | indoor |
|
|
| rain, snow, storm, weather | weather |
|
|
| spring, summer, autumn, winter | seasonal |
|
|
| abstract, minimal, pattern | abstract |
|
|
|
|
### Step 3: Detect Mood
|
|
|
|
| Mood Keywords | Music Mood |
|
|
|---------------|------------|
|
|
| epic, battle, intense, boss | Epic |
|
|
| calm, relax, peaceful, zen | Chill |
|
|
| fast, action, rush, chase | Intense |
|
|
| fun, happy, cute, silly | Playful |
|
|
| mystery, scary, dark, creepy | Mysterious |
|
|
| hero, adventure, brave | Heroic |
|
|
| weird, unique, strange | Quirky |
|
|
| background, ambient, subtle | Ambient |
|
|
|
|
### Step 4: Determine Avatar Mode
|
|
|
|
| Game Mechanic | Avatar Mode | Context |
|
|
|---------------|-------------|---------|
|
|
| Cockpit/driving view | HEAD_ONLY | spaceship-cockpit, tank, mech-suit |
|
|
| Driving with body visible | HEAD_AND_SHOULDERS | race-car, airplane, submarine |
|
|
| Upper body action | UPPER_BODY | hoverboard, jetpack |
|
|
| Full character movement | FULL_BODY | platformer-standard, costumes |
|
|
|
|
### Step 5: Select Context
|
|
|
|
| Game Type | Recommended Context |
|
|
|-----------|---------------------|
|
|
| Space shooter | spaceship-cockpit |
|
|
| Racing game | race-car, motorcycle |
|
|
| Flappy clone | flappy-style |
|
|
| Tank game | tank |
|
|
| Maze game (pacman) | pacman-style |
|
|
| Hoverboard/skateboard | hoverboard |
|
|
| Jetpack game | jetpack |
|
|
| Mech combat | mech-suit |
|
|
| Underwater | submarine |
|
|
| Dragon game | dragon-rider |
|
|
| Platformer | platformer-standard |
|
|
| RPG/Adventure | knight-armor, wizard-robes, ninja-outfit |
|
|
| Sports | athlete-uniform, sports-player |
|
|
| Cooking | chef-outfit |
|
|
| Science | scientist-labcoat |
|
|
|
|
## Best Practices
|
|
|
|
### 1. Use Presets for Variety
|
|
```javascript
|
|
// DON'T: Always use the same combination
|
|
background: { theme: 'space', variant: 'nebula' }
|
|
|
|
// DO: Use different presets or variations
|
|
const preset = AssetPresets.getRandom('action-arcade');
|
|
```
|
|
|
|
### 2. Match Mood and Theme
|
|
```javascript
|
|
// GOOD: Epic music + Space background
|
|
{ music: { mood: 'Epic' }, background: { theme: 'space' } }
|
|
|
|
// BAD: Chill music + Intense action background
|
|
{ music: { mood: 'Chill' }, background: { theme: 'mechanical' } }
|
|
```
|
|
|
|
### 3. Match Context to Gameplay
|
|
```javascript
|
|
// GOOD: Flying game → HEAD_ONLY + flappy-style
|
|
// GOOD: Platformer → FULL_BODY + platformer-standard
|
|
// BAD: Racing game → FULL_BODY (should be HEAD_AND_SHOULDERS)
|
|
```
|
|
|
|
### 4. Validate Combinations
|
|
```javascript
|
|
const score = AssetCompatibility.validate(config).score;
|
|
// Aim for score > 70
|
|
```
|
|
|
|
## Example Selections
|
|
|
|
### "space shooter with aliens"
|
|
```javascript
|
|
{
|
|
music: { mood: 'Epic', energy: 8 },
|
|
background: { theme: 'space', variant: 'nebula' },
|
|
avatarContext: { mode: 'HEAD_ONLY', context: 'spaceship-cockpit' }
|
|
}
|
|
```
|
|
|
|
### "relaxing puzzle game with nature"
|
|
```javascript
|
|
{
|
|
music: { mood: 'Chill', energy: 3 },
|
|
background: { theme: 'nature', variant: 'meadow' },
|
|
avatarContext: { mode: 'FULL_BODY', context: 'platformer-standard' }
|
|
}
|
|
```
|
|
|
|
### "medieval RPG with dragon battles"
|
|
```javascript
|
|
{
|
|
music: { mood: 'Epic', energy: 9 },
|
|
background: { theme: 'fantasy', variant: 'castle' },
|
|
avatarContext: { mode: 'FULL_BODY', context: 'knight-armor' }
|
|
}
|
|
```
|
|
|
|
### "scary haunted house escape"
|
|
```javascript
|
|
{
|
|
music: { mood: 'Mysterious', energy: 5 },
|
|
background: { theme: 'spooky', variant: 'hauntedHouse' },
|
|
avatarContext: { mode: 'FULL_BODY', context: 'adventure-hero' }
|
|
}
|
|
```
|
|
|
|
## Tracking Variety
|
|
|
|
To ensure games don't all look the same:
|
|
|
|
1. Rotate through presets (don't always pick index 0)
|
|
2. Use different background variants within same theme
|
|
3. Mix costumes even for similar game types
|
|
4. Vary music energy levels
|
|
|
|
## Template Selection
|
|
|
|
- Use `gameTemplateAssets.html` when avatar matters
|
|
- Use `gameTemplateSimple.html` for abstract/puzzle games without avatars
|