Add 3 files
Browse files- README.md +6 -4
- index.html +798 -19
- prompts.txt +3 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: blue
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: gold
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: pink
|
| 5 |
colorTo: blue
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,798 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Hoops Hero - Dunk Challenge</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
|
| 9 |
+
<style>
|
| 10 |
+
@import url('https://fonts.googleapis.com/css2?family=Bungee&display=swap');
|
| 11 |
+
|
| 12 |
+
* {
|
| 13 |
+
margin: 0;
|
| 14 |
+
padding: 0;
|
| 15 |
+
box-sizing: border-box;
|
| 16 |
+
touch-action: manipulation;
|
| 17 |
+
-webkit-tap-highlight-color: transparent;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
body {
|
| 21 |
+
font-family: 'Bungee', cursive;
|
| 22 |
+
overflow: hidden;
|
| 23 |
+
background: linear-gradient(to bottom, #1a2a6c, #b21f1f, #fdbb2d);
|
| 24 |
+
color: white;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
#gameCanvas {
|
| 28 |
+
position: absolute;
|
| 29 |
+
top: 0;
|
| 30 |
+
left: 0;
|
| 31 |
+
width: 100%;
|
| 32 |
+
height: 100%;
|
| 33 |
+
z-index: 1;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
.court {
|
| 37 |
+
position: absolute;
|
| 38 |
+
width: 100%;
|
| 39 |
+
height: 100%;
|
| 40 |
+
background: linear-gradient(to bottom, #1a2a6c, #004d99);
|
| 41 |
+
z-index: 0;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.controls {
|
| 45 |
+
position: absolute;
|
| 46 |
+
bottom: 30px;
|
| 47 |
+
width: 100%;
|
| 48 |
+
display: flex;
|
| 49 |
+
justify-content: center;
|
| 50 |
+
z-index: 10;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.jump-btn {
|
| 54 |
+
width: 100px;
|
| 55 |
+
height: 100px;
|
| 56 |
+
border-radius: 50%;
|
| 57 |
+
background: rgba(255, 215, 0, 0.7);
|
| 58 |
+
backdrop-filter: blur(5px);
|
| 59 |
+
display: flex;
|
| 60 |
+
justify-content: center;
|
| 61 |
+
align-items: center;
|
| 62 |
+
color: #1a2a6c;
|
| 63 |
+
font-size: 24px;
|
| 64 |
+
user-select: none;
|
| 65 |
+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
|
| 66 |
+
border: 4px solid white;
|
| 67 |
+
cursor: pointer;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.jump-btn:active {
|
| 71 |
+
transform: scale(0.95);
|
| 72 |
+
background: rgba(255, 215, 0, 0.9);
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.menu {
|
| 76 |
+
position: absolute;
|
| 77 |
+
top: 0;
|
| 78 |
+
left: 0;
|
| 79 |
+
width: 100%;
|
| 80 |
+
height: 100%;
|
| 81 |
+
display: flex;
|
| 82 |
+
flex-direction: column;
|
| 83 |
+
justify-content: center;
|
| 84 |
+
align-items: center;
|
| 85 |
+
background: rgba(0, 0, 0, 0.8);
|
| 86 |
+
z-index: 100;
|
| 87 |
+
backdrop-filter: blur(5px);
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
.menu h1 {
|
| 91 |
+
font-size: 4rem;
|
| 92 |
+
margin-bottom: 2rem;
|
| 93 |
+
color: #FFD700;
|
| 94 |
+
text-shadow: 0 0 10px #FFD700, 0 0 20px #FFD700;
|
| 95 |
+
letter-spacing: 2px;
|
| 96 |
+
text-align: center;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
.menu-btn {
|
| 100 |
+
background: linear-gradient(45deg, #FFD700, #FFA500);
|
| 101 |
+
border: none;
|
| 102 |
+
color: #1a2a6c;
|
| 103 |
+
padding: 15px 40px;
|
| 104 |
+
font-size: 1.5rem;
|
| 105 |
+
border-radius: 50px;
|
| 106 |
+
margin: 10px;
|
| 107 |
+
cursor: pointer;
|
| 108 |
+
font-family: 'Bungee', cursive;
|
| 109 |
+
box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
|
| 110 |
+
transition: all 0.3s;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
.menu-btn:hover {
|
| 114 |
+
transform: translateY(-3px);
|
| 115 |
+
box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
.menu-btn:active {
|
| 119 |
+
transform: translateY(0);
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
.score-panel {
|
| 123 |
+
position: absolute;
|
| 124 |
+
top: 20px;
|
| 125 |
+
left: 20px;
|
| 126 |
+
display: flex;
|
| 127 |
+
flex-direction: column;
|
| 128 |
+
z-index: 10;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
.score {
|
| 132 |
+
font-size: 1.8rem;
|
| 133 |
+
color: white;
|
| 134 |
+
background: rgba(0, 0, 0, 0.5);
|
| 135 |
+
padding: 10px 20px;
|
| 136 |
+
border-radius: 10px;
|
| 137 |
+
margin-bottom: 10px;
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
.dunks {
|
| 141 |
+
font-size: 1.8rem;
|
| 142 |
+
color: #FFD700;
|
| 143 |
+
background: rgba(0, 0, 0, 0.5);
|
| 144 |
+
padding: 10px 20px;
|
| 145 |
+
border-radius: 10px;
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
.combo-meter {
|
| 149 |
+
position: absolute;
|
| 150 |
+
top: 20px;
|
| 151 |
+
right: 20px;
|
| 152 |
+
width: 120px;
|
| 153 |
+
height: 40px;
|
| 154 |
+
background: rgba(0, 0, 0, 0.5);
|
| 155 |
+
border-radius: 20px;
|
| 156 |
+
display: flex;
|
| 157 |
+
justify-content: center;
|
| 158 |
+
align-items: center;
|
| 159 |
+
font-size: 1.5rem;
|
| 160 |
+
color: white;
|
| 161 |
+
z-index: 10;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
.combo-fill {
|
| 165 |
+
position: absolute;
|
| 166 |
+
left: 5px;
|
| 167 |
+
top: 5px;
|
| 168 |
+
bottom: 5px;
|
| 169 |
+
width: 0%;
|
| 170 |
+
background: linear-gradient(to right, #4facfe, #00f2fe);
|
| 171 |
+
border-radius: 15px;
|
| 172 |
+
transition: width 0.3s;
|
| 173 |
+
z-index: -1;
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
.dunk-effect {
|
| 177 |
+
position: absolute;
|
| 178 |
+
font-size: 2rem;
|
| 179 |
+
color: #FFD700;
|
| 180 |
+
font-weight: bold;
|
| 181 |
+
opacity: 0;
|
| 182 |
+
animation: dunkFloat 1s forwards;
|
| 183 |
+
z-index: 5;
|
| 184 |
+
text-shadow: 0 0 5px black;
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
@keyframes dunkFloat {
|
| 188 |
+
0% {
|
| 189 |
+
transform: translateY(0) scale(1);
|
| 190 |
+
opacity: 1;
|
| 191 |
+
}
|
| 192 |
+
100% {
|
| 193 |
+
transform: translateY(-100px) scale(1.5);
|
| 194 |
+
opacity: 0;
|
| 195 |
+
}
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
.swish-effect {
|
| 199 |
+
position: absolute;
|
| 200 |
+
width: 100px;
|
| 201 |
+
height: 100px;
|
| 202 |
+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23FFD700"><path d="M12 2L4 12l8 10 8-10z"/></svg>');
|
| 203 |
+
background-size: contain;
|
| 204 |
+
background-repeat: no-repeat;
|
| 205 |
+
opacity: 0;
|
| 206 |
+
animation: swishSpin 1s forwards;
|
| 207 |
+
z-index: 5;
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
@keyframes swishSpin {
|
| 211 |
+
0% {
|
| 212 |
+
transform: scale(0.5) rotate(0deg);
|
| 213 |
+
opacity: 1;
|
| 214 |
+
}
|
| 215 |
+
100% {
|
| 216 |
+
transform: scale(2) rotate(360deg);
|
| 217 |
+
opacity: 0;
|
| 218 |
+
}
|
| 219 |
+
}
|
| 220 |
+
|
| 221 |
+
.game-over {
|
| 222 |
+
position: absolute;
|
| 223 |
+
top: 0;
|
| 224 |
+
left: 0;
|
| 225 |
+
width: 100%;
|
| 226 |
+
height: 100%;
|
| 227 |
+
display: none;
|
| 228 |
+
flex-direction: column;
|
| 229 |
+
justify-content: center;
|
| 230 |
+
align-items: center;
|
| 231 |
+
background: rgba(0, 0, 0, 0.8);
|
| 232 |
+
z-index: 200;
|
| 233 |
+
backdrop-filter: blur(5px);
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
.game-over h2 {
|
| 237 |
+
font-size: 3rem;
|
| 238 |
+
margin-bottom: 1rem;
|
| 239 |
+
color: #FFD700;
|
| 240 |
+
text-shadow: 0 0 10px #FFD700;
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
+
.final-score {
|
| 244 |
+
font-size: 2rem;
|
| 245 |
+
margin-bottom: 2rem;
|
| 246 |
+
color: white;
|
| 247 |
+
}
|
| 248 |
+
</style>
|
| 249 |
+
</head>
|
| 250 |
+
<body>
|
| 251 |
+
<div class="court"></div>
|
| 252 |
+
<canvas id="gameCanvas"></canvas>
|
| 253 |
+
|
| 254 |
+
<div class="score-panel">
|
| 255 |
+
<div class="score">
|
| 256 |
+
Score: <span id="scoreValue">0</span>
|
| 257 |
+
</div>
|
| 258 |
+
<div class="dunks">
|
| 259 |
+
Dunks: <span id="dunkValue">0</span>
|
| 260 |
+
</div>
|
| 261 |
+
</div>
|
| 262 |
+
|
| 263 |
+
<div class="combo-meter">
|
| 264 |
+
<div class="combo-fill" id="comboFill"></div>
|
| 265 |
+
<span id="comboText">Combo: 0x</span>
|
| 266 |
+
</div>
|
| 267 |
+
|
| 268 |
+
<div class="controls">
|
| 269 |
+
<div class="jump-btn" id="jumpBtn">
|
| 270 |
+
<i class="fas fa-basketball-ball"></i>
|
| 271 |
+
</div>
|
| 272 |
+
</div>
|
| 273 |
+
|
| 274 |
+
<div class="menu" id="menu">
|
| 275 |
+
<h1>HOOPS HERO<br>DUNK CHALLENGE</h1>
|
| 276 |
+
<button class="menu-btn" id="startBtn">START GAME</button>
|
| 277 |
+
<button class="menu-btn" id="howToBtn">HOW TO PLAY</button>
|
| 278 |
+
</div>
|
| 279 |
+
|
| 280 |
+
<div class="game-over" id="gameOver">
|
| 281 |
+
<h2>GAME OVER!</h2>
|
| 282 |
+
<div class="final-score" id="finalScore">Score: 0</div>
|
| 283 |
+
<button class="menu-btn" id="restartBtn">PLAY AGAIN</button>
|
| 284 |
+
</div>
|
| 285 |
+
|
| 286 |
+
<script>
|
| 287 |
+
// Game variables
|
| 288 |
+
let canvas, ctx;
|
| 289 |
+
let gameRunning = false;
|
| 290 |
+
let score = 0;
|
| 291 |
+
let dunks = 0;
|
| 292 |
+
let combo = 0;
|
| 293 |
+
let maxCombo = 0;
|
| 294 |
+
let comboTime = 0;
|
| 295 |
+
let maxComboTime = 3000; // 3 seconds to maintain combo
|
| 296 |
+
let playerY = 0;
|
| 297 |
+
let playerX = 0;
|
| 298 |
+
let playerWidth = 60;
|
| 299 |
+
let playerHeight = 90;
|
| 300 |
+
let gravity = 0.5;
|
| 301 |
+
let jumpForce = -12;
|
| 302 |
+
let velocity = 0;
|
| 303 |
+
let isJumping = false;
|
| 304 |
+
let hoops = [];
|
| 305 |
+
let lastHoopTime = 0;
|
| 306 |
+
let hoopInterval = 1500;
|
| 307 |
+
let gameSpeed = 3;
|
| 308 |
+
let animationId;
|
| 309 |
+
let gameTime = 0;
|
| 310 |
+
let difficulty = 1;
|
| 311 |
+
|
| 312 |
+
// Initialize game
|
| 313 |
+
function init() {
|
| 314 |
+
canvas = document.getElementById('gameCanvas');
|
| 315 |
+
ctx = canvas.getContext('2d');
|
| 316 |
+
|
| 317 |
+
resizeCanvas();
|
| 318 |
+
window.addEventListener('resize', resizeCanvas);
|
| 319 |
+
|
| 320 |
+
// Set up controls
|
| 321 |
+
document.getElementById('jumpBtn').addEventListener('touchstart', jump);
|
| 322 |
+
document.getElementById('jumpBtn').addEventListener('mousedown', jump);
|
| 323 |
+
|
| 324 |
+
// Keyboard controls for testing
|
| 325 |
+
document.addEventListener('keydown', (e) => {
|
| 326 |
+
if (e.key === ' ' || e.key === 'ArrowUp') {
|
| 327 |
+
jump();
|
| 328 |
+
}
|
| 329 |
+
});
|
| 330 |
+
|
| 331 |
+
// Menu buttons
|
| 332 |
+
document.getElementById('startBtn').addEventListener('click', startGame);
|
| 333 |
+
document.getElementById('howToBtn').addEventListener('click', showHowToPlay);
|
| 334 |
+
document.getElementById('restartBtn').addEventListener('click', restartGame);
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
function resizeCanvas() {
|
| 338 |
+
canvas.width = window.innerWidth;
|
| 339 |
+
canvas.height = window.innerHeight;
|
| 340 |
+
|
| 341 |
+
// Adjust player position
|
| 342 |
+
playerWidth = canvas.width * 0.1;
|
| 343 |
+
playerHeight = playerWidth * 1.5;
|
| 344 |
+
playerX = canvas.width * 0.3;
|
| 345 |
+
playerY = canvas.height * 0.6;
|
| 346 |
+
|
| 347 |
+
if (gameRunning) {
|
| 348 |
+
draw();
|
| 349 |
+
}
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
function startGame() {
|
| 353 |
+
document.getElementById('menu').style.display = 'none';
|
| 354 |
+
resetGame();
|
| 355 |
+
gameRunning = true;
|
| 356 |
+
gameTime = 0;
|
| 357 |
+
lastHoopTime = 0;
|
| 358 |
+
gameLoop();
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
function showHowToPlay() {
|
| 362 |
+
alert("HOW TO PLAY:\n\n- Tap the JUMP button to make your player jump\n- Time your jumps to dunk through the hoops\n- Each successful dunk increases your combo\n- Maintain your combo for bonus points\n- The game gets faster as you play!\n\nSet a new high score!");
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
function restartGame() {
|
| 366 |
+
document.getElementById('gameOver').style.display = 'none';
|
| 367 |
+
startGame();
|
| 368 |
+
}
|
| 369 |
+
|
| 370 |
+
function resetGame() {
|
| 371 |
+
score = 0;
|
| 372 |
+
dunks = 0;
|
| 373 |
+
combo = 0;
|
| 374 |
+
maxCombo = 0;
|
| 375 |
+
comboTime = 0;
|
| 376 |
+
playerY = canvas.height * 0.6;
|
| 377 |
+
velocity = 0;
|
| 378 |
+
isJumping = false;
|
| 379 |
+
hoops = [];
|
| 380 |
+
gameSpeed = 3;
|
| 381 |
+
difficulty = 1;
|
| 382 |
+
updateScore();
|
| 383 |
+
updateDunks();
|
| 384 |
+
updateCombo();
|
| 385 |
+
}
|
| 386 |
+
|
| 387 |
+
function gameLoop() {
|
| 388 |
+
if (!gameRunning) return;
|
| 389 |
+
|
| 390 |
+
update();
|
| 391 |
+
draw();
|
| 392 |
+
|
| 393 |
+
animationId = requestAnimationFrame(gameLoop);
|
| 394 |
+
}
|
| 395 |
+
|
| 396 |
+
function update() {
|
| 397 |
+
// Increase game time
|
| 398 |
+
gameTime += 16; // Assuming 60fps (1000ms/60 ≈ 16ms per frame)
|
| 399 |
+
|
| 400 |
+
// Increase difficulty over time
|
| 401 |
+
difficulty = 1 + Math.floor(gameTime / 30000) * 0.2;
|
| 402 |
+
gameSpeed = 3 * difficulty;
|
| 403 |
+
|
| 404 |
+
// Update player position
|
| 405 |
+
velocity += gravity;
|
| 406 |
+
playerY += velocity;
|
| 407 |
+
|
| 408 |
+
// Check if player is on the ground
|
| 409 |
+
if (playerY > canvas.height * 0.6) {
|
| 410 |
+
playerY = canvas.height * 0.6;
|
| 411 |
+
velocity = 0;
|
| 412 |
+
isJumping = false;
|
| 413 |
+
}
|
| 414 |
+
|
| 415 |
+
// Update combo timer
|
| 416 |
+
if (combo > 0) {
|
| 417 |
+
comboTime += 16;
|
| 418 |
+
if (comboTime > maxComboTime) {
|
| 419 |
+
combo = 0;
|
| 420 |
+
comboTime = 0;
|
| 421 |
+
updateCombo();
|
| 422 |
+
}
|
| 423 |
+
}
|
| 424 |
+
|
| 425 |
+
// Update hoops
|
| 426 |
+
updateHoops();
|
| 427 |
+
|
| 428 |
+
// Check for dunk collisions
|
| 429 |
+
checkDunkCollisions();
|
| 430 |
+
}
|
| 431 |
+
|
| 432 |
+
function updateHoops() {
|
| 433 |
+
// Move existing hoops
|
| 434 |
+
for (let i = 0; i < hoops.length; i++) {
|
| 435 |
+
hoops[i].x -= gameSpeed;
|
| 436 |
+
|
| 437 |
+
// Remove hoops that are off screen
|
| 438 |
+
if (hoops[i].x + hoops[i].width < 0) {
|
| 439 |
+
hoops.splice(i, 1);
|
| 440 |
+
i--;
|
| 441 |
+
}
|
| 442 |
+
}
|
| 443 |
+
|
| 444 |
+
// Add new hoops
|
| 445 |
+
const now = Date.now();
|
| 446 |
+
if (now - lastHoopTime > hoopInterval / difficulty) {
|
| 447 |
+
addHoop();
|
| 448 |
+
lastHoopTime = now;
|
| 449 |
+
}
|
| 450 |
+
}
|
| 451 |
+
|
| 452 |
+
function addHoop() {
|
| 453 |
+
const heightVariation = Math.random() * 100 - 50; // -50 to 50
|
| 454 |
+
const hoopHeight = canvas.height * 0.15 + heightVariation;
|
| 455 |
+
|
| 456 |
+
hoops.push({
|
| 457 |
+
x: canvas.width,
|
| 458 |
+
y: canvas.height * 0.3 + heightVariation,
|
| 459 |
+
width: 80,
|
| 460 |
+
height: hoopHeight,
|
| 461 |
+
passed: false
|
| 462 |
+
});
|
| 463 |
+
}
|
| 464 |
+
|
| 465 |
+
function checkDunkCollisions() {
|
| 466 |
+
const player = {
|
| 467 |
+
x: playerX,
|
| 468 |
+
y: playerY,
|
| 469 |
+
width: playerWidth,
|
| 470 |
+
height: playerHeight
|
| 471 |
+
};
|
| 472 |
+
|
| 473 |
+
for (let i = 0; i < hoops.length; i++) {
|
| 474 |
+
const hoop = hoops[i];
|
| 475 |
+
|
| 476 |
+
// Check if player is aligned with hoop
|
| 477 |
+
if (
|
| 478 |
+
player.x + player.width > hoop.x &&
|
| 479 |
+
player.x < hoop.x + hoop.width &&
|
| 480 |
+
!hoop.passed
|
| 481 |
+
) {
|
| 482 |
+
// Check if player is in dunk position (above rim)
|
| 483 |
+
if (
|
| 484 |
+
player.y + player.height * 0.3 < hoop.y + hoop.height * 0.5 &&
|
| 485 |
+
player.y + player.height > hoop.y + hoop.height * 0.7
|
| 486 |
+
) {
|
| 487 |
+
// Successful dunk!
|
| 488 |
+
dunks++;
|
| 489 |
+
combo++;
|
| 490 |
+
comboTime = 0;
|
| 491 |
+
if (combo > maxCombo) maxCombo = combo;
|
| 492 |
+
|
| 493 |
+
// Bonus points for combo
|
| 494 |
+
const points = 10 * combo;
|
| 495 |
+
score += points;
|
| 496 |
+
|
| 497 |
+
hoop.passed = true;
|
| 498 |
+
|
| 499 |
+
updateScore();
|
| 500 |
+
updateDunks();
|
| 501 |
+
updateCombo();
|
| 502 |
+
|
| 503 |
+
// Show dunk effect
|
| 504 |
+
showDunkEffect(hoop.x + hoop.width / 2, hoop.y + hoop.height * 0.7);
|
| 505 |
+
|
| 506 |
+
// Show swish effect sometimes
|
| 507 |
+
if (Math.random() > 0.7) {
|
| 508 |
+
showSwishEffect(hoop.x + hoop.width / 2, hoop.y + hoop.height * 0.7);
|
| 509 |
+
}
|
| 510 |
+
}
|
| 511 |
+
}
|
| 512 |
+
}
|
| 513 |
+
}
|
| 514 |
+
|
| 515 |
+
function showDunkEffect(x, y) {
|
| 516 |
+
const effect = document.createElement('div');
|
| 517 |
+
effect.className = 'dunk-effect';
|
| 518 |
+
effect.textContent = `+${10 * combo}`;
|
| 519 |
+
effect.style.left = `${x}px`;
|
| 520 |
+
effect.style.top = `${y}px`;
|
| 521 |
+
document.body.appendChild(effect);
|
| 522 |
+
|
| 523 |
+
// Remove after animation
|
| 524 |
+
setTimeout(() => {
|
| 525 |
+
effect.remove();
|
| 526 |
+
}, 1000);
|
| 527 |
+
}
|
| 528 |
+
|
| 529 |
+
function showSwishEffect(x, y) {
|
| 530 |
+
const effect = document.createElement('div');
|
| 531 |
+
effect.className = 'swish-effect';
|
| 532 |
+
effect.style.left = `${x - 50}px`;
|
| 533 |
+
effect.style.top = `${y - 50}px`;
|
| 534 |
+
document.body.appendChild(effect);
|
| 535 |
+
|
| 536 |
+
// Remove after animation
|
| 537 |
+
setTimeout(() => {
|
| 538 |
+
effect.remove();
|
| 539 |
+
}, 1000);
|
| 540 |
+
}
|
| 541 |
+
|
| 542 |
+
function jump() {
|
| 543 |
+
if (!isJumping && gameRunning) {
|
| 544 |
+
velocity = jumpForce * difficulty;
|
| 545 |
+
isJumping = true;
|
| 546 |
+
}
|
| 547 |
+
}
|
| 548 |
+
|
| 549 |
+
function draw() {
|
| 550 |
+
// Clear canvas
|
| 551 |
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
| 552 |
+
|
| 553 |
+
// Draw court
|
| 554 |
+
drawCourt();
|
| 555 |
+
|
| 556 |
+
// Draw hoops
|
| 557 |
+
drawHoops();
|
| 558 |
+
|
| 559 |
+
// Draw player
|
| 560 |
+
drawPlayer();
|
| 561 |
+
}
|
| 562 |
+
|
| 563 |
+
function drawCourt() {
|
| 564 |
+
// Court floor
|
| 565 |
+
ctx.fillStyle = '#1a2a6c';
|
| 566 |
+
ctx.fillRect(0, canvas.height * 0.65, canvas.width, canvas.height * 0.35);
|
| 567 |
+
|
| 568 |
+
// Court lines
|
| 569 |
+
ctx.strokeStyle = '#fff';
|
| 570 |
+
ctx.lineWidth = 4;
|
| 571 |
+
ctx.beginPath();
|
| 572 |
+
ctx.moveTo(0, canvas.height * 0.65);
|
| 573 |
+
ctx.lineTo(canvas.width, canvas.height * 0.65);
|
| 574 |
+
ctx.stroke();
|
| 575 |
+
|
| 576 |
+
// Free throw line
|
| 577 |
+
ctx.beginPath();
|
| 578 |
+
ctx.arc(canvas.width * 0.2, canvas.height * 0.65, 100, Math.PI, Math.PI * 2);
|
| 579 |
+
ctx.stroke();
|
| 580 |
+
|
| 581 |
+
// Key
|
| 582 |
+
ctx.strokeRect(canvas.width * 0.2 - 100, canvas.height * 0.65 - 100, 200, 100);
|
| 583 |
+
|
| 584 |
+
// Backboard (always at same position)
|
| 585 |
+
ctx.fillStyle = '#fff';
|
| 586 |
+
ctx.fillRect(canvas.width * 0.1 - 5, canvas.height * 0.3, 10, 80);
|
| 587 |
+
|
| 588 |
+
// Rim
|
| 589 |
+
ctx.strokeStyle = '#FFD700';
|
| 590 |
+
ctx.lineWidth = 5;
|
| 591 |
+
ctx.beginPath();
|
| 592 |
+
ctx.arc(canvas.width * 0.1, canvas.height * 0.3 + 80, 20, 0, Math.PI * 2);
|
| 593 |
+
ctx.stroke();
|
| 594 |
+
|
| 595 |
+
// Net
|
| 596 |
+
ctx.strokeStyle = 'rgba(255, 255, 255, 0.7)';
|
| 597 |
+
ctx.lineWidth = 1;
|
| 598 |
+
for (let i = 0; i < 8; i++) {
|
| 599 |
+
ctx.beginPath();
|
| 600 |
+
ctx.moveTo(canvas.width * 0.1, canvas.height * 0.3 + 80);
|
| 601 |
+
ctx.lineTo(
|
| 602 |
+
canvas.width * 0.1 + Math.cos(i * Math.PI / 4) * 20,
|
| 603 |
+
canvas.height * 0.3 + 80 + Math.sin(i * Math.PI / 4) * 30
|
| 604 |
+
);
|
| 605 |
+
ctx.stroke();
|
| 606 |
+
}
|
| 607 |
+
}
|
| 608 |
+
|
| 609 |
+
function drawHoops() {
|
| 610 |
+
for (let hoop of hoops) {
|
| 611 |
+
// Backboard
|
| 612 |
+
ctx.fillStyle = '#fff';
|
| 613 |
+
ctx.fillRect(hoop.x - 5, hoop.y, 10, hoop.height);
|
| 614 |
+
|
| 615 |
+
// Rim
|
| 616 |
+
ctx.strokeStyle = '#FFD700';
|
| 617 |
+
ctx.lineWidth = 5;
|
| 618 |
+
ctx.beginPath();
|
| 619 |
+
ctx.arc(hoop.x, hoop.y + hoop.height * 0.7, 20, 0, Math.PI * 2);
|
| 620 |
+
ctx.stroke();
|
| 621 |
+
|
| 622 |
+
// Net
|
| 623 |
+
ctx.strokeStyle = 'rgba(255, 255, 255, 0.7)';
|
| 624 |
+
ctx.lineWidth = 1;
|
| 625 |
+
for (let i = 0; i < 8; i++) {
|
| 626 |
+
ctx.beginPath();
|
| 627 |
+
ctx.moveTo(hoop.x, hoop.y + hoop.height * 0.7);
|
| 628 |
+
ctx.lineTo(
|
| 629 |
+
hoop.x + Math.cos(i * Math.PI / 4) * 20,
|
| 630 |
+
hoop.y + hoop.height * 0.7 + Math.sin(i * Math.PI / 4) * 30
|
| 631 |
+
);
|
| 632 |
+
ctx.stroke();
|
| 633 |
+
}
|
| 634 |
+
}
|
| 635 |
+
}
|
| 636 |
+
|
| 637 |
+
function drawPlayer() {
|
| 638 |
+
// Body
|
| 639 |
+
ctx.fillStyle = '#FF6347';
|
| 640 |
+
ctx.fillRect(playerX, playerY, playerWidth, playerHeight);
|
| 641 |
+
|
| 642 |
+
// Head
|
| 643 |
+
ctx.fillStyle = '#FFD699';
|
| 644 |
+
ctx.beginPath();
|
| 645 |
+
ctx.arc(
|
| 646 |
+
playerX + playerWidth * 0.5,
|
| 647 |
+
playerY + playerHeight * 0.2,
|
| 648 |
+
playerWidth * 0.3,
|
| 649 |
+
0,
|
| 650 |
+
Math.PI * 2
|
| 651 |
+
);
|
| 652 |
+
ctx.fill();
|
| 653 |
+
|
| 654 |
+
// Jersey
|
| 655 |
+
ctx.fillStyle = '#fff';
|
| 656 |
+
ctx.fillRect(
|
| 657 |
+
playerX + playerWidth * 0.1,
|
| 658 |
+
playerY + playerHeight * 0.3,
|
| 659 |
+
playerWidth * 0.8,
|
| 660 |
+
playerHeight * 0.4
|
| 661 |
+
);
|
| 662 |
+
|
| 663 |
+
// Jersey number
|
| 664 |
+
ctx.fillStyle = '#1a2a6c';
|
| 665 |
+
ctx.font = `bold ${playerWidth * 0.4}px Arial`;
|
| 666 |
+
ctx.textAlign = 'center';
|
| 667 |
+
ctx.fillText(
|
| 668 |
+
'23',
|
| 669 |
+
playerX + playerWidth * 0.5,
|
| 670 |
+
playerY + playerHeight * 0.55
|
| 671 |
+
);
|
| 672 |
+
|
| 673 |
+
// Shorts
|
| 674 |
+
ctx.fillStyle = '#1a2a6c';
|
| 675 |
+
ctx.fillRect(
|
| 676 |
+
playerX + playerWidth * 0.1,
|
| 677 |
+
playerY + playerHeight * 0.7,
|
| 678 |
+
playerWidth * 0.8,
|
| 679 |
+
playerHeight * 0.2
|
| 680 |
+
);
|
| 681 |
+
|
| 682 |
+
// Legs
|
| 683 |
+
ctx.fillStyle = '#FFD699';
|
| 684 |
+
ctx.fillRect(
|
| 685 |
+
playerX + playerWidth * 0.2,
|
| 686 |
+
playerY + playerHeight * 0.9,
|
| 687 |
+
playerWidth * 0.25,
|
| 688 |
+
playerHeight * 0.1
|
| 689 |
+
);
|
| 690 |
+
ctx.fillRect(
|
| 691 |
+
playerX + playerWidth * 0.55,
|
| 692 |
+
playerY + playerHeight * 0.9,
|
| 693 |
+
playerWidth * 0.25,
|
| 694 |
+
playerHeight * 0.1
|
| 695 |
+
);
|
| 696 |
+
|
| 697 |
+
// Arms (position changes when jumping)
|
| 698 |
+
ctx.fillStyle = '#FFD699';
|
| 699 |
+
if (isJumping) {
|
| 700 |
+
// Dunking pose
|
| 701 |
+
ctx.fillRect(
|
| 702 |
+
playerX - playerWidth * 0.2,
|
| 703 |
+
playerY + playerHeight * 0.3,
|
| 704 |
+
playerWidth * 0.2,
|
| 705 |
+
playerHeight * 0.4
|
| 706 |
+
);
|
| 707 |
+
ctx.fillRect(
|
| 708 |
+
playerX + playerWidth,
|
| 709 |
+
playerY + playerHeight * 0.3,
|
| 710 |
+
playerWidth * 0.2,
|
| 711 |
+
playerHeight * 0.4
|
| 712 |
+
);
|
| 713 |
+
|
| 714 |
+
// Basketball in hands
|
| 715 |
+
ctx.fillStyle = '#FFA500';
|
| 716 |
+
ctx.beginPath();
|
| 717 |
+
ctx.arc(
|
| 718 |
+
playerX + playerWidth * 0.5,
|
| 719 |
+
playerY + playerHeight * 0.4,
|
| 720 |
+
playerWidth * 0.2,
|
| 721 |
+
0,
|
| 722 |
+
Math.PI * 2
|
| 723 |
+
);
|
| 724 |
+
ctx.fill();
|
| 725 |
+
|
| 726 |
+
// Basketball lines
|
| 727 |
+
ctx.strokeStyle = '#8B4513';
|
| 728 |
+
ctx.lineWidth = 2;
|
| 729 |
+
ctx.beginPath();
|
| 730 |
+
ctx.arc(
|
| 731 |
+
playerX + playerWidth * 0.5,
|
| 732 |
+
playerY + playerHeight * 0.4,
|
| 733 |
+
playerWidth * 0.2,
|
| 734 |
+
0,
|
| 735 |
+
Math.PI
|
| 736 |
+
);
|
| 737 |
+
ctx.stroke();
|
| 738 |
+
ctx.beginPath();
|
| 739 |
+
ctx.arc(
|
| 740 |
+
playerX + playerWidth * 0.5,
|
| 741 |
+
playerY + playerHeight * 0.4,
|
| 742 |
+
playerWidth * 0.2,
|
| 743 |
+
Math.PI * 0.3,
|
| 744 |
+
Math.PI * 1.3
|
| 745 |
+
);
|
| 746 |
+
ctx.stroke();
|
| 747 |
+
} else {
|
| 748 |
+
// Standing pose
|
| 749 |
+
ctx.fillRect(
|
| 750 |
+
playerX - playerWidth * 0.1,
|
| 751 |
+
playerY + playerHeight * 0.3,
|
| 752 |
+
playerWidth * 0.1,
|
| 753 |
+
playerHeight * 0.4
|
| 754 |
+
);
|
| 755 |
+
ctx.fillRect(
|
| 756 |
+
playerX + playerWidth,
|
| 757 |
+
playerY + playerHeight * 0.3,
|
| 758 |
+
playerWidth * 0.1,
|
| 759 |
+
playerHeight * 0.4
|
| 760 |
+
);
|
| 761 |
+
}
|
| 762 |
+
}
|
| 763 |
+
|
| 764 |
+
function updateScore() {
|
| 765 |
+
document.getElementById('scoreValue').textContent = score;
|
| 766 |
+
}
|
| 767 |
+
|
| 768 |
+
function updateDunks() {
|
| 769 |
+
document.getElementById('dunkValue').textContent = dunks;
|
| 770 |
+
}
|
| 771 |
+
|
| 772 |
+
function updateCombo() {
|
| 773 |
+
document.getElementById('comboText').textContent = `Combo: ${combo}x`;
|
| 774 |
+
document.getElementById('comboFill').style.width = `${(comboTime / maxComboTime) * 100}%`;
|
| 775 |
+
|
| 776 |
+
// Change color based on combo level
|
| 777 |
+
if (combo >= 5) {
|
| 778 |
+
document.getElementById('comboFill').style.background = 'linear-gradient(to right, #ff5e62, #ff9966)';
|
| 779 |
+
} else if (combo >= 3) {
|
| 780 |
+
document.getElementById('comboFill').style.background = 'linear-gradient(to right, #4facfe, #00f2fe)';
|
| 781 |
+
} else {
|
| 782 |
+
document.getElementById('comboFill').style.background = 'linear-gradient(to right, #4facfe, #00f2fe)';
|
| 783 |
+
}
|
| 784 |
+
}
|
| 785 |
+
|
| 786 |
+
function gameOver() {
|
| 787 |
+
gameRunning = false;
|
| 788 |
+
cancelAnimationFrame(animationId);
|
| 789 |
+
|
| 790 |
+
document.getElementById('finalScore').textContent = `Score: ${score} | Dunks: ${dunks} | Max Combo: ${maxCombo}x`;
|
| 791 |
+
document.getElementById('gameOver').style.display = 'flex';
|
| 792 |
+
}
|
| 793 |
+
|
| 794 |
+
// Start the game when page loads
|
| 795 |
+
window.onload = init;
|
| 796 |
+
</script>
|
| 797 |
+
<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=Eligrgs/gold" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 798 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Make a car real life racing game that is phone friendly
|
| 2 |
+
Make a reat life car racing but you have to get the coins and you can't lose
|
| 3 |
+
Invente a game that is like Flappy Dunk
|