forked from ChromeGaming/GameSphere
-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.html
82 lines (79 loc) · 1.86 KB
/
game.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="script.js"></script>
<style type="text/css">
div , canvas{
width: 800px;
height: 600px;
position:absolute;
top: 0;
left: 0;
text-align:center;
font: 20px Courier New bold;
color: white;
}
div,#keys{
display: none;
}
div > span{
position:absolute;
width: 100%;
left: 0;
}
#intro span {
top: 20%;
opacity: 0;
}
b{
color: orange;
}
#gameOver{
font-size: 24px;
background: rgba(0,0,0,0.7);
}
#go{
font-size: 48px;
color: red;
top: 30%;
}
#score{
font-size: 32px;
top: 50%;
}
#restart{
bottom: 10px;
}
audio{
visibility: hidden;
}
</style>
</head>
<body>
<audio><source src="cat.mp3" /></audio>
<canvas id="c"></canvas>
<img id="img" src="https://github.com/GameSphere-MultiPlayer/GameSphere/assets/56786344/68bd68bd-6b20-41c6-80c0-b938f2231978" style="visibility:hidden" />
<div id="intro">
<span>They say black cats are bad luck.</span>
<span>Those humans...</span>
<span>What a bunch of pussies.</span>
<span>To us garden gnomes,<br>bad luck is a dozen of <br>bloodthirsty boars coming at you.</span>
<span>And let me tell you my friend,</span>
<span>when that happens,<br> anything you can put between you and them <br><i>isn't</i> bad luck.</span>
<span>It's an opportunity to live a few more seconds.</span>
<span>
<p>Now, GET READY TO RUN FOR YOUR LIFE !</p>
<br>
<p><b>W</b>, <b>A</b>, <b>S</b>, <b>D</b></b> for moving</p>
<p><b><-</b> and <b>-></b> for kicking arses</p>
<br>
<p>Press <b>SPACE</b> to start</p>
</span>
</div>
<div id="gameOver">
<span id="go">GAME OVER !</span>
<span id="score">You ran <b id="meters">0</b> meters<br> in <span id="time">0</span> seconds !</span>
<span id="restart">Press <b>R</b> to restart the game.
</div>
</body>
<html>