forked from platzhersh/pacman-canvas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.htm
executable file
·227 lines (183 loc) · 7.83 KB
/
index.htm
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
<!DOCTYPE html>
<!--<html lang="en">-->
<html lang="en" manifest="cache.manifest">
<head>
<meta charset="utf-8" />
<title>Pacman in HTML 5 Canvas</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="pacman-canvas.css">
<!-- SEO Stuff -->
<meta name="description" content="Play Pacman Canvas for free on your desktop or mobile. This whole game is open source an was created in HTML5." />
<link rel="canonical" href="http://pacman.platzh1rsch.ch/" />
<meta name="author" content="platzh1rsch.ch" />
<meta name="publisher" content="platzh1rsch.ch" />
<meta name="copyright" content="© Copyright (c) platzh1rsch.ch" />
<meta name="robots" content="index,follow" />
<meta http-equiv="content-language" content="de">
<meta name="language" content="de">
<meta name="page-topic" content="Games/Arcade" />
<meta content="National" name="distribution" />
<meta content="pacman.platzh1rsch.ch" name="target" />
<!-- Facebook Open Graph Information -->
<meta property="og:image" content="http://pacman.platzh1rsch.ch/img/Icon-200x200.png"/>
<meta property="og:title" content="Pacman Canvas in HTML5" />
<meta property="og:description" content="Play Pacman Canvas for free on your desktop or mobile. This whole game is open source an was created in HTML5." />
<meta property="og:url" content="http://pacman.platzh1rsch.ch/" />
<meta property="og:site_name" content="Pacman Canvas in HTML5" />
<meta property="og:locale" content="en_US" />
<!-- site icons -->
<link rel="shortcut icon" href="img/Icon-130x130.png" />
<link rel="apple-touch-icon" href="img/Icon-130x130.png" />
<meta property="og:image" content="http://pacman.platzh1rsch.ch/img/Icon-130x130.png"/>
<!-- AppsFuel verification code -->
<meta name="appsfuel_code" content="83d3cedc1050a5c"/>
<!-- Mobile Viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
<!-- Apple Mobile Web Capability -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- Script -->
<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="js/jquery.hammer.min.js" type="text/javascript"></script>
<!-- Google Analytics -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-28993174-1']);
_gaq.push(['_setDomainName', 'pacman.platzh1rsch.ch']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div class="container">
<div class="main">
<!-- Display this message if Javascript is disabled -->
<noscript>
<h2>Enable Javascript!</h2>
<p>This HTML 5 app requires Javascript to run. Please check that Javascript is enabled in your browser.</p>
</noscript>
<!-- Highscore -->
<div class="content" id="highscore-content">
<div class="button" id="back">back</div>
<div>
<h1>Highscore</h1>
<p>
<ol id="highscore-list">
</ol>
</p>
</div>
</div>
<!-- INSTRUCTIONS -->
<div class="content" id="instructions-content">
<div class="button" id="back">back</div>
<div>
<h1>Instructions</h1>
<div class="nomobile">
<h2>Controls</h2>
<p>Use your arrow keys or [W,A,S,D] keys to navigate pacman.</p>
<p>To pause / resume the game press [SPACE] or [ESC] or just click into the game area.</p>
</div>
<div class="mobile">
<h2>Controls</h2>
<p>Use swipe gestures to navigate pacman.</p>
<p>Alternatively use the Arrow Buttons underneath the game area to navigate pacman.</p>
<p>To pause / resume the game, touch the game area once.</p>
</div>
</div>
</div>
<!-- Info -->
<div class="content" id="info-content">
<div class="button" id="back">back</div>
<div>
<h1>Info</h1>
<p>Current Version: 0.84 (09.11.2014) (<a href="#" id="updateCode">get latest</a>)</p>
<img src="img/platzh1rsch-logo.png">
<p>Pacman Canvas is Open Source, written by <a href="http://platzh1rsch.ch">platzh1rsch</a>. You can get the code on <a target="_blank" href="https://github.com/platzhersh/pacman-canvas" target="_blank">github</a>.</p>
<p>If you have any suggestions how to make this app better, please post your suggestion / request on <a target="_blank" href="https://platzh1rsch.uservoice.com/">uservoice</a>.</p>
<p>
</div>
</div>
<!-- main game content -->
<div class="content" id="game-content">
<!-- main game content -->
<div class="game wrapper">
<div class="score">Score:</div>
<div class="lives">Lives: </div>
<div class="controlSound">
<img src="img/audio-icon-mute.png" id="mute">
</div>
<!-- canvas is splitted into 18x13 fields -->
<div id="canvas-container">
<div id="canvas-overlay-container">
<div id="canvas-overlay-content">
<div id="title">Pacman Canvas</div>
<div><p id="text">Click to Play</p></div>
</div>
</div>
<canvas id="myCanvas" width="540" height="390">
<p>Canvas not supported</p>
</canvas>
</div>
<div class="controls" id="game-buttons">
<!-- Will be moved to Instructions
<p class="nomobile">Use W-A-S-D keys to navigate Pac-Man</p>
-->
<!-- OLD Buttons -->
<div>
<span id="up" class="controlButton">↑</span>
</div>
<div>
<span id="left" class="controlButton">←</span>
<span id="down" class="controlButton">↓</span>
<span id="right" class="controlButton">→</span>
</div>
</div>
<!-- inGame Controls End -->
<!-- Game Menu -->
<div class="controls" id="menu-buttons">
<ul>
<li class="button" id="newGame">New Game</li>
<li class="button" id="highscore">Highscore</li>
<li class="button" id="instructions">Instructions</li>
<li class="button" id="info">Info</li>
</ul>
</div>
<!-- Game Menu End -->
</div>
<div class="description nomobile">
<p>This whole thing was written in HTML5, CSS3 and Javascript (using small bits of jquery). For the basics I was following the <a href="http://devhammer.net/blog/exploring-html5-canvas-part-1---introduction" target="_blank">"Exploring HTML5 Canvas"</a> Tutorials (Part 1 - 6) by Devhammer. Thanks for the great Tutorial!</a>
<p>For some other stuff, like how to write objectorientated javascript I was following the tutorials over at <a href="http://www.codecademy.com/" target="_blank">http://www.codecademy.com/</a>, which is a really great site to learn Javascript and also other languages.</a>
<p>If you understand German you can also read my blogpost about this site: <a href="http://blog.platzh1rsch.ch/2012/08/pacman-in-html5-canvas.html">"Pacman in HTML5 Canvas"</a>.</p>
<span id="audio">
<audio id="theme" preload="auto">
<source src="wav/theme.wav" type="audio/wav">
<source src="mp3/theme.mp3" type="audio/mpeg">
</audio>
<audio id="waka" preload="auto">
<source src="wav/waka.wav" type="audio/wav">
<source src="mp3/waka.mp3" type="audio/mpeg">
</audio>
<audio id="die" preload="auto">
<source src="wav/die.wav" type="audio/wav">
<source src="mp3/die.mp3" type="audio/mpeg">
</audio>
<audio id="mark" preload="auto">
<!--source src="wav/powerpill.wav" type="audio/wav"-->
<source src="mp3/mark.mp3" type="audio/mpeg">
</audio>
<audio id="powerpill" preload="auto">
<source src="wav/powerpill.wav" type="audio/wav">
<source src="mp3/powerpill.mp3" type="audio/mpeg">
</audio>
</span>
</div>
</div>
</div>
</div>
<script src="pacman-canvas.js" type="text/javascript"></script>
</body>
</html>