Spaces:
Running
Running
Add 3 files
Browse filesFiles changed (3)
- README.md+7-5
- index.html+445-19
- prompts.txtAdded+1
12345678910---title: Falemoji: 🐨colorFrom: greencolorTo: redsdk: staticpinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference123456789101112---title: falemoji: 🐳colorFrom: purplecolorTo: bluesdk: staticpinned: falsetags:- deepsite---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
12345678910111213141516171819<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width" /><title>My static Space</title><link rel="stylesheet" href="style.css" /></head><body><div class="card"><h1>Welcome to your static Space!</h1><p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p><p>Also don't forget to check the<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.</p></div></body></html>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Cyber Flappy</title><script src="https://cdn.tailwindcss.com"></script><style>@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');body {font-family: 'Press Start 2P', cursive;overflow: hidden;background-color: #0f0e17;color: #fffffe;}#gameCanvas {background: linear-gradient(to bottom, #0f0e17 0%, #1a1a2e 100%);display: block;margin: 0 auto;border: 4px solid #7f5af0;box-shadow: 0 0 20px #7f5af0;}.neon-text {text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #7f5af0, 0 0 20px #7f5af0;}.pixel-grid {background-image:linear-gradient(#2cb67d55 1px, transparent 1px),linear-gradient(90deg, #2cb67d55 1px, transparent 1px);background-size: 20px 20px;}.cyber-button {background: #7f5af0;color: #fffffe;border: none;padding: 12px 24px;font-family: 'Press Start 2P', cursive;font-size: 16px;cursor: pointer;transition: all 0.3s;position: relative;overflow: hidden;box-shadow: 0 0 10px #7f5af0;}.cyber-button:hover {background: #2cb67d;box-shadow: 0 0 20px #2cb67d;}.cyber-button:active {transform: translateY(2px);}.cyber-button::before {content: '';position: absolute;top: 0;left: -100%;width: 100%;height: 100%;background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);transition: 0.5s;}.cyber-button:hover::before {left: 100%;}.glow {animation: glow 1.5s ease-in-out infinite alternate;}@keyframes glow {from {box-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #7f5af0, 0 0 20px #7f5af0;}to {box-shadow: 0 0 10px #fff, 0 0 20px #2cb67d, 0 0 30px #2cb67d, 0 0 40px #2cb67d;}}</style></head><body class="pixel-grid min-h-screen flex flex-col items-center justify-center p-4"><div class="text-center mb-4"><h1 class="neon-text text-4xl md:text-6xl mb-4 glow">CYBER FLAPPY</h1><p class="text-lg md:text-xl mb-6">Navigate the neon pipes in this cyberpunk world</p></div><div class="relative"><canvas id="gameCanvas" width="320" height="480"></canvas><div id="startScreen" class="absolute inset-0 flex flex-col items-center justify-center bg-black bg-opacity-70"><h2 class="text-2xl md:text-3xl mb-6 neon-text">READY PLAYER?</h2><button id="startButton" class="cyber-button mb-4">START GAME</button><p class="text-sm mt-4">Press SPACE or CLICK to flap</p></div><div id="gameOverScreen" class="absolute inset-0 hidden flex-col items-center justify-center bg-black bg-opacity-70"><h2 class="text-2xl md:text-3xl mb-4 neon-text">GAME OVER</h2><p id="scoreDisplay" class="text-xl mb-6">SCORE: 0</p><button id="restartButton" class="cyber-button">TRY AGAIN</button></div></div><div class="mt-6 text-center"><p class="text-sm text-gray-400">Use your cyber reflexes to survive!</p></div><script>document.addEventListener('DOMContentLoaded', () => {const canvas = document.getElementById('gameCanvas');const ctx = canvas.getContext('2d');const startScreen = document.getElementById('startScreen');const gameOverScreen = document.getElementById('gameOverScreen');const startButton = document.getElementById('startButton');const restartButton = document.getElementById('restartButton');const scoreDisplay = document.getElementById('scoreDisplay');// Game variableslet gameRunning = false;let score = 0;let highScore = 0;let gravity = 0.5;let speed = 2;// Bird propertiesconst bird = {x: 50,y: canvas.height / 2,width: 30,height: 24,velocity: 0,color: '#7f5af0',wingAngle: 0,wingDirection: 1};// Pipes arraylet pipes = [];// Initialize gamefunction initGame() {bird.y = canvas.height / 2;bird.velocity = 0;pipes = [];score = 0;gameRunning = true;startScreen.style.display = 'none';gameOverScreen.style.display = 'none';animate();}// Draw bird with cyberpunk stylefunction drawBird() {// Bodyctx.fillStyle = bird.color;ctx.beginPath();ctx.ellipse(bird.x, bird.y, bird.width / 2, bird.height / 2, 0, 0, Math.PI * 2);ctx.fill();// Eye (glowing)ctx.fillStyle = '#fffffe';ctx.beginPath();ctx.arc(bird.x + 8, bird.y - 3, 4, 0, Math.PI * 2);ctx.fill();ctx.fillStyle = '#0f0e17';ctx.beginPath();ctx.arc(bird.x + 8, bird.y - 3, 2, 0, Math.PI * 2);ctx.fill();// Wing (animated)ctx.save();ctx.translate(bird.x - 10, bird.y);ctx.rotate(bird.wingAngle);ctx.fillStyle = '#2cb67d';ctx.beginPath();ctx.moveTo(0, 0);ctx.lineTo(-15, -10);ctx.lineTo(-5, -15);ctx.closePath();ctx.fill();ctx.restore();// Update wing animationbird.wingAngle += 0.1 * bird.wingDirection;if (Math.abs(bird.wingAngle) > 0.5) {bird.wingDirection *= -1;}// Glow effectctx.shadowColor = '#7f5af0';ctx.shadowBlur = 15;ctx.beginPath();ctx.ellipse(bird.x, bird.y, bird.width / 2, bird.height / 2, 0, 0, Math.PI * 2);ctx.fill();ctx.shadowBlur = 0;}// Create pipesfunction createPipe() {const gap = 150;const minHeight = 50;const maxHeight = canvas.height - gap - minHeight;const height = Math.floor(Math.random() * (maxHeight - minHeight + 1)) + minHeight;pipes.push({x: canvas.width,height: height,gap: gap,width: 50,passed: false,color: `hsl(${Math.random() * 60 + 200}, 80%, 60%)`});}// Draw pipes with cyberpunk stylefunction drawPipes() {pipes.forEach(pipe => {// Top pipectx.fillStyle = pipe.color;ctx.fillRect(pipe.x, 0, pipe.width, pipe.height);// Bottom pipectx.fillStyle = pipe.color;ctx.fillRect(pipe.x, pipe.height + pipe.gap, pipe.width, canvas.height - pipe.height - pipe.gap);// Pipe edges (neon effect)ctx.strokeStyle = '#fffffe';ctx.lineWidth = 3;ctx.strokeRect(pipe.x, 0, pipe.width, pipe.height);ctx.strokeRect(pipe.x, pipe.height + pipe.gap, pipe.width, canvas.height - pipe.height - pipe.gap);// Inner glowctx.shadowColor = pipe.color;ctx.shadowBlur = 10;ctx.fillRect(pipe.x, 0, pipe.width, pipe.height);ctx.fillRect(pipe.x, pipe.height + pipe.gap, pipe.width, canvas.height - pipe.height - pipe.gap);ctx.shadowBlur = 0;// Pipe details (circuits)ctx.strokeStyle = '#fffffe';ctx.lineWidth = 1;for (let y = 10; y < pipe.height; y += 15) {ctx.beginPath();ctx.moveTo(pipe.x + 5, y);ctx.lineTo(pipe.x + pipe.width - 5, y);ctx.stroke();}for (let y = pipe.height + pipe.gap + 10; y < canvas.height; y += 15) {ctx.beginPath();ctx.moveTo(pipe.x + 5, y);ctx.lineTo(pipe.x + pipe.width - 5, y);ctx.stroke();}});}// Update pipesfunction updatePipes() {if (gameRunning) {// Create new pipesif (pipes.length === 0 || pipes[pipes.length - 1].x < canvas.width - 200) {createPipe();}// Move pipes and check for passingpipes.forEach(pipe => {pipe.x -= speed;// Check if bird passed the pipeif (!pipe.passed && pipe.x + pipe.width < bird.x) {pipe.passed = true;score++;if (score > highScore) {highScore = score;}// Play score soundconst scoreSound = new Audio('data:audio/wav;base64,UklGRl9vT19XQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YU...');scoreSound.volume = 0.2;scoreSound.play().catch(e => console.log('Audio error:', e));}});// Remove off-screen pipespipes = pipes.filter(pipe => pipe.x + pipe.width > 0);}}// Check collisionsfunction checkCollisions() {// Check if bird hits the ground or ceilingif (bird.y + bird.height / 2 > canvas.height || bird.y - bird.height / 2 < 0) {gameOver();}// Check pipe collisionsfor (const pipe of pipes) {if (bird.x + bird.width / 2 > pipe.x &&bird.x - bird.width / 2 < pipe.x + pipe.width &&(bird.y - bird.height / 2 < pipe.height ||bird.y + bird.height / 2 > pipe.height + pipe.gap)) {gameOver();}}}// Game overfunction gameOver() {gameRunning = false;scoreDisplay.textContent = `SCORE: ${score} | HIGH: ${highScore}`;gameOverScreen.style.display = 'flex';// Play explosion soundconst explosionSound = new Audio('data:audio/wav;base64,UklGRl9vT19XQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YU...');explosionSound.volume = 0.3;explosionSound.play().catch(e => console.log('Audio error:', e));}// Flap (jump)function flap() {if (gameRunning) {bird.velocity = -8;// Play flap soundconst flapSound = new Audio('data:audio/wav;base64,UklGRl9vT19XQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YU...');flapSound.volume = 0.2;flapSound.play().catch(e => console.log('Audio error:', e));} else if (!startScreen.style.display === 'none' && !gameOverScreen.style.display === 'none') {initGame();}}// Update game statefunction update() {if (gameRunning) {// Update bird physicsbird.velocity += gravity;bird.y += bird.velocity;// Update pipesupdatePipes();// Check collisionscheckCollisions();// Increase difficultyif (score > 0 && score % 5 === 0) {speed = 2 + Math.floor(score / 5) * 0.5;}}}// Draw everythingfunction draw() {// Clear canvasctx.fillStyle = '#0f0e17';ctx.fillRect(0, 0, canvas.width, canvas.height);// Draw grid lines (cyberpunk style)ctx.strokeStyle = '#2cb67d33';ctx.lineWidth = 1;// Vertical linesfor (let x = 0; x < canvas.width; x += 20) {ctx.beginPath();ctx.moveTo(x, 0);ctx.lineTo(x, canvas.height);ctx.stroke();}// Horizontal linesfor (let y = 0; y < canvas.height; y += 20) {ctx.beginPath();ctx.moveTo(0, y);ctx.lineTo(canvas.width, y);ctx.stroke();}// Draw pipesdrawPipes();// Draw birddrawBird();// Draw scorectx.fillStyle = '#fffffe';ctx.font = '20px "Press Start 2P"';ctx.textAlign = 'left';ctx.fillText(`SCORE: ${score}`, 10, 30);// Draw speed indicatorctx.fillStyle = '#2cb67d';ctx.fillText(`SPEED: ${speed.toFixed(1)}`, 10, 60);}// Game loopfunction animate() {update();draw();if (gameRunning) {requestAnimationFrame(animate);}}// Event listenersstartButton.addEventListener('click', initGame);restartButton.addEventListener('click', initGame);document.addEventListener('keydown', (e) => {if (e.code === 'Space') {e.preventDefault();flap();}});canvas.addEventListener('click', () => {flap();});// Initial drawdraw();// Easter egg - change bird color on double clickcanvas.addEventListener('dblclick', () => {const colors = ['#7f5af0', '#2cb67d', '#ff8906', '#e53170', '#25d7fd'];bird.color = colors[Math.floor(Math.random() * colors.length)];});});</script><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Satoshisakamoto/fal" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>
1Faça um flap Bird Cyber punk README.md+7-5
index.html+445-19
prompts.txtAdded+1