/* ================================================================= DTIM-ZEC SHIP BUILDER & GALAXY RANGERS FINALE Optimiert für processing.min.js - Jan Bühring Modell ================================================================= */ // Ressourcen int researchers = 0; int rawMaterials = 0; float viralMultiplier = 1.0; // Schiffsbau-Fortschritt (4 Hauptmodule) boolean part1Built = false; // ZEC-Quanten-Reaktor boolean part2Built = false; // 120-Grad Waben-Chassis boolean part3Built = false; // Photonen-Schild & Laser boolean part4Built = false; // KI-Navigations-Brücke boolean isReadyForLaunch = false; int recipientClass = 0; // 0 = Einrichtung, 1 = Universitäten, 2 = Industrie ArrayList terminalLogs; float clickPulse = 0.0; void setup() { size(1100, 750); terminalLogs = new ArrayList(); addLog("SYSTEM: DTIM-ZEC Werft-Terminal online."); addLog("AUFGABE: Verschicke Mails, um Forscher & Rohstoffe zu gewinnen!"); } void draw() { background(10, 12, 18); // Passiver Ertrag durch Forscher if (frameCount % 90 == 0 && researchers > 0) { rawMaterials += researchers * 2; } // HUD & Fenster zeichnen drawHeaderHUD(); if (!isReadyForLaunch) { drawInteractiveClicker(); drawRecipientClassSelector(); drawShipConstructionYard(); drawTerminalWindow(); } else { drawGalaxyRangersLaunchScreen(); // Das epische Finale! } } void addLog(String text) { terminalLogs.add("[" + nf(hour(),2) + ":" + nf(minute(),2) + ":" + nf(second(),2) + "] " + text); if (terminalLogs.size() > 9) { terminalLogs.remove(0); } } void checkLaunchState() { if (part1Built && part2Built && part3Built && part4Built) { isReadyForLaunch = true; addLog("🚨 SYSTEM: Alle Schiffsmodule bereit! NASA-Kontrollzentrum meldet sich..."); } } // --- HUD --- void drawHeaderHUD() { fill(18, 24, 36); stroke(0, 180, 255, 80); strokeWeight(1.5); rect(20, 20, width - 40, 70, 8); if (!isReadyForLaunch) { fill(0, 220, 255); textSize(13); textAlign(LEFT, CENTER); text("FORSCHER IM TEAM:", 40, 45); fill(0, 255, 150); textSize(20); text(researchers + " Wissenschaftler", 185, 44); fill(0, 220, 255); textSize(13); text("ROHSTOFFE (TITAN / ZEC-KNOTEN):", 420, 45); fill(255, 200, 0); textSize(20); text(rawMaterials + " Einheiten", 665, 44); } else { fill(0, 255, 180); textSize(18); textAlign(CENTER, CENTER); text("🚀 ZEC-1 ENDEAVOUR: BEREIT ZUM MISSION-START!", width/2, 55); } } // --- KLICKER & EMPFÄNGER --- void drawInteractiveClicker() { float btnX = 40; float btnY = 110; float btnW = 380; float btnH = 140; if (clickPulse > 0) clickPulse -= 0.1; fill(18, 28, 45); stroke(0, 200, 255, 150 + clickPulse * 100); strokeWeight(2 + clickPulse * 2); rect(btnX, btnY, btnW, btnH, 12); fill(0, 220, 255); textAlign(CENTER, CENTER); textSize(17); text("✉️ MAILS VERSCHICKEN ✉️", btnX + btnW/2, btnY + 40); fill(200); textSize(11); text("(Klicken oder LEERTASTE)", btnX + btnW/2, btnY + 70); fill(0, 255, 180); textSize(12); text("Anwerben von Forschern & Rohstoffen", btnX + btnW/2, btnY + 105); } void drawRecipientClassSelector() { float x = 40; float y = 265; fill(15, 20, 30); stroke(40, 50, 70); rect(x, y, 380, 135, 8); fill(0, 180, 255); textSize(12); textAlign(LEFT, TOP); text("ZIEL-GRUPPE FÜR REKRUTIERUNG:", x + 15, y + 10); drawClassBtn(x + 15, y + 32, 350, 28, "1. Hilfseinrichtung (+Virales Netzwerk)", recipientClass == 0); drawClassBtn(x + 15, y + 65, 350, 28, "2. Universitäten (+Anwerbung Forscher)", recipientClass == 1); drawClassBtn(x + 15, y + 98, 350, 28, "3. Industrie (+Rohstoff-Lieferung)", recipientClass == 2); } void drawClassBtn(float x, float y, float w, float h, String label, boolean active) { if (active) { fill(0, 150, 220); stroke(0, 220, 255); } else { fill(22, 30, 42); stroke(40, 50, 60); } rect(x, y, w, h, 5); fill(255); textSize(11); textAlign(LEFT, CENTER); text(label, x + 10, y + h/2); } // --- SCHIFFSBAU-WERFT --- void drawShipConstructionYard() { float x = 440; float y = 110; float w = 620; fill(15, 20, 30); stroke(40, 50, 70); rect(x, y, w, 420, 10); fill(0, 180, 255); textSize(14); textAlign(LEFT, TOP); text("SCHIFFSBAU-MONTAGERAUCH (ZEC-1 ENDEAVOUR)", x + 20, y + 15); drawPartBtn(x + 20, y + 45, w - 40, 75, "1. ZEC-Quanten-Reaktor", "Liefert die 120°-Spannung für die Raumkrümmung.", 150, part1Built); drawPartBtn(x + 20, y + 130, w - 40, 75, "2. Hexagonales Waben-Chassis", "3D-Rumpf aus Graph-verstärktem Titan.", 350, part2Built); drawPartBtn(x + 20, y + 215, w - 40, 75, "3. Photonen-Laser & Schild", "Abwehr von Mikrometeoriten im Transit.", 600, part3Built); drawPartBtn(x + 20, y + 300, w - 40, 75, "4. KI-Navigations-Brücke", "Berechnet die Adjazenzmatrix in Echtzeit.", 1000, part4Built); } void drawPartBtn(float x, float y, float w, float h, String title, String desc, int cost, boolean built) { if (built) { fill(0, 180, 100, 40); stroke(0, 255, 150); } else if (rawMaterials >= cost) { fill(24, 36, 52); stroke(0, 180, 255); } else { fill(16, 20, 28); stroke(40, 45, 55); } rect(x, y, w, h, 8); fill(255); textSize(13); textAlign(LEFT, TOP); text(title, x + 15, y + 10); fill(160); textSize(10); text(desc, x + 15, y + 28); if (built) { fill(0, 255, 180); textSize(13); text("✅ MONTIERT", x + 15, y + 48); } else { fill(255, 200, 0); textSize(12); text("Kosten: " + cost + " Rohstoffe", x + 15, y + 48); } } // --- TERMINAL --- void drawTerminalWindow() { float termX = 40; float termY = 540; float termW = 1020; float termH = 180; fill(8, 12, 16); stroke(0, 180, 255, 60); rect(termX, termY, termW, termH, 8); fill(0, 180, 255); textSize(11); textAlign(LEFT, TOP); text("WERFT-LOGBUCH // MITTEILUNGEN", termX + 15, termY + 8); stroke(0, 180, 255, 40); line(termX, termY + 22, termX + termW, termY + 22); textSize(10); for (int i = 0; i < terminalLogs.size(); i++) { String logText = (String) terminalLogs.get(i); if (logText.indexOf("GEWINN") > 0 || logText.indexOf("MONTIERT") > 0) fill(0, 255, 150); else if (logText.indexOf("FORSCHER") > 0) fill(255, 200, 0); else fill(120, 160, 180); text(logText, termX + 15, termY + 28 + i * 16); } } // --- GALAXY RANGERS FINALE SCREEN --- void drawGalaxyRangersLaunchScreen() { fill(10, 15, 25); stroke(0, 255, 180); strokeWeight(2); rect(80, 100, width - 160, 580, 15); fill(255, 200, 0); textSize(24); textAlign(CENTER, TOP); text("⚡ KONTROLLZENTRUM NASA & DTIM-HQ ⚡", width/2, 130); fill(0, 220, 255); textSize(14); textAlign(CENTER, TOP); text("==========================================================================", width/2, 165); // Retro Galaxie Rangers Intro Text! fill(255); textSize(13); textAlign(CENTER, TOP); text("„Im Jahr 2026 erreichte die Menschheit die Grenzen des bekannten Raums.\n" + "Keine chemische Rakete der Welt konnte uns weiterbringen...\n\n" + "Bis ein mutiges Team aus einer deutschen Einrichtung und internationalen Wissenschaftlern\n" + "die Gesetze der Raumzeit mit der 120°-Gitter-Physik neu schrieb!\n\n" + "Wir haben ein Team außergewöhnlicher Pioniere zusammengestellt.\n" + "Keine Soldaten. Keine Megakonzerne. Nur reine Physik, Mut und der ZEC-Antrieb.\n\n" + "Die ZEC-1 ENDEAVOUR ist startklar auf der Rampe. Der Mars wartet auf uns!“", width/2, 190); fill(0, 220, 255); textSize(14); text("==========================================================================", width/2, 380); // Animierter Pulsierender Start-Button float pulse = sin(frameCount * 0.1) * 5.0; fill(0, 200, 120); stroke(255); strokeWeight(2); rect(width/2 - 200, 430, 400, 70, 12); fill(10, 20, 15); textSize(18); textAlign(CENTER, CENTER); text("🚀 MISSION ZEC-1 STARTEN! ➔", width/2, 465); fill(180); textSize(11); text("(Klicke hier, um den ZEC-Raumsprung zum Mars einzuleiten)", width/2, 520); } // --- INTERAKTIONEN --- void triggerManualMail() { clickPulse = 1.0; if (recipientClass == 0) { // Einrichtung viralMultiplier += 0.05; rawMaterials += (int)(random(2, 6) * viralMultiplier); addLog("Hilfseinrichtung unterstützt! Rohstoffe geliefert (+" + rawMaterials + ")"); } else if (recipientClass == 1) { // Universitäten if (random(1.0) < 0.45) { researchers++; addLog("FORSCHER GEWONNEN! Ein Physiker schließt sich dem Team an (#" + researchers + ")"); } else { rawMaterials += 8; addLog("Uni-Labor spendet Messgeräte (+8 Rohstoffe)."); } } else if (recipientClass == 2) { // Industrie int matGain = (int)random(15, 35); rawMaterials += matGain; addLog("INDUSTRIE-LIEFERUNG: +" + matGain + " Rohstoffe erhalten!"); } } void mousePressed() { if (isReadyForLaunch) { // Start-Button Klick if (mouseX > width/2 - 200 && mouseX < width/2 + 200 && mouseY > 430 && mouseY < 500) { addLog("🚀 ZÜNDUNG DER 120-GRAD SPULEN! MARS-RUTE AKTIV!"); } return; } // Mail-Button if (mouseX > 40 && mouseX < 420 && mouseY > 110 && mouseY < 250) { triggerManualMail(); } // Empfänger-Klassen if (mouseX > 55 && mouseX < 405) { if (mouseY > 297 && mouseY < 325) recipientClass = 0; if (mouseY > 330 && mouseY < 358) recipientClass = 1; if (mouseY > 363 && mouseY < 391) recipientClass = 2; } // Werft-Klicks (Bauteile montieren) float x = 440; float y = 110; float w = 620; if (mouseX > x + 20 && mouseX < x + w - 20) { if (!part1Built && mouseY > y + 45 && mouseY < y + 120 && rawMaterials >= 150) { rawMaterials -= 150; part1Built = true; addLog("✅ MONTIERT: ZEC-Quanten-Reaktor"); } if (!part2Built && mouseY > y + 130 && mouseY < y + 205 && rawMaterials >= 350) { rawMaterials -= 350; part2Built = true; addLog("✅ MONTIERT: Hexagonales Waben-Chassis"); } if (!part3Built && mouseY > y + 215 && mouseY < y + 290 && rawMaterials >= 600) { rawMaterials -= 600; part3Built = true; addLog("✅ MONTIERT: Photonen-Laser & Schild"); } if (!part4Built && mouseY > y + 300 && mouseY < y + 375 && rawMaterials >= 1000) { rawMaterials -= 1000; part4Built = true; addLog("✅ MONTIERT: KI-Navigations-Brücke"); } } checkLaunchState(); } void keyPressed() { if (key == ' ' && !isReadyForLaunch) { triggerManualMail(); } }