/* ================================================================= GAME 1: THE MAIL SPAMMER -> BREAKTHROUGH EVENT Optimiert für processing.min.js - Jan Bühring Modell ================================================================= */ // Ressourcen float money = 0.0; int contactsCount = 0; float viralMultiplier = 1.0; // Upgrades int pythonBots = 0; float pythonPrice = 30.0; int geminiAIs = 0; float geminiPrice = 150.0; // Empfänger-Klassen int recipientClass = 0; // 0 = Hilfseinrichtung/Lokal, 1 = Uni-Professoren, 2 = Medien & Verlage // Breakthrough State boolean isBreakthroughTriggered = false; float breakthroughProgress = 0.0; // 0 bis 100% ArrayList terminalLogs; float clickPulse = 0.0; void setup() { size(1100, 750); terminalLogs = new ArrayList(); addLog("SYSTEM: DTIM-ZEC Node V2.0 online."); addLog("INFO: Starte Lokale Kontaktaufnahme..."); } void draw() { background(10, 12, 18); // Automatischer Adress-Zuwachs durch Bots (Gedrosselt!) if (frameCount % 120 == 0) { // alle 2 Sekunden if (pythonBots > 0) { contactsCount += pythonBots; checkBreakthrough(); } } if (frameCount % 60 == 0) { if (geminiAIs > 0) { money += geminiAIs * 3.50 * viralMultiplier; } // Virales Marketing der Einrichtung erhöht Reichweite passiv if (recipientClass == 0 && viralMultiplier > 1.0) { contactsCount += (int)(viralMultiplier * 0.8); checkBreakthrough(); } } // HUD & Fenster zeichnen drawHeaderHUD(); if (!isBreakthroughTriggered) { drawInteractiveClicker(); drawRecipientClassSelector(); drawUpgradeShop(); drawTerminalWindow(); } else { drawBreakthroughScreen(); // Wenn Medien berichten -> Wechsel zum Baumodus! } } void addLog(String text) { terminalLogs.add("[" + nf(hour(),2) + ":" + nf(minute(),2) + ":" + nf(second(),2) + "] " + text); if (terminalLogs.size() > 12) { terminalLogs.remove(0); } } void checkBreakthrough() { breakthroughProgress = map(contactsCount, 0, 500, 0, 100); if (contactsCount >= 500 && !isBreakthroughTriggered) { isBreakthroughTriggered = true; addLog("⚠️ BREAKTHROUGH: Medien berichten international!"); } } // --- HUD --- void drawHeaderHUD() { fill(18, 24, 36); stroke(0, 180, 255, 80); strokeWeight(1.5); rect(20, 20, width - 40, 70, 8); if (!isBreakthroughTriggered) { fill(0, 220, 255); textSize(13); textAlign(LEFT, CENTER); text("KONTOSTAND:", 40, 45); fill(0, 255, 150); textSize(20); text(nf(money, 1, 2) + " €", 145, 44); fill(0, 220, 255); textSize(13); text("REICHWEITE / KONTAKTE:", 300, 45); fill(255, 200, 0); textSize(18); text(contactsCount + " / 500", 475, 44); // Fortschrittsbalken zum Durchbruch fill(30, 40, 55); rect(600, 37, 240, 16, 4); fill(0, 255, 180); rect(600, 37, map(breakthroughProgress, 0, 100, 0, 240), 16, 4); fill(255); textSize(10); textAlign(CENTER, CENTER); text("MEDIEN-DURCHBRUCH: " + (int)breakthroughProgress + "%", 720, 45); } else { fill(0, 255, 180); textSize(18); textAlign(CENTER, CENTER); text("🌐 INTERNATIONALER MEDIEN-DURCHBRUCH ERFOLGT! GELD SPIELT KEINE ROLLE MEHR.", width/2, 55); } } // --- KLICKER & EMPFÄNGER-KLASSEN --- void drawInteractiveClicker() { float btnX = 40; float btnY = 110; float btnW = 380; float btnH = 150; 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("✉️ MAIL ABSENDEN ✉️", btnX + btnW/2, btnY + 45); fill(200); textSize(11); text("(Klicken oder LEERTASTE)", btnX + btnW/2, btnY + 75); fill(0, 255, 180); textSize(12); text("+1 bis 2 Adressen | Chance auf JACKPOT!", btnX + btnW/2, btnY + 115); } void drawRecipientClassSelector() { float x = 40; float y = 280; fill(15, 20, 30); stroke(40, 50, 70); rect(x, y, 380, 140, 8); fill(0, 180, 255); textSize(12); textAlign(LEFT, TOP); text("EMPFÄNGER-KLASSE WÄHLEN:", x + 15, y + 12); // Klasse 0: Hilfseinrichtung / Freunde (Virales Marketing) drawClassBtn(x + 15, y + 35, 350, 28, "1. Hilfseinrichtung (+Virales Marketing)", recipientClass == 0); // Klasse 1: Universitäten drawClassBtn(x + 15, y + 68, 350, 28, "2. Physik-Professoren (+Hohe Spenden)", recipientClass == 1); // Klasse 2: Tech-Journalisten drawClassBtn(x + 15, y + 101, 350, 28, "3. Science-Blogs & Presse (+Reichweite)", 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); } // --- SHOP --- void drawUpgradeShop() { float shopX = 440; float shopY = 110; float shopW = 620; fill(15, 20, 30); stroke(40, 50, 70); rect(shopX, shopY, shopW, 310, 10); fill(0, 180, 255); textSize(14); textAlign(LEFT, TOP); text("AUTOMATISIERUNG", shopX + 20, shopY + 15); drawShopBtn(shopX + 20, shopY + 45, shopW - 40, 75, "Python Address-Scraper", "Sammelt langsam Adressen im Netz (+1/2s).", pythonPrice, "Aktiv: " + pythonBots, money >= pythonPrice); drawShopBtn(shopX + 20, shopY + 130, shopW - 40, 75, "Gemini Auto-Mail AI", "Verfasst individuelle Mails & erzeugt Spenden.", geminiPrice, "Aktiv: " + geminiAIs, money >= geminiPrice); } void drawShopBtn(float x, float y, float w, float h, String title, String desc, float price, String status, boolean canAfford) { if (canAfford) fill(24, 36, 52); else fill(16, 20, 28); stroke(canAfford ? color(0, 180, 255) : color(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); fill(0, 255, 150); textSize(12); text("Preis: " + nf(price, 1, 2) + " €", x + 15, y + 48); fill(0, 200, 255); textAlign(RIGHT, TOP); textSize(11); text(status, x + w - 15, y + 10); } // --- TERMINAL --- void drawTerminalWindow() { float termX = 40; float termY = 440; float termW = 1020; float termH = 280; 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("LIVE MAIL-LOGS & MEDIEN-RÜCKMELDUNGEN", termX + 15, termY + 10); stroke(0, 180, 255, 40); line(termX, termY + 26, termX + termW, termY + 26); textSize(10); for (int i = 0; i < terminalLogs.size(); i++) { String logText = (String) terminalLogs.get(i); if (logText.indexOf("JACKPOT") > 0 || logText.indexOf("BREAKTHROUGH") > 0) fill(255, 200, 0); else if (logText.indexOf("SPENDE") > 0) fill(0, 255, 150); else fill(120, 160, 180); text(logText, termX + 15, termY + 34 + i * 19); } } // --- BREAKTHROUGH SCREEN (WECHSEL ZUM BAUMODUS) --- void drawBreakthroughScreen() { fill(15, 22, 34); stroke(0, 255, 180); strokeWeight(2); rect(100, 120, width - 200, 560, 15); fill(0, 255, 180); textSize(24); textAlign(CENTER, TOP); text("💥 DIE MEDIEN-EXPLOSION 💥", width/2, 150); fill(255); textSize(14); textAlign(CENTER, TOP); text("Ein bekannter Physik-Journalist hat deine Website jan-buehring.de entdeckt.\n" + "Innerhalb von Stunden berichten Nature, BBC und Wired über das DTIM-ZEC Modell!\n\n" + "Mäzene, Internationale Forschungsfonds und Raumfahrt-Konsortien überweisen unaufgefordert Millionen.", width/2, 210); fill(0, 220, 255); textSize(18); text("KONTOSTAND: UNBEGRENZT (Geld wird nicht mehr benötigt)", width/2, 320); // Button zum eigentlichen Baumodus fill(0, 200, 120); rect(width/2 - 180, 420, 360, 60, 10); fill(10, 20, 15); textSize(16); textAlign(CENTER, CENTER); text("🚀 RAUMSCHIFF-WERFT STARTEN ➔", width/2, 450); } // --- INTERAKTIONEN --- void triggerManualMail() { clickPulse = 1.0; // 1-2 Adressen pro Klick int newAddrs = (int)random(1, 3); contactsCount += newAddrs; if (recipientClass == 0) { // Einrichtung / Virales Marketing viralMultiplier += 0.08; addLog("Mail an Bewohner/Betreuer. Viraler Multiplikator steigt auf " + nf(viralMultiplier,1,2) + "x!"); } else if (recipientClass == 1) { // Professoren if (random(1.0) < 0.40) { float donation = random(10.0, 50.0) * viralMultiplier; money += donation; addLog("SPENDE VON PROFESSOR: +" + nf(donation, 1, 2) + " €"); } else { addLog("Mail an Uni-Institut gesendet (+1 Addr)."); } } else if (recipientClass == 2) { // Medien // Chance auf JACKPOT! if (random(1.0) < 0.12) { int jackpot = (int)random(40, 90); contactsCount += jackpot; addLog("🔥 JACKPOT! Science-Blog teilt jan-buehring.de! (+" + jackpot + " Kontakte)"); } else { addLog("Pressemitteilung an Tech-Magazin gesendet."); } } checkBreakthrough(); } void mousePressed() { if (isBreakthroughTriggered) { // Klick auf "RAUMSCHIFF-WERFT STARTEN" if (mouseX > width/2 - 180 && mouseX < width/2 + 180 && mouseY > 420 && mouseY < 480) { // Hier startet der echte Baumodus (Phase 2)! addLog("START: Raumschiff-Werft wird initialisiert..."); } return; } // Mail Klick if (mouseX > 40 && mouseX < 420 && mouseY > 110 && mouseY < 260) { triggerManualMail(); } // Empfänger-Klassen if (mouseX > 55 && mouseX < 405) { if (mouseY > 315 && mouseY < 343) recipientClass = 0; if (mouseY > 348 && mouseY < 376) recipientClass = 1; if (mouseY > 381 && mouseY < 409) recipientClass = 2; } // Shop float shopX = 440; float shopY = 110; float shopW = 620; if (mouseX > shopX + 20 && mouseX < shopX + shopW - 20) { if (mouseY > shopY + 45 && mouseY < shopY + 120 && money >= pythonPrice) { money -= pythonPrice; pythonBots++; pythonPrice *= 1.4; addLog("BOT GEKAUFT: Python Scraper #" + pythonBots); } if (mouseY > shopY + 130 && mouseY < shopY + 205 && money >= geminiPrice) { money -= geminiPrice; geminiAIs++; geminiPrice *= 1.5; addLog("KI ANGEHEUERT: Gemini Auto-Mail Instance #" + geminiAIs); } } } void keyPressed() { if (key == ' ' && !isBreakthroughTriggered) { triggerManualMail(); } }