<!-- -- Uploaded on : https://haxor.my.id/open/amkebiye_koro.html -- Official Web : https://prinsh.com -- script-deface-generator.prinsh.com --> <!DOCTYPE html> <html> <head> <title>Vago Esha Vago - Sumu</title> <style> canvas { border: 2px solid black; } </style> </head> <body> <canvas id="gameCanvas" width="800" height="400"></canvas> <script> const canvas = document.getElementById('gameCanvas'); const ctx = canvas.getContext('2d'); // Characters const players = { esha: { x: 100, y: 300, width: 40, height: 60, color: 'pink', speed: 5 }, sefat: { x: 700, y: 300, width: 40, height: 60, color: 'blue', speed: 3 } }; // Game variables let isJumping = false; let score = 0; // Controls document.addEventListener('keydown', (e) => { if (e.key === 'ArrowUp' && !isJumping) { jumpEsha(); } }); // Esha's jump mechanic function jumpEsha() { isJumping = true; let jumpHeight = 0; const jumpInterval = setInterval(() => { if (jumpHeight < 100) { players.esha.y -= 5; jumpHeight += 5; } else { clearInterval(jumpInterval); fallEsha(); } }, 20); } function fallEsha() { const fallInterval = setInterval(() => { if (players.esha.y < 300) { players.esha.y += 5; } else { clearInterval(fallInterval); isJumping = false; } }, 20); } // Game loop function gameLoop() { // Clear canvas ctx.clearRect(0, 0, canvas.width, canvas.height); // Move Sefat towards Esha if(players.sefat.x > players.esha.x) { players.sefat.x -= players.sefat.speed; } // Draw characters ctx.fillStyle = players.esha.color; ctx.fillRect(players.esha.x, players.esha.y, players.esha.width, players.esha.height); ctx.fillStyle = players.sefat.color; ctx.fillRect(players.sefat.x, players.sefat.y, players.sefat.width, players.sefat.height); // Collision detection if ( players.esha.x < players.sefat.x + players.sefat.width && players.esha.x + players.esha.width > players.sefat.x && players.esha.y < players.sefat.y + players.sefat.height && players.esha.y + players.esha.height > players.sefat.y ) { alert('Sefat ধরে ফেলেছে! Game Over! Score: ' + score); location.reload(); } // Update score score++; ctx.fillStyle = 'black'; ctx.font = '20px Arial'; ctx.fillText('Score: ' + score, 10, 30); requestAnimationFrame(gameLoop); } // Start game gameLoop(); </script> </body> </html>