Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 119 lines (101 sloc) 3.48 kB
b3355c6 @stephank Add a testing page, for messing around with during development.
authored
1 <!doctype html>
2 <html>
3 <head>
4
5 <!--
6 Copy me to testing.html!
7
8 This file is a template for a testing page. This template itself is in version control, which is
9 nice. If you copy this page as testing.html, you'll notice that testing.html is ignored by
10 version control, which is even nicer. It's for messing around while developing.
11
12 This page is functionally much like arashi.html, but contains lots of commentary.
13 -->
14
15 <title>ArashiJS</title>
16
17 <link rel=stylesheet media=screen href="arashi.css">
18
19 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.js"></script>
20
21 <!--
22 Development mode will currently change the following:
23 * Force the use of WAVs, rather than OGGs. This is because OGGs are a build product.
24 Note that Google Chrome is unfortunately incapable of playing WAVs. (Chromium issue #23916)
25 * Draw a framerate counter. The counter does not update while the engine is paused,
26 (where it should actually show zero, or such).
27 -->
28 <script>window.arashi_devmode = true;</script>
29
30 <!-- It is important for globals to be import first. -->
31 <script src="src/globals.js"></script>
32
33 <!-- Source files -->
34 <script src="src/engine.js"></script>
35 <script src="src/random.js"></script>
36 <script src="src/soundkit.js"></script>
37 <script src="src/grid.js"></script>
38 <script src="src/vakit/7segment.js"></script>
39 <script src="src/vakit/14segment.js"></script>
40 <script src="src/vakit/starfield.js"></script>
41 <script src="src/vakit/sizzling.js"></script>
42 <script src="src/vakit/logo.js"></script>
43 <script src="src/vakit/lightning.js"></script>
44 <script src="src/gamestates/title.js"></script>
45 <script src="src/gamestates/game.js"></script>
bdcce6f @stephank Some basic spike code.
authored
46 <script src="src/enemies/plasma.js"></script>
8c3cf7f @stephank Update testing template.
authored
47 <script src="src/enemies/spiker.js"></script>
bdcce6f @stephank Some basic spike code.
authored
48 <script src="src/enemies/spikes.js"></script>
8c3cf7f @stephank Update testing template.
authored
49 <script src="src/enemies/pulsar.js"></script>
b3355c6 @stephank Add a testing page, for messing around with during development.
authored
50
51 <!-- Bootstrap code -->
52 <script>
53 // Show the dialog after page load.
54 // Technically, sounds may still be loading at this point. Assume it won't take long now.
55 $(document).ready(function () {
56 $('#d').show();
57 $('#s a').focus();
58 });
59 // Run the game.
60 function start() {
61 $('#d').hide();
62
63 // Typical way to start the game.
64 // Engine.start();
65
66 // But #start also takes a gamestate-like object. Handy for testing.
67 Engine.start(TestMachine);
68 }
69 </script>
70
71 <!-- Here's an example gamestate-like object, which just draws some silly text. -->
72 <script>
73 var TestMachine = {
74 enter_start: function() {
75 c.beginPath();
76 c.save();
77 c.translate(225, 260);
78 c.scale(20, 20);
79 Dig14Segment.drawText('TEST');
80 c.translate(12, 2);
81 c.scale(0.5, 0.5);
82 Dig14Segment.drawText('ICLE');
83 c.restore();
84 c.lineWidth = 4;
85 c.strokeStyle = 'white';
86 c.stroke();
87 Engine.pause();
88 }
89 };
90 </script>
91
92 </head>
93 <body>
94
95 <!-- The vertically centered horizontal strip, for drawing the horizontal frame border. -->
96 <div id="h"></div>
97 <!-- The horizontally centered vertical strip. -->
98 <div id="v"></div>
99 <!-- The centered canvas. -->
100 <div id="c"><canvas id="game" width="800" height="600"></canvas></div>
101
102 <!-- The start-up dialog. -->
103 <div id="d" style="display: none">
104 <p>
105 <strong>Heads-up:</strong> this page contains multimedia content;<br>
106 adjust your speaker volume!
107 </p>
108 <p>
109 Depends on some fairly new browser features. Make sure your<br>
110 browser is up-to-date! Tested with Firefox 3.5+ and Chrome 5+.
111 </p>
112 <p id="s">
113 <a href="javascript:start()">Continue</a>
114 </p>
115 </div>
116
117 </body>
118 </html>
Something went wrong with that request. Please try again.