{"id":178,"date":"2026-10-21T08:14:47","date_gmt":"2026-10-21T08:14:47","guid":{"rendered":"https:\/\/itdd.au.dk\/hlss\/?page_id=178"},"modified":"2026-10-23T11:27:49","modified_gmt":"2026-10-23T11:27:49","slug":"178-2","status":"publish","type":"page","link":"https:\/\/itdd.au.dk\/hlss\/178-2\/","title":{"rendered":"."},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"765\" src=\"https:\/\/itdd.au.dk\/hlss\/wp-content\/uploads\/sites\/117\/2026\/10\/Gemini_Generated_Image_zbbj96zbbj96zbbj-1024x765.jpg\" alt=\"\" class=\"wp-image-242\" srcset=\"https:\/\/itdd.au.dk\/hlss\/wp-content\/uploads\/sites\/117\/2026\/10\/Gemini_Generated_Image_zbbj96zbbj96zbbj-1024x765.jpg 1024w, https:\/\/itdd.au.dk\/hlss\/wp-content\/uploads\/sites\/117\/2026\/10\/Gemini_Generated_Image_zbbj96zbbj96zbbj-300x224.jpg 300w, https:\/\/itdd.au.dk\/hlss\/wp-content\/uploads\/sites\/117\/2026\/10\/Gemini_Generated_Image_zbbj96zbbj96zbbj-767x573.jpg 767w, https:\/\/itdd.au.dk\/hlss\/wp-content\/uploads\/sites\/117\/2026\/10\/Gemini_Generated_Image_zbbj96zbbj96zbbj-1536x1147.jpg 1536w, https:\/\/itdd.au.dk\/hlss\/wp-content\/uploads\/sites\/117\/2026\/10\/Gemini_Generated_Image_zbbj96zbbj96zbbj-2048x1529.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<!-- \n  S\u00c5DAN INDS\u00c6TTER DU SPILLET I WORDPRESS (AU MULTISITE SIKRET):\n  1. Rediger siden i WordPress.\n  2. Tilf\u00f8j blokken \"Tilpasset HTML\" (Custom HTML).\n  3. Erstat ALT i blokken med koden herunder og tryk Opdater.\n-->\n<div id=\"atari-easter-egg-wrapper\">\n    <link href=\"https:\/\/fonts.googleapis.com\/css2?family=Press+Start+2P&amp;display=swap\" rel=\"stylesheet\">\n    <style>\n        #atari-easter-egg-wrapper,\n        #atari-easter-egg-wrapper * {\n            box-sizing: border-box;\n            font-family: 'Press Start 2P', monospace;\n            user-select: none;\n            -webkit-user-select: none;\n        }\n        #atari-easter-egg-wrapper {\n            margin: 2rem auto;\n            padding: 12px;\n            display: flex;\n            flex-direction: column;\n            align-items: center;\n            justify-content: center;\n            color: #ffffff;\n            line-height: 1.5;\n            max-width: 100%;\n        }\n        #atari-easter-egg-wrapper .atari-hidden {\n            display: none !important;\n            visibility: hidden !important;\n            opacity: 0 !important;\n            pointer-events: none !important;\n        }\n        #atari-easter-egg-wrapper .atari-case {\n            width: 100%;\n            max-width: 440px;\n            background: linear-gradient(180deg, #222222 0%, #151515 100%);\n            border: 4px solid #333333;\n            border-radius: 16px;\n            padding: 20px;\n            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 2px 4px rgba(255,255,255,0.1);\n            display: flex;\n            flex-direction: column;\n            align-items: center;\n        }\n        #atari-easter-egg-wrapper .top-bar {\n            width: 100%;\n            display: flex;\n            justify-content: space-between;\n            align-items: center;\n            margin-bottom: 8px;\n            padding: 0 4px;\n        }\n        #atari-easter-egg-wrapper .brand-group {\n            display: flex;\n            align-items: center;\n            gap: 8px;\n        }\n        #atari-easter-egg-wrapper .brand-title {\n            font-size: 11px;\n            letter-spacing: 0.1em;\n            color: #fbbf24;\n            font-weight: bold;\n        }\n        #atari-easter-egg-wrapper .brand-badge {\n            font-size: 8px;\n            background: rgba(245, 158, 11, 0.2);\n            color: #fcd34d;\n            border: 1px solid rgba(245, 158, 11, 0.4);\n            padding: 2px 6px;\n            border-radius: 4px;\n        }\n        #atari-easter-egg-wrapper .metallic-strip {\n            width: 100%;\n            background: linear-gradient(90deg, #8a7343 0%, #e6c875 50%, #8a7343 100%);\n            height: 6px;\n            border-radius: 999px;\n            margin-bottom: 16px;\n        }\n        #atari-easter-egg-wrapper .crt-container {\n            position: relative;\n            width: 100%;\n            aspect-ratio: 3 \/ 4;\n            background-color: #05050a;\n            border: 8px solid #1a1a1a;\n            border-radius: 16px;\n            box-shadow: inset 0 0 30px rgba(0,0,0,0.9), 0 0 15px rgba(59, 130, 246, 0.15);\n            overflow: hidden;\n        }\n        #atari-easter-egg-wrapper .crt-container::after {\n            content: \" \";\n            display: block;\n            position: absolute;\n            top: 0; left: 0; bottom: 0; right: 0;\n            background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.35) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));\n            z-index: 10;\n            background-size: 100% 4px, 6px 100%;\n            pointer-events: none;\n        }\n        #atari-easter-egg-wrapper canvas {\n            display: block;\n            width: 100%;\n            height: 100%;\n            image-rendering: pixelated;\n            image-rendering: crisp-edges;\n        }\n        #atari-easter-egg-wrapper .hud-bar {\n            position: absolute;\n            top: 0; left: 0; right: 0;\n            padding: 12px;\n            display: flex;\n            justify-content: space-between;\n            align-items: flex-start;\n            z-index: 15;\n            pointer-events: none;\n            font-size: 10px;\n        }\n        #atari-easter-egg-wrapper .hud-label-score { color: #fbbf24; margin-bottom: 4px; }\n        #atari-easter-egg-wrapper .hud-label-hi { color: #22d3ee; margin-bottom: 4px; text-align: center; }\n        #atari-easter-egg-wrapper .hud-label-lives { color: #fb7185; margin-bottom: 4px; text-align: right; }\n        #atari-easter-egg-wrapper .hud-val { color: #ffffff; letter-spacing: 0.06em; }\n        #atari-easter-egg-wrapper .atari-overlay {\n            position: absolute;\n            top: 0; left: 0; right: 0; bottom: 0;\n            background: rgba(0, 0, 0, 0.88);\n            z-index: 30;\n            display: flex;\n            flex-direction: column;\n            align-items: center;\n            justify-content: center;\n            padding: 20px;\n            text-align: center;\n        }\n        #atari-easter-egg-wrapper .info-box {\n            background: rgba(17, 24, 39, 0.95);\n            border: 2px solid #374151;\n            border-radius: 8px;\n            padding: 14px;\n            margin: 16px 0 22px 0;\n            width: 100%;\n            font-size: 9px;\n            color: #d1d5db;\n            line-height: 1.8;\n        }\n        #atari-easter-egg-wrapper .leaderboard-list {\n            margin: 8px 0;\n            height: 110px;\n            overflow-y: auto;\n            text-align: left;\n            font-size: 8px;\n            line-height: 1.8;\n        }\n        #atari-easter-egg-wrapper .leaderboard-entry {\n            display: flex;\n            justify-content: space-between;\n            margin-bottom: 4px;\n            border-bottom: 1px dashed #374151;\n            padding-bottom: 2px;\n        }\n        #atari-easter-egg-wrapper .retro-btn {\n            background: #c9302c !important;\n            border-bottom: 6px solid #761c19 !important;\n            border-right: 4px solid #761c19 !important;\n            border-top: 2px solid #ff6b68 !important;\n            border-left: 2px solid #ff6b68 !important;\n            color: #ffffff !important;\n            transition: transform 0.08s ease;\n            text-shadow: 2px 2px 0px #000000;\n            padding: 12px 22px;\n            border-radius: 8px;\n            font-size: 12px;\n            cursor: pointer;\n            position: relative;\n            z-index: 35;\n            display: inline-block;\n            text-decoration: none !important;\n        }\n        #atari-easter-egg-wrapper .retro-btn:hover {\n            background: #dc3834 !important;\n        }\n        #atari-easter-egg-wrapper .retro-btn:active, \n        #atari-easter-egg-wrapper .retro-btn.active-press {\n            transform: translateY(4px);\n            border-bottom-width: 2px !important;\n        }\n        #atari-easter-egg-wrapper .retro-btn-secondary {\n            background: #2b2b2b !important;\n            border-bottom: 5px solid #141414 !important;\n            border-right: 3px solid #141414 !important;\n            border-top: 2px solid #525252 !important;\n            border-left: 2px solid #525252 !important;\n            color: #e5e7eb !important;\n            cursor: pointer;\n            border-radius: 10px;\n            padding: 12px 10px;\n            font-size: 12px;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n        }\n        #atari-easter-egg-wrapper .controls-grid {\n            width: 100%;\n            margin-top: 16px;\n            display: grid;\n            grid-template-columns: 1fr 1fr;\n            gap: 14px;\n        }\n        #atari-easter-egg-wrapper .blink {\n            animation: atari-blinker 1s steps(2, start) infinite;\n        }\n        #atari-easter-egg-wrapper .blink-fast {\n            animation: atari-blinker 0.4s steps(2, start) infinite;\n        }\n        @keyframes atari-blinker {\n            to { visibility: hidden; }\n        }\n        #atari-easter-egg-wrapper .name-entry-chars {\n            font-size: 20px;\n            letter-spacing: 8px;\n            color: #fbbf24;\n            margin: 20px 0;\n            text-shadow: 0 3px 0 #000;\n        }\n        #atari-easter-egg-wrapper .active-char {\n            color: #22d3ee;\n            border-bottom: 4px solid #22d3ee;\n        }\n    <\/style>\n    <div class=\"atari-case\">\n        <div class=\"top-bar\">\n            <div class=\"brand-group\">\n                <span class=\"brand-title\">ATARI 5200<\/span>\n                <span id=\"atariStatusBadge\" class=\"brand-badge\">EASTER EGG<\/span>\n            <\/div>\n            <button type=\"button\" id=\"atariSoundToggle\" class=\"retro-btn-secondary\" style=\"padding: 6px 10px; font-size: 9px; gap: 6px;\" title=\"Sl\u00e5 lyd til\/fra\">\n                <span id=\"atariSoundIcon\">\ud83d\udd0a<\/span>\n                <span id=\"atariSoundText\">LYD<\/span>\n            <\/button>\n        <\/div>\n        <div class=\"metallic-strip\"><\/div>\n        <div class=\"crt-container\">\n            <div class=\"hud-bar\">\n                <div>\n                    <div class=\"hud-label-score\">SCORE<\/div>\n                    <div id=\"atariScoreDisplay\" class=\"hud-val\">00000<\/div>\n                <\/div>\n                <div style=\"text-align: center;\">\n                    <div class=\"hud-label-hi\">TOP 1<\/div>\n                    <div id=\"atariHighScoreDisplay\" class=\"hud-val\">00000<\/div>\n                <\/div>\n                <div style=\"text-align: right;\">\n                    <div class=\"hud-label-lives\">LIV<\/div>\n                    <div id=\"atariLivesDisplay\" style=\"display: flex; gap: 4px; justify-content: flex-end; min-height: 16px;\"><\/div>\n                <\/div>\n            <\/div>\n            <canvas id=\"atariGameCanvas\" width=\"240\" height=\"320\"><\/canvas>\n            \n            <!-- START SK\u00c6RM -->\n            <div id=\"atariStartOverlay\" class=\"atari-overlay\">\n                <div style=\"color: #fbbf24; font-size: 9px; letter-spacing: 0.1em; margin-bottom: 8px;\">Det Hemmelige Blog-spil<\/div>\n                <div style=\"font-size: 18px; color: #22d3ee; margin-bottom: 10px; line-height: 1.4; text-shadow: 0 3px 0 #000;\">\n                    GALAXY<br><span style=\"color: #f43f5e;\">DEFENDER<\/span>\n                <\/div>\n                <div class=\"info-box\">\n                    <div style=\"color: #fcd34d; margin-bottom: 6px;\">STYRING:<\/div>\n                    <div>\u25c0 \/ \u25b6 eller [A] \/ [D]<\/div>\n                    <div style=\"color: #34d399; margin-top: 6px;\">AUTOFIRE ER AKTIVERET!<\/div>\n                    <div style=\"color: #fb7185; font-size: 8px; margin-top: 8px;\">Undg\u00e5 at fjenderne rammer dit skib!<\/div>\n                <\/div>\n                <button type=\"button\" id=\"atariStartBtn\" class=\"retro-btn blink\">\n                    TRYK START\n                <\/button>\n            <\/div>\n\n            <!-- NAME ENTRY SK\u00c6RM -->\n            <div id=\"atariNameEntryOverlay\" class=\"atari-overlay atari-hidden\">\n                <div style=\"font-size: 14px; color: #f59e0b; margin-bottom: 8px; text-shadow: 0 3px 0 #000;\">NY HIGHSCORE!<\/div>\n                <div style=\"font-size: 9px; color: #9ca3af; margin-bottom: 4px;\">INDTAST DINE INITIALER:<\/div>\n                <div id=\"atariNameEntryChars\" class=\"name-entry-chars\">\n                    <span id=\"char0\">A<\/span><span id=\"char1\">A<\/span><span id=\"char2\">A<\/span>\n                <\/div>\n                <div style=\"font-size: 8px; color: #6b7280; margin-bottom: 16px;\">[\u25c0\/\u25b6] Skift bogstav<br><br>[ENTER] V\u00e6lg bogstav<\/div>\n                <button type=\"button\" id=\"atariSelectLetterBtn\" class=\"retro-btn\">\n                    V\u00c6LG\n                <\/button>\n            <\/div>\n\n            <!-- GAMEOVER \/ LEADERBOARD SK\u00c6RM -->\n            <div id=\"atariGameOverOverlay\" class=\"atari-overlay atari-hidden\">\n                <div style=\"font-size: 16px; color: #f43f5e; margin-bottom: 4px; text-shadow: 0 2px 0 #000;\">GAME OVER<\/div>\n                <div class=\"info-box\" style=\"margin: 8px 0 12px 0; padding: 10px;\">\n                    <div style=\"text-align:center; color: #fbbf24; margin-bottom: 6px; font-size: 10px;\">\u2605 HALL OF FAME \u2605<\/div>\n                    <div id=\"atariLeaderboardList\" class=\"leaderboard-list\">\n                        <!-- Indhold genereres af JS -->\n                    <\/div>\n                <\/div>\n                <button type=\"button\" id=\"atariRestartBtn\" class=\"retro-btn\">\n                    SPIL IGEN\n                <\/button>\n            <\/div>\n\n        <\/div>\n        <div class=\"controls-grid\">\n            <button type=\"button\" id=\"atariBtnLeft\" class=\"retro-btn retro-btn-secondary\" aria-label=\"Flyv til venstre\">\n                \u25c0 VENSTRE\n            <\/button>\n            <button type=\"button\" id=\"atariBtnRight\" class=\"retro-btn retro-btn-secondary\" aria-label=\"Flyv til h\u00f8jre\">\n                H\u00d8JRE \u25b6\n            <\/button>\n        <\/div>\n        <div style=\"margin-top: 12px; font-size: 8px; color: #6b7280; text-align: center;\">\n            BRUG PILETASTERNE [\u25c0\/\u25b6], [A\/D] ELLER KNAPPERNE OVENFOR\n        <\/div>\n    <\/div>\n    <script>\n        (function() {\n            function bootAtariGame() {\n                const canvas = document.getElementById('atariGameCanvas');\n                if (!canvas || canvas.getAttribute('data-loaded') === 'true') return;\n                canvas.setAttribute('data-loaded', 'true');\n                const badge = document.getElementById('atariStatusBadge');\n                if (badge) {\n                    badge.textContent = 'READY';\n                    badge.style.color = '#34d399';\n                    badge.style.borderColor = '#34d399';\n                }\n                const ctx = canvas.getContext('2d');\n\n                \/\/ --- AUDIO SYSTEM ---\n                class RetroAudio {\n                    constructor() {\n                        this.ctx = null;\n                        this.enabled = true;\n                    }\n                    init() {\n                        try {\n                            if (!this.ctx) {\n                                const AudioCtx = window.AudioContext || window.webkitAudioContext;\n                                if (AudioCtx) this.ctx = new AudioCtx();\n                            }\n                            if (this.ctx && this.ctx.state === 'suspended') this.ctx.resume();\n                        } catch (e) {}\n                    }\n                    toggle() {\n                        this.enabled = !this.enabled;\n                        return this.enabled;\n                    }\n                    playLaser() {\n                        if (!this.enabled || !this.ctx) return;\n                        try {\n                            const osc = this.ctx.createOscillator();\n                            const gain = this.ctx.createGain();\n                            osc.type = 'square';\n                            const now = this.ctx.currentTime;\n                            osc.frequency.setValueAtTime(780, now);\n                            osc.frequency.exponentialRampToValueAtTime(180, now + 0.07);\n                            gain.gain.setValueAtTime(0.08, now);\n                            gain.gain.linearRampToValueAtTime(0.01, now + 0.07);\n                            osc.connect(gain);\n                            gain.connect(this.ctx.destination);\n                            osc.start(now);\n                            osc.stop(now + 0.07);\n                        } catch (e) {}\n                    }\n                    playEnemyHit() {\n                        if (!this.enabled || !this.ctx) return;\n                        try {\n                            const osc = this.ctx.createOscillator();\n                            const gain = this.ctx.createGain();\n                            osc.type = 'sawtooth';\n                            const now = this.ctx.currentTime;\n                            osc.frequency.setValueAtTime(220, now);\n                            osc.frequency.linearRampToValueAtTime(55, now + 0.14);\n                            gain.gain.setValueAtTime(0.12, now);\n                            gain.gain.linearRampToValueAtTime(0.01, now + 0.14);\n                            osc.connect(gain);\n                            gain.connect(this.ctx.destination);\n                            osc.start(now);\n                            osc.stop(now + 0.14);\n                        } catch (e) {}\n                    }\n                    playPlayerDamage() {\n                        if (!this.enabled || !this.ctx) return;\n                        try {\n                            const osc = this.ctx.createOscillator();\n                            const gain = this.ctx.createGain();\n                            osc.type = 'triangle';\n                            const now = this.ctx.currentTime;\n                            osc.frequency.setValueAtTime(150, now);\n                            osc.frequency.setValueAtTime(90, now + 0.08);\n                            osc.frequency.setValueAtTime(60, now + 0.16);\n                            osc.frequency.linearRampToValueAtTime(30, now + 0.35);\n                            gain.gain.setValueAtTime(0.25, now);\n                            gain.gain.linearRampToValueAtTime(0.01, now + 0.35);\n                            osc.connect(gain);\n                            gain.connect(this.ctx.destination);\n                            osc.start(now);\n                            osc.stop(now + 0.35);\n                        } catch (e) {}\n                    }\n                    playGameOver() {\n                        if (!this.enabled || !this.ctx) return;\n                        try {\n                            const notes = [330, 293, 261, 196];\n                            notes.forEach((freq, idx) => {\n                                const osc = this.ctx.createOscillator();\n                                const gain = this.ctx.createGain();\n                                osc.type = 'square';\n                                const start = this.ctx.currentTime + idx * 0.16;\n                                osc.frequency.setValueAtTime(freq, start);\n                                gain.gain.setValueAtTime(0.12, start);\n                                gain.gain.linearRampToValueAtTime(0.01, start + 0.15);\n                                osc.connect(gain);\n                                gain.connect(this.ctx.destination);\n                                osc.start(start);\n                                osc.stop(start + 0.15);\n                            });\n                        } catch (e) {}\n                    }\n                }\n\n                \/\/ --- SPRITES ---\n                const SPRITES = {\n                    player: [\"000010000\",\"000111000\",\"000111000\",\"010121010\",\"111111111\",\"110111011\",\"100101001\"],\n                    enemyScout: [\"001111100\",\"011111110\",\"110111011\",\"111111111\",\"010111010\",\"100000001\"],\n                    enemySwooper: [\"100111001\",\"110111011\",\"011010110\",\"001111100\",\"010101010\",\"100000001\"],\n                    enemyTank: [\"011111110\",\"111222111\",\"112222211\",\"111111111\",\"011010110\",\"011000110\"]\n                };\n\n                function drawSprite(c, matrix, x, y, pixelSize, primaryColor, secondaryColor) {\n                    const sec = secondaryColor || '#ffffff';\n                    for (let row = 0; row < matrix.length; row++) {\n                        for (let col = 0; col < matrix[row].length; col++) {\n                            const val = matrix[row][col];\n                            if (val !== '0') {\n                                c.fillStyle = val === '1' ? primaryColor : sec;\n                                c.fillRect(Math.floor(x + col * pixelSize), Math.floor(y + row * pixelSize), pixelSize, pixelSize);\n                            }\n                        }\n                    }\n                }\n\n                \/\/ --- GLOBALS &#038; LEADERBOARD ---\n                const audio = new RetroAudio();\n                const scoreDisplay = document.getElementById('atariScoreDisplay');\n                const highScoreDisplay = document.getElementById('atariHighScoreDisplay');\n                const livesDisplay = document.getElementById('atariLivesDisplay');\n                \n                const startOverlay = document.getElementById('atariStartOverlay');\n                const nameEntryOverlay = document.getElementById('atariNameEntryOverlay');\n                const gameOverOverlay = document.getElementById('atariGameOverOverlay');\n                const leaderboardListDOM = document.getElementById('atariLeaderboardList');\n                \n                const STORAGE_KEY = 'studieblog_atari5200_leaderboard';\n                let leaderboard = [];\n                \n                function loadLeaderboard() {\n                    try {\n                        const stored = localStorage.getItem(STORAGE_KEY);\n                        if (stored) leaderboard = JSON.parse(stored);\n                    } catch(e) {}\n                    if (!Array.isArray(leaderboard)) leaderboard = [];\n                }\n                function saveLeaderboard() {\n                    try {\n                        leaderboard.sort((a, b) => b.score - a.score);\n                        leaderboard = leaderboard.slice(0, 10);\n                        localStorage.setItem(STORAGE_KEY, JSON.stringify(leaderboard));\n                    } catch(e) {}\n                }\n                loadLeaderboard();\n                \n                function getHighScore() {\n                    return leaderboard.length > 0 ? leaderboard[0].score : 0;\n                }\n\n                const keys = { left: false, right: false };\n                let inputCooldown = 0;\n                let gameState = 'START'; \/\/ START, PLAYING, NAME_ENTRY, GAMEOVER\n                let score = 0;\n                let lives = 3;\n                let difficultyMultiplier = 1;\n                let lastTime = 0;\n                let spawnTimer = 0;\n                \n                const player = { width: 18, height: 14, x: 111, y: 282, speed: 135, fireCooldown: 0, fireRate: 0.20, invulnerableTimer: 0 };\n                let bullets = [];\n                let enemies = [];\n                let particles = [];\n                let stars = [];\n\n                \/\/ --- NAME ENTRY VARIABLES ---\n                const ALPHABET = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ.- 0123456789\";\n                let initials = [0, 0, 0];\n                let currentLetterIndex = 0;\n\n                function initStars() {\n                    stars = [];\n                    const colors = ['#ffffff', '#60a5fa', '#fbbf24', '#9ca3af'];\n                    for (let i = 0; i < 45; i++) {\n                        stars.push({\n                            x: Math.random() * canvas.width,\n                            y: Math.random() * canvas.height,\n                            speed: 15 + Math.random() * 45,\n                            size: Math.random() > 0.8 ? 2 : 1,\n                            color: colors[Math.floor(Math.random() * colors.length)]\n                        });\n                    }\n                }\n                function formatScore(num) {\n                    return num.toString().padStart(5, '0');\n                }\n                function updateHUD() {\n                    scoreDisplay.textContent = formatScore(score);\n                    highScoreDisplay.textContent = formatScore(getHighScore());\n                    livesDisplay.innerHTML = '';\n                    for (let i = 0; i < 3; i++) {\n                        const shipIcon = document.createElement('span');\n                        shipIcon.textContent = '\u25b2';\n                        shipIcon.style.fontSize = '12px';\n                        shipIcon.style.color = i < lives ? '#22d3ee' : '#374151';\n                        livesDisplay.appendChild(shipIcon);\n                    }\n                }\n                function renderLeaderboardDOM() {\n                    leaderboardListDOM.innerHTML = '';\n                    if (leaderboard.length === 0) {\n                        leaderboardListDOM.innerHTML = '<div style=\"text-align:center; color:#9ca3af; margin-top:20px;\">INGEN SCORES ENDNU<\/div>';\n                        return;\n                    }\n                    leaderboard.forEach((entry, index) => {\n                        const row = document.createElement('div');\n                        row.className = 'leaderboard-entry';\n                        \n                        const rankSpan = document.createElement('span');\n                        rankSpan.style.color = index === 0 ? '#fbbf24' : (index < 3 ? '#e5e7eb' : '#9ca3af');\n                        rankSpan.textContent = `${index + 1}. ${entry.initials}`;\n                        \n                        const scoreSpan = document.createElement('span');\n                        scoreSpan.style.color = '#34d399';\n                        scoreSpan.textContent = formatScore(entry.score);\n                        \n                        row.appendChild(rankSpan);\n                        row.appendChild(scoreSpan);\n                        leaderboardListDOM.appendChild(row);\n                    });\n                }\n\n                function createExplosion(x, y, color, count) {\n                    const total = count || 14;\n                    for (let i = 0; i < total; i++) {\n                        const angle = Math.random() * Math.PI * 2;\n                        const speed = 20 + Math.random() * 75;\n                        particles.push({\n                            x: x, y: y,\n                            vx: Math.cos(angle) * speed,\n                            vy: Math.sin(angle) * speed,\n                            size: Math.random() > 0.4 ? 2 : 3,\n                            color: color,\n                            life: 0.35 + Math.random() * 0.25\n                        });\n                    }\n                }\n                function spawnEnemy() {\n                    const rand = Math.random();\n                    let type = 'scout'; let sprite = SPRITES.enemyScout; let color = '#ff5555'; let hp = 1; let speed = (48 + Math.random() * 25) * difficultyMultiplier; let points = 100;\n                    if (rand > 0.78) {\n                        type = 'tank'; sprite = SPRITES.enemyTank; color = '#ffb000'; hp = 2; speed = 34 * difficultyMultiplier; points = 250;\n                    } else if (rand > 0.45) {\n                        type = 'swooper'; sprite = SPRITES.enemySwooper; color = '#d946ef'; hp = 1; speed = 62 * difficultyMultiplier; points = 150;\n                    }\n                    const width = 18; const height = 12;\n                    const x = 10 + Math.random() * (canvas.width - width - 20);\n                    enemies.push({\n                        x: x, baseX: x, y: -height, width: width, height: height,\n                        type: type, sprite: sprite, color: color, hp: hp, speed: speed, points: points,\n                        waveOffset: Math.random() * Math.PI * 2\n                    });\n                }\n\n                function startGame(e) {\n                    if (e && e.preventDefault) e.preventDefault();\n                    audio.init();\n                    score = 0;\n                    lives = 3;\n                    difficultyMultiplier = 1;\n                    player.x = (canvas.width - player.width) \/ 2;\n                    player.invulnerableTimer = 0;\n                    bullets = [];\n                    enemies = [];\n                    particles = [];\n                    spawnTimer = 0.4;\n                    keys.left = false; \n                    keys.right = false;\n                    \n                    updateHUD();\n                    startOverlay.classList.add('atari-hidden');\n                    gameOverOverlay.classList.add('atari-hidden');\n                    nameEntryOverlay.classList.add('atari-hidden');\n                    gameState = 'PLAYING';\n                }\n\n                function isHighScoreEligible(s) {\n                    if (s <= 0) return false;\n                    if (leaderboard.length < 10) return true;\n                    return s > leaderboard[leaderboard.length - 1].score;\n                }\n\n                function triggerGameOver() {\n                    audio.playGameOver();\n                    if (isHighScoreEligible(score)) {\n                        startNameEntry();\n                    } else {\n                        showLeaderboardScreen();\n                    }\n                }\n\n                \/\/ --- NAME ENTRY LOGIC ---\n                function startNameEntry() {\n                    gameState = 'NAME_ENTRY';\n                    initials = [0, 0, 0]; \/\/ Reset til A, A, A\n                    currentLetterIndex = 0;\n                    inputCooldown = 0.5; \/\/ Undg\u00e5 instant input\n                    keys.left = false; keys.right = false;\n                    updateNameEntryDisplay();\n                    startOverlay.classList.add('atari-hidden');\n                    gameOverOverlay.classList.add('atari-hidden');\n                    nameEntryOverlay.classList.remove('atari-hidden');\n                }\n                function updateNameEntryDisplay() {\n                    for(let i=0; i<3; i++) {\n                        const el = document.getElementById('char' + i);\n                        el.textContent = ALPHABET[initials[i]];\n                        el.className = '';\n                        if(i === currentLetterIndex) {\n                            el.classList.add('active-char', 'blink-fast');\n                        }\n                    }\n                }\n                function cycleLetter(dir) {\n                    initials[currentLetterIndex] += dir;\n                    if (initials[currentLetterIndex] < 0) initials[currentLetterIndex] = ALPHABET.length - 1;\n                    if (initials[currentLetterIndex] >= ALPHABET.length) initials[currentLetterIndex] = 0;\n                    updateNameEntryDisplay();\n                }\n                function confirmLetter() {\n                    if(gameState !== 'NAME_ENTRY') return;\n                    currentLetterIndex++;\n                    if (currentLetterIndex > 2) {\n                        \/\/ F\u00e6rdig! Gem score\n                        const finalInitials = ALPHABET[initials[0]] + ALPHABET[initials[1]] + ALPHABET[initials[2]];\n                        leaderboard.push({ initials: finalInitials, score: score });\n                        saveLeaderboard();\n                        updateHUD();\n                        showLeaderboardScreen();\n                    } else {\n                        updateNameEntryDisplay();\n                    }\n                }\n\n                function showLeaderboardScreen() {\n                    gameState = 'GAMEOVER';\n                    renderLeaderboardDOM();\n                    startOverlay.classList.add('atari-hidden');\n                    nameEntryOverlay.classList.add('atari-hidden');\n                    gameOverOverlay.classList.remove('atari-hidden');\n                }\n\n                function checkAABB(a, b) {\n                    if (a.x >= b.x + b.width) return false;\n                    if (a.x + a.width <= b.x) return false;\n                    if (a.y >= b.y + b.height) return false;\n                    if (a.y + a.height <= b.y) return false;\n                    return true;\n                }\n\n                function update(dt) {\n                    \/\/ Opdater stjerner og partikler (altid)\n                    for (let s of stars) {\n                        s.y += s.speed * dt;\n                        if (s.y > canvas.height) { s.y = 0; s.x = Math.random() * canvas.width; }\n                    }\n                    for (let i = particles.length - 1; i >= 0; i--) {\n                        const p = particles[i];\n                        p.x += p.vx * dt;\n                        p.y += p.vy * dt;\n                        p.life -= dt;\n                        if (p.life <= 0) particles.splice(i, 1);\n                    }\n\n                    if (gameState === 'NAME_ENTRY') {\n                        if (inputCooldown > 0) {\n                            inputCooldown -= dt;\n                        } else {\n                            if (keys.left) { cycleLetter(-1); inputCooldown = 0.15; }\n                            if (keys.right) { cycleLetter(1); inputCooldown = 0.15; }\n                        }\n                        return;\n                    }\n\n                    if (gameState !== 'PLAYING') return;\n\n                    difficultyMultiplier = 1 + Math.min(1.5, score \/ 4500);\n                    \n                    if (keys.left) player.x -= player.speed * dt;\n                    if (keys.right) player.x += player.speed * dt;\n                    if (player.x < 6) player.x = 6;\n                    if (player.x > canvas.width - player.width - 6) player.x = canvas.width - player.width - 6;\n                    if (player.invulnerableTimer > 0) player.invulnerableTimer -= dt;\n                    \n                    player.fireCooldown -= dt;\n                    if (player.fireCooldown <= 0) {\n                        bullets.push({\n                            x: player.x + Math.floor(player.width \/ 2) - 1,\n                            y: player.y - 4,\n                            width: 2, height: 6, speed: 240\n                        });\n                        audio.playLaser();\n                        player.fireCooldown = player.fireRate;\n                    }\n                    for (let i = bullets.length - 1; i >= 0; i--) {\n                        const b = bullets[i];\n                        b.y -= b.speed * dt;\n                        if (b.y + b.height < 0) bullets.splice(i, 1);\n                    }\n                    \n                    spawnTimer -= dt;\n                    if (spawnTimer <= 0) {\n                        spawnEnemy();\n                        spawnTimer = Math.max(0.38, 1.05 - (difficultyMultiplier - 1) * 0.35);\n                    }\n                    \n                    for (let i = enemies.length - 1; i >= 0; i--) {\n                        const e = enemies[i];\n                        e.y += e.speed * dt;\n                        if (e.type === 'swooper') {\n                            e.waveOffset += dt * 4;\n                            e.x = e.baseX + Math.sin(e.waveOffset) * 24;\n                            e.x = Math.max(6, Math.min(canvas.width - e.width - 6, e.x));\n                        }\n                        let enemyDestroyed = false;\n                        for (let j = bullets.length - 1; j >= 0; j--) {\n                            if (checkAABB(bullets[j], e)) {\n                                bullets.splice(j, 1);\n                                e.hp -= 1;\n                                if (e.hp <= 0) {\n                                    score += e.points;\n                                    updateHUD();\n                                    audio.playEnemyHit();\n                                    createExplosion(e.x + e.width \/ 2, e.y + e.height \/ 2, e.color, 14);\n                                    enemies.splice(i, 1);\n                                    enemyDestroyed = true;\n                                    break;\n                                } else {\n                                    createExplosion(e.x + e.width \/ 2, e.y + e.height, '#ffffff', 5);\n                                }\n                            }\n                        }\n                        if (enemyDestroyed) continue;\n                        \n                        if (checkAABB(e, player)) {\n                            enemies.splice(i, 1);\n                            createExplosion(e.x + e.width \/ 2, e.y + e.height \/ 2, '#ff3333', 20);\n                            if (player.invulnerableTimer <= 0) {\n                                lives -= 1;\n                                player.invulnerableTimer = 1.2;\n                                audio.playPlayerDamage();\n                                updateHUD();\n                                if (lives <= 0) {\n                                    createExplosion(player.x + player.width \/ 2, player.y + player.height \/ 2, '#38bdf8', 30);\n                                    triggerGameOver();\n                                    return;\n                                }\n                            }\n                            continue;\n                        }\n                        if (e.y > canvas.height + 10) enemies.splice(i, 1);\n                    }\n                }\n\n                function render() {\n                    ctx.fillStyle = '#05050a';\n                    ctx.fillRect(0, 0, canvas.width, canvas.height);\n                    for (let s of stars) {\n                        ctx.fillStyle = s.color;\n                        ctx.fillRect(Math.floor(s.x), Math.floor(s.y), s.size, s.size);\n                    }\n                    if (gameState === 'PLAYING') {\n                        for (let b of bullets) {\n                            ctx.fillStyle = '#fef08a';\n                            ctx.fillRect(Math.floor(b.x), Math.floor(b.y), b.width, b.height);\n                        }\n                        const blinkVisible = player.invulnerableTimer <= 0 || Math.floor(player.invulnerableTimer * 15) % 2 === 0;\n                        if (blinkVisible) {\n                            drawSprite(ctx, SPRITES.player, player.x, player.y, 2, '#38bdf8', '#facc15');\n                            const flameHeight = Math.random() > 0.5 ? 4 : 2;\n                            ctx.fillStyle = '#f97316';\n                            ctx.fillRect(Math.floor(player.x + 8), Math.floor(player.y + player.height), 2, flameHeight);\n                        }\n                        for (let e of enemies) {\n                            drawSprite(ctx, e.sprite, e.x, e.y, 2, e.color, '#ffffff');\n                        }\n                    }\n                    for (let p of particles) {\n                        ctx.fillStyle = p.color;\n                        ctx.fillRect(Math.floor(p.x), Math.floor(p.y), p.size, p.size);\n                    }\n                }\n\n                function gameLoop(timestamp) {\n                    if (!lastTime) lastTime = timestamp;\n                    const dt = Math.min((timestamp - lastTime) \/ 1000, 0.1);\n                    lastTime = timestamp;\n                    update(dt);\n                    render();\n                    requestAnimationFrame(gameLoop);\n                }\n\n                \/\/ --- CONTROLS ---\n                window.addEventListener('keydown', (e) => {\n                    if (e.code === 'ArrowLeft' || e.code === 'KeyA') {\n                        if (gameState === 'PLAYING' || gameState === 'NAME_ENTRY') e.preventDefault();\n                        keys.left = true;\n                        document.getElementById('atariBtnLeft').classList.add('active-press');\n                    }\n                    if (e.code === 'ArrowRight' || e.code === 'KeyD') {\n                        if (gameState === 'PLAYING' || gameState === 'NAME_ENTRY') e.preventDefault();\n                        keys.right = true;\n                        document.getElementById('atariBtnRight').classList.add('active-press');\n                    }\n                    if (e.code === 'Space' || e.code === 'Enter') {\n                        if (gameState === 'START' || gameState === 'GAMEOVER') {\n                            e.preventDefault();\n                            startGame();\n                        } else if (gameState === 'NAME_ENTRY') {\n                            e.preventDefault();\n                            confirmLetter();\n                        }\n                    }\n                });\n                window.addEventListener('keyup', (e) => {\n                    if (e.code === 'ArrowLeft' || e.code === 'KeyA') {\n                        keys.left = false;\n                        document.getElementById('atariBtnLeft').classList.remove('active-press');\n                    }\n                    if (e.code === 'ArrowRight' || e.code === 'KeyD') {\n                        keys.right = false;\n                        document.getElementById('atariBtnRight').classList.remove('active-press');\n                    }\n                });\n\n                function bindButton(btnId, directionKey) {\n                    const btn = document.getElementById(btnId);\n                    if (!btn) return;\n                    const activate = (e) => {\n                        e.preventDefault();\n                        keys[directionKey] = true;\n                        btn.classList.add('active-press');\n                    };\n                    const deactivate = (e) => {\n                        e.preventDefault();\n                        keys[directionKey] = false;\n                        btn.classList.remove('active-press');\n                    };\n                    btn.addEventListener('mousedown', activate);\n                    btn.addEventListener('mouseup', deactivate);\n                    btn.addEventListener('mouseleave', deactivate);\n                    btn.addEventListener('touchstart', activate, { passive: false });\n                    btn.addEventListener('touchend', deactivate, { passive: false });\n                    btn.addEventListener('touchcancel', deactivate, { passive: false });\n                }\n                bindButton('atariBtnLeft', 'left');\n                bindButton('atariBtnRight', 'right');\n\n                const startBtn = document.getElementById('atariStartBtn');\n                const restartBtn = document.getElementById('atariRestartBtn');\n                const selectLetterBtn = document.getElementById('atariSelectLetterBtn');\n                const soundToggle = document.getElementById('atariSoundToggle');\n\n                if (startBtn) {\n                    startBtn.addEventListener('click', startGame);\n                    startBtn.addEventListener('touchend', startGame, { passive: false });\n                }\n                if (restartBtn) {\n                    restartBtn.addEventListener('click', startGame);\n                    restartBtn.addEventListener('touchend', startGame, { passive: false });\n                }\n                if (selectLetterBtn) {\n                    selectLetterBtn.addEventListener('click', confirmLetter);\n                    selectLetterBtn.addEventListener('touchend', (e) => { e.preventDefault(); confirmLetter(); }, { passive: false });\n                }\n                if (soundToggle) {\n                    soundToggle.addEventListener('click', () => {\n                        audio.init();\n                        const isEnabled = audio.toggle();\n                        document.getElementById('atariSoundIcon').textContent = isEnabled ? '\ud83d\udd0a' : '\ud83d\udd07';\n                        document.getElementById('atariSoundText').textContent = isEnabled ? 'LYD' : 'MUTE';\n                    });\n                }\n\n                initStars();\n                updateHUD();\n                requestAnimationFrame(gameLoop);\n            }\n            if (document.readyState === 'loading') {\n                document.addEventListener('DOMContentLoaded', bootAtariGame);\n            } else {\n                bootAtariGame();\n            }\n        })();\n    <\/script>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ATARI 5200 EASTER EGG \ud83d\udd0a LYD SCORE 00000 TOP 1 00000 LIV Det Hemmelige Blog-spil GALAXYDEFENDER STYRING: \u25c0 \/ \u25b6 eller [A] \/ [D] AUTOFIRE ER AKTIVERET! Undg\u00e5 at fjenderne rammer dit skib! TRYK START NY HIGHSCORE! INDTAST DINE INITIALER: AAA [\u25c0\/\u25b6] Skift bogstav [ENTER] V\u00e6lg bogstav V\u00c6LG GAME OVER \u2605 HALL OF FAME \u2605 [&hellip;]<\/p>\n","protected":false},"author":239,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-178","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/itdd.au.dk\/hlss\/wp-json\/wp\/v2\/pages\/178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itdd.au.dk\/hlss\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/itdd.au.dk\/hlss\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/itdd.au.dk\/hlss\/wp-json\/wp\/v2\/users\/239"}],"replies":[{"embeddable":true,"href":"https:\/\/itdd.au.dk\/hlss\/wp-json\/wp\/v2\/comments?post=178"}],"version-history":[{"count":8,"href":"https:\/\/itdd.au.dk\/hlss\/wp-json\/wp\/v2\/pages\/178\/revisions"}],"predecessor-version":[{"id":245,"href":"https:\/\/itdd.au.dk\/hlss\/wp-json\/wp\/v2\/pages\/178\/revisions\/245"}],"wp:attachment":[{"href":"https:\/\/itdd.au.dk\/hlss\/wp-json\/wp\/v2\/media?parent=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}