Add 3 files
Browse files- README.md +7 -5
- index.html +681 -19
- prompts.txt +1 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 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: amogos
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: green
|
| 5 |
+
colorTo: gray
|
| 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,681 @@
|
|
| 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, maximum-scale=1.0, user-scalable=no">
|
| 6 |
+
<title>Mini Among Us</title>
|
| 7 |
+
<style>
|
| 8 |
+
/* Reset and base styles */
|
| 9 |
+
* {
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 0;
|
| 12 |
+
box-sizing: border-box;
|
| 13 |
+
touch-action: manipulation;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
body {
|
| 17 |
+
font-family: Arial, sans-serif;
|
| 18 |
+
background-color: #1a1a2e;
|
| 19 |
+
color: white;
|
| 20 |
+
overflow: hidden;
|
| 21 |
+
height: 100vh;
|
| 22 |
+
width: 100vw;
|
| 23 |
+
position: relative;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
/* Game container */
|
| 27 |
+
#game-container {
|
| 28 |
+
position: relative;
|
| 29 |
+
width: 100%;
|
| 30 |
+
height: 100%;
|
| 31 |
+
overflow: hidden;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
/* Game map */
|
| 35 |
+
#game-map {
|
| 36 |
+
position: absolute;
|
| 37 |
+
width: 2000px;
|
| 38 |
+
height: 2000px;
|
| 39 |
+
background-color: #16213e;
|
| 40 |
+
transform-origin: 0 0;
|
| 41 |
+
background-image:
|
| 42 |
+
linear-gradient(#4cc9f033 1px, transparent 1px),
|
| 43 |
+
linear-gradient(90deg, #4cc9f033 1px, transparent 1px);
|
| 44 |
+
background-size: 40px 40px;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
/* Rooms and walls */
|
| 48 |
+
.room {
|
| 49 |
+
position: absolute;
|
| 50 |
+
background-color: #0f3460;
|
| 51 |
+
border: 3px solid #4cc9f0;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
.room-label {
|
| 55 |
+
position: absolute;
|
| 56 |
+
color: white;
|
| 57 |
+
font-size: 16px;
|
| 58 |
+
text-align: center;
|
| 59 |
+
width: 100%;
|
| 60 |
+
top: 10px;
|
| 61 |
+
pointer-events: none;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
/* Player character */
|
| 65 |
+
.player {
|
| 66 |
+
position: absolute;
|
| 67 |
+
width: 40px;
|
| 68 |
+
height: 40px;
|
| 69 |
+
background-color: #f72585;
|
| 70 |
+
border-radius: 50%;
|
| 71 |
+
border: 3px solid white;
|
| 72 |
+
z-index: 10;
|
| 73 |
+
transition: transform 0.2s ease;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
.player::after {
|
| 77 |
+
content: '';
|
| 78 |
+
position: absolute;
|
| 79 |
+
width: 20px;
|
| 80 |
+
height: 15px;
|
| 81 |
+
background-color: white;
|
| 82 |
+
border-radius: 50%;
|
| 83 |
+
top: 8px;
|
| 84 |
+
left: 10px;
|
| 85 |
+
transform: rotate(10deg);
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
/* NPC characters */
|
| 89 |
+
.npc {
|
| 90 |
+
position: absolute;
|
| 91 |
+
width: 40px;
|
| 92 |
+
height: 40px;
|
| 93 |
+
background-color: #4cc9f0;
|
| 94 |
+
border-radius: 50%;
|
| 95 |
+
border: 3px solid white;
|
| 96 |
+
z-index: 9;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
.npc::after {
|
| 100 |
+
content: '';
|
| 101 |
+
position: absolute;
|
| 102 |
+
width: 20px;
|
| 103 |
+
height: 15px;
|
| 104 |
+
background-color: white;
|
| 105 |
+
border-radius: 50%;
|
| 106 |
+
top: 8px;
|
| 107 |
+
left: 10px;
|
| 108 |
+
transform: rotate(10deg);
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
/* Tasks */
|
| 112 |
+
.task {
|
| 113 |
+
position: absolute;
|
| 114 |
+
width: 30px;
|
| 115 |
+
height: 30px;
|
| 116 |
+
background-color: #f8f9fa;
|
| 117 |
+
border-radius: 5px;
|
| 118 |
+
display: flex;
|
| 119 |
+
justify-content: center;
|
| 120 |
+
align-items: center;
|
| 121 |
+
font-size: 20px;
|
| 122 |
+
cursor: pointer;
|
| 123 |
+
z-index: 8;
|
| 124 |
+
box-shadow: 0 0 10px rgba(248, 249, 250, 0.5);
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
/* Task popup */
|
| 128 |
+
#task-popup {
|
| 129 |
+
position: absolute;
|
| 130 |
+
top: 50%;
|
| 131 |
+
left: 50%;
|
| 132 |
+
transform: translate(-50%, -50%);
|
| 133 |
+
width: 80%;
|
| 134 |
+
max-width: 300px;
|
| 135 |
+
background-color: #0f3460;
|
| 136 |
+
border: 3px solid #4cc9f0;
|
| 137 |
+
border-radius: 10px;
|
| 138 |
+
padding: 20px;
|
| 139 |
+
z-index: 100;
|
| 140 |
+
display: none;
|
| 141 |
+
text-align: center;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
#task-popup h3 {
|
| 145 |
+
margin-bottom: 15px;
|
| 146 |
+
color: #f72585;
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
#task-popup button {
|
| 150 |
+
background-color: #4cc9f0;
|
| 151 |
+
color: white;
|
| 152 |
+
border: none;
|
| 153 |
+
padding: 10px 20px;
|
| 154 |
+
border-radius: 5px;
|
| 155 |
+
margin-top: 15px;
|
| 156 |
+
font-size: 16px;
|
| 157 |
+
cursor: pointer;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
/* Controls */
|
| 161 |
+
#controls {
|
| 162 |
+
position: absolute;
|
| 163 |
+
bottom: 20px;
|
| 164 |
+
left: 20px;
|
| 165 |
+
width: 120px;
|
| 166 |
+
height: 120px;
|
| 167 |
+
z-index: 20;
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
.control-btn {
|
| 171 |
+
position: absolute;
|
| 172 |
+
width: 40px;
|
| 173 |
+
height: 40px;
|
| 174 |
+
background-color: rgba(255, 255, 255, 0.3);
|
| 175 |
+
border-radius: 50%;
|
| 176 |
+
display: flex;
|
| 177 |
+
justify-content: center;
|
| 178 |
+
align-items: center;
|
| 179 |
+
font-size: 20px;
|
| 180 |
+
color: white;
|
| 181 |
+
user-select: none;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
#up-btn { top: 0; left: 40px; }
|
| 185 |
+
#left-btn { top: 40px; left: 0; }
|
| 186 |
+
#right-btn { top: 40px; right: 0; }
|
| 187 |
+
#down-btn { bottom: 0; left: 40px; }
|
| 188 |
+
|
| 189 |
+
/* Task list */
|
| 190 |
+
#task-list {
|
| 191 |
+
position: absolute;
|
| 192 |
+
top: 20px;
|
| 193 |
+
right: 20px;
|
| 194 |
+
background-color: rgba(15, 52, 96, 0.8);
|
| 195 |
+
border: 2px solid #4cc9f0;
|
| 196 |
+
border-radius: 10px;
|
| 197 |
+
padding: 10px;
|
| 198 |
+
max-width: 150px;
|
| 199 |
+
z-index: 20;
|
| 200 |
+
}
|
| 201 |
+
|
| 202 |
+
#task-list h3 {
|
| 203 |
+
font-size: 14px;
|
| 204 |
+
margin-bottom: 5px;
|
| 205 |
+
color: #f72585;
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
.task-item {
|
| 209 |
+
font-size: 12px;
|
| 210 |
+
margin-bottom: 5px;
|
| 211 |
+
display: flex;
|
| 212 |
+
align-items: center;
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
.task-item.completed {
|
| 216 |
+
text-decoration: line-through;
|
| 217 |
+
opacity: 0.6;
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
.task-checkbox {
|
| 221 |
+
width: 12px;
|
| 222 |
+
height: 12px;
|
| 223 |
+
border: 1px solid white;
|
| 224 |
+
border-radius: 2px;
|
| 225 |
+
margin-right: 5px;
|
| 226 |
+
display: inline-block;
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
.task-item.completed .task-checkbox {
|
| 230 |
+
background-color: #4cc9f0;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
/* Game status */
|
| 234 |
+
#game-status {
|
| 235 |
+
position: absolute;
|
| 236 |
+
top: 20px;
|
| 237 |
+
left: 20px;
|
| 238 |
+
background-color: rgba(15, 52, 96, 0.8);
|
| 239 |
+
border: 2px solid #4cc9f0;
|
| 240 |
+
border-radius: 10px;
|
| 241 |
+
padding: 10px;
|
| 242 |
+
z-index: 20;
|
| 243 |
+
}
|
| 244 |
+
|
| 245 |
+
#game-status h3 {
|
| 246 |
+
font-size: 14px;
|
| 247 |
+
margin-bottom: 5px;
|
| 248 |
+
color: #f72585;
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
+
/* Win screen */
|
| 252 |
+
#win-screen {
|
| 253 |
+
position: absolute;
|
| 254 |
+
top: 0;
|
| 255 |
+
left: 0;
|
| 256 |
+
width: 100%;
|
| 257 |
+
height: 100%;
|
| 258 |
+
background-color: rgba(0, 0, 0, 0.8);
|
| 259 |
+
display: flex;
|
| 260 |
+
flex-direction: column;
|
| 261 |
+
justify-content: center;
|
| 262 |
+
align-items: center;
|
| 263 |
+
z-index: 200;
|
| 264 |
+
display: none;
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
#win-screen h2 {
|
| 268 |
+
font-size: 32px;
|
| 269 |
+
color: #f72585;
|
| 270 |
+
margin-bottom: 20px;
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
#win-screen button {
|
| 274 |
+
background-color: #4cc9f0;
|
| 275 |
+
color: white;
|
| 276 |
+
border: none;
|
| 277 |
+
padding: 15px 30px;
|
| 278 |
+
border-radius: 5px;
|
| 279 |
+
font-size: 18px;
|
| 280 |
+
cursor: pointer;
|
| 281 |
+
}
|
| 282 |
+
</style>
|
| 283 |
+
</head>
|
| 284 |
+
<body>
|
| 285 |
+
<div id="game-container">
|
| 286 |
+
<div id="game-map">
|
| 287 |
+
<!-- Rooms will be added via JavaScript -->
|
| 288 |
+
</div>
|
| 289 |
+
|
| 290 |
+
<!-- Player character will be added via JavaScript -->
|
| 291 |
+
|
| 292 |
+
<!-- Controls -->
|
| 293 |
+
<div id="controls">
|
| 294 |
+
<div id="up-btn" class="control-btn">↑</div>
|
| 295 |
+
<div id="left-btn" class="control-btn">←</div>
|
| 296 |
+
<div id="right-btn" class="control-btn">→</div>
|
| 297 |
+
<div id="down-btn" class="control-btn">↓</div>
|
| 298 |
+
</div>
|
| 299 |
+
|
| 300 |
+
<!-- Task list -->
|
| 301 |
+
<div id="task-list">
|
| 302 |
+
<h3>Tasks</h3>
|
| 303 |
+
<div id="tasks-container">
|
| 304 |
+
<!-- Task items will be added via JavaScript -->
|
| 305 |
+
</div>
|
| 306 |
+
</div>
|
| 307 |
+
|
| 308 |
+
<!-- Game status -->
|
| 309 |
+
<div id="game-status">
|
| 310 |
+
<h3>Status</h3>
|
| 311 |
+
<div id="tasks-completed">Tasks: 0/3</div>
|
| 312 |
+
</div>
|
| 313 |
+
|
| 314 |
+
<!-- Task popup -->
|
| 315 |
+
<div id="task-popup">
|
| 316 |
+
<h3 id="task-title">Fix Wiring</h3>
|
| 317 |
+
<div id="task-description">Tap the button to complete the task</div>
|
| 318 |
+
<button id="complete-task-btn">Complete</button>
|
| 319 |
+
</div>
|
| 320 |
+
|
| 321 |
+
<!-- Win screen -->
|
| 322 |
+
<div id="win-screen">
|
| 323 |
+
<h2>All Tasks Completed!</h2>
|
| 324 |
+
<button id="restart-btn">Play Again</button>
|
| 325 |
+
</div>
|
| 326 |
+
</div>
|
| 327 |
+
|
| 328 |
+
<script>
|
| 329 |
+
// Game state
|
| 330 |
+
const gameState = {
|
| 331 |
+
player: {
|
| 332 |
+
x: 500,
|
| 333 |
+
y: 500,
|
| 334 |
+
speed: 5,
|
| 335 |
+
moving: false,
|
| 336 |
+
direction: null
|
| 337 |
+
},
|
| 338 |
+
npcs: [],
|
| 339 |
+
tasks: [],
|
| 340 |
+
completedTasks: 0,
|
| 341 |
+
totalTasks: 3,
|
| 342 |
+
currentTask: null,
|
| 343 |
+
mapScale: 1,
|
| 344 |
+
mapOffset: { x: 0, y: 0 }
|
| 345 |
+
};
|
| 346 |
+
|
| 347 |
+
// DOM elements
|
| 348 |
+
const gameMap = document.getElementById('game-map');
|
| 349 |
+
const controls = document.getElementById('controls');
|
| 350 |
+
const taskList = document.getElementById('task-list');
|
| 351 |
+
const tasksContainer = document.getElementById('tasks-container');
|
| 352 |
+
const gameStatus = document.getElementById('game-status');
|
| 353 |
+
const tasksCompleted = document.getElementById('tasks-completed');
|
| 354 |
+
const taskPopup = document.getElementById('task-popup');
|
| 355 |
+
const taskTitle = document.getElementById('task-title');
|
| 356 |
+
const taskDescription = document.getElementById('task-description');
|
| 357 |
+
const completeTaskBtn = document.getElementById('complete-task-btn');
|
| 358 |
+
const winScreen = document.getElementById('win-screen');
|
| 359 |
+
const restartBtn = document.getElementById('restart-btn');
|
| 360 |
+
|
| 361 |
+
// Control buttons
|
| 362 |
+
const upBtn = document.getElementById('up-btn');
|
| 363 |
+
const leftBtn = document.getElementById('left-btn');
|
| 364 |
+
const rightBtn = document.getElementById('right-btn');
|
| 365 |
+
const downBtn = document.getElementById('down-btn');
|
| 366 |
+
|
| 367 |
+
// Initialize the game
|
| 368 |
+
function initGame() {
|
| 369 |
+
createRooms();
|
| 370 |
+
createPlayer();
|
| 371 |
+
createNPCs(3);
|
| 372 |
+
createTasks();
|
| 373 |
+
setupControls();
|
| 374 |
+
updateMapView();
|
| 375 |
+
|
| 376 |
+
// Game loop
|
| 377 |
+
setInterval(gameLoop, 1000/60);
|
| 378 |
+
}
|
| 379 |
+
|
| 380 |
+
// Create rooms on the map
|
| 381 |
+
function createRooms() {
|
| 382 |
+
const rooms = [
|
| 383 |
+
{ x: 200, y: 200, width: 400, height: 300, name: "Admin" },
|
| 384 |
+
{ x: 700, y: 200, width: 400, height: 300, name: "Cafeteria" },
|
| 385 |
+
{ x: 200, y: 600, width: 400, height: 300, name: "Storage" },
|
| 386 |
+
{ x: 700, y: 600, width: 400, height: 300, name: "MedBay" },
|
| 387 |
+
{ x: 1200, y: 400, width: 300, height: 300, name: "Reactor" }
|
| 388 |
+
];
|
| 389 |
+
|
| 390 |
+
rooms.forEach(room => {
|
| 391 |
+
const roomElement = document.createElement('div');
|
| 392 |
+
roomElement.className = 'room';
|
| 393 |
+
roomElement.style.left = `${room.x}px`;
|
| 394 |
+
roomElement.style.top = `${room.y}px`;
|
| 395 |
+
roomElement.style.width = `${room.width}px`;
|
| 396 |
+
roomElement.style.height = `${room.height}px`;
|
| 397 |
+
|
| 398 |
+
const label = document.createElement('div');
|
| 399 |
+
label.className = 'room-label';
|
| 400 |
+
label.textContent = room.name;
|
| 401 |
+
|
| 402 |
+
roomElement.appendChild(label);
|
| 403 |
+
gameMap.appendChild(roomElement);
|
| 404 |
+
});
|
| 405 |
+
}
|
| 406 |
+
|
| 407 |
+
// Create player character
|
| 408 |
+
function createPlayer() {
|
| 409 |
+
const player = document.createElement('div');
|
| 410 |
+
player.className = 'player';
|
| 411 |
+
player.id = 'player';
|
| 412 |
+
player.style.left = `${gameState.player.x}px`;
|
| 413 |
+
player.style.top = `${gameState.player.y}px`;
|
| 414 |
+
gameMap.appendChild(player);
|
| 415 |
+
}
|
| 416 |
+
|
| 417 |
+
// Create NPC characters
|
| 418 |
+
function createNPCs(count) {
|
| 419 |
+
for (let i = 0; i < count; i++) {
|
| 420 |
+
const npc = {
|
| 421 |
+
x: Math.random() * 1800 + 100,
|
| 422 |
+
y: Math.random() * 1800 + 100,
|
| 423 |
+
speed: 1 + Math.random() * 2,
|
| 424 |
+
direction: Math.random() * Math.PI * 2,
|
| 425 |
+
changeDirectionTimer: 0
|
| 426 |
+
};
|
| 427 |
+
|
| 428 |
+
gameState.npcs.push(npc);
|
| 429 |
+
|
| 430 |
+
const npcElement = document.createElement('div');
|
| 431 |
+
npcElement.className = 'npc';
|
| 432 |
+
npcElement.style.left = `${npc.x}px`;
|
| 433 |
+
npcElement.style.top = `${npc.y}px`;
|
| 434 |
+
npcElement.id = `npc-${i}`;
|
| 435 |
+
gameMap.appendChild(npcElement);
|
| 436 |
+
}
|
| 437 |
+
}
|
| 438 |
+
|
| 439 |
+
// Create tasks
|
| 440 |
+
function createTasks() {
|
| 441 |
+
const taskTypes = [
|
| 442 |
+
{ name: "Fix Wiring", description: "Connect the wires correctly", icon: "🔌" },
|
| 443 |
+
{ name: "Download Data", description: "Wait for download to complete", icon: "📥" },
|
| 444 |
+
{ name: "Align Engine", description: "Adjust the engine output", icon: "⚙️" },
|
| 445 |
+
{ name: "Clear Asteroids", description: "Shoot the asteroids", icon: "☄️" },
|
| 446 |
+
{ name: "Inspect Sample", description: "Analyze the sample", icon: "🧪" }
|
| 447 |
+
];
|
| 448 |
+
|
| 449 |
+
// Create 3 random tasks
|
| 450 |
+
for (let i = 0; i < gameState.totalTasks; i++) {
|
| 451 |
+
const randomType = taskTypes[Math.floor(Math.random() * taskTypes.length)];
|
| 452 |
+
const task = {
|
| 453 |
+
id: i,
|
| 454 |
+
name: randomType.name,
|
| 455 |
+
description: randomType.description,
|
| 456 |
+
icon: randomType.icon,
|
| 457 |
+
x: Math.random() * 1600 + 200,
|
| 458 |
+
y: Math.random() * 1600 + 200,
|
| 459 |
+
completed: false
|
| 460 |
+
};
|
| 461 |
+
|
| 462 |
+
gameState.tasks.push(task);
|
| 463 |
+
|
| 464 |
+
// Add to task list
|
| 465 |
+
const taskItem = document.createElement('div');
|
| 466 |
+
taskItem.className = 'task-item';
|
| 467 |
+
taskItem.id = `task-item-${i}`;
|
| 468 |
+
taskItem.innerHTML = `
|
| 469 |
+
<span class="task-checkbox"></span>
|
| 470 |
+
<span>${task.name}</span>
|
| 471 |
+
`;
|
| 472 |
+
tasksContainer.appendChild(taskItem);
|
| 473 |
+
|
| 474 |
+
// Create task element on map
|
| 475 |
+
const taskElement = document.createElement('div');
|
| 476 |
+
taskElement.className = 'task';
|
| 477 |
+
taskElement.id = `task-${i}`;
|
| 478 |
+
taskElement.style.left = `${task.x}px`;
|
| 479 |
+
taskElement.style.top = `${task.y}px`;
|
| 480 |
+
taskElement.textContent = task.icon;
|
| 481 |
+
taskElement.addEventListener('click', () => startTask(i));
|
| 482 |
+
gameMap.appendChild(taskElement);
|
| 483 |
+
}
|
| 484 |
+
}
|
| 485 |
+
|
| 486 |
+
// Setup controls
|
| 487 |
+
function setupControls() {
|
| 488 |
+
// Touch controls
|
| 489 |
+
upBtn.addEventListener('touchstart', () => { gameState.player.moving = true; gameState.player.direction = 'up'; });
|
| 490 |
+
leftBtn.addEventListener('touchstart', () => { gameState.player.moving = true; gameState.player.direction = 'left'; });
|
| 491 |
+
rightBtn.addEventListener('touchstart', () => { gameState.player.moving = true; gameState.player.direction = 'right'; });
|
| 492 |
+
downBtn.addEventListener('touchstart', () => { gameState.player.moving = true; gameState.player.direction = 'down'; });
|
| 493 |
+
|
| 494 |
+
upBtn.addEventListener('touchend', stopMoving);
|
| 495 |
+
leftBtn.addEventListener('touchend', stopMoving);
|
| 496 |
+
rightBtn.addEventListener('touchend', stopMoving);
|
| 497 |
+
downBtn.addEventListener('touchend', stopMoving);
|
| 498 |
+
|
| 499 |
+
// Mouse controls for testing
|
| 500 |
+
upBtn.addEventListener('mousedown', () => { gameState.player.moving = true; gameState.player.direction = 'up'; });
|
| 501 |
+
leftBtn.addEventListener('mousedown', () => { gameState.player.moving = true; gameState.player.direction = 'left'; });
|
| 502 |
+
rightBtn.addEventListener('mousedown', () => { gameState.player.moving = true; gameState.player.direction = 'right'; });
|
| 503 |
+
downBtn.addEventListener('mousedown', () => { gameState.player.moving = true; gameState.player.direction = 'down'; });
|
| 504 |
+
|
| 505 |
+
upBtn.addEventListener('mouseup', stopMoving);
|
| 506 |
+
leftBtn.addEventListener('mouseup', stopMoving);
|
| 507 |
+
rightBtn.addEventListener('mouseup', stopMoving);
|
| 508 |
+
downBtn.addEventListener('mouseup', stopMoving);
|
| 509 |
+
|
| 510 |
+
// Complete task button
|
| 511 |
+
completeTaskBtn.addEventListener('click', completeTask);
|
| 512 |
+
|
| 513 |
+
// Restart button
|
| 514 |
+
restartBtn.addEventListener('click', restartGame);
|
| 515 |
+
}
|
| 516 |
+
|
| 517 |
+
function stopMoving() {
|
| 518 |
+
gameState.player.moving = false;
|
| 519 |
+
}
|
| 520 |
+
|
| 521 |
+
// Game loop
|
| 522 |
+
function gameLoop() {
|
| 523 |
+
updatePlayer();
|
| 524 |
+
updateNPCs();
|
| 525 |
+
checkTaskCompletion();
|
| 526 |
+
}
|
| 527 |
+
|
| 528 |
+
// Update player position
|
| 529 |
+
function updatePlayer() {
|
| 530 |
+
const player = document.getElementById('player');
|
| 531 |
+
|
| 532 |
+
if (gameState.player.moving) {
|
| 533 |
+
switch (gameState.player.direction) {
|
| 534 |
+
case 'up':
|
| 535 |
+
gameState.player.y -= gameState.player.speed;
|
| 536 |
+
break;
|
| 537 |
+
case 'down':
|
| 538 |
+
gameState.player.y += gameState.player.speed;
|
| 539 |
+
break;
|
| 540 |
+
case 'left':
|
| 541 |
+
gameState.player.x -= gameState.player.speed;
|
| 542 |
+
break;
|
| 543 |
+
case 'right':
|
| 544 |
+
gameState.player.x += gameState.player.speed;
|
| 545 |
+
break;
|
| 546 |
+
}
|
| 547 |
+
|
| 548 |
+
// Boundary checking
|
| 549 |
+
gameState.player.x = Math.max(0, Math.min(gameState.player.x, 2000 - 40));
|
| 550 |
+
gameState.player.y = Math.max(0, Math.min(gameState.player.y, 2000 - 40));
|
| 551 |
+
|
| 552 |
+
player.style.left = `${gameState.player.x}px`;
|
| 553 |
+
player.style.top = `${gameState.player.y}px`;
|
| 554 |
+
|
| 555 |
+
updateMapView();
|
| 556 |
+
}
|
| 557 |
+
}
|
| 558 |
+
|
| 559 |
+
// Update NPC positions
|
| 560 |
+
function updateNPCs() {
|
| 561 |
+
gameState.npcs.forEach((npc, index) => {
|
| 562 |
+
// Change direction randomly
|
| 563 |
+
npc.changeDirectionTimer--;
|
| 564 |
+
if (npc.changeDirectionTimer <= 0) {
|
| 565 |
+
npc.direction = Math.random() * Math.PI * 2;
|
| 566 |
+
npc.changeDirectionTimer = 30 + Math.random() * 100;
|
| 567 |
+
}
|
| 568 |
+
|
| 569 |
+
// Move in current direction
|
| 570 |
+
npc.x += Math.cos(npc.direction) * npc.speed;
|
| 571 |
+
npc.y += Math.sin(npc.direction) * npc.speed;
|
| 572 |
+
|
| 573 |
+
// Boundary checking
|
| 574 |
+
npc.x = Math.max(0, Math.min(npc.x, 2000 - 40));
|
| 575 |
+
npc.y = Math.max(0, Math.min(npc.y, 2000 - 40));
|
| 576 |
+
|
| 577 |
+
// Update DOM
|
| 578 |
+
const npcElement = document.getElementById(`npc-${index}`);
|
| 579 |
+
npcElement.style.left = `${npc.x}px`;
|
| 580 |
+
npcElement.style.top = `${npc.y}px`;
|
| 581 |
+
});
|
| 582 |
+
}
|
| 583 |
+
|
| 584 |
+
// Update map view to follow player
|
| 585 |
+
function updateMapView() {
|
| 586 |
+
const viewportWidth = window.innerWidth;
|
| 587 |
+
const viewportHeight = window.innerHeight;
|
| 588 |
+
|
| 589 |
+
// Calculate scale to fit map in viewport
|
| 590 |
+
const scaleX = viewportWidth / 2000;
|
| 591 |
+
const scaleY = viewportHeight / 2000;
|
| 592 |
+
gameState.mapScale = Math.min(scaleX, scaleY) * 0.8; // Slightly zoomed in
|
| 593 |
+
|
| 594 |
+
// Center on player
|
| 595 |
+
gameState.mapOffset.x = -gameState.player.x * gameState.mapScale + viewportWidth / 2;
|
| 596 |
+
gameState.mapOffset.y = -gameState.player.y * gameState.mapScale + viewportHeight / 2;
|
| 597 |
+
|
| 598 |
+
// Apply transform
|
| 599 |
+
gameMap.style.transform = `translate(${gameState.mapOffset.x}px, ${gameState.mapOffset.y}px) scale(${gameState.mapScale})`;
|
| 600 |
+
}
|
| 601 |
+
|
| 602 |
+
// Start a task
|
| 603 |
+
function startTask(taskId) {
|
| 604 |
+
const task = gameState.tasks[taskId];
|
| 605 |
+
if (task && !task.completed) {
|
| 606 |
+
gameState.currentTask = taskId;
|
| 607 |
+
taskTitle.textContent = task.name;
|
| 608 |
+
taskDescription.textContent = task.description;
|
| 609 |
+
taskPopup.style.display = 'block';
|
| 610 |
+
}
|
| 611 |
+
}
|
| 612 |
+
|
| 613 |
+
// Complete the current task
|
| 614 |
+
function completeTask() {
|
| 615 |
+
if (gameState.currentTask !== null) {
|
| 616 |
+
const task = gameState.tasks[gameState.currentTask];
|
| 617 |
+
if (task && !task.completed) {
|
| 618 |
+
task.completed = true;
|
| 619 |
+
gameState.completedTasks++;
|
| 620 |
+
|
| 621 |
+
// Update task list
|
| 622 |
+
const taskItem = document.getElementById(`task-item-${gameState.currentTask}`);
|
| 623 |
+
taskItem.classList.add('completed');
|
| 624 |
+
|
| 625 |
+
// Remove task from map
|
| 626 |
+
const taskElement = document.getElementById(`task-${gameState.currentTask}`);
|
| 627 |
+
if (taskElement) taskElement.remove();
|
| 628 |
+
|
| 629 |
+
// Update status
|
| 630 |
+
tasksCompleted.textContent = `Tasks: ${gameState.completedTasks}/${gameState.totalTasks}`;
|
| 631 |
+
|
| 632 |
+
// Check if all tasks are completed
|
| 633 |
+
if (gameState.completedTasks >= gameState.totalTasks) {
|
| 634 |
+
winScreen.style.display = 'flex';
|
| 635 |
+
}
|
| 636 |
+
}
|
| 637 |
+
|
| 638 |
+
taskPopup.style.display = 'none';
|
| 639 |
+
gameState.currentTask = null;
|
| 640 |
+
}
|
| 641 |
+
}
|
| 642 |
+
|
| 643 |
+
// Check if player is near a task
|
| 644 |
+
function checkTaskCompletion() {
|
| 645 |
+
// This is handled by the click event on task elements
|
| 646 |
+
}
|
| 647 |
+
|
| 648 |
+
// Restart the game
|
| 649 |
+
function restartGame() {
|
| 650 |
+
// Clear existing elements
|
| 651 |
+
gameMap.innerHTML = '';
|
| 652 |
+
tasksContainer.innerHTML = '';
|
| 653 |
+
|
| 654 |
+
// Reset game state
|
| 655 |
+
gameState.player.x = 500;
|
| 656 |
+
gameState.player.y = 500;
|
| 657 |
+
gameState.player.moving = false;
|
| 658 |
+
gameState.player.direction = null;
|
| 659 |
+
gameState.npcs = [];
|
| 660 |
+
gameState.tasks = [];
|
| 661 |
+
gameState.completedTasks = 0;
|
| 662 |
+
gameState.currentTask = null;
|
| 663 |
+
|
| 664 |
+
// Hide win screen
|
| 665 |
+
winScreen.style.display = 'none';
|
| 666 |
+
|
| 667 |
+
// Reset status
|
| 668 |
+
tasksCompleted.textContent = `Tasks: 0/${gameState.totalTasks}`;
|
| 669 |
+
|
| 670 |
+
// Reinitialize game
|
| 671 |
+
initGame();
|
| 672 |
+
}
|
| 673 |
+
|
| 674 |
+
// Initialize the game when the page loads
|
| 675 |
+
window.addEventListener('load', initGame);
|
| 676 |
+
|
| 677 |
+
// Handle window resize
|
| 678 |
+
window.addEventListener('resize', updateMapView);
|
| 679 |
+
</script>
|
| 680 |
+
<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=kate-line/amogos" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 681 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Create a simple HTML/CSS/JavaScript game inspired by Among Us that works in a mobile browser in portrait mode. The game should be fully offline (no server or internet connection required) and include the following features: 1. A simple map where the player can move around. 2. A player character controlled by on-screen buttons (up/down/left/right) or touch controls. 3. NPC characters that move randomly on their own. 4. Basic tasks the player can complete (e.g., tapping a button to fix something). 5. No need for kill or vote mechanics since the game is offline. 6. A clean, mobile-friendly UI that works on touch screens. 7. Do not use any external libraries — only vanilla HTML, CSS, and JavaScript. If possible, keep the entire code in one file and include comments to make it easy to understand.
|