🎮ArcadeLab

Relojero de Vice City · GTA VI y Pagani Design

by AtomicBuilder62
18 lines5.3 KB
▶ Play
<!doctype html><html lang="es"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Relojero de Vice City</title>
<style>
*{box-sizing:border-box}body{margin:0;background:#191525;color:#faf4e9;font:16px/1.35 'Trebuchet MS',system-ui,sans-serif;text-align:center}main{max-width:32rem;margin:auto;padding:12px 16px}h1{font:italic 700 clamp(1.6rem,7vw,2.4rem)/1.15 Georgia,serif;margin:.1em 0}p{margin:.45em 0}.meta{color:#e5bace;font-weight:bold}.dial{width:min(62vw,235px);aspect-ratio:1;margin:12px auto;border-radius:50%;position:relative;border:6px solid #c5a15c;background:radial-gradient(circle,#312b38,#15101d 74%);box-shadow:0 0 0 2px #806d45,inset 0 0 0 2px #705f50}.hand{position:absolute;left:50%;bottom:50%;width:3px;height:18%;background:#aa9688;transform-origin:bottom;transform:rotate(-55deg)}.long{height:28%;transform:rotate(48deg)}.word,.date,.day{position:absolute;left:50%;transform:translateX(-50%);font:700 .7rem Georgia,serif;letter-spacing:.07em;pointer-events:none}.word{top:60%;color:#ead4a5;white-space:nowrap}.date,.day{background:#e9ddb9;color:#221d22;padding:0 .32em}.day{top:25%}.date{left:74%;top:45%}button{font:inherit;font-weight:bold;cursor:pointer;border:0;border-radius:.55em;min-height:42px}button:focus-visible{outline:3px dashed #fbf5e2;outline-offset:2px}.key{position:absolute;border-radius:50%;width:22%;height:22%;padding:0;background:#3e3545;color:#ffe9b3;border:1px solid #8d794e}.key:nth-of-type(1){top:2%;left:39%}.key:nth-of-type(2){top:39%;right:2%}.key:nth-of-type(3){bottom:2%;left:39%}.key:nth-of-type(4){left:2%;top:39%}.key.lit{background:#fff0a1;color:#201421;box-shadow:0 0 14px #ffd568;transform:scale(1.08)}#status{min-height:1.4em;color:#fff2ac}#action{padding:.55em 1.2em;background:#f1b6cc;color:#2b1727}#action:disabled{opacity:.65;cursor:default}small{display:block;color:#c8bfd3;font-size:.76rem;max-width:34em;margin:12px auto}#story{font-size:.9rem}kbd{white-space:nowrap}
</style><main><h1>Relojero de Vice City</h1><p class="meta" id="meta"></p><p id="story"></p><div class="dial" role="group" aria-label="Las cuatro posiciones de la esfera"><i class="hand"></i><i class="hand long"></i><b class="day">LUN</b><b class="date">24</b><span class="word" id="brand"></span><button class="key" aria-label="Doce, flecha arriba">12</button><button class="key" aria-label="Tres, flecha derecha">3</button><button class="key" aria-label="Seis, flecha abajo">6</button><button class="key" aria-label="Nueve, flecha izquierda">9</button></div><p>Memoriza los destellos. Repite el orden tocando las horas o usando las flechas.</p><p id="status" role="status" aria-live="polite"></p><button id="action"></button><small>Reto de aficionado creado con IA. Dibujos originales. GQ identifica el reloj de «Vice City 04» como Crowex. El Pagani Design PD-1752 es la referencia de estilo elegida para este juego.</small></main>
<script>
const el=id=>document.getElementById(id), keys=[...document.querySelectorAll('.key')],hours=[12,3,6,9];
const dials=[['CROWEX','Crowex · La esfera que aparece en GTA VI.'],['PD-1752','Pagani Design PD-1752 · El día arriba y la fecha a la derecha.'],['VICE CITY','Tu diseño · Último turno en el taller.']];
let round,score,value,step,sequence,phase,version=0;
function stage(){phase='ready';value=3;step=0;sequence=Array.from({length:3+round},()=>Math.floor(Math.random()*4));el('brand').textContent=dials[round][0];el('story').textContent=dials[round][1];el('meta').textContent=`Esfera ${round+1}/3 · ${score}/9 puntos`;el('status').textContent=`Secuencia de ${sequence.length} destellos`;button('Ver secuencia',false)}
function button(label,disabled){el('action').textContent=label;el('action').disabled=disabled}
function later(fn,ms){let id=version;setTimeout(()=>{if(id===version)fn()},ms)}
function clearKeys(){keys.forEach(key=>key.classList.remove('lit'))}
function play(){version++;clearKeys();phase='show';step=0;button('Observa…',true);sequence.forEach((n,i)=>{later(()=>{keys[n].classList.add('lit');el('status').textContent=`Destello ${i+1} · ${hours[n]}`},200+i*740);later(clearKeys,730+i*740)});later(()=>{phase='guess';el('status').textContent=`Tu turno · 0/${sequence.length}`;button('Ver otra vez (−1)',false)},200+sequence.length*740)}
function guess(n){if(phase!=='guess')return;if(n!==sequence[step]){value=Math.max(0,value-1);phase='retry';el('status').textContent='Se cruzaron las agujas. Vuelve a observar.';button('Repetir secuencia',false);return}keys[n].classList.add('lit');later(()=>keys[n].classList.remove('lit'),150);step++;el('status').textContent=`Tu turno · ${step}/${sequence.length}`;if(step!==sequence.length)return;score+=value;phase=round===2?'end':'next';el('meta').textContent=`Esfera ${round+1}/3 · ${score}/9 puntos`;el('status').textContent=phase==='end'?`Taller completado · ${score}/9 puntos`:`¡Esfera lista! +${value} puntos`;button(phase==='end'?'Jugar de nuevo':'Siguiente esfera',false)}
function start(){version++;clearKeys();round=0;score=0;stage()}
el('action').onclick=()=>{if(phase==='end')return start();if(phase==='next'){round++;return stage()}if(phase==='guess')value=Math.max(0,value-1);play()};keys.forEach((key,n)=>key.onclick=()=>guess(n));document.addEventListener('keydown',e=>{const n=['ArrowUp','ArrowRight','ArrowDown','ArrowLeft'].indexOf(e.key);if(n>=0&&phase==='guess'){e.preventDefault();if(!e.repeat)guess(n)}});start();
</script></html>

Game Source: Relojero de Vice City · GTA VI y Pagani Design

Creator: AtomicBuilder62

Libraries: none

Complexity: simple (18 lines, 5.3 KB)

The full source code is displayed above on this page.

Remix Instructions

To remix this game, copy the source code above and modify it. Add a ARCADELAB header at the top with "remix_of: relojero-de-vice-city-gta-vi-y-pagani-de-atomicbuilder62" to link back to the original. Then publish at arcadelab.ai/publish.