Add 2 files
Browse filesFiles changed (2)
- index.html+362-479
- prompts.txt+2-1
2 unmodified lines34567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725732 unmodified lines<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Realistic Cat Simulator</title><script src="https://cdn.tailwindcss.com"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"><style>@keyframes purr {0% { transform: translateX(0); }25% { transform: translateX(-2px); }50% { transform: translateX(0); }75% { transform: translateX(2px); }100% { transform: translateX(0); }}@keyframes tailWag {0% { transform: rotate(-10deg); }50% { transform: rotate(10deg); }100% { transform: rotate(-10deg); }}@keyframes blink {0% { transform: scaleY(1); }5% { transform: scaleY(0.1); }10% { transform: scaleY(1); }100% { transform: scaleY(1); }}.purring {animation: purr 0.2s infinite;}.tail-wagging {transform-origin: top center;animation: tailWag 0.8s infinite;}.blinking {animation: blink 4s infinite;}.cat-eye {transition: all 0.3s ease;}.cat-paw {cursor: pointer;transition: all 0.2s ease;}.cat-paw:active {transform: scale(0.95);}.mood-indicator {transition: width 0.5s ease;}.food-bowl {transition: all 0.3s ease;}.food-bowl:hover {transform: scale(1.05);}.thought-bubble {opacity: 0;transition: all 0.5s ease;}.show-thought {opacity: 1;}</style></head><body class="bg-gray-100 min-h-screen flex flex-col items-center justify-center p-4"><div class="max-w-2xl w-full bg-white rounded-xl shadow-xl overflow-hidden"><div class="bg-orange-200 p-4"><h1 class="text-3xl font-bold text-center text-gray-800">Realistic Cat Simulator</h1><div class="flex justify-between items-center mt-2"><div class="w-full bg-gray-200 rounded-full h-4"><div id="hunger-bar" class="bg-blue-500 h-4 rounded-full mood-indicator" style="width: 50%"></div></div><span class="ml-2 text-sm font-medium">Hunger</span></div><div class="flex justify-between items-center mt-2"><div class="w-full bg-gray-200 rounded-full h-4"><div id="happiness-bar" class="bg-green-500 h-4 rounded-full mood-indicator" style="width: 70%"></div></div><span class="ml-2 text-sm font-medium">Happiness</span></div><div class="flex justify-between items-center mt-2"><div class="w-full bg-gray-200 rounded-full h-4"><div id="energy-bar" class="bg-yellow-500 h-4 rounded-full mood-indicator" style="width: 80%"></div></div><span class="ml-2 text-sm font-medium">Energy</span></div></div><div class="p-6 relative"><!-- Thought bubble --><div id="thought-bubble" class="thought-bubble absolute top-0 left-1/2 transform -translate-x-1/2 -translate-y-1/2 bg-white rounded-full p-3 shadow-lg flex items-center justify-center"><span id="thought-text" class="text-sm font-medium"></span><div class="absolute bottom-0 left-1/2 transform -translate-x-1/2 translate-y-1/2 w-4 h-4 bg-white rotate-45"></div></div><!-- The cat --><div class="flex justify-center"><div id="cat-container" class="relative w-64 h-64"><!-- Tail --><div id="cat-tail" class="tail-wagging absolute -right-8 top-16 w-16 h-4 bg-gray-700 rounded-full transform rotate-12"></div><!-- Body --><div id="cat-body" class="absolute top-10 left-10 w-40 h-32 bg-gray-500 rounded-full"><!-- Head --><div id="cat-head" class="absolute -top-8 -left-4 w-24 h-24 bg-gray-500 rounded-full"><!-- Ears --><div class="absolute -top-2 -left-2 w-8 h-8 bg-gray-700 rounded-tl-full"></div><div class="absolute -top-2 -right-2 w-8 h-8 bg-gray-700 rounded-tr-full"></div><!-- Inner ears --><div class="absolute top-1 left-1 w-5 h-5 bg-pink-300 rounded-tl-full"></div><div class="absolute top-1 right-1 w-5 h-5 bg-pink-300 rounded-tr-full"></div><!-- Eyes --><div class="absolute top-6 left-4 w-6 h-8 bg-white rounded-full overflow-hidden"><div id="left-eye" class="cat-eye absolute top-2 left-1 w-4 h-4 bg-green-600 rounded-full blinking"><div class="absolute top-1 left-1 w-2 h-2 bg-black rounded-full"></div></div></div><div class="absolute top-6 right-4 w-6 h-8 bg-white rounded-full overflow-hidden"><div id="right-eye" class="cat-eye absolute top-2 left-1 w-4 h-4 bg-green-600 rounded-full blinking"><div class="absolute top-1 left-1 w-2 h-2 bg-black rounded-full"></div></div></div><!-- Nose --><div class="absolute top-10 left-1/2 transform -translate-x-1/2 w-4 h-3 bg-pink-300 rounded-b-full"></div><!-- Mouth --><div class="absolute top-12 left-1/2 transform -translate-x-1/2 w-6 flex flex-col items-center"><div class="w-0.5 h-2 bg-gray-800"></div><div class="flex"><div class="w-3 h-0.5 bg-gray-800"></div><div class="w-3 h-0.5 bg-gray-800"></div></div></div><!-- Whiskers --><div class="absolute top-10 left-0 w-full flex justify-between"><div class="flex space-x-4"><div class="w-8 h-0.5 bg-gray-800"></div><div class="w-8 h-0.5 bg-gray-800"></div><div class="w-8 h-0.5 bg-gray-800"></div></div><div class="flex space-x-4"><div class="w-8 h-0.5 bg-gray-800"></div><div class="w-8 h-0.5 bg-gray-800"></div><div class="w-8 h-0.5 bg-gray-800"></div></div></div></div><!-- Legs --><div class="absolute bottom-0 left-4 w-8 h-12 bg-gray-500 rounded-b-full"></div><div class="absolute bottom-0 right-4 w-8 h-12 bg-gray-500 rounded-b-full"></div><!-- Paws --><div id="left-paw" class="cat-paw absolute bottom-0 left-6 w-6 h-4 bg-gray-700 rounded-full flex justify-around"><div class="w-1 h-2 bg-gray-800 rounded-full"></div><div class="w-1 h-2 bg-gray-800 rounded-full"></div><div class="w-1 h-2 bg-gray-800 rounded-full"></div></div><div id="right-paw" class="cat-paw absolute bottom-0 right-6 w-6 h-4 bg-gray-700 rounded-full flex justify-around"><div class="w-1 h-2 bg-gray-800 rounded-full"></div><div class="w-1 h-2 bg-gray-800 rounded-full"></div><div class="w-1 h-2 bg-gray-800 rounded-full"></div></div></div></div></div><!-- Cat states --><div id="cat-states" class="mt-8 flex justify-center space-x-4"><div id="sleeping-state" class="hidden bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm font-medium"><i class="fas fa-moon mr-1"></i> Sleeping</div><div id="eating-state" class="hidden bg-green-100 text-green-800 px-3 py-1 rounded-full text-sm font-medium"><i class="fas fa-utensils mr-1"></i> Eating</div><div id="playing-state" class="hidden bg-yellow-100 text-yellow-800 px-3 py-1 rounded-full text-sm font-medium"><i class="fas fa-gamepad mr-1"></i> Playing</div><div id="angry-state" class="hidden bg-red-100 text-red-800 px-3 py-1 rounded-full text-sm font-medium"><i class="fas fa-angry mr-1"></i> Angry</div></div><!-- Controls --><div class="mt-8 grid grid-cols-2 md:grid-cols-4 gap-4"><button id="pet-btn" class="bg-purple-500 hover:bg-purple-600 text-white px-4 py-2 rounded-lg flex items-center justify-center"><i class="fas fa-hand-paper mr-2"></i> Pet</button><button id="feed-btn" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg flex items-center justify-center"><i class="fas fa-utensils mr-2"></i> Feed</button><button id="play-btn" class="bg-yellow-500 hover:bg-yellow-600 text-white px-4 py-2 rounded-lg flex items-center justify-center"><i class="fas fa-gamepad mr-2"></i> Play</button><button id="sleep-btn" class="bg-indigo-500 hover:bg-indigo-600 text-white px-4 py-2 rounded-lg flex items-center justify-center"><i class="fas fa-moon mr-2"></i> Sleep</button></div><!-- Food bowl --><div id="food-bowl" class="food-bowl absolute bottom-4 right-4 w-16 h-8 bg-gray-300 rounded-b-full border-t-4 border-gray-400 flex justify-center items-end pb-1 cursor-pointer"><div id="food-content" class="hidden w-12 h-4 bg-yellow-300 rounded-full"></div></div><!-- Toy --><div id="cat-toy" class="absolute bottom-4 left-4 w-12 h-12 bg-red-500 rounded-full flex items-center justify-center cursor-pointer"><i class="fas fa-paw text-white"></i></div></div></div><audio id="purr-sound" src="https://assets.mixkit.co/sfx/preview/mixkit-cat-purring-close-1900.mp3" preload="auto"></audio><audio id="meow-sound" src="https://assets.mixkit.co/sfx/preview/mixkit-cat-meow-117.mp3" preload="auto"></audio><audio id="angry-sound" src="https://assets.mixkit.co/sfx/preview/mixkit-angry-cat-944.mp3" preload="auto"></audio><audio id="eating-sound" src="https://assets.mixkit.co/sfx/preview/mixkit-small-dog-eating-1210.mp3" preload="auto"></audio><audio id="play-sound" src="https://assets.mixkit.co/sfx/preview/mixkit-dog-playing-with-toy-1211.mp3" preload="auto"></audio><script>// Game stateconst state = {hunger: 50,happiness: 70,energy: 80,isSleeping: false,isEating: false,isPlaying: false,isAngry: false,lastAction: null};// DOM elementsconst hungerBar = document.getElementById('hunger-bar');const happinessBar = document.getElementById('happiness-bar');const energyBar = document.getElementById('energy-bar');const catBody = document.getElementById('cat-body');const catHead = document.getElementById('cat-head');const catTail = document.getElementById('cat-tail');const leftEye = document.getElementById('left-eye');const rightEye = document.getElementById('right-eye');const leftPaw = document.getElementById('left-paw');const rightPaw = document.getElementById('right-paw');const petBtn = document.getElementById('pet-btn');const feedBtn = document.getElementById('feed-btn');const playBtn = document.getElementById('play-btn');const sleepBtn = document.getElementById('sleep-btn');const foodBowl = document.getElementById('food-bowl');const foodContent = document.getElementById('food-content');const catToy = document.getElementById('cat-toy');const thoughtBubble = document.getElementById('thought-bubble');const thoughtText = document.getElementById('thought-text');const sleepingState = document.getElementById('sleeping-state');const eatingState = document.getElementById('eating-state');const playingState = document.getElementById('playing-state');const angryState = document.getElementById('angry-state');// Soundsconst purrSound = document.getElementById('purr-sound');const meowSound = document.getElementById('meow-sound');const angrySound = document.getElementById('angry-sound');const eatingSound = document.getElementById('eating-sound');const playSound = document.getElementById('play-sound');// Update barsfunction updateBars() {hungerBar.style.width = `${state.hunger}%`;happinessBar.style.width = `${state.happiness}%`;energyBar.style.width = `${state.energy}%`;// Color changes based on levelshungerBar.className = `h-4 rounded-full mood-indicator ${state.hunger < 30 ? 'bg-red-500' : 'bg-blue-500'}`;happinessBar.className = `h-4 rounded-full mood-indicator ${state.happiness < 40 ? 'bg-yellow-500' : 'bg-green-500'}`;energyBar.className = `h-4 rounded-full mood-indicator ${state.energy < 30 ? 'bg-orange-500' : 'bg-yellow-500'}`;}// Show thought bubblefunction showThought(text, duration = 3000) {thoughtText.textContent = text;thoughtBubble.classList.add('show-thought');setTimeout(() => {thoughtBubble.classList.remove('show-thought');}, duration);}// Pet the catpetBtn.addEventListener('click', () => {if (state.isSleeping) {showThought("Zzz... Don't disturb me!", 2000);state.happiness -= 5;angrySound.play();setAngry();setTimeout(() => clearAngry(), 2000);} else if (state.isEating) {showThought("I'm eating! Go away!", 2000);state.happiness -= 5;angrySound.play();setAngry();setTimeout(() => clearAngry(), 2000);} else if (state.isPlaying) {showThought("Not now, I'm playing!", 2000);} else {showThought("Purrr... That feels good!", 2000);state.happiness = Math.min(100, state.happiness + 10);purrSound.play();catBody.classList.add('purring');setTimeout(() => catBody.classList.remove('purring'), 2000);}updateBars();state.lastAction = 'pet';});// Feed the catfeedBtn.addEventListener('click', () => {if (state.isSleeping) {showThought("Zzz... Maybe later...", 2000);} else if (state.isPlaying) {showThought("I'll eat after playing!", 2000);} else {showThought("Yum! Food!", 2000);foodContent.classList.remove('hidden');state.isEating = true;eatingState.classList.remove('hidden');eatingSound.play();setTimeout(() => {state.hunger = Math.min(100, state.hunger + 30);state.happiness = Math.min(100, state.happiness + 5);foodContent.classList.add('hidden');state.isEating = false;eatingState.classList.add('hidden');updateBars();}, 3000);}state.lastAction = 'feed';});// Play with the catplayBtn.addEventListener('click', () => {if (state.isSleeping) {showThought("Zzz... I'm too sleepy...", 2000);} else if (state.energy < 20) {showThought("Too tired to play...", 2000);} else {showThought("Yay! Playtime!", 2000);state.isPlaying = true;playingState.classList.remove('hidden');playSound.play();state.happiness = Math.min(100, state.happiness + 15);state.energy = Math.max(0, state.energy - 20);// Animate the toylet toyX = 50;let toyY = 50;let directionX = 1;let directionY = 1;const playInterval = setInterval(() => {toyX += 5 * directionX;toyY += 3 * directionY;if (toyX > 80 || toyX < 20) directionX *= -1;if (toyY > 80 || toyY < 20) directionY *= -1;catToy.style.left = `${toyX}%`;catToy.style.top = `${toyY}%`;// Make cat follow the toy with eyesconst catRect = catBody.getBoundingClientRect();const toyRect = catToy.getBoundingClientRect();const catCenterX = catRect.left + catRect.width / 2;const catCenterY = catRect.top + catRect.height / 2;const angleX = Math.atan2(toyRect.left - catCenterX, toyRect.top - catCenterY) * (180 / Math.PI);const angleY = Math.atan2(toyRect.top - catCenterY, toyRect.left - catCenterX) * (180 / Math.PI);leftEye.style.transform = `rotate(${angleX}deg)`;rightEye.style.transform = `rotate(${angleX}deg)`;}, 100);setTimeout(() => {clearInterval(playInterval);state.isPlaying = false;playingState.classList.add('hidden');leftEye.style.transform = 'rotate(0)';rightEye.style.transform = 'rotate(0)';catToy.style.left = '10%';catToy.style.top = '80%';updateBars();}, 5000);}state.lastAction = 'play';});// Put cat to sleepsleepBtn.addEventListener('click', () => {if (state.isPlaying) {showThought("I don't want to sleep now!", 2000);} else if (state.isEating) {showThought("I need to finish eating first!", 2000);} else {showThought("Zzz... Goodnight...", 2000);state.isSleeping = true;sleepingState.classList.remove('hidden');// Close eyesleftEye.style.height = '2px';rightEye.style.height = '2px';// Stop tail waggingcatTail.classList.remove('tail-wagging');// Recover energy while sleepingconst sleepInterval = setInterval(() => {state.energy = Math.min(100, state.energy + 5);updateBars();if (state.energy >= 95) {clearInterval(sleepInterval);state.isSleeping = false;sleepingState.classList.add('hidden');leftEye.style.height = '4px';rightEye.style.height = '4px';catTail.classList.add('tail-wagging');showThought("I'm awake now!", 2000);}}, 1000);}state.lastAction = 'sleep';});// Set angry statefunction setAngry() {state.isAngry = true;angryState.classList.remove('hidden');// Change eye color to redleftEye.style.backgroundColor = 'red';rightEye.style.backgroundColor = 'red';// Ears go backcatHead.style.transform = 'scale(1.05)';}// Clear angry statefunction clearAngry() {state.isAngry = false;angryState.classList.add('hidden');// Restore eye colorleftEye.style.backgroundColor = 'green';rightEye.style.backgroundColor = 'green';// Restore headcatHead.style.transform = 'scale(1)';}// Paw interactionsleftPaw.addEventListener('click', () => {if (!state.isSleeping && !state.isEating && !state.isPlaying) {showThought("Hey! That's my paw!", 2000);meowSound.play();// Animate pawleftPaw.style.transform = 'translateY(-10px) rotate(-20deg)';setTimeout(() => {leftPaw.style.transform = '';}, 500);}});rightPaw.addEventListener('click', () => {if (!state.isSleeping && !state.isEating && !state.isPlaying) {showThought("Don't touch my paws!", 2000);meowSound.play();// Animate pawrightPaw.style.transform = 'translateY(-10px) rotate(20deg)';setTimeout(() => {rightPaw.style.transform = '';}, 500);}});// Food bowl interactionfoodBowl.addEventListener('click', () => {if (!state.isSleeping && !state.isEating && !state.isPlaying) {showThought("Is there food for me?", 2000);}});// Toy interactioncatToy.addEventListener('click', () => {if (!state.isSleeping && !state.isEating && !state.isPlaying) {showThought("Is that for me to play with?", 2000);}});// Random cat behaviorssetInterval(() => {if (!state.isSleeping && !state.isEating && !state.isPlaying && Math.random() > 0.7) {const behaviors = [() => showThought("I wonder what's outside...", 2000),() => showThought("Maybe I'll take a nap soon...", 2000),() => {showThought("Time to clean myself!", 2000);// Animate cleaningleftPaw.style.transform = 'translateY(-20px) rotate(-45deg)';setTimeout(() => {leftPaw.style.transform = '';}, 1000);},() => {showThought("Stretch time!", 2000);// Animate stretchingcatBody.style.transform = 'scaleY(1.1)';setTimeout(() => {catBody.style.transform = '';}, 1000);}];const randomBehavior = behaviors[Math.floor(Math.random() * behaviors.length)];randomBehavior();}// Passive stat changesif (!state.isSleeping) {state.hunger = Math.max(0, state.hunger - 1);state.happiness = Math.max(0, state.happiness - 0.5);if (!state.isPlaying) {state.energy = Math.max(0, state.energy - 0.3);}updateBars();}// Meow randomlyif (!state.isSleeping && !state.isEating && !state.isPlaying && Math.random() > 0.95) {meowSound.play();}}, 5000);// InitializeupdateBars();</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=Palenkov/cat" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>2 unmodified lines34567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554562 unmodified lines<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Jumpster - Sprunki Inspired Game</title><script src="https://cdn.tailwindcss.com"></script><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"><style>@keyframes jump {0% { transform: translateY(0); }50% { transform: translateY(-100px); }100% { transform: translateY(0); }}@keyframes float {0% { transform: translateY(0); }50% { transform: translateY(-10px); }100% { transform: translateY(0); }}@keyframes slide {from { transform: translateX(100%); }to { transform: translateX(-100%); }}.jumping {animation: jump 0.5s ease-out;}.floating {animation: float 2s infinite ease-in-out;}.sliding {animation: slide linear infinite;}.game-container {position: relative;width: 100%;height: 400px;overflow: hidden;background: linear-gradient(to bottom, #87CEEB, #E0F7FA);}.platform {position: absolute;bottom: 0;width: 100%;height: 20px;background: linear-gradient(to right, #8BC34A, #4CAF50);}.character {position: absolute;width: 50px;height: 50px;bottom: 20px;left: 50px;transition: all 0.1s ease;}.obstacle {position: absolute;width: 30px;height: 30px;bottom: 20px;}.collectible {position: absolute;width: 20px;height: 20px;bottom: 40px;}.game-over {transform: scale(1.1);transition: all 0.3s ease;}</style></head><body class="bg-gray-100 min-h-screen flex flex-col items-center justify-center p-4"><div class="max-w-md w-full bg-white rounded-xl shadow-xl overflow-hidden"><div class="bg-green-500 p-4"><h1 class="text-3xl font-bold text-center text-white">Jumpster</h1><div class="flex justify-between items-center mt-4"><div class="bg-white bg-opacity-30 px-4 py-2 rounded-lg"><span class="font-bold text-white">Score: </span><span id="score" class="font-bold text-white">0</span></div><div class="bg-white bg-opacity-30 px-4 py-2 rounded-lg"><span class="font-bold text-white">High Score: </span><span id="high-score" class="font-bold text-white">0</span></div></div></div><div class="game-container" id="game-container"><div class="platform"></div><div id="character" class="character"><svg viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="#FF5722" /><circle cx="35" cy="40" r="5" fill="#FFFFFF" /><circle cx="65" cy="40" r="5" fill="#FFFFFF" /><circle cx="35" cy="40" r="2" fill="#000000" /><circle cx="65" cy="40" r="2" fill="#000000" /><path d="M40 65 Q50 75 60 65" stroke="#FFFFFF" stroke-width="3" fill="none" /></svg></div></div><div class="p-4 flex flex-col items-center"><button id="start-btn" class="bg-green-500 hover:bg-green-600 text-white px-6 py-3 rounded-lg font-bold text-lg mb-4"><i class="fas fa-play mr-2"></i> Start Game</button><div class="grid grid-cols-2 gap-2 w-full"><button id="left-btn" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg"><i class="fas fa-arrow-left mr-2"></i> Left</button><button id="right-btn" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg"><i class="fas fa-arrow-right mr-2"></i> Right</button><button id="jump-btn" class="col-span-2 bg-yellow-500 hover:bg-yellow-600 text-white px-4 py-2 rounded-lg"><i class="fas fa-arrow-up mr-2"></i> Jump</button></div></div></div><audio id="jump-sound" src="https://assets.mixkit.co/sfx/preview/mixkit-quick-jump-arcade-game-239.mp3" preload="auto"></audio><audio id="collect-sound" src="https://assets.mixkit.co/sfx/preview/mixkit-achievement-bell-600.mp3" preload="auto"></audio><audio id="game-over-sound" src="https://assets.mixkit.co/sfx/preview/mixkit-retro-arcade-lose-2027.mp3" preload="auto"></audio><script>// Game stateconst gameState = {score: 0,highScore: localStorage.getItem('highScore') || 0,isPlaying: false,isJumping: false,characterX: 50,characterY: 0,speed: 3,gameSpeed: 3,obstacles: [],collectibles: [],lastObstacleTime: 0,lastCollectibleTime: 0};// DOM elementsconst gameContainer = document.getElementById('game-container');const character = document.getElementById('character');const scoreElement = document.getElementById('score');const highScoreElement = document.getElementById('high-score');const startBtn = document.getElementById('start-btn');const leftBtn = document.getElementById('left-btn');const rightBtn = document.getElementById('right-btn');const jumpBtn = document.getElementById('jump-btn');// Soundsconst jumpSound = document.getElementById('jump-sound');const collectSound = document.getElementById('collect-sound');const gameOverSound = document.getElementById('game-over-sound');// InitializehighScoreElement.textContent = gameState.highScore;// Start gamefunction startGame() {gameState.score = 0;gameState.isPlaying = true;gameState.characterX = 50;gameState.speed = 3;gameState.obstacles = [];gameState.collectibles = [];scoreElement.textContent = gameState.score;startBtn.innerHTML = '<i class="fas fa-redo mr-2"></i> Restart';// Clear existing elementsdocument.querySelectorAll('.obstacle, .collectible').forEach(el => el.remove());// Start game loopgameLoop();}// Game loopfunction gameLoop() {if (!gameState.isPlaying) return;updateCharacter();updateObstacles();updateCollectibles();checkCollisions();// Increase difficultyif (gameState.score > 0 && gameState.score % 10 === 0) {gameState.speed = 3 + Math.floor(gameState.score / 10) * 0.5;}requestAnimationFrame(gameLoop);}// Update character positionfunction updateCharacter() {character.style.left = `${gameState.characterX}px`;character.style.bottom = `${20 + gameState.characterY}px`;// Apply gravityif (gameState.characterY > 0) {gameState.characterY -= 2;} else if (gameState.characterY < 0) {gameState.characterY = 0;}}// Update obstaclesfunction updateObstacles() {const now = Date.now();// Add new obstacleif (now - gameState.lastObstacleTime > 2000 && Math.random() > 0.7) {const obstacle = document.createElement('div');obstacle.className = 'obstacle sliding';obstacle.style.animationDuration = `${3000 / gameState.speed}ms`;// Random obstacle typeconst types = ['rock', 'cactus', 'log'];const type = types[Math.floor(Math.random() * types.length)];if (type === 'rock') {obstacle.innerHTML = `<svg viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="#795548" /><circle cx="30" cy="40" r="10" fill="#5D4037" /><circle cx="70" cy="30" r="8" fill="#5D4037" /><circle cx="50" cy="70" r="12" fill="#5D4037" /></svg>`;} else if (type === 'cactus') {obstacle.innerHTML = `<svg viewBox="0 0 100 100"><rect x="45" y="20" width="10" height="60" fill="#4CAF50" /><rect x="30" y="30" width="10" height="30" fill="#388E3C" /><rect x="60" y="40" width="10" height="20" fill="#388E3C" /></svg>`;} else {obstacle.innerHTML = `<svg viewBox="0 0 100 100"><rect x="20" y="45" width="60" height="10" rx="5" fill="#8D6E63" /><circle cx="30" cy="50" r="10" fill="#6D4C41" /><circle cx="70" cy="50" r="10" fill="#6D4C41" /></svg>`;}obstacle.dataset.type = type;gameContainer.appendChild(obstacle);gameState.obstacles.push({element: obstacle,x: gameContainer.clientWidth,y: 0,width: 30,height: 30});gameState.lastObstacleTime = now;}// Move obstaclesgameState.obstacles = gameState.obstacles.filter(obstacle => {obstacle.x -= gameState.speed;obstacle.element.style.left = `${obstacle.x}px`;// Remove if off screenif (obstacle.x + obstacle.width < 0) {obstacle.element.remove();return false;}return true;});}// Update collectiblesfunction updateCollectibles() {const now = Date.now();// Add new collectibleif (now - gameState.lastCollectibleTime > 1500 && Math.random() > 0.8) {const collectible = document.createElement('div');collectible.className = 'collectible sliding floating';collectible.style.animationDuration = `${3000 / gameState.speed}ms`;// Random collectible typeconst types = ['coin', 'star', 'gem'];const type = types[Math.floor(Math.random() * types.length)];if (type === 'coin') {collectible.innerHTML = `<svg viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="#FFD700" /><circle cx="50" cy="50" r="30" fill="#FFC107" /><circle cx="50" cy="50" r="20" fill="#FFD700" /></svg>`;} else if (type === 'star') {collectible.innerHTML = `<svg viewBox="0 0 100 100"><path d="M50 10 L61 39 L92 39 L67 59 L78 88 L50 70 L22 88 L33 59 L8 39 L39 39 Z" fill="#FFC107" /></svg>`;} else {collectible.innerHTML = `<svg viewBox="0 0 100 100"><path d="M50 10 L80 50 L50 90 L20 50 Z" fill="#E91E63" /><path d="M50 20 L70 50 L50 80 L30 50 Z" fill="#F48FB1" /></svg>`;}collectible.dataset.type = type;gameContainer.appendChild(collectible);gameState.collectibles.push({element: collectible,x: gameContainer.clientWidth,y: 40,width: 20,height: 20});gameState.lastCollectibleTime = now;}// Move collectiblesgameState.collectibles = gameState.collectibles.filter(collectible => {collectible.x -= gameState.speed;collectible.element.style.left = `${collectible.x}px`;// Remove if off screenif (collectible.x + collectible.width < 0) {collectible.element.remove();return false;}return true;});}// Check collisionsfunction checkCollisions() {const characterRect = {x: gameState.characterX,y: gameState.characterY,width: 50,height: 50};// Check obstacle collisionsfor (const obstacle of gameState.obstacles) {if (isColliding(characterRect, obstacle)) {gameOver();return;}}// Check collectible collisionsfor (const collectible of gameState.collectibles) {if (isColliding(characterRect, collectible)) {collectSound.play();gameState.score += 5;scoreElement.textContent = gameState.score;collectible.element.remove();gameState.collectibles = gameState.collectibles.filter(c => c !== collectible);}}}// Collision detectionfunction isColliding(rect1, rect2) {return (rect1.x < rect2.x + rect2.width &&rect1.x + rect1.width > rect2.x &&rect1.y < rect2.y + rect2.height &&rect1.y + rect1.height > rect2.y);}// Game overfunction gameOver() {gameState.isPlaying = false;gameOverSound.play();// Update high scoreif (gameState.score > gameState.highScore) {gameState.highScore = gameState.score;highScoreElement.textContent = gameState.highScore;localStorage.setItem('highScore', gameState.highScore);}// Animate charactercharacter.classList.add('game-over');// Show game over messagesetTimeout(() => {alert(`Game Over! Your score: ${gameState.score}`);character.classList.remove('game-over');}, 500);}// Jumpfunction jump() {if (!gameState.isPlaying || gameState.characterY > 0) return;jumpSound.play();gameState.characterY = 100;character.classList.add('jumping');setTimeout(() => {character.classList.remove('jumping');}, 500);}// Move leftfunction moveLeft() {if (!gameState.isPlaying) return;gameState.characterX = Math.max(0, gameState.characterX - 20);}// Move rightfunction moveRight() {if (!gameState.isPlaying) return;gameState.characterX = Math.min(gameContainer.clientWidth - 50, gameState.characterX + 20);}// Event listenersstartBtn.addEventListener('click', startGame);leftBtn.addEventListener('click', moveLeft);rightBtn.addEventListener('click', moveRight);jumpBtn.addEventListener('click', jump);// Keyboard controlsdocument.addEventListener('keydown', (e) => {if (e.code === 'Space' || e.key === 'ArrowUp') {jump();} else if (e.key === 'ArrowLeft') {moveLeft();} else if (e.key === 'ArrowRight') {moveRight();}});</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=Palenkov/cat" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>
1Faça um simulator de gato realista12Faça um simulator de gato realistaFaça um jogo parecido com on jogo "Sprunki"
index.html+362-479
prompts.txt+2-1