// TLW-Modell: SpaceX Ultimate Starship (Physikalisch korrektes Ring-Design) float zeit = 0; float starshipX, starshipY; // Quanten (Grün - Einsammeln) float[] qX = new float[4]; float[] qY = new float[4]; float[] qSpeed = new float[4]; // Singularitäten (Rot - Ausweichen) float[] sX = new float[3]; float[] sY = new float[3]; float[] sSpeed = new float[3]; // Schockwelle & Gameplay-Werte float schockX, schockY, schockRadius = 0, schockIntensitaet = 0; int ladung = 0; int score = 0; int schild = 3; boolean gameOver = false; boolean sieg = false; // Regler & Auto-Aim float ladeFrequenz = 0.45; boolean autoAim = true; float resonanzPunkt = 0.78; String statusText = "Sammle grüne Quanten, weiche roten Rissen aus! Speed steigt per Wurzelfunktion."; boolean eventOffen = true; String eventTitel = ""; String eventText = ""; void setup() { size(850, 650); starshipX = 140; starshipY = 240; // Grüne Quanten initialisieren for (int i = 0; i < 4; i++) { qX[i] = width + random(50, 400 + i*100); qY[i] = random(60, 440); qSpeed[i] = random(1.0, 1.5); } // Rote Risse initialisieren for (int i = 0; i < 3; i++) { sX[i] = width + random(200, 600 + i*150); sY[i] = random(60, 440); sSpeed[i] = random(1.2, 1.8); } triggerEvent(0, "🚀 SPACEX ULTIMATE: THE QUANTUM TRANSIT", "Mission Mars-Transit! Du nutzt das fusionierte Triebwerk des TLW-Modells. Aufgabe: Sammle die grünen Vakuum-Quanten, um den Akkumulator auf 100% zu laden. Aber Vorsicht! Die Krümmung zieht rote Gitter-Risse (Singularitäten) an. Weiche ihnen aus! Die Dynamik eskaliert per Wurzelfunktion."); } void draw() { background(6, 8, 14); if (!eventOffen && !gameOver && !sieg) { zeit += 0.02; if (mouseY > 40 && mouseY < 470) starshipY = lerp(starshipY, mouseY, 0.1); if (schockIntensitaet > 0) { schockRadius += 11; schockIntensitaet -= 5; } } float schiffSkalierung = 1.0 + (ladung / 100.0) * 0.25; float wurzelSpeed = 3.5 + sqrt(ladung) * 1.4; // 1. HEXAGONALES NETZ MIT SCHOCKWELLEN-VERZERRUNG int schritt = 30; for (int x = -30; x <= width + 30; x += schritt) { for (int y = -30; y <= height - 100; y += schritt) { float dx = starshipX - x; float dy = starshipY - y; float abstand = sqrt(dx*dx + dy*dy); if (abstand == 0) abstand = 0.1; float kompression = (abstand < 180) ? map(abstand, 0, 180, 22 * (ladung/100.0), 0) : 0; float sDx = x - schockX; float sDy = y - schockY; float sAbstand = sqrt(sDx*sDx + sDy*sDy); float schockVersatz = 0; if (schockIntensitaet > 0 && abs(sAbstand - schockRadius) < 40) { schockVersatz = map(abs(sAbstand - schockRadius), 0, 40, 22 * (schockIntensitaet / 255.0), 0); } float posX = x + (dx / abstand) * kompression + (sDx / (sAbstand == 0 ? 1 : sAbstand)) * schockVersatz; float posY = y + (dy / abstand) * kompression + (sDy / (sAbstand == 0 ? 1 : sAbstand)) * schockVersatz; float schockGluehen = (schockIntensitaet > 0 && abs(sAbstand - schockRadius) < 50) ? map(abs(sAbstand - schockRadius), 0, 50, schockIntensitaet, 0) : 0; stroke(schockGluehen * 0.4, 120 + schockGluehen * 0.4, 255, map(abstand, 0, 400, 38, 10)); strokeWeight(schockGluehen > 15 ? 1.5 : 1); noFill(); beginShape(); for (int i = 0; i < 6; i++) { vertex(posX + cos(PI/3*i+zeit*0.01)*16, posY + sin(PI/3*i+zeit*0.01)*16); } endShape(CLOSE); } } // 2. ENGINE: GRÜNE QUANTEN (Einsammeln) & GRAVITATIONSLINSE for (int i = 0; i < 4; i++) { if (!eventOffen && !gameOver && !sieg) { qX[i] -= wurzelSpeed * qSpeed[i]; qY[i] += sin(zeit * 4 + i) * 1.2; if (schockIntensitaet > 0) { float sDx = qX[i] - schockX; float sDy = qY[i] - schockY; float sAbstand = sqrt(sDx*sDx + sDy*sDy); if (abs(sAbstand - schockRadius) < 60) qY[i] += (sDy / (sAbstand == 0 ? 1 : sAbstand)) * map(abs(sAbstand - schockRadius), 0, 60, 5.0, 0) * (schockIntensitaet / 255.0); } if (qX[i] < -30) { qX[i] = width + random(50, 300); qY[i] = random(60, 440); } } stroke(0, 255, 180, 200); strokeWeight(1.5); fill(8, 32, 38); ellipse(qX[i], qY[i], 18, 18); fill(255, 180); noStroke(); ellipse(qX[i], qY[i], 6, 6); if (dist(starshipX, starshipY, qX[i], qY[i]) < 32 * schiffSkalierung && !eventOffen && !gameOver && !sieg) { schockX = qX[i]; schockY = qY[i]; schockRadius = 0; schockIntensitaet = 255; qX[i] = width + random(100, 400); qY[i] = random(60, 440); score += 50; ladung = constrain(ladung + 12, 0, 100); statusText = "⚡ QUANT COLLAPSED! Vakuum-Energie geladen."; if (ladung >= 100) sieg = true; } } // 3. ENGINE: ROTE SINGULARITÄTEN (Ausweichen) for (int i = 0; i < 3; i++) { if (!eventOffen && !gameOver && !sieg) { sX[i] -= wurzelSpeed * sSpeed[i] * 1.1; sY[i] += cos(zeit * 3 + i) * 1.5; if (sX[i] < -30) { sX[i] = width + random(100, 400); sY[i] = random(60, 440); score += 10; } } stroke(255, 40, 40, 220); strokeWeight(2); fill(30, 6, 12); ellipse(sX[i], sY[i], 22, 22); fill(255, 50, 50, 120 + sin(zeit*20)*100); noStroke(); ellipse(sX[i], sY[i], 10, 10); if (dist(starshipX, starshipY, sX[i], sY[i]) < 30 * schiffSkalierung && !eventOffen && !gameOver && !sieg) { schild--; sX[i] = width + random(300, 600); statusText = "💥 ANOMALIE-EINSCHLAG! Schildbalken beschädigt!"; if (schild <= 0) gameOver = true; } } // Starship Rendern mit Matrix-Verschiebung pushMatrix(); translate(starshipX, starshipY); scale(schiffSkalierung); translate(-starshipX, -starshipY); drawStarship(starshipX, starshipY); popMatrix(); if (gameOver) { fill(255, 50, 50); textAlign(CENTER, CENTER); textSize(24); text("GAME OVER\nHüllenkollaps im Vakuum!", width/2, height/2 - 40); } if (sieg) { fill(0, 255, 180); textAlign(CENTER, CENTER); textSize(24); text("MISSION ERFOLGREICH!\nStarship zu 100% topologisch geladen.", width/2, height/2 - 40); } drawInterface(wurzelSpeed); if (eventOffen) drawModal(); } // NEUES DESIGN: Physikalisch korrektes topologisches Ring-Schiff (Bühring-Metrik) void drawStarship(float cx, float cy) { // 1. Der Alcubierre-Feld-Ring (Großer vertikaler Torus am Heck, der die Raumzeit krümmt) stroke(0, 255, 200, 180 + ladung); strokeWeight(2.5); fill(18, 28, 45); ellipse(cx - 30, cy, 18, 55); // Der massive Feldgenerator-Ring // Internes Energieleuchten im Ring-Zentrum if (ladung > 0) { fill(0, 255, 180, 100 + sin(zeit * 25) * 80); noStroke(); ellipse(cx - 30, cy, 8, 30); } // 2. Das Hauptchassis: Symmetrische Nadel-Kapsel (Minimiert topologischen Reibungswiderstand) fill(235, 240, 250); stroke(30, 40, 55); strokeWeight(1.5); beginShape(); vertex(cx - 35, cy - 10); vertex(cx + 40, cy - 8); vertex(cx + 110, cy); // Extrem spitze Bug-Nadel (Feld-Deflektor) vertex(cx + 40, cy + 8); vertex(cx - 35, cy + 10); vertex(cx - 20, cy); endShape(CLOSE); // 3. Seitliche Stabilisierungs-Leiterflächen (Kopplungs-Ausleger) fill(70, 80, 95); stroke(30, 40, 55); rect(cx - 15, cy - 16, 25, 4); rect(cx - 15, cy + 12, 25, 4); // Bug-Deflektoraura if (ladung > 50) { noFill(); stroke(0, 150, 255, map(ladung, 50, 100, 0, 150)); arc(cx + 115, cy, 15, 15, -HALF_PI, HALF_PI); } } void triggerEvent(int id, String titel, String text) { eventTitel = titel; eventText = text; eventOffen = true; } void drawModal() { fill(4, 5, 12, 230); noStroke(); rect(0, 0, width, height); fill(16, 20, 32); stroke(0, 255, 180, 160); strokeWeight(2); rect(140, 170, 570, 290, 5); fill(0, 255, 180); textSize(15); textAlign(LEFT, TOP); text(eventTitel, 175, 200); fill(235); textSize(13); text(eventText, 175, 240, 500, 160); fill(0, 150, 255); noStroke(); rect(325, 395, 200, 40, 4); fill(255); textAlign(CENTER, CENTER); text("SYSTEME STARTEN ▶", 425, 415); textAlign(LEFT, TOP); } void drawInterface(float akSpeed) { fill(12, 14, 22); noStroke(); rect(0, 530, width, 120); stroke(35, 48, 68); line(0, 530, width, 530); fill(255); textSize(12); textAlign(LEFT, TOP); text("SPACEX METRIC-RING HARVESTER // PILOT HUD", 25, 546); fill(0, 255, 180); text("SCORE: " + score, 305, 546); fill(255, 60, 100); text("SCHILD: " + (schild*33) + "%", 415, 546); fill(40, 50, 65); rect(530, 544, 140, 15, 3); fill(map(ladung,0,100,0,255), map(ladung,0,100,255,80), 80); rect(530, 544, map(ladung, 0, 100, 0, 140), 15, 3); fill(255); text("BATTERIE: " + ladung + "%", 685, 546); fill(200, 220, 240); textSize(11); text("Status: " + statusText, 25, 572); fill(130, 150, 170); textFont(createFont("Courier", 11)); text("TLW-Gleichung: v_gitter = 3.5 + sqrt(" + ladung + ") * 1.4 = " + nf(akSpeed, 1, 2) + " L_t", 25, 602); textFont(createFont("Arial", 12)); if (gameOver || sieg) { fill(0, 180, 255); rect(685, 572, 135, 45, 4); fill(255); textAlign(CENTER, CENTER); text("RESET 🔄", 752, 594); textAlign(LEFT, TOP); } else { fill(autoAim ? color(0, 140, 90) : color(45, 50, 60)); rect(685, 572, 135, 45, 4); fill(255); textAlign(CENTER, CENTER); text(autoAim ? "🎯 AUTO-AIM\nREADY" : "❌ MANUAL\nAIM", 752, 594); textAlign(LEFT, TOP); } } void mousePressed() { if (eventOffen) { if (mouseX > 325 && mouseX < 525 && mouseY > 395 && mouseY < 435) eventOffen = false; return; } if (mouseX > 685 && mouseX < 820 && mouseY > 572 && mouseY < 617) { if (gameOver || sieg) { ladung = 0; score = 0; schild = 3; gameOver = false; sieg = false; for (int i = 0; i < 4; i++) qX[i] = width + random(50, 400); for (int i = 0; i < 3; i++) sX[i] = width + random(200, 500); statusText = "Systeme rebootet. Triebwerk online."; } else { autoAim = !autoAim; } } }