Spaces:
Running
Running
Delete play.html
Browse files
play.html
DELETED
|
@@ -1,940 +0,0 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="it">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
| 6 |
-
<title>INNOVATION RUN - Matteo Bergamelli</title>
|
| 7 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
-
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700;800&display=swap" rel="stylesheet">
|
| 9 |
-
<style>
|
| 10 |
-
:root { --neon-green: #00ff41; --legacy-gold: #ffb700; --error-red: #ff0055; --bg-dark: #0a0a0a; }
|
| 11 |
-
body { background: #0a0a0a; color: #e0e0e0; font-family: 'JetBrains Mono', monospace; overflow: hidden; user-select: none; touch-action: none; position: fixed;}
|
| 12 |
-
canvas { display: block; width: 100%; height: 100%; }
|
| 13 |
-
|
| 14 |
-
.scanlines { background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.1)); background-size: 100% 4px; position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 10; }
|
| 15 |
-
.ui-panel { backdrop-filter: blur(5px); background: rgba(20, 20, 20, 0.8); border: 1px solid rgba(255, 255, 255, 0.1); transition: all 0.2s; }
|
| 16 |
-
|
| 17 |
-
.btn { background: var(--neon-green); color: #000; padding: 20px 50px; font-size: 1.5rem; font-weight: 800; text-transform: uppercase; cursor: pointer; border-radius: 4px; box-shadow: 0 0 20px rgba(0, 255, 65, 0.4); transition: 0.2s; border: none; }
|
| 18 |
-
.btn:hover { transform: scale(1.05); background: #fff; box-shadow: 0 0 40px rgba(0, 255, 65, 0.6); }
|
| 19 |
-
|
| 20 |
-
.flow-container { width: 200px; height: 12px; background: #333; border-radius: 6px; overflow: hidden; position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 20; border: 2px solid #555; }
|
| 21 |
-
.flow-bar { height: 100%; width: 0%; background: linear-gradient(90deg, #ffb700, #00ff41); transition: width 0.1s linear; }
|
| 22 |
-
.flow-text { position: absolute; bottom: 48px; left: 50%; transform: translateX(-50%); font-size: 0.8rem; color: #fff; text-transform: uppercase; font-weight: bold; text-shadow: 0 2px 4px #000; width: 100%; text-align: center; }
|
| 23 |
-
|
| 24 |
-
.floating-message {
|
| 25 |
-
position: absolute;
|
| 26 |
-
font-weight: 800;
|
| 27 |
-
font-size: 1.80rem;
|
| 28 |
-
text-align: left;
|
| 29 |
-
pointer-events: none;
|
| 30 |
-
text-shadow: 2px 2px 0px #000;
|
| 31 |
-
z-index: 50;
|
| 32 |
-
white-space: nowrap;
|
| 33 |
-
animation: floatRightUp 1.1s cubic-bezier(0.23, 1, 0.32, 1) forwards;
|
| 34 |
-
}
|
| 35 |
-
|
| 36 |
-
@keyframes floatRightUp {
|
| 37 |
-
0% { opacity: 0; transform: translate(0, 20px) scale(0.5); }
|
| 38 |
-
10% { opacity: 1; transform: translate(20px, -20px) scale(1.2); }
|
| 39 |
-
70% { opacity: 1; transform: translate(40px, -80px) scale(1); }
|
| 40 |
-
100% { opacity: 0; transform: translate(60px, -120px) scale(0.9); }
|
| 41 |
-
}
|
| 42 |
-
|
| 43 |
-
.motivational-banner { position: absolute; top: 20%; width: 100%; text-align: center; font-size: 1.7rem; font-weight: 800; color: #fff; text-shadow: 0 0 20px var(--neon-green); pointer-events: none; z-index: 40; opacity: 0; transition: all 0.5s; letter-spacing: 2px; }
|
| 44 |
-
.combo-display { position: absolute; top: 45%; right: 8%; font-size: 2.1rem; font-weight: 900; color: #fff; text-shadow: 4px 4px 0px #ff0055; opacity: 0; transition: all 0.3s; z-index: 45; transform: rotate(-10deg); text-align: right; pointer-events: none; font-style: italic; }
|
| 45 |
-
.hidden { display: none !important; }
|
| 46 |
-
</style>
|
| 47 |
-
</head>
|
| 48 |
-
<body>
|
| 49 |
-
|
| 50 |
-
<div id="game-container" style="position: relative; width: 100vw; height: 100vh; background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%); overflow: hidden;">
|
| 51 |
-
<div class="scanlines"></div>
|
| 52 |
-
<canvas id="gameCanvas"></canvas>
|
| 53 |
-
|
| 54 |
-
<div id="motivator" class="motivational-banner"></div>
|
| 55 |
-
<div id="combo" class="combo-display"></div>
|
| 56 |
-
|
| 57 |
-
<div style="position: absolute; top: 0; left: 0; width: 100%; padding: 1rem; display: flex; justify-content: space-between; z-index: 20; pointer-events: none;">
|
| 58 |
-
<div class="ui-panel" style="padding: 0.5rem 1rem; border-radius: 0.25rem;">
|
| 59 |
-
<div style="font-size: 10px; color: #999;" id="lbl-phase">FASE PROGETTO</div>
|
| 60 |
-
<div id="phase-display" style="color: #00ff41; font-weight: bold; font-size: 1.125rem;"></div>
|
| 61 |
-
</div>
|
| 62 |
-
<div class="ui-panel" style="padding: 0.5rem 1rem; border-radius: 0.25rem; text-align: right;">
|
| 63 |
-
<div style="font-size: 10px; color: #999;" id="lbl-metrics">KPI</div>
|
| 64 |
-
<div style="color: white; font-size: 0.875rem;">
|
| 65 |
-
<span id="lbl-score">PUNTI</span>: <span id="score-display" style="color: #00ff41; font-weight: bold;">0</span> |
|
| 66 |
-
<span id="lbl-legacy">LEGACY</span>: <span id="legacy-display" style="color: #ffb700; font-weight: bold;">0</span>%
|
| 67 |
-
</div>
|
| 68 |
-
</div>
|
| 69 |
-
</div>
|
| 70 |
-
|
| 71 |
-
<div class="flow-text" id="flow-label"></div>
|
| 72 |
-
<div class="flow-container"><div id="flow-bar" class="flow-bar"></div></div>
|
| 73 |
-
|
| 74 |
-
<div id="start-screen" style="position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 30; background: rgba(0,0,0,0.92); backdrop-filter: blur(8px); padding: 1rem;">
|
| 75 |
-
|
| 76 |
-
<div style="background: #111; border: 1px solid #444; padding: 2rem; border-radius: 0.5rem; max-width: 40rem; width: 100%; margin-bottom: 2rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);">
|
| 77 |
-
<div style="display: flex; flex-direction: column; gap: 1.5rem; font-size: 1.1rem;">
|
| 78 |
-
<div style="display: flex; align-items: center;">
|
| 79 |
-
<span id="icon-legacy" style="font-size: 2.8rem; margin-right: 1rem;"></span>
|
| 80 |
-
<div><span id="title-legacy" style="color: #ffb700; font-weight: bold; font-size: 1.2rem;"></span><p id="desc-legacy" style="color: #999; font-size: 1.2rem; margin: 0;"></p></div>
|
| 81 |
-
</div>
|
| 82 |
-
<div style="display: flex; align-items: center;">
|
| 83 |
-
<span id="icon-ai" style="font-size: 2.8rem; margin-right: 1rem;"></span>
|
| 84 |
-
<div><span id="title-ai" style="color: #00ff41; font-weight: bold; font-size: 1.2rem;"></span><p id="desc-ai" style="color: #999; font-size: 1.2rem; margin: 0;"></p></div>
|
| 85 |
-
</div>
|
| 86 |
-
<div style="display: flex; align-items: center;">
|
| 87 |
-
<span id="icon-obs" style="font-size: 2.8rem; margin-right: 1rem;"></span>
|
| 88 |
-
<div><span id="title-obs" style="color: #ff0055; font-weight: bold; font-size: 1.2rem;"></span><p id="desc-obs" style="color: #999; font-size: 1.2rem; margin: 0;"></p></div>
|
| 89 |
-
</div>
|
| 90 |
-
<div style="display: flex; align-items: center;">
|
| 91 |
-
<span style="font-size: 2.8rem; margin-right: 1rem;">⚡</span>
|
| 92 |
-
<div><span id="title-bar" style="color: white; font-weight: bold; font-size: 1.2rem;"></span><p id="desc-bar" style="color: #999; font-size: 1.2rem; margin: 0;"></p></div>
|
| 93 |
-
</div>
|
| 94 |
-
</div>
|
| 95 |
-
</div>
|
| 96 |
-
|
| 97 |
-
<button id="btn-start" class="btn" onclick="initGame()"></button>
|
| 98 |
-
<p id="controls-hint" style="margin-top: 1.5rem; font-size: 1rem; color: #ccc; animation: pulse 2s infinite; font-weight: bold;"></p>
|
| 99 |
-
</div>
|
| 100 |
-
|
| 101 |
-
<div id="game-over" class="hidden" style="position: absolute; inset: 0; flex-direction: column; align-items: center; justify-content: center; z-index: 40; background: rgba(0,0,0,0.95);">
|
| 102 |
-
|
| 103 |
-
<h2 id="go-title" style="font-size: 2.25rem; font-weight: bold; color: white; margin-bottom: 1.5rem; text-align: center;"></h2>
|
| 104 |
-
|
| 105 |
-
<div style="text-align: center; font-size: 1.45rem; color: #ccc; margin-bottom: 2.5rem; background: #1a1a1a; padding: 2.5rem; border: 1px solid #444; border-radius: 0.5rem; max-width: 35rem; width: 100%;">
|
| 106 |
-
<p id="go-reason" style="color: #ff0055; font-weight: bold; margin-bottom: 1.5rem; font-size: 1.7rem;"></p>
|
| 107 |
-
|
| 108 |
-
<div style="display: flex; justify-content: space-between; margin-bottom: 0.8rem;"><span>MVP Score:</span><span id="final-score" style="color: #00ff41; font-weight: bold;">0</span></div>
|
| 109 |
-
<div style="display: flex; justify-content: space-between; margin-bottom: 1.5rem;"><span>Modernizzazione:</span><span id="final-legacy" style="color: #ffb700; font-weight: bold;">0%</span></div>
|
| 110 |
-
<hr style="border-color: #444; margin: 1.5rem 0;">
|
| 111 |
-
|
| 112 |
-
<p id="death-quote" style="font-style: italic; color: #999; font-size: 1.2rem;"></p>
|
| 113 |
-
</div>
|
| 114 |
-
<button id="btn-restart" class="btn" onclick="initGame()"></button>
|
| 115 |
-
</div>
|
| 116 |
-
</div>
|
| 117 |
-
|
| 118 |
-
<script>
|
| 119 |
-
document.addEventListener('DOMContentLoaded', () => {
|
| 120 |
-
|
| 121 |
-
// 1. Previene il "Pinch to Zoom" (Pizzico con due dita) su tutto il documento
|
| 122 |
-
document.addEventListener('touchmove', function (event) {
|
| 123 |
-
if (event.touches.length > 1) {
|
| 124 |
-
event.preventDefault(); // Blocca se ci sono più di 1 dito
|
| 125 |
-
}
|
| 126 |
-
}, { passive: false });
|
| 127 |
-
|
| 128 |
-
// 2. Previene il doppio tap veloce (Zoom) su tutto il documento
|
| 129 |
-
let lastTouchEnd = 0;
|
| 130 |
-
document.addEventListener('touchend', function (event) {
|
| 131 |
-
const now = (new Date()).getTime();
|
| 132 |
-
if (now - lastTouchEnd <= 300) {
|
| 133 |
-
event.preventDefault();
|
| 134 |
-
}
|
| 135 |
-
lastTouchEnd = now;
|
| 136 |
-
}, false);
|
| 137 |
-
|
| 138 |
-
// 3. Gestione specifica per il contenitore del gioco (Massima priorità)
|
| 139 |
-
const gameContainer = document.querySelector('.game-zoom-container');
|
| 140 |
-
if (gameContainer) {
|
| 141 |
-
gameContainer.addEventListener('touchmove', function(e) {
|
| 142 |
-
// Impedisce qualsiasi movimento della pagina mentre si gioca
|
| 143 |
-
e.preventDefault();
|
| 144 |
-
}, { passive: false });
|
| 145 |
-
}
|
| 146 |
-
});
|
| 147 |
-
/**
|
| 148 |
-
* ==========================================================================================
|
| 149 |
-
* ⚙️ CONFIGURAZIONE DI GIOCO - MATTEO INNOVATION LAB EDITION
|
| 150 |
-
* ==========================================================================================
|
| 151 |
-
*/
|
| 152 |
-
const GAME_CONFIG = {
|
| 153 |
-
SPEED: {
|
| 154 |
-
INITIAL: 5.8,
|
| 155 |
-
MAX: 14.0,
|
| 156 |
-
ACCELERATION: 0.0007,
|
| 157 |
-
BOOST: 3.5
|
| 158 |
-
},
|
| 159 |
-
GRAVITY: 0.45,
|
| 160 |
-
JUMP_FORCE: -10.8,
|
| 161 |
-
|
| 162 |
-
TEXTS: {
|
| 163 |
-
TITLE: "Innovation Run",
|
| 164 |
-
SUBTITLE: "// Missione: Crea un PoC visionario OMNICANALE",
|
| 165 |
-
LBL_PHASE: "STATUS MENTALE",
|
| 166 |
-
LBL_METRICS: "LIVELLO HYPE",
|
| 167 |
-
LBL_SCORE: "STIMA DEL CAPO",
|
| 168 |
-
LBL_LEGACY: "BUG RISOLTI",
|
| 169 |
-
START_BTN: "Corri verso l'innovazione",
|
| 170 |
-
RESTART_BTN: "CTRL+Z E RIPROVA",
|
| 171 |
-
CONTROLS: "Premi SPAZIO per saltare i problemi | GIÙ per schivare le riunioni",
|
| 172 |
-
BAR_EMPTY: "CERCA ISPIRAZIONE...",
|
| 173 |
-
BAR_FULL: "🔥 MODALITÀ GENIO ATTIVA! 🔥"
|
| 174 |
-
},
|
| 175 |
-
|
| 176 |
-
JUMP_MESSAGES: [
|
| 177 |
-
"SALTO DI QUALITÀ!",
|
| 178 |
-
"SKIP MEETING!",
|
| 179 |
-
"BYPASS!",
|
| 180 |
-
"NEXT LEVEL!",
|
| 181 |
-
"ELEVATION!",
|
| 182 |
-
"QUOTA RAGGIUNTA!",
|
| 183 |
-
"CLOUD JUMP!",
|
| 184 |
-
"SORPASSO!",
|
| 185 |
-
"HOP!",
|
| 186 |
-
"AGILE JUMP!",
|
| 187 |
-
"SCALABILITÀ!"
|
| 188 |
-
],
|
| 189 |
-
|
| 190 |
-
ENTITIES: {
|
| 191 |
-
LEGACY: {
|
| 192 |
-
CHAR: '☕',
|
| 193 |
-
COLOR: '#FFC107', // Giallo Oro
|
| 194 |
-
TITLE: "CAFFÈ DOPPIO",
|
| 195 |
-
DESC: "Senza questo non si compila. [+10 Punti]",
|
| 196 |
-
MSG: [
|
| 197 |
-
"CAFFÈ DOPPIO!",
|
| 198 |
-
"ENERGIA PURA!",
|
| 199 |
-
"COMPILAZIONE OK!",
|
| 200 |
-
"BUG-IORNO!",
|
| 201 |
-
"FOCUS ON!",
|
| 202 |
-
"ESPRESSO DI CODICE!",
|
| 203 |
-
"REFILL DI SINAPSI!",
|
| 204 |
-
"BREAK INNOVATION LAB",
|
| 205 |
-
"SHOT DI CREATIVITÀ!",
|
| 206 |
-
"CPU AL 100%, DEV ANCHE!",
|
| 207 |
-
"SYNC-CAFFÈ CON IL TEAM!",
|
| 208 |
-
"MEETING-READY MODE!",
|
| 209 |
-
"LATENZA MENTALE AZZERATA!",
|
| 210 |
-
"ONIVERSE FUEL!",
|
| 211 |
-
"IDEA RICARICATA!",
|
| 212 |
-
"POC-ACCINO TIME!",
|
| 213 |
-
"DEBUG CON AROMA ARABICA!",
|
| 214 |
-
"IL GANTT ORA HA SENSO!",
|
| 215 |
-
"OMNICAPPUCCINO APPROVED!"
|
| 216 |
-
]
|
| 217 |
-
},
|
| 218 |
-
AI: {
|
| 219 |
-
CHAR: '🤖',
|
| 220 |
-
COLOR: '#00D4FF', // Azzurro Ciano
|
| 221 |
-
TITLE: "VERTEX AI",
|
| 222 |
-
DESC: "Non ti sostituisce, ti AMPLIFICA. [GOD MODE]",
|
| 223 |
-
MSG: [
|
| 224 |
-
"GEMINI MI AMPLIFICA!",
|
| 225 |
-
"COPILOT ATTIVO!",
|
| 226 |
-
"INTELLIGENZA++",
|
| 227 |
-
"SALTO NEL FUTURO!",
|
| 228 |
-
"HYPE BOOST!",
|
| 229 |
-
"PROMPT IN ONIVERSE STYLE!",
|
| 230 |
-
"LLM ALLINEATO!",
|
| 231 |
-
"DEPLOYATO SU VERTEX!",
|
| 232 |
-
"DASHBOARD PARLANTE!",
|
| 233 |
-
"RAG ATTIVATO!",
|
| 234 |
-
"INSIGHT IN REAL-TIME!",
|
| 235 |
-
"PROTOTIPO READY!",
|
| 236 |
-
"AI++",
|
| 237 |
-
"È USCITO IL NUOVO GEMINI!",
|
| 238 |
-
"FINETUNING DI GEMMA",
|
| 239 |
-
"DALLO USE CASE AL WOW CASE!",
|
| 240 |
-
"REALTA' AUMENTATA ON!"
|
| 241 |
-
]
|
| 242 |
-
|
| 243 |
-
},
|
| 244 |
-
OBSTACLE: {
|
| 245 |
-
CHAR: '🧱',
|
| 246 |
-
COLOR: '#FF3D00', // Rosso Arancio
|
| 247 |
-
TITLE: "OLD STYLE",
|
| 248 |
-
DESC: "'Si è sempre fatto così', 'Costa troppo'. SALTALA!",
|
| 249 |
-
MSG: [
|
| 250 |
-
"NON TI SENTO!",
|
| 251 |
-
"BYE BYE SILOS!",
|
| 252 |
-
"INNOVAZIONE VERA!",
|
| 253 |
-
"BUROCRAZIA KO!",
|
| 254 |
-
"RIUNIONE SENZA AGENDA IN VISTA!",
|
| 255 |
-
"SCOPE CREEP IN ARRIVO!",
|
| 256 |
-
"SLIDE AL POSTO DI CODICE!",
|
| 257 |
-
"\"METTIAMOLO NEL PROSSIMO QUARTO\"",
|
| 258 |
-
"E-MAIL A 32 DESTINATARI!",
|
| 259 |
-
"TICKET APERTO DAL 2012!",
|
| 260 |
-
"APPROVAZIONE A TRE LIVELLI!",
|
| 261 |
-
"CAMBIO REQUISITI LAST MINUTE!",
|
| 262 |
-
"DOCUMENTAZIONE INESISTENTE!",
|
| 263 |
-
"PASSWORD SCRITTA SU POST-IT!",
|
| 264 |
-
"EXCEL SALVATO SUL DESKTOP!",
|
| 265 |
-
"INTERFACCIA NON RESPONSIVE!",
|
| 266 |
-
"MEETING CHE POTEVA ESSERE UNA CHAT!",
|
| 267 |
-
"CHAOS MONKEY ORGANIZZATIVO!",
|
| 268 |
-
]
|
| 269 |
-
},
|
| 270 |
-
BAR: {
|
| 271 |
-
TITLE: "BARRA DELL'INNOVAZIONE",
|
| 272 |
-
DESC: "Riempi la barra per far approvare il budget."
|
| 273 |
-
}
|
| 274 |
-
},
|
| 275 |
-
|
| 276 |
-
MOTIVATIONAL: [
|
| 277 |
-
"MA SUL MIO PC FUNZIONA!",
|
| 278 |
-
"È COLPA DELLA CACHE!",
|
| 279 |
-
"CHI HA TOCCATO IL SERVER?!",
|
| 280 |
-
"PUSHATO IN PRODUZIONE!",
|
| 281 |
-
"NON È UN BUG, È UNA FEATURE!",
|
| 282 |
-
"HO COMMENTATO IL CODICE",
|
| 283 |
-
"STACCA E RIATTACCA!",
|
| 284 |
-
"PIÙ PYTHON, MENO PPTX!",
|
| 285 |
-
"OMNICHANNEL A VITA!",
|
| 286 |
-
"DA QUI A PROTOTIPO È UN ATTIMO!",
|
| 287 |
-
"MAKE IT WORK, THEN MAKE IT WOW!",
|
| 288 |
-
"L'OMNICANALE NON DORME MAI!",
|
| 289 |
-
"IL PROBLEMA GIUSTO VALE ORO.",
|
| 290 |
-
"DOMANDE GIUSTE",
|
| 291 |
-
"IDEE GENIALI A GO GO",
|
| 292 |
-
"PENSALA IN SCALA ONIVERSE.",
|
| 293 |
-
"SE PUÒ ESSERE AUTOMATIZZATO, FALLO!",
|
| 294 |
-
"OGNI BUG RACCONTA UNA STORIA.",
|
| 295 |
-
"MVP O NIENTE.",
|
| 296 |
-
"DATI, NON OPINIONI.",
|
| 297 |
-
"PIÙ TEST, MENO ALIBI.",
|
| 298 |
-
"UN PROTOTIPO VALE 100 SLIDE.",
|
| 299 |
-
"DA DOSSOBUONO AL FUTURO",
|
| 300 |
-
],
|
| 301 |
-
|
| 302 |
-
COMBO_PHRASES: [
|
| 303 |
-
"DAJE DEV!",
|
| 304 |
-
"CODICE POETICO!",
|
| 305 |
-
"MIRACOLO TECNICO!",
|
| 306 |
-
"SENIOR DEV AURA!",
|
| 307 |
-
"ANGULAR GOAL!",
|
| 308 |
-
"ZERO CONFLITTI GIT!",
|
| 309 |
-
"MVP LEGGENDARIO!",
|
| 310 |
-
"FERMATEMI!",
|
| 311 |
-
"QUESTO È IL FUTURO!",
|
| 312 |
-
"BRIVIDO AI!",
|
| 313 |
-
"DOSSOBUONO POWER!",
|
| 314 |
-
"OMNICHANNEL COMBO x10!",
|
| 315 |
-
"FLOW STATE ATTIVATO!",
|
| 316 |
-
"FRONT-END DA VETRINA ONIVERSE!",
|
| 317 |
-
"BACK-END CHE NON MOLLA!",
|
| 318 |
-
"PIPELINE DA CHAMPIONS LEAGUE!",
|
| 319 |
-
"UX SPAZIALE!",
|
| 320 |
-
"SCALABILITÀ LIKE A BOSS!",
|
| 321 |
-
"LATENZA? NON PERVENUTA!",
|
| 322 |
-
"REFACTORING ELEGANTE!",
|
| 323 |
-
"SPRINT PERFETTO!",
|
| 324 |
-
"PoC DA APPLAUSO!",
|
| 325 |
-
"ROADMAP ALLINEATA AL CODICE!",
|
| 326 |
-
],
|
| 327 |
-
|
| 328 |
-
GAME_OVER_TITLES: [
|
| 329 |
-
"SCHERMATA BLU",
|
| 330 |
-
"TI HANNO MESSO IN UN'ALTRA CALL",
|
| 331 |
-
"HAI CANCELLATO IL DATABASE",
|
| 332 |
-
"IL WI-FI TI HA TRADITO",
|
| 333 |
-
"IL SERVER VA IN VACANZA",
|
| 334 |
-
"SLIDE INFINITE, TEMPO FINITO",
|
| 335 |
-
"MEETING CHE NON FINISCE",
|
| 336 |
-
"MERGE FALLITO",
|
| 337 |
-
"CONFLITTO DI PRIORITÀ CRITICO",
|
| 338 |
-
"TASK AGGIUNTO IN EXCEL",
|
| 339 |
-
"LOGIN BLOCCATO",
|
| 340 |
-
"SESSIONE SCADUTA NEL MOMENTO SBAGLIATO",
|
| 341 |
-
"WI-FI DELLO STORE IN TILT",
|
| 342 |
-
"SERVER DOWN DURANTE LA DEMO",
|
| 343 |
-
"CRON JOB IMPAZZITO",
|
| 344 |
-
"TIMEOUT ESISTENZIALE DEL DEV"
|
| 345 |
-
],
|
| 346 |
-
GAME_OVER_REASONS: [
|
| 347 |
-
"Sei finito in un tunnel di burocrazia.",
|
| 348 |
-
"Hai accettato una riunione venerdì alle 17:30.",
|
| 349 |
-
"Il Legacy Code ha avuto la meglio.",
|
| 350 |
-
"Ti sei dimenticato la WHERE nel DELETE * FROM...",
|
| 351 |
-
"Ti sei perso tra troppi file Excel di tracking.",
|
| 352 |
-
"Un merge conflict ti ha fatto perdere il ritmo.",
|
| 353 |
-
"Hai aperto la mail sbagliata in diretta con il capo.",
|
| 354 |
-
"Hai sottovalutato la demo in ambiente reale store.",
|
| 355 |
-
"La user journey era più lunga del previsto.",
|
| 356 |
-
"La call \"da 10 minuti\" è durata un'ora.",
|
| 357 |
-
"Il PoC ha funzionato… ma solo in locale.",
|
| 358 |
-
"Hai deployato sulla branch sbagliata.",
|
| 359 |
-
"Il budget è finito prima della feature chiave.",
|
| 360 |
-
"Hai dimenticato di allineare business e IT.",
|
| 361 |
-
"I log erano verbosi, ma non sul problema giusto.",
|
| 362 |
-
"La sandbox non era così isolata come pensavi.",
|
| 363 |
-
"Un redirect ti ha portato nel limbo dell'autenticazione.",
|
| 364 |
-
"La checklist di go-live era rimasta in bozza.",
|
| 365 |
-
"Hai chiuso il tab con la documentazione proprio sul più bello."
|
| 366 |
-
],
|
| 367 |
-
DEATH_QUOTES: [
|
| 368 |
-
"\"Tranquillo, il backup è... aspetta, c'era un backup vero?\"",
|
| 369 |
-
"\"Vabbè, diciamo che era solo un test di carico.\"",
|
| 370 |
-
"\"Se nessuno se ne è accorto, non è successo niente.\"",
|
| 371 |
-
"\"Prova a dare la colpa allo stagista.\"",
|
| 372 |
-
"\"Riavvia il router e prega.\"",
|
| 373 |
-
"\"In teoria l'architettura era perfetta… in pratica un po' meno.\"",
|
| 374 |
-
"\"Il PoC era visionario, il firewall un po' di più.\"",
|
| 375 |
-
"\"Secondo me in demo funzionava meglio.\"",
|
| 376 |
-
"\"Scrivi pure 'da migliorare' nel retrospettivo.\"",
|
| 377 |
-
"\"Mettiamo 'comportamento atteso da chiarire' nel ticket.\"",
|
| 378 |
-
"\"Se lo raccontiamo bene diventa un caso studio.\"",
|
| 379 |
-
"\"È colpa dell'ambiente, non del Dev.\"",
|
| 380 |
-
"\"L'importante è che in PowerPoint sembri tutto stabile.\"",
|
| 381 |
-
"\"Chiamiamolo 'fail veloce' e sembriamo agili.\"",
|
| 382 |
-
"\"Al massimo lo vendiamo come esperienza immersiva imprevista.\"",
|
| 383 |
-
"\"Mettiamo un feature flag e nessuno si farà male.\"",
|
| 384 |
-
"\"Se il log non parla, il Dev sospira.\"",
|
| 385 |
-
"\"Tranquilli, la prossima iterazione sarà quella buona. Forse.\""
|
| 386 |
-
],
|
| 387 |
-
|
| 388 |
-
PHASES: [
|
| 389 |
-
{ score: 0, name: "ULTIMO ARRIVATO" },
|
| 390 |
-
{ score: 150, name: "QUELLO BRAVO COL PC" },
|
| 391 |
-
{ score: 400, name: "HACKER DI PROVINCIA" },
|
| 392 |
-
{ score: 700, name: "VISIONARIO TECH" },
|
| 393 |
-
{ score: 1200, name: "RE DELL'INNOVATION LAB 👑" }
|
| 394 |
-
]
|
| 395 |
-
};
|
| 396 |
-
|
| 397 |
-
/* ================= ENGINE START ================= */
|
| 398 |
-
const canvas = document.getElementById('gameCanvas');
|
| 399 |
-
const ctx = canvas.getContext('2d');
|
| 400 |
-
const GRAVITY = GAME_CONFIG.GRAVITY;
|
| 401 |
-
const JUMP = GAME_CONFIG.JUMP_FORCE;
|
| 402 |
-
const DOUBLE_JUMP = GAME_CONFIG.JUMP_FORCE * 0.9;
|
| 403 |
-
const GROUND_H = 80;
|
| 404 |
-
|
| 405 |
-
let state = { playing: false, speed: GAME_CONFIG.SPEED.INITIAL, score: 0, legacy: 0, flow: 50, frame: 0, phaseIdx: 0, shake: 0, combo: 0 };
|
| 406 |
-
let player = { x: 80, y: 0, w: 48, h: 48, dy: 0, grounded: false, canDouble: false, amplified: 0, stretch: 1 };
|
| 407 |
-
let entities = [], particles = [], bgStars = [];
|
| 408 |
-
|
| 409 |
-
const dom = {
|
| 410 |
-
start: document.getElementById('start-screen'),
|
| 411 |
-
over: document.getElementById('game-over'),
|
| 412 |
-
score: document.getElementById('score-display'),
|
| 413 |
-
legacy: document.getElementById('legacy-display'),
|
| 414 |
-
phase: document.getElementById('phase-display'),
|
| 415 |
-
bar: document.getElementById('flow-bar'),
|
| 416 |
-
barLabel: document.getElementById('flow-label'),
|
| 417 |
-
finalScore: document.getElementById('final-score'),
|
| 418 |
-
finalLegacy: document.getElementById('final-legacy'),
|
| 419 |
-
deathQuote: document.getElementById('death-quote'),
|
| 420 |
-
motivator: document.getElementById('motivator'),
|
| 421 |
-
combo: document.getElementById('combo'),
|
| 422 |
-
goTitle: document.getElementById('go-title'),
|
| 423 |
-
goReason: document.getElementById('go-reason')
|
| 424 |
-
};
|
| 425 |
-
|
| 426 |
-
function setupUI() {
|
| 427 |
-
document.getElementById('lbl-phase').innerText = GAME_CONFIG.TEXTS.LBL_PHASE;
|
| 428 |
-
document.getElementById('lbl-metrics').innerText = GAME_CONFIG.TEXTS.LBL_METRICS;
|
| 429 |
-
document.getElementById('lbl-score').innerText = GAME_CONFIG.TEXTS.LBL_SCORE;
|
| 430 |
-
document.getElementById('lbl-legacy').innerText = GAME_CONFIG.TEXTS.LBL_LEGACY;
|
| 431 |
-
document.getElementById('btn-start').innerText = GAME_CONFIG.TEXTS.START_BTN;
|
| 432 |
-
document.getElementById('btn-restart').innerText = GAME_CONFIG.TEXTS.RESTART_BTN;
|
| 433 |
-
document.getElementById('controls-hint').innerText = GAME_CONFIG.TEXTS.CONTROLS;
|
| 434 |
-
|
| 435 |
-
document.getElementById('icon-legacy').innerText = GAME_CONFIG.ENTITIES.LEGACY.CHAR;
|
| 436 |
-
document.getElementById('title-legacy').innerText = GAME_CONFIG.ENTITIES.LEGACY.TITLE;
|
| 437 |
-
document.getElementById('desc-legacy').innerText = GAME_CONFIG.ENTITIES.LEGACY.DESC;
|
| 438 |
-
|
| 439 |
-
document.getElementById('icon-ai').innerText = GAME_CONFIG.ENTITIES.AI.CHAR;
|
| 440 |
-
document.getElementById('title-ai').innerText = GAME_CONFIG.ENTITIES.AI.TITLE;
|
| 441 |
-
document.getElementById('desc-ai').innerText = GAME_CONFIG.ENTITIES.AI.DESC;
|
| 442 |
-
|
| 443 |
-
document.getElementById('icon-obs').innerText = GAME_CONFIG.ENTITIES.OBSTACLE.CHAR;
|
| 444 |
-
document.getElementById('title-obs').innerText = GAME_CONFIG.ENTITIES.OBSTACLE.TITLE;
|
| 445 |
-
document.getElementById('desc-obs').innerText = GAME_CONFIG.ENTITIES.OBSTACLE.DESC;
|
| 446 |
-
|
| 447 |
-
document.getElementById('title-bar').innerText = GAME_CONFIG.ENTITIES.BAR.TITLE;
|
| 448 |
-
document.getElementById('desc-bar').innerText = GAME_CONFIG.ENTITIES.BAR.DESC;
|
| 449 |
-
}
|
| 450 |
-
|
| 451 |
-
function resize() { canvas.width = window.innerWidth; canvas.height = window.innerHeight; state.groundY = canvas.height - GROUND_H; }
|
| 452 |
-
window.addEventListener('resize', resize);
|
| 453 |
-
setupUI();
|
| 454 |
-
resize();
|
| 455 |
-
|
| 456 |
-
for(let i=0; i<80; i++) bgStars.push({ x: Math.random() * canvas.width, y: Math.random() * canvas.height, size: Math.random() * 2 });
|
| 457 |
-
|
| 458 |
-
function initGame() {
|
| 459 |
-
Object.assign(state, { playing: true, speed: GAME_CONFIG.SPEED.INITIAL, score: 0, legacy: 0, flow: 50, frame: 0, phaseIdx: 0, shake: 0, combo: 0 });
|
| 460 |
-
Object.assign(player, { y: state.groundY - player.h, dy: 0, grounded: true, amplified: 0, stretch: 1, w: 48, h: 48 });
|
| 461 |
-
entities = []; particles = [];
|
| 462 |
-
|
| 463 |
-
dom.start.style.display = 'none';
|
| 464 |
-
dom.over.classList.add('hidden');
|
| 465 |
-
dom.over.style.display = 'none';
|
| 466 |
-
dom.motivator.style.opacity = 0;
|
| 467 |
-
dom.combo.style.opacity = 0;
|
| 468 |
-
|
| 469 |
-
dom.phase.innerText = GAME_CONFIG.PHASES[0].name;
|
| 470 |
-
|
| 471 |
-
updateHUD();
|
| 472 |
-
requestAnimationFrame(loop);
|
| 473 |
-
}
|
| 474 |
-
|
| 475 |
-
function jump() {
|
| 476 |
-
if (!state.playing) return;
|
| 477 |
-
if (player.grounded) {
|
| 478 |
-
player.dy = JUMP;
|
| 479 |
-
player.grounded = false;
|
| 480 |
-
player.stretch = 1.3;
|
| 481 |
-
player.canDouble = state.flow >= 25;
|
| 482 |
-
explosion(player.x + player.w/2, player.y + player.h, 5, '#fff');
|
| 483 |
-
}
|
| 484 |
-
else if (player.canDouble) {
|
| 485 |
-
player.dy = DOUBLE_JUMP;
|
| 486 |
-
player.canDouble = false;
|
| 487 |
-
player.stretch = 1.2;
|
| 488 |
-
state.flow = Math.max(0, state.flow - 25);
|
| 489 |
-
explosion(player.x + player.w/2, player.y + player.h, 15, '#00ff41');
|
| 490 |
-
|
| 491 |
-
let msg = GAME_CONFIG.JUMP_MESSAGES[Math.floor(Math.random() * GAME_CONFIG.JUMP_MESSAGES.length)];
|
| 492 |
-
floatText(msg, player.x + 40, player.y - 40, '#00ff41');
|
| 493 |
-
}
|
| 494 |
-
updateHUD();
|
| 495 |
-
}
|
| 496 |
-
|
| 497 |
-
window.addEventListener('keydown', e => {
|
| 498 |
-
if (e.code === 'Space' || e.code === 'ArrowUp') { e.preventDefault(); jump(); }
|
| 499 |
-
if (e.code === 'ArrowDown' && !player.grounded) { player.dy += 6; player.stretch = 0.7; }
|
| 500 |
-
});
|
| 501 |
-
window.addEventListener('touchstart', e => { e.preventDefault(); jump(); }, {passive: false});
|
| 502 |
-
window.addEventListener('mousedown', jump);
|
| 503 |
-
|
| 504 |
-
function loop() {
|
| 505 |
-
if (!state.playing) return;
|
| 506 |
-
|
| 507 |
-
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
| 508 |
-
if (state.shake > 0) {
|
| 509 |
-
ctx.translate((Math.random()-0.5)*state.shake, (Math.random()-0.5)*state.shake);
|
| 510 |
-
state.shake *= 0.9;
|
| 511 |
-
if(state.shake < 0.5) state.shake = 0;
|
| 512 |
-
}
|
| 513 |
-
|
| 514 |
-
ctx.fillStyle = '#0a0a0a'; ctx.fillRect(0, 0, canvas.width, canvas.height);
|
| 515 |
-
|
| 516 |
-
if (state.speed < GAME_CONFIG.SPEED.MAX) state.speed += GAME_CONFIG.SPEED.ACCELERATION;
|
| 517 |
-
let currentSpd = state.speed + (player.amplified > 0 ? GAME_CONFIG.SPEED.BOOST : 0);
|
| 518 |
-
|
| 519 |
-
ctx.fillStyle = '#fff';
|
| 520 |
-
bgStars.forEach(s => {
|
| 521 |
-
s.x -= currentSpd * 0.15;
|
| 522 |
-
if(s.x < 0) s.x = canvas.width;
|
| 523 |
-
ctx.globalAlpha = 0.4;
|
| 524 |
-
ctx.fillRect(s.x, s.y, s.size, s.size);
|
| 525 |
-
});
|
| 526 |
-
ctx.globalAlpha = 1;
|
| 527 |
-
|
| 528 |
-
ctx.strokeStyle = '#222'; ctx.lineWidth = 1; ctx.beginPath();
|
| 529 |
-
let offset = (state.frame * currentSpd * 0.4) % 100;
|
| 530 |
-
for (let i = 0; i < canvas.width + 100; i += 100) {
|
| 531 |
-
ctx.moveTo(i - offset, state.groundY);
|
| 532 |
-
ctx.lineTo(i - offset - 150, canvas.height);
|
| 533 |
-
}
|
| 534 |
-
ctx.stroke();
|
| 535 |
-
|
| 536 |
-
updatePlayer();
|
| 537 |
-
manageEntities(currentSpd);
|
| 538 |
-
drawParticles();
|
| 539 |
-
|
| 540 |
-
// SHADOW LOGIC: White if amplified, else dark gray
|
| 541 |
-
ctx.shadowBlur = 10;
|
| 542 |
-
ctx.shadowColor = player.amplified > 0 ? '#ffffff' : '#444';
|
| 543 |
-
|
| 544 |
-
ctx.fillStyle = '#111'; ctx.fillRect(0, state.groundY, canvas.width, canvas.height - state.groundY);
|
| 545 |
-
ctx.strokeStyle = '#00ff41'; ctx.lineWidth = 4; ctx.beginPath();
|
| 546 |
-
ctx.moveTo(0, state.groundY); ctx.lineTo(canvas.width, state.groundY); ctx.stroke(); ctx.shadowBlur = 0;
|
| 547 |
-
|
| 548 |
-
if (state.frame % 600 === 0 && state.frame > 100) showMotivation();
|
| 549 |
-
|
| 550 |
-
if (player.amplified > 0) {
|
| 551 |
-
player.amplified--;
|
| 552 |
-
if (player.amplified === 0) floatText("GOD MODE OFF", player.x + 40, player.y - 50, '#aaa');
|
| 553 |
-
}
|
| 554 |
-
|
| 555 |
-
state.frame++;
|
| 556 |
-
requestAnimationFrame(loop);
|
| 557 |
-
}
|
| 558 |
-
|
| 559 |
-
function updatePlayer() {
|
| 560 |
-
player.dy += GRAVITY; player.y += player.dy;
|
| 561 |
-
|
| 562 |
-
if (player.y + player.h > state.groundY) {
|
| 563 |
-
if (!player.grounded) {
|
| 564 |
-
player.stretch = 0.7;
|
| 565 |
-
explosion(player.x + player.w/2, state.groundY, 8, '#aaa');
|
| 566 |
-
}
|
| 567 |
-
player.y = state.groundY - player.h; player.dy = 0; player.grounded = true;
|
| 568 |
-
}
|
| 569 |
-
player.stretch += (1 - player.stretch) * 0.1;
|
| 570 |
-
|
| 571 |
-
let drawH = player.h * player.stretch, drawW = player.w * (1/player.stretch);
|
| 572 |
-
let drawX = player.x + (player.w - drawW)/2, drawY = player.y + (player.h - drawH);
|
| 573 |
-
|
| 574 |
-
// PLAYER COLOR LOGIC: White if amplified, else Neon Green
|
| 575 |
-
ctx.fillStyle = player.amplified > 0 ? '#ffffff' : '#00ff41';
|
| 576 |
-
|
| 577 |
-
if (state.frame % 3 === 0) particles.push({ x: drawX, y: drawY, w: drawW, h: drawH, life: 0.6, type: 'trail', color: ctx.fillStyle });
|
| 578 |
-
|
| 579 |
-
ctx.shadowColor = ctx.fillStyle; ctx.shadowBlur = 20;
|
| 580 |
-
ctx.fillRect(drawX, drawY, drawW, drawH);
|
| 581 |
-
ctx.fillStyle = '#000'; ctx.fillRect(drawX + drawW*0.6, drawY + drawH*0.2, drawW*0.3, 5); ctx.shadowBlur = 0;
|
| 582 |
-
}
|
| 583 |
-
|
| 584 |
-
function manageEntities(spd) {
|
| 585 |
-
let minGap = 500 - (spd * 8);
|
| 586 |
-
let last = entities[entities.length-1];
|
| 587 |
-
|
| 588 |
-
// --- 1. SPAWNING LOGIC BILANCIATA ---
|
| 589 |
-
if (!last || (canvas.width - last.x > minGap)) {
|
| 590 |
-
if (Math.random() > 0.96) return;
|
| 591 |
-
|
| 592 |
-
let typeKey = 'OBSTACLE';
|
| 593 |
-
let rand = Math.random();
|
| 594 |
-
|
| 595 |
-
if (rand > 0.65) typeKey = 'LEGACY';
|
| 596 |
-
if (rand > 0.93) typeKey = 'AI';
|
| 597 |
-
|
| 598 |
-
let conf = GAME_CONFIG.ENTITIES[typeKey];
|
| 599 |
-
// Dimensioni base più grandi per visibilità
|
| 600 |
-
let h = 60, w = 60, y = state.groundY - 60;
|
| 601 |
-
let variant = 'normal';
|
| 602 |
-
|
| 603 |
-
if (typeKey === 'OBSTACLE') {
|
| 604 |
-
let obsType = Math.random();
|
| 605 |
-
|
| 606 |
-
// --- LOGICA VARIANTI ---
|
| 607 |
-
if (obsType < 0.3) {
|
| 608 |
-
// DRONE
|
| 609 |
-
w = 55; h = 55;
|
| 610 |
-
y = state.groundY - 120 - (Math.random() * 40);
|
| 611 |
-
variant = 'flying';
|
| 612 |
-
} else if (obsType < 0.65) {
|
| 613 |
-
// TOWER (Muro Alto)
|
| 614 |
-
w = 60;
|
| 615 |
-
h = 95 + (Math.random() * 50);
|
| 616 |
-
y = state.groundY - h;
|
| 617 |
-
variant = 'tower';
|
| 618 |
-
} else {
|
| 619 |
-
// GROUND (Standard)
|
| 620 |
-
y = state.groundY - h;
|
| 621 |
-
variant = 'ground';
|
| 622 |
-
}
|
| 623 |
-
|
| 624 |
-
// --- FIX: MAI DUE TORRI DI FILA ---
|
| 625 |
-
if (variant === 'tower' && last && last.variant === 'tower') {
|
| 626 |
-
// Se l'ultimo era una torre, questo diventa terra forzatamente
|
| 627 |
-
variant = 'ground';
|
| 628 |
-
h = 60; // Resetta altezza standard
|
| 629 |
-
y = state.groundY - h;
|
| 630 |
-
}
|
| 631 |
-
}
|
| 632 |
-
else if (typeKey === 'AI') {
|
| 633 |
-
w = 50; h = 50;
|
| 634 |
-
y = state.groundY - 90 - (Math.random() * 60);
|
| 635 |
-
}
|
| 636 |
-
else {
|
| 637 |
-
// LEGACY
|
| 638 |
-
y = state.groundY - 65;
|
| 639 |
-
}
|
| 640 |
-
|
| 641 |
-
entities.push({
|
| 642 |
-
type: typeKey, conf: conf, x: canvas.width, y: y, w: w, h: h,
|
| 643 |
-
active: true, variant: variant, pulse: Math.random() * 10,
|
| 644 |
-
rot: 0
|
| 645 |
-
});
|
| 646 |
-
}
|
| 647 |
-
|
| 648 |
-
// --- 2. RENDER LOOP "HIGH VISIBILITY" ---
|
| 649 |
-
for (let i = entities.length - 1; i >= 0; i--) {
|
| 650 |
-
let e = entities[i];
|
| 651 |
-
e.x -= spd;
|
| 652 |
-
e.pulse += 0.05;
|
| 653 |
-
e.rot += 0.02;
|
| 654 |
-
|
| 655 |
-
let floatY = 0;
|
| 656 |
-
if (e.variant === 'flying' || e.type !== 'OBSTACLE') {
|
| 657 |
-
floatY = Math.sin(state.frame * 0.08 + e.x * 0.01) * 5;
|
| 658 |
-
}
|
| 659 |
-
let drawY = e.y + floatY;
|
| 660 |
-
|
| 661 |
-
if (e.active) {
|
| 662 |
-
ctx.save();
|
| 663 |
-
ctx.textAlign = "center";
|
| 664 |
-
ctx.textBaseline = "middle";
|
| 665 |
-
ctx.font = "36px Arial"; // EMOJI PIÙ GRANDE
|
| 666 |
-
|
| 667 |
-
let cx = e.x + e.w/2;
|
| 668 |
-
let cy = drawY + e.h/2;
|
| 669 |
-
|
| 670 |
-
// BORDURA SPESSA PER TUTTI
|
| 671 |
-
ctx.lineWidth = 4;
|
| 672 |
-
|
| 673 |
-
// ==========================================
|
| 674 |
-
// A. AI - VERTEX NODE
|
| 675 |
-
// ==========================================
|
| 676 |
-
if (e.type === 'AI') {
|
| 677 |
-
ctx.shadowBlur = 30;
|
| 678 |
-
ctx.shadowColor = '#00D4FF';
|
| 679 |
-
|
| 680 |
-
// Anelli
|
| 681 |
-
ctx.translate(cx, cy);
|
| 682 |
-
ctx.rotate(e.rot * 2);
|
| 683 |
-
ctx.strokeStyle = '#00D4FF'; // Ciano puro
|
| 684 |
-
ctx.setLineDash([5, 5]);
|
| 685 |
-
ctx.beginPath();
|
| 686 |
-
ctx.arc(0, 0, (e.w/1.5), 0, Math.PI * 2);
|
| 687 |
-
ctx.stroke();
|
| 688 |
-
|
| 689 |
-
ctx.rotate(-e.rot * 4);
|
| 690 |
-
ctx.strokeStyle = '#fff';
|
| 691 |
-
ctx.lineWidth = 2;
|
| 692 |
-
ctx.setLineDash([]);
|
| 693 |
-
ctx.beginPath();
|
| 694 |
-
ctx.arc(0, 0, (e.w/2.2), 0, Math.PI * 2);
|
| 695 |
-
ctx.stroke();
|
| 696 |
-
|
| 697 |
-
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
| 698 |
-
ctx.shadowBlur = 0;
|
| 699 |
-
ctx.fillText(e.conf.CHAR, cx, cy);
|
| 700 |
-
}
|
| 701 |
-
|
| 702 |
-
// ==========================================
|
| 703 |
-
// B. LEGACY - CAFFÈ VISIBILE
|
| 704 |
-
// ==========================================
|
| 705 |
-
else if (e.type === 'LEGACY') {
|
| 706 |
-
let breathe = 1 + Math.sin(e.pulse * 2) * 0.1;
|
| 707 |
-
|
| 708 |
-
ctx.shadowBlur = 25;
|
| 709 |
-
ctx.shadowColor = '#FFC107';
|
| 710 |
-
ctx.strokeStyle = '#FFC107';
|
| 711 |
-
// SFONDO PIÙ OPACO per contrasto col caffè
|
| 712 |
-
ctx.fillStyle = 'rgba(255, 193, 7, 0.35)';
|
| 713 |
-
|
| 714 |
-
ctx.translate(cx, cy);
|
| 715 |
-
ctx.scale(breathe, breathe);
|
| 716 |
-
|
| 717 |
-
ctx.beginPath();
|
| 718 |
-
ctx.roundRect(-e.w/2, -e.h/2, e.w, e.h, 12);
|
| 719 |
-
ctx.fill();
|
| 720 |
-
ctx.stroke();
|
| 721 |
-
|
| 722 |
-
// Angoli Bianchi
|
| 723 |
-
ctx.strokeStyle = '#FFF';
|
| 724 |
-
ctx.lineWidth = 3; // Angoli più spessi
|
| 725 |
-
let corner = 10;
|
| 726 |
-
let hs = e.w/2 - 2;
|
| 727 |
-
ctx.beginPath();
|
| 728 |
-
ctx.moveTo(-hs, -hs + corner); ctx.lineTo(-hs, -hs); ctx.lineTo(-hs + corner, -hs);
|
| 729 |
-
ctx.moveTo(hs, -hs + corner); ctx.lineTo(hs, -hs); ctx.lineTo(hs - corner, -hs);
|
| 730 |
-
ctx.moveTo(-hs, hs - corner); ctx.lineTo(-hs, hs); ctx.lineTo(-hs + corner, hs);
|
| 731 |
-
ctx.moveTo(hs, hs - corner); ctx.lineTo(hs, hs); ctx.lineTo(hs - corner, hs);
|
| 732 |
-
ctx.stroke();
|
| 733 |
-
|
| 734 |
-
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
| 735 |
-
|
| 736 |
-
// --- FIX VISIBILITÀ CAFFÈ ---
|
| 737 |
-
// Disegniamo un alone BIANCO dietro l'emoji per staccarla dal fondo scuro/oro
|
| 738 |
-
ctx.shadowBlur = 20;
|
| 739 |
-
ctx.shadowColor = '#ffffff';
|
| 740 |
-
ctx.fillStyle = '#ffffff'; // Colore di riempimento per sicurezza (alcuni browser usano questo per emoji testuali)
|
| 741 |
-
ctx.fillText(e.conf.CHAR, cx, cy + 3);
|
| 742 |
-
// Ridisegniamo senza ombra per nitidezza
|
| 743 |
-
ctx.shadowBlur = 0;
|
| 744 |
-
ctx.fillText(e.conf.CHAR, cx, cy + 3);
|
| 745 |
-
}
|
| 746 |
-
|
| 747 |
-
// ==========================================
|
| 748 |
-
// C. OSTACOLO - GLITCH
|
| 749 |
-
// ==========================================
|
| 750 |
-
else {
|
| 751 |
-
let color = '#FF3D00';
|
| 752 |
-
let jitter = (Math.random() - 0.5) * 4;
|
| 753 |
-
let gx = e.x + jitter;
|
| 754 |
-
|
| 755 |
-
ctx.shadowBlur = 15;
|
| 756 |
-
ctx.shadowColor = color;
|
| 757 |
-
// Sfondo rosso più visibile
|
| 758 |
-
ctx.fillStyle = 'rgba(255, 61, 0, 0.3)';
|
| 759 |
-
ctx.strokeStyle = color;
|
| 760 |
-
|
| 761 |
-
// Bordo molto spesso
|
| 762 |
-
ctx.lineWidth = 4;
|
| 763 |
-
|
| 764 |
-
ctx.fillRect(gx, drawY, e.w, e.h);
|
| 765 |
-
ctx.strokeRect(gx, drawY, e.w, e.h);
|
| 766 |
-
|
| 767 |
-
// Dettagli interni
|
| 768 |
-
ctx.fillStyle = color;
|
| 769 |
-
ctx.globalAlpha = 0.8; // Dettagli più visibili
|
| 770 |
-
|
| 771 |
-
if (e.variant === 'tower') {
|
| 772 |
-
// SERVER RACK
|
| 773 |
-
for(let ly = drawY + 10; ly < drawY + e.h; ly += 20) {
|
| 774 |
-
ctx.fillRect(gx + 8, ly, e.w - 16, 4); // Linee più spesse
|
| 775 |
-
}
|
| 776 |
-
// Led lampeggiante
|
| 777 |
-
if (Math.floor(state.frame / 10) % 2 === 0) {
|
| 778 |
-
ctx.fillStyle = '#fff'; // Led bianco strobo
|
| 779 |
-
ctx.shadowColor = '#fff';
|
| 780 |
-
ctx.shadowBlur = 15;
|
| 781 |
-
ctx.beginPath(); ctx.arc(gx + e.w - 12, drawY + 12, 4, 0, Math.PI*2); ctx.fill();
|
| 782 |
-
}
|
| 783 |
-
}
|
| 784 |
-
else if (e.variant === 'flying') {
|
| 785 |
-
// DRONE
|
| 786 |
-
let wingY = Math.sin(state.frame * 0.5) * 5;
|
| 787 |
-
ctx.beginPath();
|
| 788 |
-
ctx.lineWidth = 3;
|
| 789 |
-
ctx.moveTo(gx, drawY + e.h/2);
|
| 790 |
-
ctx.lineTo(gx - 20, drawY + e.h/2 + wingY); // Ali più lunghe
|
| 791 |
-
ctx.moveTo(gx + e.w, drawY + e.h/2);
|
| 792 |
-
ctx.lineTo(gx + e.w + 20, drawY + e.h/2 + wingY);
|
| 793 |
-
ctx.stroke();
|
| 794 |
-
} else {
|
| 795 |
-
// GROUND X
|
| 796 |
-
ctx.lineWidth = 3;
|
| 797 |
-
ctx.beginPath();
|
| 798 |
-
ctx.moveTo(gx + 5, drawY + 5); ctx.lineTo(gx + e.w - 5, drawY + e.h - 5);
|
| 799 |
-
ctx.moveTo(gx + e.w - 5, drawY + 5); ctx.lineTo(gx + 5, drawY + e.h - 5);
|
| 800 |
-
ctx.stroke();
|
| 801 |
-
}
|
| 802 |
-
|
| 803 |
-
ctx.globalAlpha = 1;
|
| 804 |
-
ctx.shadowBlur = 0;
|
| 805 |
-
|
| 806 |
-
// EMOJI CON OMBRA NERA PER CONTRASTO SUL ROSSO
|
| 807 |
-
ctx.shadowColor = '#000';
|
| 808 |
-
ctx.shadowBlur = 5;
|
| 809 |
-
ctx.fillText(e.conf.CHAR, cx + jitter, cy);
|
| 810 |
-
}
|
| 811 |
-
|
| 812 |
-
ctx.restore();
|
| 813 |
-
|
| 814 |
-
// Collision Check
|
| 815 |
-
if (rectHit(player.x, player.y, player.w, player.h, e.x, drawY, e.w, e.h)) handleHit(e);
|
| 816 |
-
}
|
| 817 |
-
if (e.x + e.w < 0) entities.splice(i, 1);
|
| 818 |
-
}
|
| 819 |
-
}
|
| 820 |
-
function rectHit(x1, y1, w1, h1, x2, y2, w2, h2) { return x2 < x1 + w1 && x2 + w2 > x1 && y2 < y1 + h1 && y2 + h2 > y1; }
|
| 821 |
-
|
| 822 |
-
function handleHit(e) {
|
| 823 |
-
e.active = false;
|
| 824 |
-
let msgList = e.conf.MSG;
|
| 825 |
-
let randomMsg = Array.isArray(msgList) ? msgList[Math.floor(Math.random() * msgList.length)] : msgList;
|
| 826 |
-
|
| 827 |
-
if (e.type === 'OBSTACLE') {
|
| 828 |
-
if (player.amplified > 0) {
|
| 829 |
-
state.shake = 20;
|
| 830 |
-
// White explosion for destruction in God Mode
|
| 831 |
-
explosion(e.x + e.w/2, e.y + e.h/2, 25, '#ffffff');
|
| 832 |
-
floatText(randomMsg, e.x + 80, e.y - 20, '#fff');
|
| 833 |
-
state.score += 15; state.combo++;
|
| 834 |
-
showCombo();
|
| 835 |
-
} else {
|
| 836 |
-
gameOver();
|
| 837 |
-
}
|
| 838 |
-
} else {
|
| 839 |
-
explosion(e.x + e.w/2, e.y + e.h/2, 12, e.conf.COLOR);
|
| 840 |
-
floatText(randomMsg, e.x + 80, e.y - 40, e.conf.COLOR);
|
| 841 |
-
|
| 842 |
-
if (e.type === 'LEGACY') {
|
| 843 |
-
state.legacy += 10; state.score += 10;
|
| 844 |
-
state.flow = Math.min(100, state.flow + 25);
|
| 845 |
-
state.combo++;
|
| 846 |
-
}
|
| 847 |
-
if (e.type === 'AI') {
|
| 848 |
-
player.amplified = 600;
|
| 849 |
-
state.score += 50; state.shake = 8;
|
| 850 |
-
showMotivation();
|
| 851 |
-
state.combo += 3;
|
| 852 |
-
}
|
| 853 |
-
showCombo(); updateHUD();
|
| 854 |
-
}
|
| 855 |
-
}
|
| 856 |
-
|
| 857 |
-
function explosion(x, y, count, color) {
|
| 858 |
-
for(let i=0; i<count; i++) particles.push({ x, y, vx: (Math.random() - 0.5) * 10, vy: (Math.random() - 0.5) * 10, life: 1.0, color, type: 'spark' });
|
| 859 |
-
}
|
| 860 |
-
|
| 861 |
-
function drawParticles() {
|
| 862 |
-
for(let i=particles.length-1; i>=0; i--) {
|
| 863 |
-
let p = particles[i];
|
| 864 |
-
if (p.type === 'trail') {
|
| 865 |
-
ctx.fillStyle = p.color; ctx.globalAlpha = p.life * 0.5;
|
| 866 |
-
ctx.fillRect(p.x, p.y, p.w, p.h);
|
| 867 |
-
ctx.globalAlpha = 1; p.life -= 0.04;
|
| 868 |
-
} else {
|
| 869 |
-
p.x += p.vx; p.y += p.vy; p.vy += 0.3; p.life -= 0.015;
|
| 870 |
-
ctx.fillStyle = p.color; ctx.globalAlpha = p.life;
|
| 871 |
-
ctx.fillRect(p.x, p.y, 5, 5); ctx.globalAlpha = 1;
|
| 872 |
-
}
|
| 873 |
-
if (p.life <= 0) particles.splice(i, 1);
|
| 874 |
-
}
|
| 875 |
-
}
|
| 876 |
-
|
| 877 |
-
function floatText(txt, x, y, col) {
|
| 878 |
-
let el = document.createElement('div');
|
| 879 |
-
el.className = 'floating-message';
|
| 880 |
-
el.innerText = txt;
|
| 881 |
-
el.style.left = (x + 60) + 'px';
|
| 882 |
-
el.style.top = y + 'px';
|
| 883 |
-
el.style.color = col;
|
| 884 |
-
document.body.appendChild(el);
|
| 885 |
-
setTimeout(() => el.remove(), 4000);
|
| 886 |
-
}
|
| 887 |
-
|
| 888 |
-
function showMotivation() {
|
| 889 |
-
let txt = GAME_CONFIG.MOTIVATIONAL[Math.floor(Math.random() * GAME_CONFIG.MOTIVATIONAL.length)];
|
| 890 |
-
dom.motivator.innerText = txt;
|
| 891 |
-
dom.motivator.style.opacity = 1; dom.motivator.style.transform = "scale(1.15)";
|
| 892 |
-
setTimeout(() => { dom.motivator.style.opacity = 0; dom.motivator.style.transform = "scale(1)"; }, 3500);
|
| 893 |
-
}
|
| 894 |
-
|
| 895 |
-
function showCombo() {
|
| 896 |
-
if (state.combo > 1) {
|
| 897 |
-
let phrase = GAME_CONFIG.COMBO_PHRASES[Math.floor(Math.random() * GAME_CONFIG.COMBO_PHRASES.length)];
|
| 898 |
-
dom.combo.innerText = phrase;
|
| 899 |
-
dom.combo.style.opacity = 1; dom.combo.style.transform = 'scale(1.2) rotate(-10deg)';
|
| 900 |
-
setTimeout(() => { dom.combo.style.opacity = 0; dom.combo.style.transform = 'scale(1) rotate(-10deg)'; }, 2000);
|
| 901 |
-
}
|
| 902 |
-
}
|
| 903 |
-
|
| 904 |
-
function updateHUD() {
|
| 905 |
-
dom.score.innerText = state.score;
|
| 906 |
-
dom.legacy.innerText = state.legacy;
|
| 907 |
-
dom.bar.style.width = state.flow + '%';
|
| 908 |
-
|
| 909 |
-
if (state.flow >= 25) {
|
| 910 |
-
dom.bar.style.boxShadow = '0 0 15px #00ff41';
|
| 911 |
-
dom.barLabel.innerText = GAME_CONFIG.TEXTS.BAR_FULL;
|
| 912 |
-
dom.barLabel.style.color = "#00ff41";
|
| 913 |
-
} else {
|
| 914 |
-
dom.bar.style.boxShadow = 'none';
|
| 915 |
-
dom.barLabel.innerText = GAME_CONFIG.TEXTS.BAR_EMPTY;
|
| 916 |
-
dom.barLabel.style.color = "#aaa";
|
| 917 |
-
}
|
| 918 |
-
|
| 919 |
-
let currentPhaseObj = GAME_CONFIG.PHASES.slice().reverse().find(p => state.score >= p.score);
|
| 920 |
-
if (currentPhaseObj && currentPhaseObj.name !== dom.phase.innerText) {
|
| 921 |
-
dom.phase.innerText = currentPhaseObj.name;
|
| 922 |
-
floatText("FASE: " + currentPhaseObj.name, canvas.width/2, canvas.height/2, '#fff');
|
| 923 |
-
}
|
| 924 |
-
}
|
| 925 |
-
|
| 926 |
-
function gameOver() {
|
| 927 |
-
state.playing = false;
|
| 928 |
-
dom.finalScore.innerText = state.score;
|
| 929 |
-
dom.finalLegacy.innerText = state.legacy + "%";
|
| 930 |
-
|
| 931 |
-
dom.goTitle.innerText = GAME_CONFIG.GAME_OVER_TITLES[Math.floor(Math.random() * GAME_CONFIG.GAME_OVER_TITLES.length)];
|
| 932 |
-
dom.goReason.innerText = GAME_CONFIG.GAME_OVER_REASONS[Math.floor(Math.random() * GAME_CONFIG.GAME_OVER_REASONS.length)];
|
| 933 |
-
dom.deathQuote.innerText = GAME_CONFIG.DEATH_QUOTES[Math.floor(Math.random() * GAME_CONFIG.DEATH_QUOTES.length)];
|
| 934 |
-
|
| 935 |
-
dom.over.classList.remove('hidden');
|
| 936 |
-
dom.over.style.display = 'flex';
|
| 937 |
-
}
|
| 938 |
-
</script>
|
| 939 |
-
</body>
|
| 940 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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