Inscription #76458306#76,458,306svgInscription #76317362#76,317,362html<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Doctor Game</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } html, body { width: 100%; height: 100%; overflow: hidden; background-color: #000; display: flex; justify-content: center; align-items: center; } #gameCanvas { border: 2px solid #000; background-color: #000; width: 100%; height: 100%; } #loading { position: absolute; font-size: 24px; color: #fff; } #gameOver, #gameWin { position: absolute; color: #fff; font-size: 48px; text-align: center; display: none; } #gameOver img, #gameWin img { display: block; margin: 0 auto; } .score { position: absolute; color: #fff; font-size: 24px; top: 10px; left: 10px; } </style> </head> <body> <div id="loading">Loading...</div> <canvas id="gameCanvas"></canvas> <div class="score" id="score">Score: 0</div> <div id="gameOver"> <img src="/content/b39fb550791fa80ee1ab70a097cbe5d458a379c6d4b69361e11cab8d095f5054i1" alt="Game Over"> YOU LOOSE! </div> <div id="gameWin"> <img src="/content/e0499fc3235ad11b54ffb5b35eac6cf63e4d07aeead0a2594fbef280749c83f0i0" alt="You Win"> YOU WIN! </div> <script> const canvas = document.getElementById('gameCanvas'); const ctx = canvas.getContext('2d'); const loadingText = document.getElementById('loading'); const gameOverText = document.getElementById('gameOver'); const gameWinText = document.getElementById('gameWin'); const scoreText = document.getElementById('score'); function resizeCanvas() { canvas.width = window.innerWidth; canvas.height = window.innerHeight; } window.addEventListener('load', resizeCanvas); window.addEventListener('resize', resizeCanvas); const playerImage = new Image(); playerImage.src = '/content/b39fb550791fa80ee1ab70a097cbe5d458a379c6d4b69361e11cab8d095f5054i0'; const obstacleImages = [ '/content/f39d29543c4038130c35f49506a9dd6fa9750d93c54cd6b2b68c40522f1c8f85i3', '/content/7c8ffe9220a15ba3f1fd6a146c13d93bc24a37da92d57a7ff29e7b77e02037cfi2', '/content/b39fb550791fa80ee1ab70a097cbe5d458a379c6d4b69361e11cab8d095f5054i1' ]; const bonusItems = [ { src: '/content/f22f985713542879156e2d026990e9a56ffbb7f024dfc525ced405c081331dfdi0', points: 11 }, { src: '/content/2dbc6018dfda1d9dec11dcbff67134492c8a1b2dcecbcd6e9587a96f19f897a0i0', points: 12 }, { src: '/content/d11673e85d06ba8bf6c386119a3a7e320c05c413f21fadc2155e68687ce515f7i0', points: 13 } ]; let imagesLoaded = 0; const totalImages = 1 + obstacleImages.length + bonusItems.length; function imageLoaded() { imagesLoaded++; if (imagesLoaded === totalImages) { loadingText.style.display = 'none'; gameLoop(); } } playerImage.onload = imageLoaded; const loadedObstacleImages = obstacleImages.map(src => { const img = new Image(); img.src = src; img.onload = imageLoaded; return img; }); const loadedBonusItems = bonusItems.map(item => { const img = new Image(); img.src = item.src; img.onload = imageLoaded; return { img, points: item.points }; }); const player = { x: 50, y: 0, width: 70, height: 70, dy: 0, gravity: 1.5, jumpStrength: -25, isJumping: false }; const groundHeight = 50; const obstacles = []; const bonuses = []; let obstacleDelay = Math.floor(Math.random() * 1000) + 1000; let bonusDelay = Math.floor(Math.random() * 5000) + 4000; let lastObstacleTime = Date.now(); let lastBonusTime = Date.now(); let score = 0; let isGameOver = false; setInterval(() => { if (!isGameOver) { score++; } }, 1000); document.addEventListener('keydown', function(event) { if (event.code === 'Space' || event.code === 'ArrowUp') { if (!player.isJumping && !isGameOver) { player.dy = player.jumpStrength; player.isJumping = true; } } }); canvas.addEventListener('touchstart', function(event) { event.preventDefault(); if (!player.isJumping && !isGameOver) { player.dy = player.jumpStrength; player.isJumping = true; } }, { passive: false }); function addObstacle() { const obstacle = { x: canvas.width, y: canvas.height - groundHeight - 35, width: 35, height: 35, speed: 6, img: loadedObstacleImages[Math.floor(Math.random() * loadedObstacleImages.length)] }; obstacles.push(obstacle); obstacleDelay = Math.floor(Math.random() * 1000) + 3000; } function addBonus() { const bonus = { x: canvas.width, y: canvas.height - groundHeight - 110, width: 40, height: 40, speed: 6, ...loadedBonusItems[Math.floor(Math.random() * loadedBonusItems.length)] }; bonuses.push(bonus); bonusDelay = Math.floor(Math.random() * 5000) + 4000; } function drawGround() { ctx.fillStyle = '#654321'; ctx.fillRect(0, canvas.height - groundHeight, canvas.width, groundHeight); } function gameLoop() { if (isGameOver) return; player.dy += player.gravity; player.y += player.dy; if (player.y >= canvas.height - player.height - groundHeight) { player.y = canvas.height - player.height - groundHeight; player.dy = 0; player.isJumping = false; } if (Date.now() - lastObstacleTime > obstacleDelay) { addObstacle(); lastObstacleTime = Date.now(); } if (Date.now() - lastBonusTime > bonusDelay) { addBonus(); lastBonusTime = Date.now(); } for (let i = 0; i < obstacles.length; i++) { const obs = obstacles[i]; obs.x -= obs.speed; if (player.x < obs.x + obs.width && player.x + player.width > obs.x && player.y < obs.y + obs.height && player.y + player.height > obs.y) { endGame('lose'); } if (obs.x + obs.width < 0) { obstacles.splice(i, 1); i--; } } for (let i = 0; i < bonuses.length; i++) { const bonus = bonuses[i]; bonus.x -= bonus.speed; if (player.x < bonus.x + bonus.width && player.x + player.width > bonus.x && player.y < bonus.y + bonus.height && player.y + player.height > bonus.y) { score += bonus.points; bonuses.splice(i, 1); i--; } if (bonus.x + bonus.width < 0) { bonuses.splice(i, 1); i--; } } if (score >= 150) { endGame('win'); } ctx.clearRect(0, 0, canvas.width, canvas.height); drawGround(); ctx.drawImage(playerImage, player.x, player.y, player.width, player.height); for (const obs of obstacles) { ctx.drawImage(obs.img, obs.x, obs.y, obs.width, obs.height); } for (const bonus of bonuses) { ctx.drawImage(bonus.img, bonus.x, bonus.y, bonus.width, bonus.height); } scoreText.textContent = 'Score: ' + score; requestAnimationFrame(gameLoop); } function endGame(result) { isGameOver = true; if (result === 'lose') { gameOverText.style.display = 'block'; } else if (result === 'win') { gameWinText.style.display = 'block'; } } </script> </body> </html>#76,316,783textInscription #76314538#76,314,538html#74,379,310text#74,379,309textInscription #72716423#72,716,423htmlInscription #72470635#72,470,635svgtransfer100.pizza#71,726,875brc-20transfer100.pizza#71,329,467brc-20regLunaraStar.uniworlds#70,864,417snslunara.btc#70,864,413textreglunara.uniworlds#70,864,411sns#65,756,098gltf#64,366,448Inscription #57083411#57,083,411html27173.bitmap#12,605,413text