-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
189 lines (187 loc) · 5.9 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Tiles Game</title>
<link rel="stylesheet" href="main.css">
<link rel="preload" as="font" href="fonts/Another-Typewriter.woff" crossorigin>
<link rel="preload" as="font" href="fonts/Emilys-Candy.woff2" crossorigin>
<link rel="preload" as="fetch" href="sound/laser.mp3">
<link rel="preload" as="fetch" href="sound/smash.mp3">
<script type="module" src="js/components.js"></script>
<script type="module" src="js/particle.js"></script>
<script type="module" src="js/timer.js"></script>
<script src="js/util.js" defer></script>
<script type="module" src="js/game.js"></script>
<meta name="viewport" content="initial-scale=1, minimum-scale=1">
<meta name="description" content="An exploration of match three games with a gravity mechanic.">
</head>
<body>
<div class="container">
<div class="d-flex align-items-start w-auto">
<canvas id="canvas"></canvas>
<div class="d-flex flex-column gap-2 font-typewriter">
<div id="bombs" class="d-flex align-items-end bg-secondary px-4 py-1 rounded-pill text-right">
<img src="img/bomb-72.webp" alt="Bombs" width="72" height="72" class="mr-2">
<div id="bombs-used" class="size-4">0</div>
</div>
<div class="d-flex align-items-end bg-secondary px-4 py-1 rounded-pill">
<img src="img/stopwatch-72.webp" alt="Timer" width="72" height="72">
<div id="timer" class="size-4 text-right" style="min-width: 4ch">0:00</div>
</div>
<button class="bg-secondary px-4 py-1 rounded-pill border-0" id="btn-pause">
<img src="img/pause.webp" alt="Pause" width="72" height="72">
</button>
</div>
</div>
<form class="table" id="game-parameters">
<div class="row">
<label for="grid-width">
Width
</label>
<div>
<input type="number" min="2" max="37" required value="9" id="grid-width">
</div>
</div>
<div class="row">
<label for="grid-height">
Height
</label>
<div>
<input type="number" min="2" max="37" required value="6" id="grid-height">
</div>
</div>
<div class="row">
<label for="grid-depth">
Depth
</label>
<div>
<input type="number" min="2" max="5" required value="2" id="grid-depth">
</div>
</div>
<div class="row">
<label for="num-colors">
Colours
</label>
<div>
<input type="number" min="4" max="7" required value="4" id="num-colors">
</div>
</div>
<div class="row">
<label for="blank-percentage">
Blank %
</label>
<div>
<input type="number" min="0" max="99" step="3" required value="0" id="blank-percentage"> %
</div>
</div>
<div class="row">
<div></div>
<div class="form-check">
<input type="checkbox" id="color-over-blank">
<label for="color-over-blank">
Place colours over blanks
</label>
</div>
</div>
<div class="row">
<label for="run-length">
Minimum Run Length
</label>
<div class="d-flex">
<output id="run-length" for="shape-min-size btn-reduce-run-length">
2
</output>
<button type="button" id="btn-reduce-run-length" disabled>
Reduce
</button>
</div>
</div>
<div class="row">
<label for="shape-size-min">
Minimum Group Size
</label>
<div>
<input type="number" min="2" max="9" required value="2" id="shape-size-min">
</div>
</div>
<div class="row">
<label for="shape-size-mean">
Mean Group Size
</label>
<div>
<input type="number" min="2" required value="3" id="shape-size-mean">
</div>
</div>
<div class="row">
<label for="shape-size-max">
Maximum Group Size
</label>
<div>
<input type="number" min="2" required value="11" id="shape-size-max">
</div>
</div>
<div class="row">
<label for="drop-probability">
Drop Probability
</label>
<div>
<input type="number" min="0" max="99" step="3" required value="51" id="drop-probability"> %
</div>
</div>
<div class="row">
<label for="random-seed">
Random Seed
</label>
<div>
<input type="text" id="random-seed" cols="10" maxlength="25" style="width: 25em">
</div>
</div>
<div class="row">
<div></div>
<div>
<button type="submit" id="btn-random-game">
Random Game
</button>
<button type="submit" id="btn-seed-game">
Seed Game
</button>
<button type="button" id="btn-empty">
Clear
</button>
<button type="button" id="btn-build" disabled>
Add Group
</button>
<button type="button" id="btn-about" data-toggle="modal" data-target="about-modal">
?
</button>
</div>
</div>
</form>
</div>
<div class="modal fade" id="about-modal">
<div class="modal-body">
<h1 style="font-family: 'Emilys Candy'">Tiles Game</h1>
<p>
An implementation by Elizabeth Hudnott. An exploration of the mechanics of <a href="https://www.games.co.uk/game/tiles" target="_blank" rel="noreferrer">Tiles</a> by <a href="https://kizi.com" target="_blank" rel="noreferrer">Kizi</a>.
</p>
<p>
<a href="https://freesound.org/people/jobro/sounds/35677" target="_blank" rel="noopener">Laser shots</a> sound by jobro, licensed under <a href="https://creativecommons.org/licenses/by/3.0" rel="noopener">CC By Attribution 3</a>.<br>
<a href="https://freesound.org/people/Nox_Sound/sounds/554367" target="_blank" rel="noopener">Foley_Impact_Smash_Tiles</a> sound by Nox_Sound.
</p>
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal">Return to Game</button>
</div>
</div>
<div class="modal fade" id="completed-modal">
<div class="modal-body">
Congratulations! You solved the puzzle.
You used <span id="bombs-used-complete"></span> bombs and took <span id="time-taken"></span>.
Can you solve a puzzle like this <span id="objective"></span> in a faster time?
</div>
<div class="modal-footer">
<button type="button" id="btn-next-level">New Game</button>
</div>
</div>
</body>
</html>