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:
2026-11-13 15:45:35 +01:00
parent 819ee0a5c3
commit 7a69651b6d
60 changed files with 1895 additions and 207 deletions

View File

@@ -18,7 +18,14 @@ if /i "%SCRIPT%"=="generate_voice" set PY="%TOOLS%\.venv-tts\Scripts\python.exe
if /i "%SCRIPT%"=="make_voice_refs" set PY="%TOOLS%\.venv-tts\Scripts\python.exe"
set PYTHONIOENCODING=utf-8
pushd "%HERE%"
%PY% "%TOOLS%\%SCRIPT%.py" %1 %2 %3 %4 %5 %6 %7 %8 %9
set ARGS=
:collect
if "%~1"=="" goto run
set ARGS=%ARGS% %1
shift
goto collect
:run
%PY% "%TOOLS%\%SCRIPT%.py"%ARGS%
set RC=%ERRORLEVEL%
popd
exit /b %RC%

View File

@@ -22,8 +22,9 @@ _SCENE = "digital painting, cinematic lighting, high detail, dark industrial moo
PROMPTS = [
# app icon
("icon", "game app icon: a fierce armoured battle robot for arena fights, heavy riveted steel box body with a huge raised front flipper plate and a spinning saw, angry glowing orange eyes on the front armour, chunky, not a car, no windows, no arms, no legs, "
"orange and black hazard paint, sparks flying, bold silhouette, plain solid black background"),
("icon", "game app icon: a low flat wedge-shaped battle robot shaped like a steel doorstop on hidden wheels, seen from the front at an angle, "
"huge raised front flipper plate, two glowing orange eye lights in the armour, orange and black hazard paint, sparks flying, "
"bold simple silhouette, centred, plain solid black background"),
# scenes (not cut out)
("bg_workshop", f"interior of a cluttered robot workshop garage at night, workbenches with tools, welding sparks, "
@@ -85,9 +86,9 @@ PROMPTS = [
("opp_buzzkill", f"yellow and black striped robot with a big front circular saw, {_ROBOT}"),
("opp_flapjack", f"blue and white low robot with a huge flipper plate and big tyres, {_ROBOT}"),
("opp_pincer", f"red and gold heavy robot on tank tracks with hydraulic crushing jaws, {_ROBOT}"),
("opp_thunderclap", f"purple robot with an overhead axe hammer and a flamethrower turret, {_ROBOT}"),
("opp_thunderclap", f"purple low flat armoured box robot on four wheels with a long axe arm hinged on top lying along its back and a small flamethrower nozzle turret, {_ROBOT}"),
("opp_gravedigger", f"black domed robot with green lights, tank tracks and a rocket pod turret, {_ROBOT}"),
("opp_overlord", f"menacing black and red domed robot with a heavy horizontal spinning bar weapon, {_ROBOT}"),
("opp_overlord", f"menacing black and red round dome shell robot like an upturned wok on hidden wheels, long horizontal spinning steel bar across the front at floor height, {_ROBOT}"),
# shop mechanic (original character)
("npc_mechanic", "game character portrait, gruff middle-aged robot mechanic with welding goggles pushed up on the forehead, "

View File

@@ -0,0 +1,53 @@
"""Robot Clash - shop images made from the real 3D parts (generate_variants.py, Flux.2 Klein + ReferenceLatent).
Reference r3d_<id> = the part exactly as the game builds it (tools/partshots.ps1 renders them into output/).
Flux keeps shape, proportions and viewing angle and paints it in the sprite style, so the shop picture
matches what ends up on the robot.
..\\tools\\partshots.ps1 3D renders -> output/r3d_<id>_raw_00001_.png
gen generate_variants all part images (part_<id>)
gen adopt --size 192 part_<id>
VARIANTS = [(name, ref_name, prompt)]
"""
STYLE = (
"keep exactly the same object, the same shape, proportions, parts and viewing angle as the reference image; "
"render it as a detailed game sprite: scratched painted steel, bolts and rivets, small yellow and black hazard stripe details, "
"soft studio lighting, crisp edges, high detail, centred single subject, plain solid black background, no text"
)
_P = {
'crate': "a plain rectangular steel robot chassis box with a raised accent strip on top",
'doorstop': "a low wedge-shaped steel robot chassis, flat sloped front, hazard stripes on the flat rear deck",
'bulwark': "a large heavy rectangular steel robot chassis box with a raised accent strip on top",
'scarab': "a robot chassis base plate with a smooth round steel dome shell and an accent ring around the dome",
'rubber': "a set of four small rubber robot wheels with steel hubs",
'bigtyre': "a pair of huge chunky rubber tyres with steel hubs",
'tracks': "a pair of long tank crawler tracks with round end wheels",
'steel': "a U-shaped set of three plain grey riveted steel armour plates (two side plates and a rear plate)",
'titan': "a U-shaped set of three light blue-grey titanium armour panels with bolts",
'hardox': "a U-shaped set of three thick yellowish hardened steel wear plates with heavy bolts",
'wedge': "a flat angled steel ramming wedge plate",
'flipper': "a flat steel flipper plate with an accent stripe, hinged at its rear edge",
'hammer': "a robot axe hammer: long steel arm on a pivot block with an axe head pointing down at the end",
'saw': "a large circular saw blade on a short motor arm",
'crusher': "two hydraulic crusher jaw arms side by side with sharp teeth at the tips",
'spinner': "a long horizontal steel spinner bar with hardened teeth blocks at both ends on a central hub",
'flamer': "a small robot turret base with a red fuel tank and a steel flamethrower nozzle",
'minigun': "a small robot turret base with a housing and a rotating multi-barrel minigun",
'rockets': "a small robot turret base carrying a box-shaped rocket pod with four tubes",
}
VARIANTS = [(f"part_{k}", f"r3d_{k}", v) for k, v in _P.items()]
# motor + battery are not visible on the 3D robot: restyle the existing picture (reference = itself)
_INNER = {
'sparky': "a small cheap electric motor with a few wires",
'hornet': "a sleek electric motor with cooling fins",
'bulldog': "a massive high torque gear motor with a big gearbox",
'comet': "a high speed racing electric motor with a glowing blue cooling ring",
'lead': "a heavy old lead acid battery block with two terminals",
'nicd': "a pack of green battery cells strapped together",
'lipo': "a slim modern lithium battery stack with small charge lights",
}
VARIANTS += [(f"part_{k}", f"part_{k}", v) for k, v in _INNER.items()]