-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·249 lines (213 loc) · 8.27 KB
/
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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>1D Bubble - Bubbling in 1 Dimension 2012</title>
<link href='http://fonts.googleapis.com/css?family=Unlock' rel='stylesheet' type='text/css'>
<style type="text/css">
body {
background: #222222;
background-color:#282828;
background-size:16px 16px;
font: 11px verdana;
color: white;
margin-top: 60px;
}
* {
user-select: none;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-webkit-tap-highlight-color:rgba(0,0,0,0);
}
#canvas { border: #333333 1px solid; background: white; margin: 0px; }
#topline {width:1000px;margin-top:45px; }
#msg { font-size:25px; color: #ea5cc0; width: 600px;
text-shadow: #f0f0ff 0px 0px 30px;
}
.menubutton {padding:5px;width:30px;height:30px;opacity:0.5;cursor:pointer;float:left;background-color:#111;margin-right:5px}
.points, #msg {float:left;font-family: 'Unlock', cursive;height:55px; }
.points {width:199px;font-size:22px;}
#p1a,#p2a {color:#888;font-size:19px;padding-top:2px}
#p1p {padding-right:8px}
#p2p {padding-left:8px}
#p1p,#p2p {letter-spacing:1px}
#p1h {color:#22eb22}
#p2h {color:#eb2222}
#jaws-log { overflow: auto; color: #aaaaaa; width: 300px; height: 150px; margin: 40px auto 0px auto; padding: 5px; border: #444444 1px solid; clear: both; font: 10px verdana; text-align: left; }
a,a:visited { color: orange; }
#header { width: 442px; color: #aaaaaa; }
#gamecontrols {font-size:18px}
a.geco {color:#eee;text-decoration:none}
#infobox { font: 11px verdana; width: 1000px; color: #999; }
#keyinfo, #instructions span { text-shadow: #666 1px 1px; }
#keyinfo { max-width:400px}
#keyinfo span {color:white}
#instructions {max-width:400px;background-color:#111;padding:2px 20px 20px 20px;margin-top:18px}
#instructions span {display:block;color:white;padding:6px 0 2px 0}
th, td {font-size:11px;background-color:black;text-align:center;padding:1px 8px}
#enemyTable {margin-bottom:5px}
canvas {
image-rendering: optimizeSpeed;
image-rendering: optimize-contrast;
image-rendering: -moz-crisp-edges; // Firefox
image-rendering: -webkit-optimize-contrast; // Webkit, doesn't seem to work for canvas though :\
-ms-interpolation-mode: nearest-neighbor; // IE
}
.ienemy {margin-left:10px;width:40px;height:4px;overflow:hidden;}
.in_game_key {width:80px;height:80px;text-align:center;}
.in_game_key span {margin-left:20px;padding-top:10px;display:block;width:40px;height:30px;border-radius:7px;background-color:#888;color:white;font-weight:bold;}
.in_game_key.lsi {float:left;}
.in_game_key.rsi {float:right;}
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<script src="intelxdk.js"></script>
<script type="text/javascript">
/* This code is used to run as soon as Intel activates */
var onDeviceReady=function(){
//hide splash screen
intel.xdk.device.hideSplashScreen();
};
document.addEventListener("intel.xdk.device.ready",onDeviceReady,false);
/* This code prevents users from dragging the page */
var preventDefaultScroll = function(event) {
event.preventDefault();
window.scroll(0,0);
return false;
};
document.addEventListener('touchmove', preventDefaultScroll, false);
</script>
<script type="text/javascript">
function toggleInstr() {
var ii = document.getElementById("instructions")
if ( ii.style.visibility == "visible") {
ii.style.visibility = "hidden"
} else {
ii.style.visibility = "visible"
}
}
var game_running = false;
function MonitorKeyDown(e)
{
if ( game_running ) return ;
if (!e) e=window.event;
var code;
if ((e.charCode) && (e.keyCode==0))
{
code = e.charCode;
} else {
code = e.keyCode;
}
if ( code == 83 || code == 67 ) {
startGame( code )
}
}
document.onkeydown = MonitorKeyDown;
//save hiscore in cookie
function WertHolen () {
var Wert = "";
if (document.cookie) {
var Wertstart = document.cookie.indexOf("=") + 1;
var Wertende = document.cookie.indexOf(";");
if (Wertende == -1)
Wertende = document.cookie.length;
Wert = document.cookie.substring(Wertstart, Wertende);
}
return Wert;
}
function WertSetzen (Bezeichner, Wert, Verfall) {
var jetzt = new Date();
var Auszeit = new Date(jetzt.getTime() + Verfall);
document.cookie = Bezeichner + "=" + Wert + "; expires=" + Auszeit.toGMTString() + ";";
}
</script>
</head>
<body data-rendering="true">
<center>
<div style="display:none" id="infodiv">asdf</div>
<div id="header">
<img src="media/logo_x2.png" />
</div>
<div id="gamecontrols">
<a class="geco" href="javascript:startGame()">PRESS <img class="startkey" src="media/startkey.png" align="middle" alt="S"/> TO START</a>
</div>
<div id="topline">
<div class="points" style="text-align:left">
<div id="p1h">player</div>
<div id="p1p" style="float:left">000000</div><div id="p1a"></div>
</div>
<div id="msg"></div>
<div id="hidiv" class="points" style="text-align:right">
<div id="p2h">hiscore</div>
<div id="p2p" style="float:right">000000</div><div id="p2a"></div>
</div>
</div>
<div id="container" style="width:1000px;padding-top:20px">
<canvas style="position:relative;z-index:100" id="canvas" width="1000" height="6"></canvas><br>
<div style="width:1px:height:1px;position:absolute">
<div id="explosion" style="visibility:hidden;z-index:50;position:relative;left:0px;top:-30px;width:50px">
<img src="media/explode.png" />
</div>
</div>
</div>
<div id="infobox">
<div id="keyinfo">
In game keys: <br />
<div id="go_left" class="in_game_key lsi">
<span><-</span>
<i>move left</i>
</div>
<div id="go_right" class="in_game_key lsi">
<span>-></span>
<i>move right</i>
</div>
<div id="go_shoot" class="in_game_key rsi" >
<span>space</span>
<i>shoot bubble</i>
</div>
<br clear="both" />
<span>P</span>: Pause
<br /><br />
<div style="width:90px;">
<div id="sound" class="menubutton" onclick="toggleSound()"><img src="media/sound_on.png" /></div>
<div id="pause" class="menubutton" onclick="toggleInstr()" style="color:white;font-size:25px">?</div>
</div>
</div>
<br /><br />
<div id="instructions" style="visibility:hidden">
<span>Instructions:</span>
Shoot enemies with your bubbles. When enemy is in bubble, pop the bubble by touching it.
<span>Enemies:</span>
<table id="enemyTable">
<tr><th>Looks like</th><th>Hits</th><th>Name</th><th>Points</th>
</tr><tr>
<td>
<div class="ienemy"><img src="media/enemy1.png" width="50" /></div></td><td>1</td><td>Baby monster</td><td>50</td></tr>
<tr><td>
<div class="ienemy" style="width:100px"><img src="media/enemy1.png" width="100" /></div></td><td>5</td><td>Monster mama</td><td>300</td></tr>
<tr><td>
<div class="ienemy"><img src="media/enemy2.png" width="50" /></div></td><td>2</td><td>Red monster</td><td>150</td></tr>
<tr><td>
<div class="ienemy" style="width:100px"><img src="media/enemy2.png" width="100" /></div></td><td>?</td><td>Monster papa</td><td>?</td></tr>
<tr><td>
?</td><td>?</td><td>The big one!</td><td>?</td></tr>
</table>
<a href="http://globalgamejam.org/2012/1d-bobble">This game was part of global game jam 2012</a>
</div>
<br /><br />
</div>
<div id="live_info"></div>
<!-- <div id="jaws-log"></div> -->
</center>
<script src="./js/jquery-2.0.3.min.js" type="text/javascript"></script>
<script src="./js/jaws.js" type="text/javascript"></script>
<script src="./js/game.js" type="text/javascript"></script>
<script type="text/javascript">
var lasthiscore = WertHolen();
if ( ( lasthiscore.length > 7) || ( parseInt(lasthiscore ) > 9999999 )) {
lasthiscore = 0
}
p2points = lasthiscore
showpoints( "p2", lasthiscore );
</script>
<script src="http://debug-software.intel.com/target/target-script-min.js#PGaCBv9J1-Ujuhfhkq2sw_WH_ade2bi1iEBr5GOPE2E"></script>
</body></html>