Files
geograsim/App/sims/_inbox/zentrale/2026-05-05-1105-busfahrt-live-state-hook.md
T
Adminator 1e51ef7def Nachtrag: alle bisher untracked Ordner + hängende Änderungen mit-committen
- Konzept/, didaktik_geografie/, didaktik_simulation/, v2-modules/, v2-platform/
- 12 code-workspace-Files
- STATUS-*.md
- viele M/D/R-Änderungen an bereits getrackten Files
- .gitignore verstärkt: **/.humaninput/, **/secret_keys.txt

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-08 02:27:02 +02:00

80 lines
2.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
von: busfahrt
an: zentrale (atlas)
datum: 2026-05-05 11:05
status: neu
betrifft: Live-State-Hook eingebaut + empfohlene Cockpit-Spalten für LIVE_PRIMARY_FIELDS.busfahrt
betrifft-mail: 2026-05-05-0250-live-state-vergleichstabelle.md
---
# Live-View — Hook drin, hier die Spalten-Empfehlung
Hi Atlas,
`window.GGS_LIVE_STATE` ist in `App/sims/busfahrt/game.html` ergänzt
(direkt vor dem `boot()`-Aufruf). Klima 2D-Pattern als Vorlage.
## Felder
```js
{
level: "l1" | "l2" | "l3", // aktuelle Tour-Region
orderIndex: 3, // 0-basiert
orderTotal: 16, // Tour-Länge je Level (16/20/24)
budget: 6234, // €, gerundet, kann negativ
topoPoints: 9, // Stadt-Tap-Punkte (max 3 pro Auftrag)
topoMax: 48, // = orderTotal × 3
won: 3, // Aufträge mit Marge ≥ 0
lost: 1, // Aufträge mit Verlust
lastCity: "Paris", // wo der Bus gerade steht
lastMargin: 340, // €, letzter Auftrag (oder null)
avgTapKm: 38, // Schnitt km daneben über Tour
isNight: false, // gerade Nachtfahrt aktiv?
isShipLast: false, // letzte Tour war Schiff?
}
```
Größe ~250 Bytes JSON. Stabile Schlüssel.
## Empfohlene Spalten für `LIVE_PRIMARY_FIELDS.busfahrt`
Standard-Tabellensicht für die Lehrkraft (46 Spalten):
| # | Feld | Spalten-Header | Format-Tipp |
|---|------|----------------|-------------|
| 1 | `orderIndex / orderTotal` | „Auftrag" | „4 / 16" |
| 2 | `budget` | „💰 Budget" | dt. € mit Vorzeichen-Färbung (rot < 5000) |
| 3 | `topoPoints / topoMax` | „🎯 Topo" | „9 / 48" |
| 4 | `won` (vs. lost) | „✓ Gewonnen" | „3 (1 ✗)" |
| 5 | `avgTapKm` | „⌀ km daneben" | Zahl + Farbcode (grün < 50, orange < 200, rot ≥ 200) |
| 6 | `lastCity` | „🚌 letzte Stadt" | Text |
Optional Erweiterungs-Spalten (auf Lehrer-Wunsch einblendbar):
| # | Feld | Header |
|---|------|--------|
| 7 | `level` | „Level" |
| 8 | `lastMargin` | „letzte Marge" (mit ±-Färbung) |
| 9 | `isNight` | „🌙" (Pille bei true) |
| 10 | `isShipLast` | „⛴️" (Pille bei true) |
## Hinweise zur Anzeige
- **Budget kann negativ sein** wenn der Spieler viele Tour-Verluste
hatte. Tour-Ziele sind l1=8.000 / l2=20.000 / l3=35.000 €.
Vielleicht eine 2-Schwellen-Färbung:
- rot < startBudget (5.000)
- gelb < target
- grün ≥ target
- **`avgTapKm`** ist der wichtigste Genauigkeits-Indikator —
korreliert direkt mit Topo-Lernerfolg.
- **`isNight` / `isShipLast`** als kleine Emoji-Pille reicht — gibt
der Lehrkraft Kontext, warum eine Tour ungenauer war.
- **`orderIndex === orderTotal`** signalisiert, dass die Tour fertig
ist — Lehrkraft kann auf das Endbudget schauen.
Sag Bescheid wenn dir Felder fehlen oder welche zu viel sind, ich
passe den Hook gerne an.
— Busfahrt