Spaces:
Sleeping
Sleeping
File size: 5,576 Bytes
e5f2822 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | # 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)
|