Grosse Erweiterung ueber die erste spielbare Version hinaus: - Online (Firebase ueber REST, kein SDK): Konto per E-Mail, globale Lobby mit Laender-Raeumen, Herausfordern, Live-PvP (Host rechnet, Gast interpoliert, KI-Uebernahme bei Lag). Gast kann anonym beitreten. net.js / lobby.js / netfight.js, Regeln in docs/firebase. - 3 Arenen in verschiedenen Groessen (RC.ARENAS, half 8/12/16), Kamera + Licht + Boden skalieren; Liga skaliert die Arena mit, Setting + online aus Seed. Harte Rams/Wandtreffer schleudern Roboter auf den Rucken. - Intro (3D-Kamerafahrt), Titel, Einstellungen (Kamera, Schwierigkeit, Steuerung, Grafik, Arena), Lackiererei (painter.js, selbst bemalen). - Shop mit ComfyGen-Sprites (aus den 3D-Teilen erzeugt), Liga-Gegner sehen aus wie ihre Portraits (looks.js), kraeftigere Waffen-Modelle. - Oekonomie: Startgeld 800, Schadensbonus, Schaukaempfe, Online-Preisgeld. - Verschleierung: build.ps1 -Obfuscate (terser), tablet-taugliche Touch-UI. - Tests: tests/sim.test.js, balance.js, online.test.js. Dev-Tools in tools/. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
63 lines
1.9 KiB
JSON
63 lines
1.9 KiB
JSON
{
|
|
"rules": {
|
|
".read": false,
|
|
".write": false,
|
|
|
|
"highscores": {
|
|
".read": true,
|
|
".indexOn": ["score"],
|
|
"$entry": {
|
|
".write": "!data.exists()",
|
|
".validate": "newData.hasChildren(['name', 'score', 'level', 'time'])",
|
|
"name": { ".validate": "newData.isString() && newData.val().length >= 1 && newData.val().length <= 20" },
|
|
"score": { ".validate": "newData.isNumber() && newData.val() > 0 && newData.val() <= 10000000" },
|
|
"level": { ".validate": "newData.isNumber() && newData.val() >= 1 && newData.val() <= 999" },
|
|
"time": { ".validate": "newData.val() == now" },
|
|
"$other": { ".validate": false }
|
|
}
|
|
},
|
|
|
|
"users": {
|
|
"$uid": {
|
|
".read": "auth != null && auth.uid == $uid",
|
|
".write": "auth != null && auth.uid == $uid"
|
|
}
|
|
},
|
|
|
|
"lobby": {
|
|
".read": "auth != null",
|
|
"$uid": {
|
|
".write": "auth != null && auth.uid == $uid",
|
|
".validate": "newData.hasChildren(['name', 'ts'])",
|
|
"name": { ".validate": "newData.isString() && newData.val().length <= 20" },
|
|
"flag": { ".validate": "newData.isString() && newData.val().length <= 4" },
|
|
"ts": { ".validate": "newData.isNumber()" },
|
|
"$other": { ".validate": true }
|
|
}
|
|
},
|
|
|
|
"challenges": {
|
|
"$to": {
|
|
".read": "auth != null && auth.uid == $to",
|
|
"$from": {
|
|
".write": "auth != null && (auth.uid == $from || auth.uid == $to)",
|
|
".validate": "!newData.exists() || (newData.child('from').val() == $from)"
|
|
}
|
|
}
|
|
},
|
|
|
|
"matches": {
|
|
"$id": {
|
|
".read": "auth != null && $id.contains(auth.uid)",
|
|
".write": "auth != null && $id.contains(auth.uid)",
|
|
"state": {
|
|
".validate": "$id.beginsWith(auth.uid + '_')"
|
|
},
|
|
"in": {
|
|
".validate": "$id.endsWith('_' + auth.uid)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|