-
Notifications
You must be signed in to change notification settings - Fork 0
/
entry.html
56 lines (44 loc) · 1.13 KB
/
entry.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
<!DOCTYPE html>
<html>
<head>
<title>Impact Game</title>
<style type="text/css">
html,
body {
background-color: #333;
color: #fff;
font-family: helvetica, arial, sans-serif;
margin: 0;
padding: 0;
font-size: 12pt;
}
#canvas {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
}
</style>
<script type="text/javascript">
var room = "" + window.location.search.split("/")[0];
var character = "" + window.location.search.split("/")[1];
if (!window.location.search || room == "?") {
window.location.search = Math.random().toString(36).substr(2, 5) + "/" + character; // location search is the room name
var roomName = window.location.search;
}
else {
var roomName = window.location.search;
}
</script>
<script type="text/javascript" src="lib/impact/impact.js"></script>
<script type="text/javascript" src="lib/network/socket.io.js"></script>
<script type="text/javascript" src="lib/messages.js"></script>
<script type="text/javascript" src="lib/game/main.js"></script>
</head>
<body>
<!-- Display the game -->
<canvas id="canvas"></canvas>
</body>
</html>