Created
January 17, 2026 02:21
-
-
Save cadroxemmalee-lab/e0dd604b9baec2759e03746b64deeee3 to your computer and use it in GitHub Desktop.
Emmalee game
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>EMMALEE'S UNFORTUNATE ADVENTURE</title> | |
| <style> | |
| body { margin: 0; background: #000; overflow: hidden; font-family: 'Courier New', Courier, monospace; } | |
| canvas { display: block; filter: contrast(150%) saturate(200%) brightness(1.2); } | |
| #ui { position: absolute; top: 10px; left: 10px; color: #0f0; background: rgba(0,0,0,0.7); padding: 10px; border: 2px solid #0f0; } | |
| </style> | |
| </head> | |
| <body> | |
| <div id="ui">SCORE: <span id="score">0</span><br>STATUS: <span id="status">GOAT</span></div> | |
| <canvas id="game"></canvas> | |
| <script> | |
| const canvas = document.getElementById('game'); | |
| const ctx = canvas.getContext('2d'); | |
| const scoreEl = document.getElementById('score'); | |
| const statusEl = document.getElementById('status'); | |
| canvas.width = window.innerWidth; | |
| canvas.height = window.innerHeight; | |
| let score = 0; | |
| let gameActive = true; | |
| const memes = ["π", "π", "πΏ", "π‘", "π", "π·", "π¦", "π"]; | |
| const phrases = ["W RIZZ", "ABSOLUTE UNIT", "EATING L", "BRUH MOMENT", "HOG CRANKED", "BEANS"]; | |
| const player = { | |
| x: 50, | |
| y: canvas.height / 2, | |
| size: 40, | |
| dy: 0, | |
| gravity: 0.6, | |
| jump: -12, | |
| emoji: "π±" | |
| }; | |
| const obstacles = []; | |
| const speed = 7; | |
| function spawnObstacle() { | |
| obstacles.push({ | |
| x: canvas.width, | |
| y: Math.random() * (canvas.height - 50), | |
| size: 60 + Math.random() * 40, | |
| text: memes[Math.floor(Math.random() * memes.length)], | |
| speed: speed + (score / 10) | |
| }); | |
| } | |
| function update() { | |
| if (!gameActive) return; | |
| // Physics | |
| player.dy += player.gravity; | |
| player.y += player.dy; | |
| // Floor/Ceiling collision | |
| if (player.y + player.size > canvas.height) { | |
| player.y = canvas.height - player.size; | |
| player.dy = 0; | |
| } | |
| if (player.y < 0) player.y = 0; | |
| // Move obstacles | |
| obstacles.forEach((obs, index) => { | |
| obs.x -= obs.speed; | |
| // Collision Detection | |
| if (player.x < obs.x + obs.size && | |
| player.x + player.size > obs.x && | |
| player.y < obs.y + obs.size && | |
| player.y + player.size > obs.y) { | |
| gameOver(); | |
| } | |
| if (obs.x + obs.size < 0) { | |
| obstacles.splice(index, 1); | |
| score++; | |
| scoreEl.innerText = score; | |
| if (score % 5 === 0) statusEl.innerText = phrases[Math.floor(Math.random() * phrases.length)]; | |
| } | |
| }); | |
| draw(); | |
| requestAnimationFrame(update); | |
| } | |
| function draw() { | |
| // Background Chaos | |
| ctx.fillStyle = `hsl(${score * 10 % 360}, 50%, 10%)`; | |
| ctx.fillRect(0, 0, canvas.width, canvas.height); | |
| // Draw Player | |
| ctx.font = '50px serif'; | |
| ctx.save(); | |
| ctx.translate(player.x + 25, player.y + 25); | |
| ctx.rotate(score * 0.1); // Spin the player because why not | |
| ctx.fillText(player.emoji, -25, 25); | |
| ctx.restore(); | |
| // Draw Obstacles | |
| obstacles.forEach(obs => { | |
| ctx.font = `${obs.size}px serif`; | |
| ctx.fillText(obs.text, obs.x, obs.y + obs.size); | |
| // Glitch effect lines | |
| if(Math.random() > 0.95) { | |
| ctx.strokeStyle = '#f0f'; | |
| ctx.beginPath(); | |
| ctx.moveTo(obs.x, obs.y); | |
| ctx.lineTo(obs.x + 200, obs.y + Math.random() * 100); | |
| ctx.stroke(); | |
| } | |
| }); | |
| } | |
| function gameOver() { | |
| gameActive = false; | |
| ctx.fillStyle = "rgba(255, 0, 0, 0.7)"; | |
| ctx.fillRect(0, 0, canvas.width, canvas.height); | |
| ctx.fillStyle = "white"; | |
| ctx.font = "bold 50px 'Comic Sans MS'"; | |
| ctx.textAlign = "center"; | |
| ctx.fillText("L + RATIO + EMMALEE DIED", canvas.width / 2, canvas.height / 2); | |
| ctx.font = "20px 'Courier New'"; | |
| ctx.fillText("Click to respawn or whatever", canvas.width / 2, canvas.height / 2 + 50); | |
| } | |
| window.addEventListener('keydown', (e) => { | |
| if (e.code === 'Space') player.dy = player.jump; | |
| }); | |
| window.addEventListener('mousedown', () => { | |
| if (!gameActive) { | |
| location.reload(); | |
| } else { | |
| player.dy = player.jump; | |
| } | |
| }); | |
| setInterval(() => { | |
| if (gameActive) spawnObstacle(); | |
| }, 1000); | |
| update(); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment