Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
58 lines (53 loc) · 2.18 KB
/
Copy pathindex.html
File metadata and controls
58 lines (53 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Infrastructure Runner Game</title>
<!-- External stylesheet with all UI/game styles -->
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="loading">Loading...</div>
<div id="game-container"></div>
<div id="instructions">
<h3>🏗️ Infrastructure Runner - African City Edition</h3>
<p><strong>Controls:</strong></p>
<ul>
<li>←/→ or A/D: Move left/right</li>
<li>↑ or Space or W: Jump</li>
<li>R: Restart (when game over)</li>
</ul>
<p><strong>Collect:</strong> Blueprints (50pts), Water Drops (20pts), Energy Cells (30pts)</p>
<p><strong>Power-ups:</strong> Hard Hat (shield), Helicopter (fly + stars), Solar (speed + energy orbs), Wind (double jump), Water Pipeline (safe path)</p>
<p><strong>Special:</strong> ⭐ Aerial Stars (150pts, helicopter only), 💡 Solar Orbs (120pts, solar boost only)</p>
<p><em>Run through a vibrant African metropolis while building critical infrastructure!</em></p>
</div>
<!-- Three.js Library (ES Module via Import Map) -->
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.160.0/build/three.module.js",
"three/addons/": "https://unpkg.com/three@0.160.0/examples/jsm/"
}
}
</script>
<!-- Game Modules -->
<script type="module" src="game.js"></script>
<script>
// Hide loading screen once everything is loaded
window.addEventListener('load', () => {
document.getElementById('loading').style.display = 'none';
});
// Hide instructions after 10 seconds
setTimeout(() => {
const instructions = document.getElementById('instructions');
instructions.style.transition = 'opacity 2s';
instructions.style.opacity = '0';
setTimeout(() => {
instructions.style.display = 'none';
}, 2000);
}, 10000);
</script>
</body>
</html>