Spaces:
Sleeping
Sleeping
| # Backdrop Creation Guide | |
| ## Screen Layout (256ร224 pixels) | |
| ``` | |
| โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| โ 0,0 256,0 โ | |
| โ โ | |
| โ SCORE: 0 โโโโโโโโโโโโโโโโโโโโ โ | |
| โ LEVEL: 1 โ โ NEXT: โ | |
| โ LINES: 0 โ PLAY AREA โ โโโโ โ | |
| โ โ 88,32 โ โ โ โ | |
| โ โ 80ร160 px โ โโโโ โ | |
| โ โ โ โ | |
| โ โ 10ร20 blocks โ โ | |
| โ โ (8ร8 each) โ โ | |
| โ โ โ โ | |
| โ โ โ โ | |
| โ โ โ โ | |
| โ โ โ โ | |
| โ โ โ โ | |
| โ โ โ โ | |
| โ โ โ โ | |
| โ โ โ โ | |
| โ โ โ โ | |
| โ โโโโโโโโโโโโโโโโโโโโ โ | |
| โ 168,192 โ | |
| โ โ | |
| โ 0,224 256,224โ | |
| โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
| ``` | |
| ## Play Area Specifications | |
| - **Top-left corner**: (88, 32) | |
| - **Bottom-right corner**: (168, 192) | |
| - **Width**: 80 pixels (10 blocks ร 8 pixels) | |
| - **Height**: 160 pixels (20 blocks ร 8 pixels) | |
| - **Block size**: 8ร8 pixels | |
| ## UI Element Positions | |
| ### Left Side (Score/Stats) | |
| - **Score**: X: 8, Y: 8 | |
| - **Level**: X: 8, Y: 24 | |
| - **Lines**: X: 8, Y: 40 | |
| ### Right Side (Next Piece) | |
| - **"NEXT:" label**: X: 184, Y: 40 | |
| - **Next piece preview**: X: 184, Y: 52 | |
| ## Design Tips | |
| 1. **Keep the play area visible**: The play area should be clearly distinguishable from the background | |
| 2. **Avoid busy patterns in play area**: Keep the area at (88, 32) to (168, 192) relatively clear | |
| 3. **Consider contrast**: Blocks will be colored based on your backdrop's dominant colors | |
| 4. **Safe zones**: | |
| - Left side (0-87): Can have artwork, but leave room for score text | |
| - Right side (169-256): Can have artwork, but leave room for next piece | |
| - Top (0-31): Can have artwork/title | |
| - Bottom (193-224): Can have artwork/footer | |
| ## Color Palette Extraction | |
| The game extracts 7 dominant colors from your backdrop to color the Tetris pieces: | |
| - **Color 0**: I-piece (4-block line) | |
| - **Color 1**: O-piece (square) | |
| - **Color 2**: T-piece | |
| - **Color 3**: S-piece | |
| - **Color 4**: Z-piece | |
| - **Color 5**: J-piece | |
| - **Color 6**: L-piece | |
| **Tips for color extraction:** | |
| - Use vibrant, distinct colors in your backdrop | |
| - Avoid too many similar shades | |
| - The algorithm skips very dark colors (brightness < 40) | |
| - Colors are quantized and sorted by frequency | |
| ## Template Image | |
| **Quick Start:** Run `npm run generate-template` to create `BACKDROP-TEMPLATE.png` | |
| This template shows: | |
| - **Bright magenta (#FF00FF) play area** - Easy to see and select | |
| - **Grid lines** showing 8ร8 pixel blocks | |
| - **Dimension arrows** with measurements | |
| - **Corner markers** in red | |
| - **Labels** for all areas | |
| ### Using the Template | |
| 1. Run `npm run generate-template` | |
| 2. Open `BACKDROP-TEMPLATE.png` in your image editor (Photoshop, GIMP, etc.) | |
| 3. Create new layers BELOW the template layer | |
| 4. Design your artwork on these layers | |
| 5. The magenta area shows exactly where the play area will be | |
| 6. When finished, delete or hide the template layer | |
| 7. Export as 256ร224 PNG | |
| 8. Save to `public/assets/backdrops/level-X/backdrop.png` | |
| ## Example Workflow | |
| 1. Generate and open the template: `npm run generate-template` | |
| 2. In your image editor, create layers below the template | |
| 3. Design your artwork around the magenta play area | |
| 4. Make sure the play area has good contrast | |
| 5. Include 7 distinct colors you want for the blocks | |
| 6. Delete the template layer | |
| 7. Export as PNG (256ร224) | |
| 8. Place in `public/assets/backdrops/level-X/backdrop.png` | |
| 9. Test in game to see the extracted colors | |
| ## Placeholder Backdrops | |
| The generated placeholder backdrops show: | |
| - **Yellow border**: Exact play area boundary | |
| - **Yellow corner markers**: Play area corners | |
| - **Grid lines**: 8ร8 pixel block grid | |
| - **Labels**: Coordinates and dimensions | |
| - **Level indicator**: "L1", "L2", etc. | |
| Use these as templates to understand the layout before creating your final artwork! | |
| ## Resolution Reference | |
| - **Total screen**: 256ร224 pixels (classic retro resolution) | |
| - **Play area**: 80ร160 pixels | |
| - **Block size**: 8ร8 pixels | |
| - **Grid**: 10 blocks wide ร 20 blocks tall | |
| - **Aspect ratio**: Approximately 8:7 (slightly wider than square) | |