-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
654 lines (575 loc) · 27.4 KB
/
index.html
File metadata and controls
654 lines (575 loc) · 27.4 KB
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
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
<!--
Toolbox Aid
David Quesenberry
03/21/2026
index.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>HTML JavaScript Gaming</title>
<link rel="icon" href="favicon.ico" />
<style>
:root{
--bg:#0f1115;
--panel:#171a21;
--panel2:#1d2230;
--text:#eef2f7;
--muted:#a9b3c3;
--line:#2b3242;
--accent:#6cb8ff;
--accent2:#8df0c8;
--game:#2f9e44;
--demo:#1971c2;
--tool:#9c36b5;
--docs:#6c757d;
--playable:#2b8a3e;
--experimental:#e0a800;
--wip:#d6336c;
}
*{ box-sizing:border-box; }
body{
margin:0;
font-family:Arial, Helvetica, sans-serif;
background:linear-gradient(180deg, #0d1015 0%, #131722 100%);
color:var(--text);
}
.wrap{
max-width:1300px;
margin:0 auto;
padding:32px 24px 64px;
}
header{
margin-bottom:28px;
}
h1{
margin:0 0 8px;
font-size:2.2rem;
line-height:1.1;
}
.subtitle{
color:var(--muted);
max-width:900px;
line-height:1.5;
}
.toolbar{
display:flex;
flex-wrap:wrap;
gap:12px;
margin:28px 0 10px;
align-items:center;
}
.search{
flex:1 1 340px;
min-width:240px;
}
.search input{
width:100%;
padding:12px 14px;
border-radius:10px;
border:1px solid var(--line);
background:#0f1420;
color:var(--text);
outline:none;
font-size:15px;
}
.search input:focus{
border-color:var(--accent);
box-shadow:0 0 0 3px rgba(108,184,255,0.14);
}
.filters{
display:flex;
flex-wrap:wrap;
gap:8px;
}
.filter-btn{
border:1px solid var(--line);
background:var(--panel);
color:var(--text);
padding:10px 12px;
border-radius:999px;
cursor:pointer;
font-size:14px;
}
.filter-btn.active,
.filter-btn:hover{
border-color:var(--accent);
color:#fff;
}
.section{
margin-top:36px;
}
.section h2{
margin:0 0 8px;
font-size:1.35rem;
}
.section p{
margin:0 0 18px;
color:var(--muted);
line-height:1.5;
}
.grid{
display:grid;
grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
gap:18px;
}
.card{
background:linear-gradient(180deg, var(--panel) 0%, var(--panel2) 100%);
border:1px solid var(--line);
border-radius:16px;
padding:18px;
transition:transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.card:hover{
transform:translateY(-2px);
border-color:#4d638c;
box-shadow:0 8px 24px rgba(0,0,0,.22);
}
.card.hidden{
display:none;
}
.title-row{
display:flex;
justify-content:space-between;
gap:12px;
align-items:flex-start;
margin-bottom:8px;
}
.card h3{
margin:0;
font-size:1.05rem;
line-height:1.35;
}
.card a{
color:var(--accent);
text-decoration:none;
}
.card a:hover{
text-decoration:underline;
}
.desc{
color:var(--muted);
font-size:14px;
line-height:1.5;
min-height:64px;
margin-bottom:12px;
}
.path{
font-family:Consolas, monospace;
font-size:12px;
color:#8f9bb0;
background:#101521;
border:1px solid #253047;
border-radius:8px;
padding:7px 9px;
margin-bottom:12px;
word-break:break-all;
}
.badges{
display:flex;
flex-wrap:wrap;
gap:8px;
}
.badge{
display:inline-block;
font-size:11px;
line-height:1;
padding:6px 8px;
border-radius:999px;
color:#fff;
font-weight:bold;
letter-spacing:.2px;
}
.game{ background:var(--game); }
.demo{ background:var(--demo); }
.tool{ background:var(--tool); }
.docs{ background:var(--docs); }
.playable{ background:var(--playable); }
.experimental{ background:#9a6b00; }
.wip{ background:var(--wip); }
.footer-note{
margin-top:42px;
color:var(--muted);
font-size:14px;
line-height:1.6;
border-top:1px solid var(--line);
padding-top:20px;
}
.count{
color:var(--muted);
font-size:14px;
margin:12px 0 0;
}
@media (max-width: 640px){
.wrap{
padding:24px 16px 48px;
}
h1{
font-size:1.8rem;
}
}
</style>
</head>
<body>
<div class="wrap">
<header>
<h1>HTML JavaScript Gaming</h1>
<div class="subtitle">
A 2D JavaScript game engine playground with playable games, learning demos, tools, and engine documentation.
</div>
<div class="toolbar">
<div class="search">
<input id="searchInput" type="text" placeholder="Search games, demos, tools, and docs..." />
</div>
<div class="filters">
<button class="filter-btn active" data-filter="all">All</button>
<button class="filter-btn" data-filter="game">Games</button>
<button class="filter-btn" data-filter="demo">Learning Labs</button>
<button class="filter-btn" data-filter="tool">Tools</button>
<button class="filter-btn" data-filter="docs">Docs</button>
</div>
</div>
<div id="resultCount" class="count"></div>
</header>
<section class="section">
<h2>⭐ Featured</h2>
<p>Start here if you want a quick tour of the repo.</p>
<div class="grid">
<article class="card item" data-type="game" data-search="asteroids classic arcade shooter playable game">
<div class="title-row">
<h3><a href="games/Asteroids/index.html">Asteroids</a></h3>
</div>
<div class="desc">Classic arcade-style asteroid shooter built on the shared engine structure.</div>
<div class="path">games/Asteroids/index.html</div>
<div class="badges">
<span class="badge game">Game</span>
<span class="badge playable">Playable</span>
</div>
</article>
<article class="card item" data-type="game" data-search="frogger traffic river crossing experimental game">
<div class="title-row">
<h3><a href="games/Frogger/index.html">Frogger</a></h3>
</div>
<div class="desc">Arcade crossing game with lanes, hazards, level logic, and UI systems.</div>
<div class="path">games/Frogger/index.html</div>
<div class="badges">
<span class="badge game">Game</span>
<span class="badge experimental">Experimental</span>
</div>
</article>
<article class="card item" data-type="tool" data-search="sprite editor pixel art tool sprites">
<div class="title-row">
<h3><a href="tools/SpriteEditor/index.html">SpriteEditor</a></h3>
</div>
<div class="desc">Pixel and sprite editing tool for creating art and experimenting with sprite workflows.</div>
<div class="path">tools/SpriteEditor/index.html</div>
<div class="badges">
<span class="badge tool">Tool</span>
</div>
</article>
<article class="card item" data-type="demo" data-search="solar system sample orbit engine gamebase gameobjectsystem demo">
<div class="title-row">
<h3><a href="samples/visual/Solar%20System/index.html">Solar System Sample</a></h3>
</div>
<div class="desc">Compact engine-driven sample showing `GameBase`, states, controls, focus, zoom, and object-system ownership.</div>
<div class="path">samples/visual/Solar System/index.html</div>
<div class="badges">
<span class="badge demo">Demo</span>
</div>
</article>
<article class="card item" data-type="demo" data-search="2d side scroll tile map camera scrolling engine demo">
<div class="title-row">
<h3><a href="samples/engine/2D%20side%20scroll%20tile%20map/index.html">2D Side Scroll Tile Map</a></h3>
</div>
<div class="desc">Tile map, scrolling, and side-view movement demo for engine and level experimentation.</div>
<div class="path">samples/engine/2D side scroll tile map/index.html</div>
<div class="badges">
<span class="badge demo">Demo</span>
<span class="badge experimental">Experimental</span>
</div>
</article>
</div>
</section>
<section class="section">
<h2>🎮 Playable Games</h2>
<p>These are game-style projects intended to be played rather than just studied.</p>
<div class="grid">
<article class="card item" data-type="game" data-search="asteroids game arcade shooter">
<h3><a href="games/Asteroids/index.html">Asteroids</a></h3>
<div class="desc">Ship, bullets, asteroids, UFOs, and arcade gameplay flow.</div>
<div class="path">games/Asteroids/index.html</div>
<div class="badges">
<span class="badge game">Game</span>
<span class="badge playable">Playable</span>
</div>
</article>
<article class="card item" data-type="game" data-search="frogger game crossing experimental">
<h3><a href="games/Frogger/index.html">Frogger</a></h3>
<div class="desc">Cross roads and hazards using timing, positioning, and collision logic.</div>
<div class="path">games/Frogger/index.html</div>
<div class="badges">
<span class="badge game">Game</span>
<span class="badge experimental">Experimental</span>
</div>
</article>
<article class="card item" data-type="game" data-search="pong game paddle puck">
<h3><a href="games/Pong%20Game/index.html">Pong Game</a></h3>
<div class="desc">Paddles, puck movement, score handling, and classic arcade loop.</div>
<div class="path">games/Pong Game/index.html</div>
<div class="badges">
<span class="badge game">Game</span>
<span class="badge playable">Playable</span>
</div>
</article>
<article class="card item" data-type="game" data-search="snake game grid movement">
<h3><a href="games/Snake/index.html">Snake</a></h3>
<div class="desc">Grid-based movement, growth logic, and classic score-chasing gameplay.</div>
<div class="path">games/Snake/index.html</div>
<div class="badges">
<span class="badge game">Game</span>
<span class="badge playable">Playable</span>
</div>
</article>
<article class="card item" data-type="game" data-search="space invaders game shooter waves enemies">
<h3><a href="games/Space%20Invaders/index.html">Space Invaders</a></h3>
<div class="desc">Enemy waves, lasers, shields, and arcade shooter progression.</div>
<div class="path">games/Space Invaders/index.html</div>
<div class="badges">
<span class="badge game">Game</span>
<span class="badge experimental">Experimental</span>
</div>
</article>
<article class="card item" data-type="game" data-search="tic tac toe board strategy game">
<h3><a href="games/Tic-Tac-Toe/index.html">Tic-Tac-Toe</a></h3>
<div class="desc">Turn-based board game with players, board logic, and game state handling.</div>
<div class="path">games/Tic-Tac-Toe/index.html</div>
<div class="badges">
<span class="badge game">Game</span>
<span class="badge playable">Playable</span>
</div>
</article>
<article class="card item" data-type="game" data-search="connect 4 board game">
<h3><a href="games/Connect%204/index.html">Connect 4</a></h3>
<div class="desc">Grid-based connection game for experimenting with board and win logic.</div>
<div class="path">games/Connect 4/index.html</div>
<div class="badges">
<span class="badge game">Game</span>
<span class="badge playable">Playable</span>
</div>
</article>
<article class="card item" data-type="game" data-search="box drop physics game">
<h3><a href="games/Box%20Drop/index.html">Box Drop</a></h3>
<div class="desc">Small game experiment focused on motion and object interaction.</div>
<div class="path">games/Box Drop/index.html</div>
<div class="badges">
<span class="badge game">Game</span>
<span class="badge playable">Playable</span>
</div>
</article>
</div>
</section>
<section class="section">
<h2>🧪 Learning Labs / Tech Demos</h2>
<p>Focused experiments for learning mechanics, engine features, rendering, input, and simulation.</p>
<div class="grid">
<article class="card item" data-type="demo" data-search="tile map side scroll camera demo">
<h3><a href="samples/engine/2D%20side%20scroll%20tile%20map/index.html">2D Side Scroll Tile Map</a></h3>
<div class="desc">Scrolling map and hero movement demo for level and camera work.</div>
<div class="path">samples/engine/2D side scroll tile map/index.html</div>
<div class="badges">
<span class="badge demo">Demo</span>
<span class="badge experimental">Experimental</span>
</div>
</article>
<article class="card item" data-type="demo" data-search="draw shapes canvas demo">
<h3><a href="samples/visual/Draw%20Shapes/index.html">Draw Shapes</a></h3>
<div class="desc">Canvas drawing practice for basic rendering primitives and layout.</div>
<div class="path">samples/visual/Draw Shapes/index.html</div>
<div class="badges">
<span class="badge demo">Demo</span>
</div>
</article>
<article class="card item" data-type="demo" data-search="move objects motion demo">
<h3><a href="samples/visual/Move%20Objects/index.html">Move Objects</a></h3>
<div class="desc">Movement and object update demo for experimenting with motion logic.</div>
<div class="path">samples/visual/Move Objects/index.html</div>
<div class="badges">
<span class="badge demo">Demo</span>
</div>
</article>
<article class="card item" data-type="demo" data-search="full screen gaming fullscreen demo">
<h3><a href="samples/visual/Fullscreen%20Gaming/index.html">Fullscreen Gaming</a></h3>
<div class="desc">Fullscreen behavior and browser display testing for game presentation.</div>
<div class="path">samples/visual/Fullscreen Gaming/index.html</div>
<div class="badges">
<span class="badge demo">Demo</span>
</div>
</article>
<article class="card item" data-type="demo" data-search="solar system sample orbit engine demo">
<h3><a href="samples/visual/Solar%20System/index.html">Solar System Sample</a></h3>
<div class="desc">Engine-driven orbit simulation sample with states, controls, focus, zoom, and object-system ownership.</div>
<div class="path">samples/visual/Solar System/index.html</div>
<div class="badges">
<span class="badge demo">Demo</span>
</div>
</article>
<article class="card item" data-type="demo" data-search="sample game engine learning demo">
<h3><a href="samples/engine/Game%20Engine/index.html">Game Engine</a></h3>
<div class="desc">Learning example showing the engine template and project structure.</div>
<div class="path">samples/engine/Game Engine/index.html</div>
<div class="badges">
<span class="badge demo">Demo</span>
</div>
</article>
<article class="card item" data-type="demo" data-search="sample keyboard input demo">
<h3><a href="samples/input/Keyboard/index.html">Keyboard</a></h3>
<div class="desc">Keyboard input handling and interaction demo.</div>
<div class="path">samples/input/Keyboard/index.html</div>
<div class="badges">
<span class="badge demo">Demo</span>
</div>
</article>
<article class="card item" data-type="demo" data-search="sample mouse input demo">
<h3><a href="samples/input/Mouse/index.html">Mouse</a></h3>
<div class="desc">Mouse input testing and interaction demo.</div>
<div class="path">samples/input/Mouse/index.html</div>
<div class="badges">
<span class="badge demo">Demo</span>
</div>
</article>
<article class="card item" data-type="demo" data-search="sample gamecontrollers controller demo">
<h3><a href="samples/input/GameControllers/index.html">GameControllers</a></h3>
<div class="desc">Controller and gamepad input experimentation.</div>
<div class="path">samples/input/GameControllers/index.html</div>
<div class="badges">
<span class="badge demo">Demo</span>
</div>
</article>
<article class="card item" data-type="demo" data-search="sample particle particle system demo">
<h3><a href="samples/visual/Particle/index.html">Particle</a></h3>
<div class="desc">Particle effect experiments for explosions, sparks, and visual feedback.</div>
<div class="path">samples/visual/Particle/index.html</div>
<div class="badges">
<span class="badge demo">Demo</span>
</div>
</article>
<article class="card item" data-type="demo" data-search="sample audio sound demo">
<h3><a href="samples/output/Audio/index.html">Audio</a></h3>
<div class="desc">Audio playback and sound experimentation.</div>
<div class="path">samples/output/Audio/index.html</div>
<div class="badges">
<span class="badge demo">Demo</span>
</div>
</article>
<article class="card item" data-type="demo" data-search="sample synthesizer synth music demo">
<h3><a href="samples/output/Synthesizer/index.html">Synthesizer</a></h3>
<div class="desc">Synth and sound-generation demo for music and audio experimentation.</div>
<div class="path">samples/output/Synthesizer/index.html</div>
<div class="badges">
<span class="badge demo">Demo</span>
</div>
</article>
<article class="card item" data-type="demo" data-search="sample midi player midi demo">
<h3><a href="samples/output/MIDI%20Player/index.html">MIDI Player</a></h3>
<div class="desc">MIDI playback experiment for engine audio capabilities.</div>
<div class="path">samples/output/MIDI Player/index.html</div>
<div class="badges">
<span class="badge demo">Demo</span>
</div>
</article>
</div>
</section>
<section class="section">
<h2>🛠 Tools</h2>
<p>Development helpers and utilities used alongside the games and demos.</p>
<div class="grid">
<article class="card item" data-type="tool" data-search="sprite editor tool pixel art">
<h3><a href="tools/SpriteEditor/index.html">SpriteEditor</a></h3>
<div class="desc">Sprite and pixel-art editing tool for building game visuals and testing workflows.</div>
<div class="path">tools/SpriteEditor/index.html</div>
<div class="badges">
<span class="badge tool">Tool</span>
</div>
</article>
</div>
</section>
<section class="section">
<h2>📚 Documentation</h2>
<p>Project docs for setup, architecture, and sprite-related engine usage.</p>
<div class="grid">
<article class="card item" data-type="docs" data-search="getting started docs setup">
<h3><a href="https://github.com/ToolboxAid/HTML-JavaScript-Gaming/blob/main/docs/getting-started.md">Getting Started</a></h3>
<div class="desc">How to run the repo, explore the engine, and open the projects.</div>
<div class="path">docs/getting-started.md</div>
<div class="badges">
<span class="badge docs">Docs</span>
</div>
</article>
<article class="card item" data-type="docs" data-search="game engine architecture docs engine structure">
<h3><a href="https://github.com/ToolboxAid/HTML-JavaScript-Gaming/blob/main/docs/game-engine-architecture.md">Game Engine Architecture</a></h3>
<div class="desc">Overview of the engine layout, shared systems, and project direction.</div>
<div class="path">docs/game-engine-architecture.md</div>
<div class="badges">
<span class="badge docs">Docs</span>
</div>
</article>
<article class="card item" data-type="docs" data-search="sprite system docs animation rendering">
<h3><a href="https://github.com/ToolboxAid/HTML-JavaScript-Gaming/blob/main/docs/sprite-system.md">Sprite System</a></h3>
<div class="desc">Notes on sprite usage, rendering, and animation concepts in the repo.</div>
<div class="path">docs/sprite-system.md</div>
<div class="badges">
<span class="badge docs">Docs</span>
</div>
</article>
<article class="card item" data-type="docs" data-search="readme docs overview">
<h3><a href="https://github.com/ToolboxAid/HTML-JavaScript-Gaming/blob/main/README.md">README</a></h3>
<div class="desc">Top-level project overview and repository notes.</div>
<div class="path">README.md</div>
<div class="badges">
<span class="badge docs">Docs</span>
</div>
</article>
</div>
</section>
<div class="footer-note">
Open this repo through a local web server for the best results. Some browsers restrict module loading and asset access when opening files directly with <code>file:///</code>.
</div>
</div>
<script>
const searchInput = document.getElementById('searchInput');
const buttons = document.querySelectorAll('.filter-btn');
const items = document.querySelectorAll('.item');
const resultCount = document.getElementById('resultCount');
let activeFilter = 'all';
function updateResults() {
const query = searchInput.value.trim().toLowerCase();
let visible = 0;
items.forEach(item => {
const type = item.dataset.type || '';
const text = item.dataset.search || '';
const filterMatch = activeFilter === 'all' || type === activeFilter;
const searchMatch = !query || text.includes(query);
if (filterMatch && searchMatch) {
item.classList.remove('hidden');
visible++;
} else {
item.classList.add('hidden');
}
});
resultCount.textContent = visible + ' item' + (visible === 1 ? '' : 's') + ' shown';
}
buttons.forEach(button => {
button.addEventListener('click', () => {
buttons.forEach(btn => btn.classList.remove('active'));
button.classList.add('active');
activeFilter = button.dataset.filter;
updateResults();
});
});
searchInput.addEventListener('input', updateResults);
updateResults();
</script>
</body>
</html>