v0.5: Blue sky gradient, acid rework, iron, phase transitions, shadows (experimental)

- Blue sky gradient background (y<600 blue, 600-700 gradient, y>700 dark)
- Acid system: health-based damage via acid_resist, not instant delete
- New material: Iron (ID 16) - acid-proof, heat-conductive, reflective
- Phase transitions: Iron→Lava (150°C), Sand→Glass (200°C), Glass→Lava (160°C)
- Stone no longer melts (lava containment)
- Heat transfer formula improved (divisor 255→200)
- Iron metallic texture with bright highlights + light reflection
- Shadow system attempted (grid-based, per-pixel) - reverted, needs rethink
- Updated AGENTS.md for next session
This commit is contained in:
2026-07-10 14:35:35 +02:00
parent 26d5733e1e
commit a2700df292
6 changed files with 54 additions and 14 deletions
+14 -3
View File
@@ -54,7 +54,7 @@ Grid ist SoA (Structure of Arrays):
## Material-System
16 Materialien (0=Luft, 1=Stein, 2=Erde, 3=Sand, 4=Wasser, 5=Holz, 6=Lava,
7=Player, 8=Dampf, 9=Feuer, 10=Glas, 11=Eis, 12=Öl, 13=Säure, 14=Funken, 15=Rauch).
7=Player, 8=Dampf, 9=Feuer, 10=Glas, 11=Eis, 12=Öl, 13=Säure, 14=Funken, 15=Rauch, 16=Eisen).
Properties pro Material: `MaterialProps` in `engine/src/material.rs`:
- `color`, `density`, Bewegung-Typ (`is_powder/is_liquid/is_gas/is_solid/is_static`)
@@ -73,13 +73,20 @@ Properties pro Material: `MaterialProps` in `engine/src/material.rs`:
- Lava (6) → Stein (1) bei temp ≤ 5°C
- Holz (5) → Feuer (9) bei temp ≥ 240°C
- Öl (12) → Feuer (9) bei temp ≥ 120°C
- Sand (3) → Glas (10) bei temp ≥ 200°C
- Glas (10) → Lava (6) bei temp ≥ 160°C
- Eisen (16) → Lava (6) bei temp ≥ 150°C
- Stein schmilzt nicht (hält Lava auf)
**Reaktionen** (`physics::react`):
- Wasser + Lava → Dampf + Stein
- Wasser + Feuer → Dampf + Luft (löscht Feuer)
- Lava + Holz/Öl → entzündet Holz/Öl sofort zu Feuer
- Säure + Holz/Sand → zerstört Holz/Sand
- Säure + Stein/Erde → zerstört Stein/Erde (langsamer)
- Säure greift ALLE Materialien via `acid_resist` an (Health-basiert, nicht Instant-Delete):
- resist < 100 (Holz 50, Erde 70): ~2s/Zelle
- resist 100200 (Sand 150, Stein 180): ~4s/Zelle
- resist ≥ 200 (Eis, Öl): ~13s/Zelle
- resist = 255 (Eisen, Glas, Wasser, Lava): immun
**Feuer-System**:
- Braucht Brennstoff (Holz, Öl) um zu überleben — prüft direkt unter sich + Moore-Nachbarn
@@ -165,6 +172,10 @@ Jedes Material bekommt deterministische Pixel-Variation basierend auf Grid-Koord
**Beleuchtungs-Formel** (Material-Pixel): Additiv: `r = min(255, r × 150/256 + light)` — Ambient-Basis 59% + Licht obendrauf.
**Hintergrund-Gradient**: Blauer Himmel (`[80,140,220]`) von y=0600, fließender Übergang zu dunkel (`[20,20,30]`) bei y=600700. Untergrund ab y=700 dunkel.
**Schatten**: Experimentell versucht (Platform-Schatten, Sonnen-Raycasting), aktuell ausgebaut. Neu-Ansatz für nächste Session.
### UI
- **Material-Palette**: Leiste am unteren Bildschirmrand, Farb-Swatch + Name + Taste
- **FPS-Anzeige**: Oben rechts, grün, alle 500ms aktualisiert