Online-Lobby, Arenen, Lackiererei, ComfyGen-Grafik, Verschleierung
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>
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
button:disabled { opacity: .4; cursor: default; }
|
||||
button:disabled:hover { border-color: var(--line); }
|
||||
button.link { background: none; border: none; color: var(--accent); padding: 2px 4px; text-decoration: underline; }
|
||||
input[type=text], input[type=password] { font: inherit; width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line);
|
||||
input[type=text], input[type=password], input[type=email] { font: inherit; width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line);
|
||||
background: #0b0e14; color: var(--text); }
|
||||
input:focus { outline: none; border-color: var(--accent); }
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#overlay.hide { display: none; }
|
||||
#overlay.clear { background-color: transparent; }
|
||||
.card { background: rgba(21, 25, 32, .94); border: 1px solid var(--line); border-radius: 14px; padding: 22px 30px;
|
||||
min-width: 380px; max-width: 760px; text-align: center; box-shadow: 0 20px 60px #000a; }
|
||||
min-width: 380px; max-width: 760px; max-height: 520px; overflow-y: auto; text-align: center; box-shadow: 0 20px 60px #000a; }
|
||||
.card h1 { margin: 0 0 6px; font: 44px var(--head); letter-spacing: .05em; color: var(--accent); text-shadow: 0 3px 0 #5a2600; }
|
||||
.card h2 { margin: 0 0 8px; font: 26px var(--head); letter-spacing: .04em; color: var(--accent); }
|
||||
.card h3 { margin: 12px 0 6px; font: 14px var(--head); letter-spacing: .06em; color: var(--dim); text-align: left; }
|
||||
@@ -93,6 +93,14 @@
|
||||
.seg { display: flex; gap: 4px; }
|
||||
.seg button { flex: 1; padding: 5px 8px; font-size: 13px; }
|
||||
.seg button.on { background: var(--accent); color: #1a0c02; border-color: var(--accent); font-weight: 700; }
|
||||
/* compact settings: two columns of label + control */
|
||||
.set2 { display: grid; grid-template-columns: 96px 1fr 96px 1fr; gap: 7px 12px; align-items: center; text-align: left; min-width: 680px; }
|
||||
.set2 .sl, .setacc .sl { font-size: 13px; color: var(--dim); }
|
||||
.set2 .seg button { padding: 6px 4px; font-size: 12px; min-height: 32px; }
|
||||
.set2 input[type=range] { width: 100%; accent-color: var(--accent); height: 28px; }
|
||||
.setacc { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; text-align: left; margin-top: 12px;
|
||||
padding-top: 10px; border-top: 1px solid var(--line); }
|
||||
.setacc .who { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
|
||||
/* league */
|
||||
.opps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
|
||||
@@ -196,6 +204,45 @@
|
||||
.pt-colors input[type=color] { width: 34px; height: 26px; border: none; background: none; padding: 0; cursor: pointer; }
|
||||
#bPaint { align-self: flex-start; }
|
||||
|
||||
/* lobby (touch-friendly: big rows + buttons) */
|
||||
.lobbybar { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; flex-wrap: wrap; }
|
||||
.flags { display: flex; gap: 4px; flex-wrap: wrap; }
|
||||
.flag { padding: 5px 6px; line-height: 0; }
|
||||
/* flags drawn with CSS (no flag emoji on Windows) */
|
||||
.fl { display: inline-block; width: 30px; height: 20px; border-radius: 3px; vertical-align: middle; box-shadow: 0 0 0 1px rgba(255,255,255,.25); background: #555; }
|
||||
.fl-DE { background: linear-gradient(#000 33.3%, #dd0000 33.3% 66.6%, #ffce00 66.6%); }
|
||||
.fl-AT { background: linear-gradient(#c8102e 33.3%, #fff 33.3% 66.6%, #c8102e 66.6%); }
|
||||
.fl-CH { background: linear-gradient(#fff, #fff) center / 56% 20% no-repeat, linear-gradient(#fff, #fff) center / 20% 56% no-repeat, #d52b1e; }
|
||||
.fl-GB { background: linear-gradient(#c8102e, #c8102e) center / 100% 18% no-repeat, linear-gradient(#c8102e, #c8102e) center / 12% 100% no-repeat,
|
||||
linear-gradient(#fff, #fff) center / 100% 34% no-repeat, linear-gradient(#fff, #fff) center / 22% 100% no-repeat, #012169; }
|
||||
.fl-US { background: linear-gradient(#3c3b6e, #3c3b6e) left top / 42% 54% no-repeat, repeating-linear-gradient(#b22234 0 15.4%, #fff 15.4% 30.8%); }
|
||||
.fl-FR { background: linear-gradient(90deg, #0055a4 33.3%, #fff 33.3% 66.6%, #ef4135 66.6%); }
|
||||
.fl-ES { background: linear-gradient(#aa151b 25%, #f1bf00 25% 75%, #aa151b 75%); }
|
||||
.fl-IT { background: linear-gradient(90deg, #009246 33.3%, #fff 33.3% 66.6%, #ce2b37 66.6%); }
|
||||
.fl-NL { background: linear-gradient(#ae1c28 33.3%, #fff 33.3% 66.6%, #21468b 66.6%); }
|
||||
.fl-PL { background: linear-gradient(#fff 50%, #dc143c 50%); }
|
||||
.fl-TR { background: radial-gradient(circle at 42% 50%, #fff 0 20%, transparent 21%), #e30a17; }
|
||||
.fl-RU { background: linear-gradient(#fff 33.3%, #0039a6 33.3% 66.6%, #d52b1e 66.6%); }
|
||||
.fl-BR { background: radial-gradient(circle, #002776 0 22%, #fedf00 23% 46%, transparent 47%), #009b3a; }
|
||||
.fl-JP { background: radial-gradient(circle, #bc002d 0 30%, transparent 31%), #fff; }
|
||||
.fl-KR { background: radial-gradient(circle, #cd2e3a 0 14%, #0047a0 15% 28%, transparent 29%), #fff; }
|
||||
.fl-XX { background: repeating-linear-gradient(45deg, #5a6272 0 5px, #454c5a 5px 10px); }
|
||||
.flag.on { background: var(--accent); border-color: var(--accent); }
|
||||
.plist { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin: 4px 0; }
|
||||
.prow { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: center;
|
||||
background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
|
||||
.prow .pf { line-height: 0; } .prow .pn { font: 16px var(--head); letter-spacing: .02em; text-align: left; }
|
||||
.prow .pfame { color: var(--gold); font-size: 13px; font-variant-numeric: tabular-nums; }
|
||||
.prow .chal { padding: 8px 16px; background: var(--accent); color: #1a0c02; border-color: var(--accent); font-weight: 700; }
|
||||
.prow .pbusy { color: var(--dim); font-size: 13px; padding: 8px 10px; }
|
||||
.prow.me { border-color: var(--accent); background: #2a1c10; }
|
||||
/* country rooms */
|
||||
.rooms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0; }
|
||||
.room { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 10px 12px; min-height: 48px; text-align: left; }
|
||||
.room .rn { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.room .rc { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
|
||||
.room.live .rc { color: var(--good); font-weight: 700; }
|
||||
|
||||
/* fight HUD */
|
||||
#fightHud { position: absolute; left: 0; right: 0; top: 0; padding: 10px 14px; display: grid; grid-template-columns: 1fr 150px 1fr;
|
||||
gap: 12px; pointer-events: none; z-index: 4; }
|
||||
@@ -218,6 +265,10 @@
|
||||
#pad .fire button { height: 74px; font-size: 14px; font-weight: 700; }
|
||||
@media (pointer: coarse) { body.fighting #pad { display: flex; } }
|
||||
|
||||
/* tablets / phones held upright: ask to rotate (the stage is 16:9) */
|
||||
#rotate { display: none; position: fixed; left: 0; right: 0; bottom: 12%; text-align: center; z-index: 20; font: 20px var(--head); color: var(--accent); padding: 0 20px; }
|
||||
@media (pointer: coarse) and (orientation: portrait) { #rotate { display: block; } }
|
||||
|
||||
/* window buttons: only inside the exe (html.exe set by kit-host.js) */
|
||||
#winctl { position: fixed; top: 8px; right: 8px; display: none; gap: 6px; z-index: 10; }
|
||||
html.exe #winctl { display: flex; }
|
||||
@@ -231,6 +282,7 @@
|
||||
<button onclick="Kit.host.quit()" data-i18n-title="win_close">✕</button>
|
||||
</div>
|
||||
|
||||
<div id="rotate">↻ <span data-i18n="rotate_hint">Turn your device sideways</span></div>
|
||||
<div id="app">
|
||||
<div id="hud">
|
||||
<div class="logo">ROBOT CLASH</div>
|
||||
@@ -265,6 +317,7 @@
|
||||
<div class="gbar">
|
||||
<div class="err" id="gErr"></div>
|
||||
<button id="bGMenu" data-i18n="menu">Menu</button>
|
||||
<button id="bGOnline" data-i18n="online_short">Online</button>
|
||||
<button id="bTrain" data-i18n="training">Training</button>
|
||||
<button class="primary" id="bLeague" data-i18n="to_league">League</button>
|
||||
</div>
|
||||
@@ -305,7 +358,11 @@
|
||||
<script src="combat.js"></script>
|
||||
<script src="ai.js"></script>
|
||||
<script src="profiles.js"></script>
|
||||
<script src="net.js"></script>
|
||||
<script src="lobby.js"></script>
|
||||
<script src="looks.js"></script>
|
||||
<script src="render3d.js"></script>
|
||||
<script src="netfight.js"></script>
|
||||
<script src="shop.js"></script>
|
||||
<script src="painter.js"></script>
|
||||
<script src="game.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user