🎮ArcadeLab

You are an idiot

by NeonPanther57
193 lines7.1 KB
▶ Play
<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>You are an idiot</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
        }
        body {
            background: #000;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            overflow: hidden;
            touch-action: none;
            font-family: 'Impact', 'Arial Black', sans-serif;
        }
        /* Начальный экран – чёрный */
        #start {
            color: #333;
            font-size: 5vmin;
            letter-spacing: 0.5vmin;
            cursor: pointer;
        }
        /* Экран скримера – белый фон, чёрный текст */
        #scare {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #ffffff;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            z-index: 999;
            animation: flash 0.12s infinite alternate;
        }
        #scare.active {
            display: flex;
        }
        @keyframes flash {
            0% { opacity: 1; }
            100% { opacity: 0.7; }
        }
        #scare h1 {
            font-size: 20vmin;
            color: #000;
            text-shadow: 4px 4px 0 #888;
            text-align: center;
            line-height: 1.1;
            animation: shake 0.08s infinite alternate;
        }
        @keyframes shake {
            0% { transform: translate(-3px, 3px) rotate(-1.5deg); }
            100% { transform: translate(3px, -3px) rotate(1.5deg); }
        }
        #scare p {
            font-size: 8vmin;
            color: #222;
            margin-top: 2vmin;
            font-family: 'Comic Sans MS', cursive;
        }
        /* Предупреждение о горизонтальной ориентации */
        @media (orientation: portrait) {
            body::after {
                content: "Поверни телефон горизонтально";
                position: fixed;
                top: 0; left: 0; width: 100%; height: 100%;
                background: #000;
                color: #fff;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 5vmin;
                z-index: 1000;
                font-family: 'Courier New', monospace;
            }
        }
    </style>
</head>
<body>
    <div id="start">⚠ КОСНИСЬ ЭКРАНА</div>
    <div id="scare">
        <h1>YOU ARE<br>AN IDIOT</h1>
        <p>😂🤪😂</p>
    </div>

    <script>
        (function() {
            const start = document.getElementById('start');
            const scare = document.getElementById('scare');
            let triggered = false;

            // Функция воспроизведения каноничного звука (синтез речи)
            function playCanonicalSound() {
                if (!window.speechSynthesis) return;

                // Останавливаем любую предыдущую речь
                window.speechSynthesis.cancel();

                // Фразы в стиле мема
                const phrases = [
                    { text: "You are an idiot.", pitch: 0.6, rate: 0.7 },
                    { text: "You are an idiot!", pitch: 0.5, rate: 0.8 },
                    { text: "Hahahahaha!", pitch: 1.2, rate: 1.0 }
                ];

                // Воспроизводим последовательно с паузами
                let delay = 0;
                phrases.forEach((item, index) => {
                    setTimeout(() => {
                        const utterance = new SpeechSynthesisUtterance(item.text);
                        utterance.lang = 'en-US';
                        utterance.pitch = item.pitch;
                        utterance.rate = item.rate;
                        utterance.volume = 1;
                        window.speechSynthesis.speak(utterance);
                    }, delay);
                    delay += 1400; // пауза между фразами
                });
            }

            function triggerScare() {
                if (triggered) return;
                triggered = true;

                // Скрываем стартовый экран
                start.style.display = 'none';

                // Показываем скример
                scare.classList.add('active');

                // Запускаем звук
                playCanonicalSound();

                // Вибрация (интенсивная, как в меме)
                if (navigator.vibrate) {
                    // Длинная серия вибраций
                    navigator.vibrate([100, 50, 100, 50, 200, 100, 300, 100, 200, 50, 100, 50, 200]);
                }

                // Полноэкранный режим (для усиления эффекта)
                try {
                    const el = document.documentElement;
                    if (el.requestFullscreen) el.requestFullscreen().catch(() => {});
                    else if (el.webkitRequestFullscreen) el.webkitRequestFullscreen();
                    else if (el.msRequestFullscreen) el.msRequestFullscreen();
                } catch(e) {}
            }

            // Обработчики клика / касания
            start.addEventListener('click', triggerScare);
            start.addEventListener('touchstart', function(e) {
                e.preventDefault();
                triggerScare();
            }, { passive: false });

            // Скрытый выход – двойное касание по скримеру возвращает начальный экран
            let tapCount = 0, tapTimer = null;
            scare.addEventListener('click', function(e) {
                tapCount++;
                if (tapCount === 1) {
                    tapTimer = setTimeout(() => { tapCount = 0; }, 400);
                } else if (tapCount >= 2) {
                    // Сброс
                    scare.classList.remove('active');
                    start.style.display = 'block';
                    triggered = false;
                    tapCount = 0;
                    clearTimeout(tapTimer);
                    // Выход из полноэкранного режима (если был)
                    if (document.fullscreenElement) {
                        document.exitFullscreen().catch(() => {});
                    }
                }
            });
            scare.addEventListener('touchstart', function(e) {
                e.preventDefault();
                scare.click();
            }, { passive: false });
        })();
    </script>
</body>
</html>

Game Source: You are an idiot

Creator: NeonPanther57

Libraries: none

Complexity: moderate (193 lines, 7.1 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: you-are-an-idiot-neonpanther57" to link back to the original. Then publish at arcadelab.ai/publish.