HTML, CSS, JS

Use arrows to move. Collect fuel to survive! Written by Alvin Wan (alvinwan.com) for Bit by Bit (littlebitbybit.org). github.com/alvinwan.

fork
loading
Files
  • index.html
  • index.css
  • index.js
index.html
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
<!--

Highly recommend opening this game in a new tab, to view full screen.

https://Kars--ALVINWAN1.repl.co
-->

<html>
	<head>
		<link href="https://fonts.googleapis.com/css?family=Playfair+Display:400,700" rel="stylesheet">
		<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/91/three.min.js"></script>
        <script type="text/javascript" src="index.js"></script>
		<link href="index.css" rel="stylesheet">
	</head>
	<body>
		<div class="panel">
			<h1>
				<span class="the">the</span>
				<span class="title">Kars</span>
				<span class="byline">Fuel Desperation</span>
			</h1>
			<div class="entries">
				<div class="entry">
					<label>Time</label>
					<p id="time" class="time">36</p>
				</div>
				<div class="entry">
					<label>Fuel</label>
					<div class="status">
						<div class="fill" id="fuel"></div>
					</div>
				</div>
				<div class="entry">
					<label>Record</label>
					<p id="record" class="time">0</p>
				</div>
				<div class="entry">
					<label>Score</label>
					<p id="score" class="time">36</p>
				</div>
			</div>
			<p class="instructions">Use arrow keys to move. Collect fuel to survive!</p>
		</div>
		<div id="world"></div>
	</body>
</html>
result
console