-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
398 lines (391 loc) · 16.2 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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<!DOCTYPE html>
<html lang="en">
<!-- Document Head -->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>MazeQuest</title>
<link rel="stylesheet" href="./Website.css">
<script type="module" src = "./Website.js"></script>
<script type="module" src="./app.js"></script>
<!--<script type="module" src="./Combat.js"></script>-->
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
<script src="https://pixijs.download/release/pixi.js"></script>
</head>
<!--
Website Banner
-->
<header>
<div id="headerContainer">
<h1>Welcome to</h1>
<img src="./images/MazeQuest.png" alt="maze-quest-title-image">
</div>
</header>
<!--
Tab Contents
-->
<body>
<main>
<!--
Background audio initialization
-->
<audio src="In-the-hall-of-the-mountain-king.mp3" playsinline muted loop id="myaudio"></audio>
<!--
Tab Links
-->
<div class="tab">
<div class="btnGroup">
<button class="tablinks active" onclick="openTab(event, 'Hom')">Home</button>
<button class="tablinks" onclick="openTab(event, 'Sig')">Sign Up</button>
<button class="tablinks" onclick="openTab(event, 'In')">Login</button>
<button class="tablinks" id = "LevelBuilder" onclick="openTab(event, 'Bui')" disabled>Level Builder</button>
<button class="tablinks" id = "GameWindow" onclick="openTab(event, 'Gam')" disabled>Game Window</button>
<button class="tablinks" onclick="openTab(event, 'Sta')">Stats</button>
<button class="tablinks" onclick="openTab(event, 'Set')">Settings</button>
<button class="tablinks" id = "Account" onclick="openTab(event, 'Acc')" disabled>Account</button>
</div>
</div>
<style>
#Hom {
text-align: left;
}
</style>
<!--
Home Tab
-->
<div id="Hom" class="tabcontent">
<h2><u>Synopsis</u></h2>
<p>MazeQuest is an action-packed exploration game! Your journey begins as you wake up in the middle of an isolated room
with an adventure ahead of you. Your only choice? Run. On this journey, you will encounter numerous challenging
puzzles, resilient enemies, and mysterious rooms as you find the way forward.</p>
<h2><u>How To Play</u></h2>
<h3>Level Builder</h3>
<p>Customize your own rooms! Save them so you can edit or use them later.
While the template room is custom made by you, the user, the level will still possess a
uniquely-random layout that may contain base elements from the game.</p>
<h3>Game Window</h3>
<p>Greetings new player!
Your journey is just starting as you embark on this brand-new adventure! This game is comprised of many rooms that contain
mazes full of secrets and enemies. These paths can branch off from the exit, but they may contain helpful items that will
strengthen your character. Although, this can also make it a dangerous journey; be on the lookout for helpful items as you
choose to avoid or fight enemies.</p>
<h2><u>Controls</u></h2>
<h3>Movement</h3>
<p>Up: W<br>Down: S<br>Left: A<br>Right: D</p>
</div>
<!--
Account Creation
-->
<div id="Sig" class="tabcontent">
<form class="form" id="signup">
<form class="form" id = "signupContents">
<h1 class = "form__title">Create Account</h1>
<p class="form__input-message">Input Your Email with Your New Username and Password Below</p>
<div class = "form__input-group">
<input type = "email" id = "suEmail" class= "form__input" autofocus placeholder="Email">
</div>
<div class = "form__input-group">
<input type = "text" id ="username" class= "form__input" autofocus placeholder="Username">
</div>
<div class = "form__input-group">
<br />
<input type = "password" id = "suPassword" class= "form__input" autofocus placeholder="Password">
<input type = "password" id = "reSuPassword" class= "form__input" autofocus placeholder="Re-Enter Password">
<p>Password Must:</p>
<l style="width: 80%; height: 80%;">
<li>Be Greater than 8 Characters</li>
<li>Contain 1 Special Character</li>
<li>Contain 1 Uppercase Character</li>
<li>Contain 1 Number</li>
</l>
<p id = "passwordErrorMsg"></p>
</div>
<button class="form__button" type="submit">Continue</button>
</form>
</form>
</div>
<!--
Login Tab
-->
<div id="In" class="tabcontent">
<form class="form" id="login">
<h1 class = "form__title">Login</h1>
<p class="form__input-message">Input Your Email and Password Below</p>
<div class = "form__input-group">
<input type = "text" id = "liEmail" class= "form__input" autofocus placeholder="Email">
<p id = "emailErrorMsg" class="form__input-error-message"></p>
</div>
<div class = "form__input-group">
<input type = "password" id = "liPassword" class= "form__input" autofocus placeholder="Password">
<p id = "passwordErrorMsg" class="form__input-error-message"></p>
</div>
<button class="form__button" type="submit">Continue</button>
</form>
</div>
<!--
LevelBuilder Tab
-->
<div id="Bui" class="tabcontent">
<h1 class = "form__title">Level Builder</h1>
<div class="grid-container">
<div class="entities grid-item">
<h2>Give your level a name!</h2>
<p>Name must be less than 15 characters.</p>
<input type = "text" id = "levelName" class = "form__input" autofocus placeholder="Level Name">
<h4>Entities</h4>
<div id="entityList" class="entityList">
</div>
</div>
<div id="lbCanvasAnchor" class="canvas grid-item">
<canvas id="levelBuilderCanvas"></canvas>
</div>
<div class="vars grid-item">
</div>
<div class="prefabs grid-item">
<h4>Prefabs</h4>
<div class="dropdown">
<button class="dropbtn">Enemies</button>
<div class="dropdown-content">
<button class="prefab-button dropbtn" type="submit">Goblin</button>
<button class="prefab-button dropbtn" type="submit">Slime</button>
<button class="prefab-button dropbtn" type="submit">Dragon</button>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">Environment</button>
<div class="dropdown-content">
<button class="prefab-button dropbtn" type="submit">Wall</button>
<button class="prefab-button dropbtn" type="submit">Hedge</button>
<button class="prefab-button dropbtn" type="submit">Grass</button>
<button class="prefab-button dropbtn" type="submit">Path</button>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">Items</button>
<div class="dropdown-content">
<button class="prefab-button dropbtn" type="submit">Sword</button>
<button class="prefab-button dropbtn" type="submit">Spear</button>
<button class="prefab-button dropbtn" type="submit">Dragonslayer</button>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">Gizmos</button>
<div class="dropdown-content">
<button class="prefab-button dropbtn" type="submit">Exit Indicator</button>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">Custom</button>
<div class="dropdown-content">
<button class="disableNotif dropbtn" type="submit" disabled>No Custom Prefabs</button>
</div>
</div>
</div>
<div id = "userLevels" class="saved-levels grid-item">
<button class="form__button" type="submit" id = "saveLevel">Save Level</button>
<h2>Your Levels</h2>
<div id="levelList" class="entityList">
</div>
</div>
</div>
</div>
<!--
Game Window Tab
-->
<div id="Gam" class="tabcontent" >
<div id="HitboxContainer" style="position: relative;z-index: 1;">
<div id="hitbox" style="position: relative;z-index: 2;"></div>
</div>
<canvas id="canvas" style="position: relative;z-index: 0;"></canvas>
</div>
<script>
var element = document.getElementById('canvas');
var elementWidth = getComputedStyle(element).width;
console.log(elementWidth);
</script>
<style>
#HitboxContainer{
width: 385px;
margin:auto;
}
#hitbox{
height:175px;
width: 128px;
top: 115px;
margin-left: 100%;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
#canvas{
top:-70px;
}
</style>
<!--
LeaderBoard and Personal Statistics Tab Data
-->
<div id="Sta" class="tabcontent">
<h1 class = "form__title">Leaderboards</h1>
<h3>Enemies slain</h3>
<table style ="width:60%; border:1px solid #F6C90E; margin-left: auto;margin-right: auto;">
<tr>
<th id="enemySlayer1">Username#1</th>
<th id="U1E">Enemies slain</th>
</tr>
<tr>
<th id="enemySlayer2">Username#2</th>
<th id="U2E">Enemies slain</th>
</tr>
<tr>
<th id="enemySlayer3">Username#3</th>
<th id="U3E">Enemies slain</th>
</tr>
</table>
<h3>Dragons slain</h3>
<table style ="width:60%; border:1px solid #F6C90E; margin-left: auto;margin-right: auto;">
<tr>
<th id ="dragonSlayer1">Username#1</th>
<th id="U1D">Dragons slain</th>
</tr>
<tr>
<th id="dragonSlayer2">Username#2</th>
<th id="U2D">Dragons slain</th>
</tr>
<tr>
<th id="dragonSlayer3">Username#3</th>
<th id="U3D">Dragons slain</th>
</tr>
</table>
<h3>Mazes escaped</h3>
<table style ="width:60%; border:1px solid #F6C90E; margin-left: auto;margin-right: auto;">
<tr>
<th id="mazeRunner1">Username#1</th>
<th id="U1M">Mazes Escaped</th>
</tr>
<tr>
<th id="mazeRunner2">Username#2</th>
<th id="U2M">Mazes Escaped</th>
</tr>
<tr>
<th id="mazeRunner3">Username#3</th>
<th id="U3M">Mazes Escaped</th>
</tr>
</table>
<h1 class = "form__title" id = "personal_stat">Personal Stats</h1>
<table style ="width:60%; border:1px solid #F6C90E; margin-left: auto;margin-right: auto;">
<tr>
<th >Enemies slain</th>
<th id="PE">0</th>
</tr>
<tr>
<th >Dragons slain</th>
<th id="PD">0</th>
</tr>
<tr>
<th >Mazes Escaped</th>
<th id="PM">0</th>
</tr>
</table>
</div>
<!----
Settings Tab
-->
<div id="Set" class="tabcontent">
<h1 >Music</h1>
<h3>Experimental, music may not play in chrome browser</h3>
<table style ="width:100%">
<th style="width:50%">
<h2 >Sound Bar</h2>
<input type="range" min="1" max="100" value="100" id="slider">
<span id="display">1</span>
<script>
var audio = document.getElementById("myaudio");
var slider = document.getElementById("slider");
var output = document.getElementById("display");
output.innerHTML = slider.value;
slider.oninput = function() {
output.innerHTML = this.value;
audio.volume=(this.value)/100;
}
</script>
</th>
<th style="width:50%">
<h2 >Start/Mute</h2>
<input type="checkBox" id="box1" name="box1"/>
<script>
var audio = document.getElementById("myaudio");
document.getElementById('box1').addEventListener('click', function (e)
{
audio.play();
e = e || window.event;
audio.muted = !audio.muted;
e.preventDefault();
}, false);
</script>
</th>
</table>
<h1></h1>
</div>
<!--
Account tab. Contains Log out button and reset password fuctionality. Disabled by default
-->
<div id="Acc" class="tabcontent">
<h1 >Account</h1>
<table style ="width:100%">
<th style="width:50%">
<h2 >Reset Password</h2>
<form>
<p>Password Must:</p>
<l style="width: 80%; height: 80%;">
<li>Be Greater than 8 Characters</li>
<li>Contain 1 Special Character</li>
<li>Contain 1 Uppercase Character</li>
<li>Contain 1 Number</li>
</l>
<input type = "password" id = "newPassword" class= "form__input" autofocus placeholder="Password">
<input type = "password" id = "reNewPassword" class= "form__input" autofocus placeholder="Re-Enter Password">
<button id = "resetPassword" class="form__button" type="submit">Reset Password</button>
</form>
</th>
<th style="width:50%">
<h2>Log Out</h2>
<button id = "logout" class="form__button" type="submit">Here</button>
</th>
</table>
</div>
<!--
OpenTab Function, used in tab links
-->
<script>
function openTab(evt, name) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
if (evt.currentTarget != null)
{
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
evt.currentTarget.className += " active";
}
document.getElementById(name).style.display = "block";
}
openTab(new Event('PointerEvent'), 'Hom');
</script>
</main>
<!--
Hint Box
-->
<div id="changeH">You found the secret hint! Nothing's hidden here though... Look harder in The Maze!</div>
<script>
var elem = document.getElementById("changeH");
</script>
</body>
</html>