Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SuperCube Backend

FastAPI Highscore-Backend für das SuperCube Unity WebGL Spiel.

🎮 Spiel spielen: michdo93.github.io/SuperCube
🖥️ Frontend Repo: Michdo93/SuperCube
🛠️ Unity Projekt-Dateien: Michdo93/SuperCube-Unity-Project


Setup

pip install -r requirements.txt
uvicorn main:app --reload
# Docs: http://localhost:8000/docs

Endpunkte

Methode Pfad Beschreibung
GET /highscores Top-6 Highscores (Unity-kompatibles Format)
POST /highscores Neuen Highscore speichern
GET /highscores/all Alle Einträge (Debug)
DELETE /highscores/{id} Eintrag löschen (Admin-Key erforderlich)

Umgebungsvariablen (Render.com)

Variable Beschreibung Beispiel
ALLOWED_ORIGINS GitHub Pages URL https://michdo93.github.io
ADMIN_KEY Schlüssel für Delete-Route Beliebiger sicherer String
TOP_N Anzahl angezeigte Highscores 6

JSON-Format (kompatibel mit Unity)

GET /highscores:

{
  "scores": [
    {"name": "Alice", "points": "9500"},
    {"name": "Bob",   "points": "8200"},
    {"name": "-",     "points": "-"}
  ]
}

POST /highscores:

{"name": "Alice", "points": 9500}

About

The Highscore Backend for the SuperCube Unity 3D game.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages