Some checks failed
Tests / Go Tests (push) Has been cancelled
Tests / Python Tests (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / Go Lint (push) Has been cancelled
Tests / Python Lint (push) Has been cancelled
Tests / Security Scan (push) Has been cancelled
Tests / All Checks Passed (push) Has been cancelled
Security Scanning / Secret Scanning (push) Has been cancelled
Security Scanning / Dependency Vulnerability Scan (push) Has been cancelled
Security Scanning / Go Security Scan (push) Has been cancelled
Security Scanning / Python Security Scan (push) Has been cancelled
Security Scanning / Node.js Security Scan (push) Has been cancelled
Security Scanning / Docker Image Security (push) Has been cancelled
Security Scanning / Security Summary (push) Has been cancelled
CI/CD Pipeline / Go Tests (push) Has been cancelled
CI/CD Pipeline / Python Tests (push) Has been cancelled
CI/CD Pipeline / Website Tests (push) Has been cancelled
CI/CD Pipeline / Linting (push) Has been cancelled
CI/CD Pipeline / Security Scan (push) Has been cancelled
CI/CD Pipeline / Docker Build & Push (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / CI Summary (push) Has been cancelled
ci/woodpecker/manual/build-ci-image Pipeline was successful
ci/woodpecker/manual/main Pipeline failed
All services: admin-v2, studio-v2, website, ai-compliance-sdk, consent-service, klausur-service, voice-service, and infrastructure. Large PDFs and compiled binaries excluded via .gitignore.
Breakpilot Drive - Unity Lernspiel
Ein Endless Runner Lernspiel fuer Kinder der Klassen 2-6 mit Quiz-Integration.
Uebersicht
- Video-Version: Visuelles 3D-Spiel mit 3-Spur-Steuerung
- Audio-Version: Barrierefreier Hoerspiel-Modus mit raeumlichem Audio
- Quiz-Integration: Hybrid-Modus mit schnellen visuellen Fragen UND Denkpausen
Schnellstart (Docker)
# Game-Container starten (mit Backend)
docker-compose --profile game up -d
# Nur das Backend starten (fuer API-Tests)
docker-compose up backend -d
# Game oeffnen
open http://localhost:3001
Unity Projekt erstellen
Voraussetzungen
- Unity 2022.3 LTS oder neuer
- WebGL Build Support Modul installiert
Neues Projekt erstellen
# Unity Hub oeffnen und neues 3D Projekt erstellen
# Projektname: BreakpilotDrive
# Speicherort: /path/to/breakpilot-pwa/breakpilot-drive/Unity/
Empfohlene Projektstruktur
Unity/
├── Assets/
│ ├── Scripts/
│ │ ├── Core/
│ │ │ ├── GameManager.cs # Spielzustand, Score
│ │ │ ├── DifficultyManager.cs # Schwierigkeitsanpassung
│ │ │ └── AudioManager.cs # Sound-Verwaltung
│ │ ├── Player/
│ │ │ ├── PlayerController.cs # 3-Spur-Bewegung
│ │ │ └── PlayerInput.cs # Touch/Keyboard Input
│ │ ├── Track/
│ │ │ ├── TrackGenerator.cs # Endlose Strecke
│ │ │ ├── ObstacleSpawner.cs # Hindernisse
│ │ │ └── VisualTrigger.cs # Quiz-Trigger (Bruecke, etc.)
│ │ ├── Quiz/
│ │ │ ├── QuizManager.cs # Quick/Pause-Modus
│ │ │ ├── QuestionDisplay.cs # UI fuer Fragen
│ │ │ └── QuizAudio.cs # TTS fuer Audio-Version
│ │ ├── Network/
│ │ │ ├── BreakpilotAPI.cs # REST API Client
│ │ │ └── OfflineCache.cs # Lokaler Fragen-Cache
│ │ └── UI/
│ │ ├── MainMenu.cs # Startbildschirm
│ │ ├── GameHUD.cs # Score, Leben
│ │ └── QuizOverlay.cs # Frage-Anzeige
│ ├── Prefabs/
│ │ ├── Player/
│ │ │ └── Car.prefab # Spieler-Auto
│ │ ├── Obstacles/
│ │ │ ├── Rock.prefab
│ │ │ └── Barrier.prefab
│ │ ├── Items/
│ │ │ ├── Star.prefab
│ │ │ ├── Coin.prefab
│ │ │ └── Shield.prefab
│ │ └── VisualTriggers/
│ │ ├── Bridge.prefab # Loest Quick-Quiz aus
│ │ ├── House.prefab
│ │ └── Tree.prefab
│ ├── Audio/
│ │ ├── Music/
│ │ │ └── GameLoop.mp3
│ │ ├── SFX/
│ │ │ ├── Coin.wav
│ │ │ ├── Crash.wav
│ │ │ └── Correct.wav
│ │ └── Voice/
│ │ └── (TTS-generiert)
│ ├── Scenes/
│ │ ├── MainMenu.unity
│ │ ├── Game_Video.unity
│ │ └── Game_Audio.unity
│ └── WebGLTemplates/
│ └── Breakpilot/
│ └── index.html # Custom WebGL Template
├── Packages/
│ └── manifest.json
└── ProjectSettings/
└── ProjectSettings.asset
API-Endpunkte
Das Backend stellt folgende Endpunkte bereit:
Lernniveau
GET /api/game/learning-level/{user_id}
→ { overall_level: 1-5, math_level, german_level, english_level }
Schwierigkeit
GET /api/game/difficulty/{level}
→ { lane_speed, obstacle_frequency, question_complexity, answer_time }
Quiz-Fragen
GET /api/game/quiz/questions?difficulty=3&count=10&mode=quick
→ [{ id, question_text, options, correct_index, visual_trigger, time_limit_seconds }]
GET /api/game/quiz/questions?difficulty=3&count=5&mode=pause
→ [{ id, question_text, options, correct_index }]
Visuelle Trigger
GET /api/game/quiz/visual-triggers
→ [{ trigger: "bridge", question_count: 2, difficulties: [1,2] }]
Session speichern
POST /api/game/session
{ user_id, game_mode, duration_seconds, score, questions_answered, questions_correct }
→ { session_id, status, new_level? }
WebGL Build erstellen
- Unity oeffnen → File → Build Settings
- Platform: WebGL auswaehlen
- Player Settings:
- Compression Format: Gzip
- Decompression Fallback: Aktiviert
- WebGL Template: Breakpilot (custom)
- Build → Zielordner:
breakpilot-drive/Build/
Nach dem Build:
# Docker Container neu bauen
docker-compose --profile game build breakpilot-drive
# Container starten
docker-compose --profile game up -d breakpilot-drive
Quiz-Modus Implementierung
Quick Mode (waehrend der Fahrt)
// Wenn Spieler sich einem VisualTrigger naehert
public class VisualTrigger : MonoBehaviour
{
public string triggerType; // "bridge", "tree", etc.
void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
// Frage anzeigen, Spiel laeuft weiter
QuizManager.Instance.ShowQuickQuestion(triggerType);
}
}
}
Pause Mode (Spiel pausiert)
// Alle X Meter/Punkte eine Denkaufgabe
public class QuizManager : MonoBehaviour
{
public void ShowPauseQuestion()
{
Time.timeScale = 0; // Spiel pausieren
// Komplexe Frage anzeigen
// Nach Antwort: Time.timeScale = 1;
}
}
Entwicklungs-Workflow
- Lokal entwickeln: Unity Editor mit Play-Modus
- API testen:
docker-compose up backend -d - WebGL testen: Build erstellen, Container starten
- Commit: Git-Aenderungen committen (ohne Build-Artefakte)
Bekannte Einschraenkungen
- Unity WebGL unterstuetzt kein natives Audio-Recording (fuer Sprachsteuerung)
- Mobile Browser haben unterschiedliche Touch-Implementierungen
- WASM-Dateien koennen gross werden (>50MB) - Kompression wichtig