nova64 0.2.4 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/README.md +25 -8
  2. package/bin/nova64.js +165 -0
  3. package/dist/assets/console-CY_kygm3.js +14 -0
  4. package/dist/assets/console-CY_kygm3.js.map +1 -0
  5. package/dist/assets/main-l0sNRNKZ.js.map +1 -0
  6. package/dist/assets/sky/studio/nx.png +0 -0
  7. package/dist/assets/sky/studio/ny.png +0 -0
  8. package/dist/assets/sky/studio/nz.png +0 -0
  9. package/dist/assets/sky/studio/px.png +0 -0
  10. package/dist/assets/sky/studio/py.png +0 -0
  11. package/dist/assets/sky/studio/pz.png +0 -0
  12. package/dist/assets/vanilla-Dcuy32gi.js +2 -0
  13. package/dist/assets/vanilla-Dcuy32gi.js.map +1 -0
  14. package/dist/console.html +899 -0
  15. package/dist/docs/BENCHMARK.md +77 -0
  16. package/dist/docs/CHEATSHEET.md +255 -0
  17. package/dist/docs/EFFECTS_API_GUIDE.md +577 -0
  18. package/dist/docs/EFFECTS_QUICK_REFERENCE.md +331 -0
  19. package/dist/docs/FONT_CHARACTER_REFERENCE.md +219 -0
  20. package/dist/docs/FREE_GLB_ASSETS.md +330 -0
  21. package/dist/docs/FULLSCREEN_BUTTON_FEATURE.md +296 -0
  22. package/dist/docs/GAMEPAD_SUPPORT.md +348 -0
  23. package/dist/docs/GAME_IMPROVEMENTS.md +278 -0
  24. package/dist/docs/GAME_QUALITY_STATUS.md +300 -0
  25. package/dist/docs/MIGRATION_GUIDE.md +553 -0
  26. package/dist/docs/NOVA64_3D_API.md +356 -0
  27. package/dist/docs/NOVA64_API_REFERENCE.md +1406 -0
  28. package/dist/docs/NOVA64_UI_API.md +503 -0
  29. package/dist/docs/UI_SYSTEM_SUMMARY.md +445 -0
  30. package/dist/docs/VOXEL_ENGINE_GUIDE.md +662 -0
  31. package/dist/docs/VOXEL_QUICK_REFERENCE.md +386 -0
  32. package/dist/docs/api-3d.html +750 -0
  33. package/dist/docs/api-effects.html +385 -0
  34. package/dist/docs/api-improvements.md +121 -0
  35. package/dist/docs/api-skybox.html +407 -0
  36. package/dist/docs/api-sprites.html +321 -0
  37. package/dist/docs/api-voxel.html +337 -0
  38. package/dist/docs/api.html +543 -0
  39. package/dist/docs/assets.html +306 -0
  40. package/dist/docs/audio.html +340 -0
  41. package/dist/docs/blogs.html +286 -0
  42. package/dist/docs/collision.html +316 -0
  43. package/dist/docs/console.html +247 -0
  44. package/dist/docs/editor.html +297 -0
  45. package/dist/docs/font.html +247 -0
  46. package/dist/docs/framebuffer.html +247 -0
  47. package/dist/docs/fullscreen-button.html +297 -0
  48. package/dist/docs/gpu-systems.html +247 -0
  49. package/dist/docs/index.html +580 -0
  50. package/dist/docs/input.html +491 -0
  51. package/dist/docs/physics.html +311 -0
  52. package/dist/docs/screens.html +311 -0
  53. package/dist/docs/storage.html +311 -0
  54. package/dist/docs/textinput.html +332 -0
  55. package/dist/docs/ui.html +488 -0
  56. package/dist/examples/3d-advanced/code.js +695 -0
  57. package/dist/examples/adventure-comic-3d/code.js +342 -0
  58. package/dist/examples/audio-lab/code.js +150 -0
  59. package/dist/examples/boids-flocking/code.js +270 -0
  60. package/dist/examples/crystal-cathedral-3d/code.js +706 -0
  61. package/dist/examples/cyberpunk-city-3d/code.js +1383 -0
  62. package/dist/examples/demoscene/README.md +192 -0
  63. package/dist/examples/demoscene/code.js +1081 -0
  64. package/dist/examples/demoscene/meta.json +21 -0
  65. package/dist/examples/dungeon-crawler-3d/code.js +1117 -0
  66. package/dist/examples/f-zero-nova-3d/code.js +865 -0
  67. package/dist/examples/f-zero-nova-3d/code_old.js +1555 -0
  68. package/dist/examples/fps-demo-3d/code.js +744 -0
  69. package/dist/examples/game-of-life-3d/code.js +338 -0
  70. package/dist/examples/generative-art/code.js +632 -0
  71. package/dist/examples/hello-3d/code.js +325 -0
  72. package/dist/examples/hello-skybox/code.js +183 -0
  73. package/dist/examples/hello-world/code.js +19 -0
  74. package/dist/examples/input-showcase/code.js +109 -0
  75. package/dist/examples/instancing-demo/code.js +315 -0
  76. package/dist/examples/minecraft-demo/code.js +387 -0
  77. package/dist/examples/model-viewer-3d/code.js +114 -0
  78. package/dist/examples/mystical-realm-3d/code.js +1203 -0
  79. package/dist/examples/nature-explorer-3d/code.js +1318 -0
  80. package/dist/examples/particles-demo/code.js +522 -0
  81. package/dist/examples/pbr-showcase/code.js +140 -0
  82. package/dist/examples/physics-demo-3d/code.js +948 -0
  83. package/dist/examples/screen-demo/code.js +267 -0
  84. package/dist/examples/shooter-demo-3d/code.js +1286 -0
  85. package/dist/examples/space-combat-3d/IMPLEMENTATION_SUMMARY.md +109 -0
  86. package/dist/examples/space-combat-3d/README.md +135 -0
  87. package/dist/examples/space-combat-3d/code.js +1332 -0
  88. package/dist/examples/space-harrier-3d/code.js +923 -0
  89. package/dist/examples/star-fox-nova-3d/code.js +1116 -0
  90. package/dist/examples/star-fox-nova-3d/code_backup.js +410 -0
  91. package/dist/examples/star-fox-nova-3d/code_broken.js +1821 -0
  92. package/dist/examples/storage-quest/code.js +209 -0
  93. package/dist/examples/strider-demo-3d/IMPROVEMENT_OPTIONS.md +285 -0
  94. package/dist/examples/strider-demo-3d/cache-test.html +132 -0
  95. package/dist/examples/strider-demo-3d/code-fixed.js +582 -0
  96. package/dist/examples/strider-demo-3d/code-old.js +1537 -0
  97. package/dist/examples/strider-demo-3d/code.js +1462 -0
  98. package/dist/examples/strider-demo-3d/code.js.bak2 +1169 -0
  99. package/dist/examples/strider-demo-3d/fix-game.sh +53 -0
  100. package/dist/examples/super-plumber-64/README.md +128 -0
  101. package/dist/examples/super-plumber-64/code.js +1185 -0
  102. package/dist/examples/super-plumber-64/index.html +88 -0
  103. package/dist/examples/test-2d-overlay/code.js +32 -0
  104. package/dist/examples/test-font/code.js +51 -0
  105. package/dist/examples/test-minimal/code.js +21 -0
  106. package/dist/examples/ui-demo/code.js +306 -0
  107. package/dist/examples/wing-commander-space/README.md +180 -0
  108. package/dist/examples/wing-commander-space/code.js +1285 -0
  109. package/dist/examples/wizardry-3d/CHANGELOG.md +366 -0
  110. package/dist/examples/wizardry-3d/code.js +3928 -0
  111. package/dist/index.html +666 -0
  112. package/dist/os9-shell/assets/index-DIHfrTaW.css +1 -0
  113. package/dist/os9-shell/assets/index-KchE_ngx.js +483 -0
  114. package/dist/os9-shell/assets/index-KchE_ngx.js.map +1 -0
  115. package/dist/os9-shell/index.html +23 -0
  116. package/dist/os9-shell/nova-icon.svg +12 -0
  117. package/index.html +6 -1
  118. package/package.json +37 -32
  119. package/public/assets/sky/studio/nx.png +0 -0
  120. package/public/assets/sky/studio/ny.png +0 -0
  121. package/public/assets/sky/studio/nz.png +0 -0
  122. package/public/assets/sky/studio/px.png +0 -0
  123. package/public/assets/sky/studio/py.png +0 -0
  124. package/public/assets/sky/studio/pz.png +0 -0
  125. package/public/os9-shell/assets/index-KchE_ngx.js +483 -0
  126. package/public/os9-shell/assets/index-KchE_ngx.js.map +1 -0
  127. package/public/os9-shell/index.html +10 -1
  128. package/runtime/api-2d.js +301 -21
  129. package/runtime/api-3d/pbr.js +45 -1
  130. package/runtime/api-3d.js +1 -0
  131. package/runtime/api-effects.js +90 -3
  132. package/runtime/api-gameutils.js +476 -0
  133. package/runtime/api-generative.js +610 -0
  134. package/runtime/api-skybox.js +54 -0
  135. package/runtime/api-voxel.js +139 -28
  136. package/runtime/gpu-threejs.js +13 -9
  137. package/runtime/ui.js +2 -2
  138. package/src/main.js +24 -1
  139. package/public/os9-shell/assets/index-B1Uvacma.js +0 -32825
  140. package/public/os9-shell/assets/index-B1Uvacma.js.map +0 -1
@@ -0,0 +1,286 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Nova64 Blog Posts - Starcade9</title>
7
+ <style>
8
+ /* Minimal styling - content designed for easy Ghost copy/paste */
9
+ body { font-family: system-ui, -apple-system, sans-serif; max-width: 800px; margin: 0 auto; padding: 20px; line-height: 1.6; }
10
+ .blog-post { border: 1px solid #ddd; padding: 20px; margin: 20px 0; background: #fafafa; }
11
+ .blog-post h2 { margin-top: 0; }
12
+ .copy-btn { background: #333; color: #fff; border: none; padding: 8px 16px; cursor: pointer; margin-bottom: 10px; }
13
+ .copy-btn:hover { background: #555; }
14
+ hr { margin: 40px 0; }
15
+ code { background: #f0f0f0; padding: 2px 6px; }
16
+ </style>
17
+ </head>
18
+ <body>
19
+
20
+ <h1>Nova64 Blog Posts</h1>
21
+ <p>Clean, copy-paste ready content for Ghost blog at <a href="https://www.starcade9.io/">starcade9.io</a></p>
22
+
23
+ <hr>
24
+
25
+ <!-- ============================================================ -->
26
+ <!-- BLOG POST 1: INTRODUCTION -->
27
+ <!-- ============================================================ -->
28
+
29
+ <div class="blog-post">
30
+ <button class="copy-btn" onclick="copyContent('post1')">📋 Copy HTML</button>
31
+ <div id="post1">
32
+
33
+ <h2>Introducing Nova64: The Metaverse Arcade's Ultimate Virtual Console</h2>
34
+
35
+ <p><strong>A Starcade9 Creation</strong></p>
36
+
37
+ <p>We're building the future of retro gaming—and it lives inside the metaverse.</p>
38
+
39
+ <p>Meet <strong>Nova64</strong>, a fully-functional virtual console that brings the raw, unfiltered energy of Nintendo 64 and PlayStation 1 graphics into immersive 3D worlds. This isn't emulation. This is reinvention.</p>
40
+
41
+ <h3>What is Nova64?</h3>
42
+
43
+ <p>Nova64 is a JavaScript-powered 3D fantasy console built from the ground up for the metaverse. It features:</p>
44
+
45
+ <ul>
46
+ <li><strong>Authentic N64/PS1 Aesthetics</strong> – Low-poly models, vertex jitter, texture warping, and that nostalgic fog we all remember</li>
47
+ <li><strong>Three.js Rendering Engine</strong> – Hardware-accelerated 3D graphics with modern WebGL2</li>
48
+ <li><strong>Built for Metaverse Integration</strong> – Run games directly inside virtual worlds, arcades, and social spaces</li>
49
+ <li><strong>Developer-Friendly API</strong> – Create games with simple JavaScript—no complex toolchains required</li>
50
+ </ul>
51
+
52
+ <h3>Why We Built This</h3>
53
+
54
+ <p>At <a href="https://www.starcade9.io/">Starcade9</a>, we believe gaming should be social, accessible, and dripping with style. The metaverse needs more than static art galleries and virtual land speculation—it needs <em>actual games</em> that people want to play.</p>
55
+
56
+ <p>Nova64 is our answer. A virtual console that runs anywhere JavaScript runs, looks like the games we grew up playing, and plugs directly into metaverse environments.</p>
57
+
58
+ <h3>The Starcade9 Ecosystem</h3>
59
+
60
+ <p>Nova64 is part of a larger vision:</p>
61
+
62
+ <ul>
63
+ <li><strong><a href="https://www.starcade9.io/">Starcade9</a></strong> – The Metaverse Arcade. Our flagship destination for virtual gaming experiences.</li>
64
+ <li><strong><a href="https://retrogameprices.com/">RetroGamePrices.com</a></strong> – Our affiliated site tracking retro game valuations. Know what your collection is worth.</li>
65
+ <li><strong>Nova64</strong> – The engine that powers it all. Open, extensible, and built for the future.</li>
66
+ </ul>
67
+
68
+ <h3>What's Next</h3>
69
+
70
+ <p>We're actively developing Nova64 with new features dropping regularly:</p>
71
+
72
+ <ul>
73
+ <li>Voxel engine for Minecraft-style worlds</li>
74
+ <li>Physics system for realistic gameplay</li>
75
+ <li>UI framework for menus and HUDs</li>
76
+ <li>Skybox and effects systems for atmosphere</li>
77
+ <li>Full gamepad support</li>
78
+ </ul>
79
+
80
+ <p>Stay tuned. The arcade is just getting started.</p>
81
+
82
+ <p><strong>— The Starcade9 Team</strong></p>
83
+
84
+ </div>
85
+ </div>
86
+
87
+ <hr>
88
+
89
+ <!-- ============================================================ -->
90
+ <!-- BLOG POST 2: DEVELOPER ANNOUNCEMENT -->
91
+ <!-- ============================================================ -->
92
+
93
+ <div class="blog-post">
94
+ <button class="copy-btn" onclick="copyContent('post2')">📋 Copy HTML</button>
95
+ <div id="post2">
96
+
97
+ <h2>Nova64 Developer Preview: Build Games for the Metaverse</h2>
98
+
99
+ <p><strong>A Starcade9 Creation</strong></p>
100
+
101
+ <p>Calling all game developers, pixel artists, and retro enthusiasts. Nova64 is open for development.</p>
102
+
103
+ <h3>Create Games in Minutes</h3>
104
+
105
+ <p>Nova64's API is designed for speed. No massive game engines. No steep learning curves. Just JavaScript and creativity.</p>
106
+
107
+ <pre><code>// Create a spinning cube in 3 lines
108
+ const cube = createCube(2, 0xff0000, [0, 0, 0]);
109
+
110
+ export function update(dt) {
111
+ rotateMesh(cube, 0, dt, 0);
112
+ }
113
+
114
+ export function draw() {
115
+ // Rendering handled automatically
116
+ }</code></pre>
117
+
118
+ <h3>Features for Developers</h3>
119
+
120
+ <ul>
121
+ <li><strong>35+ API Functions</strong> – Primitives, cameras, lighting, fog, materials, and more</li>
122
+ <li><strong>Advanced Materials</strong> – Holographic, metallic, and emissive surfaces</li>
123
+ <li><strong>Screen Management</strong> – Built-in state machine for menus, gameplay, and game over screens</li>
124
+ <li><strong>Input System</strong> – Keyboard, mouse, and gamepad support out of the box</li>
125
+ <li><strong>2D Overlay System</strong> – Draw HUDs and UI elements over your 3D scenes</li>
126
+ <li><strong>Hot Reloading</strong> – See changes instantly during development</li>
127
+ </ul>
128
+
129
+ <h3>Example Games Included</h3>
130
+
131
+ <p>Nova64 ships with playable demos:</p>
132
+
133
+ <ul>
134
+ <li><strong>Star Fox Nova</strong> – Space combat shooter</li>
135
+ <li><strong>F-Zero Nova</strong> – High-speed racing</li>
136
+ <li><strong>Super Plumber 64</strong> – 3D platformer</li>
137
+ <li><strong>Minecraft Demo</strong> – Voxel world sandbox</li>
138
+ <li><strong>Cyberpunk City</strong> – Open world exploration</li>
139
+ </ul>
140
+
141
+ <h3>Get Started</h3>
142
+
143
+ <p>Clone the repo, run <code>pnpm dev</code>, and start building. Full documentation available at our docs site.</p>
144
+
145
+ <p>Your game could be the next title in <a href="https://www.starcade9.io/">The Metaverse Arcade</a>.</p>
146
+
147
+ <p><strong>— The Starcade9 Team</strong></p>
148
+
149
+ </div>
150
+ </div>
151
+
152
+ <hr>
153
+
154
+ <!-- ============================================================ -->
155
+ <!-- BLOG POST 3: TECH DEEP DIVE -->
156
+ <!-- ============================================================ -->
157
+
158
+ <div class="blog-post">
159
+ <button class="copy-btn" onclick="copyContent('post3')">📋 Copy HTML</button>
160
+ <div id="post3">
161
+
162
+ <h2>Inside Nova64: The Tech Behind The Metaverse Arcade</h2>
163
+
164
+ <p><strong>A Starcade9 Creation</strong></p>
165
+
166
+ <p>Nova64 isn't just another game engine. It's a purpose-built virtual console designed for a specific aesthetic and a specific future: the metaverse.</p>
167
+
168
+ <h3>The Stack</h3>
169
+
170
+ <ul>
171
+ <li><strong>Three.js 0.182.0</strong> – Latest version of the industry-standard WebGL library</li>
172
+ <li><strong>Vite</strong> – Lightning-fast development server with hot module replacement</li>
173
+ <li><strong>ES6 Modules</strong> – Modern JavaScript throughout</li>
174
+ <li><strong>Zero Dependencies</strong> – Just Three.js and you're running</li>
175
+ </ul>
176
+
177
+ <h3>N64/PS1 Aesthetic</h3>
178
+
179
+ <p>We deliberately recreate the visual quirks of 5th generation consoles:</p>
180
+
181
+ <ul>
182
+ <li><strong>Low-Poly Models</strong> – Clean geometric shapes with minimal polygons</li>
183
+ <li><strong>Vertex Snapping</strong> – That signature "wobble" on moving geometry</li>
184
+ <li><strong>Limited Color Palette</strong> – Vibrant but constrained like the classics</li>
185
+ <li><strong>Draw Distance Fog</strong> – Hide the horizon, create atmosphere</li>
186
+ <li><strong>Nearest-Neighbor Filtering</strong> – Crisp pixel textures, no blur</li>
187
+ </ul>
188
+
189
+ <h3>Metaverse-Ready Architecture</h3>
190
+
191
+ <p>Nova64 runs anywhere JavaScript runs:</p>
192
+
193
+ <ul>
194
+ <li>Embed in web-based metaverse platforms</li>
195
+ <li>Run in VR/AR headset browsers</li>
196
+ <li>Deploy to any static hosting</li>
197
+ <li>Integrate with Web3 and NFT systems</li>
198
+ </ul>
199
+
200
+ <h3>Performance First</h3>
201
+
202
+ <p>We've optimized for smooth gameplay on modest hardware:</p>
203
+
204
+ <ul>
205
+ <li>Efficient scene management</li>
206
+ <li>Smart asset loading</li>
207
+ <li>Batched rendering calls</li>
208
+ <li>Minimal garbage collection pressure</li>
209
+ </ul>
210
+
211
+ <h3>Join the Revolution</h3>
212
+
213
+ <p>The metaverse doesn't need another social platform. It needs games. Real games. Games that feel like the ones we grew up loving.</p>
214
+
215
+ <p><a href="https://www.starcade9.io/">Starcade9</a> is building that future. Nova64 is the engine.</p>
216
+
217
+ <p><strong>— The Starcade9 Team</strong></p>
218
+
219
+ </div>
220
+ </div>
221
+
222
+ <hr>
223
+
224
+ <!-- ============================================================ -->
225
+ <!-- BLOG POST 4: RETROGAMEPRICES INTEGRATION -->
226
+ <!-- ============================================================ -->
227
+
228
+ <div class="blog-post">
229
+ <button class="copy-btn" onclick="copyContent('post4')">📋 Copy HTML</button>
230
+ <div id="post4">
231
+
232
+ <h2>Retro Gaming Meets the Metaverse: Our Vision</h2>
233
+
234
+ <p><strong>A Starcade9 Creation</strong></p>
235
+
236
+ <p>Two worlds. One passion.</p>
237
+
238
+ <h3>The Physical: RetroGamePrices.com</h3>
239
+
240
+ <p>At <a href="https://retrogameprices.com/">RetroGamePrices.com</a>, we track the real-world value of retro video games. Collectors use our platform to understand market trends, verify authenticity, and make informed decisions about their physical collections.</p>
241
+
242
+ <p>It's the definitive resource for knowing what your games are worth.</p>
243
+
244
+ <h3>The Virtual: Starcade9 + Nova64</h3>
245
+
246
+ <p>But physical games have limits. Cartridges degrade. Consoles fail. Prices soar beyond reach.</p>
247
+
248
+ <p>That's where <a href="https://www.starcade9.io/">Starcade9</a> comes in. We're preserving the <em>experience</em> of retro gaming—not just the ROMs, but the feeling. The aesthetic. The joy of discovering a new game in an arcade.</p>
249
+
250
+ <p>Nova64 is our virtual console. It doesn't emulate old games—it enables new ones built in the same spirit.</p>
251
+
252
+ <h3>The Bridge</h3>
253
+
254
+ <p>Imagine this future:</p>
255
+
256
+ <ul>
257
+ <li>Own a rare physical game? Verify it on RetroGamePrices</li>
258
+ <li>Play its spiritual successor in the Starcade9 metaverse arcade</li>
259
+ <li>Connect with collectors and players who share your passion</li>
260
+ <li>Support developers creating new retro-styled experiences</li>
261
+ </ul>
262
+
263
+ <p>Physical and virtual. Collectible and playable. Past and future.</p>
264
+
265
+ <h3>This Is Starcade9</h3>
266
+
267
+ <p>The Metaverse Arcade isn't just a destination. It's a movement. Join us.</p>
268
+
269
+ <p><strong>— The Starcade9 Team</strong></p>
270
+
271
+ </div>
272
+ </div>
273
+
274
+ <hr>
275
+
276
+ <script>
277
+ function copyContent(id) {
278
+ const content = document.getElementById(id).innerHTML;
279
+ navigator.clipboard.writeText(content).then(() => {
280
+ alert('HTML copied to clipboard! Paste directly into Ghost.');
281
+ });
282
+ }
283
+ </script>
284
+
285
+ </body>
286
+ </html>
@@ -0,0 +1,316 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Collision Detection - Nova64 Documentation</title>
7
+ <style>
8
+ :root {
9
+ --bg-primary: #0f1115;
10
+ --bg-secondary: #151822;
11
+ --bg-tertiary: #1a1d2e;
12
+ --text-primary: #dcdfe4;
13
+ --text-secondary: #99a1b3;
14
+ --accent-cyan: #00ffff;
15
+ --accent-magenta: #ff0080;
16
+ --accent-yellow: #ffff00;
17
+ --border: #2a324a;
18
+ --code-bg: #1a1d2e;
19
+ }
20
+
21
+ * {
22
+ margin: 0;
23
+ padding: 0;
24
+ box-sizing: border-box;
25
+ }
26
+
27
+ body {
28
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
29
+ background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1625 50%, var(--bg-primary) 100%);
30
+ background-attachment: fixed;
31
+ color: var(--text-primary);
32
+ line-height: 1.6;
33
+ }
34
+
35
+ .container {
36
+ max-width: 1200px;
37
+ margin: 0 auto;
38
+ padding: 20px;
39
+ }
40
+
41
+ header {
42
+ background: var(--bg-secondary);
43
+ border: 2px solid var(--accent-cyan);
44
+ border-radius: 12px;
45
+ padding: 30px;
46
+ margin-bottom: 30px;
47
+ box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
48
+ }
49
+
50
+ h1 {
51
+ color: var(--accent-cyan);
52
+ font-size: 2.5em;
53
+ text-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
54
+ margin-bottom: 10px;
55
+ }
56
+
57
+ .back-link {
58
+ display: inline-block;
59
+ color: var(--accent-cyan);
60
+ text-decoration: none;
61
+ margin-bottom: 15px;
62
+ transition: color 0.3s ease;
63
+ }
64
+
65
+ .back-link:hover {
66
+ color: #33ffff;
67
+ text-decoration: underline;
68
+ }
69
+
70
+ .subtitle {
71
+ color: var(--text-secondary);
72
+ font-size: 1.1em;
73
+ }
74
+
75
+ section {
76
+ background: var(--bg-secondary);
77
+ border-left: 4px solid var(--accent-cyan);
78
+ padding: 25px;
79
+ margin-bottom: 30px;
80
+ border-radius: 8px;
81
+ }
82
+
83
+ h2 {
84
+ color: var(--accent-magenta);
85
+ font-size: 2em;
86
+ margin-bottom: 15px;
87
+ text-shadow: 0 0 10px rgba(255, 0, 128, 0.5);
88
+ }
89
+
90
+ h3 {
91
+ color: var(--accent-cyan);
92
+ font-size: 1.4em;
93
+ margin: 25px 0 15px 0;
94
+ }
95
+
96
+ .function {
97
+ background: var(--bg-tertiary);
98
+ border: 1px solid var(--border);
99
+ border-radius: 8px;
100
+ padding: 20px;
101
+ margin-bottom: 25px;
102
+ }
103
+
104
+ .function-sig {
105
+ font-family: 'Courier New', Courier, monospace;
106
+ font-size: 1.2em;
107
+ color: var(--accent-yellow);
108
+ margin-bottom: 15px;
109
+ padding: 10px;
110
+ background: var(--code-bg);
111
+ border-radius: 4px;
112
+ border-left: 3px solid var(--accent-yellow);
113
+ }
114
+
115
+ .param-list, .return-info {
116
+ margin: 15px 0;
117
+ }
118
+
119
+ .param {
120
+ padding: 8px 0;
121
+ border-bottom: 1px solid var(--border);
122
+ }
123
+
124
+ .param:last-child {
125
+ border-bottom: none;
126
+ }
127
+
128
+ .param-name {
129
+ color: var(--accent-cyan);
130
+ font-weight: bold;
131
+ font-family: 'Courier New', Courier, monospace;
132
+ }
133
+
134
+ .param-type {
135
+ color: var(--accent-magenta);
136
+ font-style: italic;
137
+ font-size: 0.9em;
138
+ }
139
+
140
+ .example {
141
+ background: var(--code-bg);
142
+ border: 1px solid var(--border);
143
+ border-radius: 8px;
144
+ padding: 20px;
145
+ margin: 15px 0;
146
+ overflow-x: auto;
147
+ }
148
+
149
+ .example-title {
150
+ color: var(--accent-yellow);
151
+ font-weight: bold;
152
+ margin-bottom: 10px;
153
+ }
154
+
155
+ pre {
156
+ margin: 0;
157
+ font-family: 'Courier New', Courier, monospace;
158
+ line-height: 1.5;
159
+ }
160
+
161
+ code {
162
+ color: var(--text-primary);
163
+ }
164
+
165
+ .note {
166
+ background: var(--bg-tertiary);
167
+ border-left: 4px solid var(--accent-yellow);
168
+ padding: 15px;
169
+ margin: 15px 0;
170
+ border-radius: 4px;
171
+ }
172
+
173
+ .note-title {
174
+ color: var(--accent-yellow);
175
+ font-weight: bold;
176
+ margin-bottom: 10px;
177
+ }
178
+
179
+ table {
180
+ width: 100%;
181
+ border-collapse: collapse;
182
+ margin: 15px 0;
183
+ }
184
+
185
+ th, td {
186
+ padding: 12px;
187
+ text-align: left;
188
+ border: 1px solid var(--border);
189
+ }
190
+
191
+ th {
192
+ background: var(--bg-tertiary);
193
+ color: var(--accent-cyan);
194
+ font-weight: bold;
195
+ }
196
+
197
+ tr:nth-child(even) {
198
+ background: var(--bg-tertiary);
199
+ }
200
+
201
+ footer {
202
+ text-align: center;
203
+ padding: 30px 20px;
204
+ color: var(--text-secondary);
205
+ border-top: 1px solid var(--border);
206
+ margin-top: 40px;
207
+ }
208
+
209
+ ul {
210
+ margin-left: 20px;
211
+ margin-top: 10px;
212
+ }
213
+
214
+ li {
215
+ margin: 5px 0;
216
+ }
217
+ </style>
218
+ </head>
219
+ <body>
220
+ <div class="container">
221
+ <a href="index.html" class="back-link">← Back to Documentation Index</a>
222
+
223
+ <header>
224
+ <h1>💥 Collision Detection</h1>
225
+ <p class="subtitle">AABB, circle, and tilemap collision detection utilities</p>
226
+ </header>
227
+
228
+
229
+ <section>
230
+ <h2>📋 Overview</h2>
231
+ <p>The Collision Detection system provides fast and accurate collision checking for boxes (AABB), circles, and tile-based maps.</p>
232
+
233
+ <div class="note">
234
+ <div class="note-title">💡 Collision Types</div>
235
+ <ul><li><strong>AABB</strong> - Axis-Aligned Bounding Box (rectangles)</li><li><strong>Circle</strong> - Circular collision detection</li><li><strong>Tilemap</strong> - Grid-based collision for platformers</li><li><strong>Raycasting</strong> - Line-of-sight checks</li></ul>
236
+ </div>
237
+
238
+
239
+ </section>
240
+
241
+ <section>
242
+ <h2>💥 Collision Functions</h2>
243
+
244
+
245
+
246
+ <div class="function">
247
+ <div class="function-sig">checkAABB(box1, box2)</div>
248
+ <p>Checks if two axis-aligned boxes overlap.</p>
249
+
250
+ <div class="param-list">
251
+
252
+ <div class="param">
253
+ <span class="param-name">box1</span>
254
+ <span class="param-type">object {x, y, width, height}</span> - First box
255
+ </div>
256
+
257
+ <div class="param">
258
+ <span class="param-name">box2</span>
259
+ <span class="param-type">object {x, y, width, height}</span> - Second box
260
+ </div>
261
+
262
+ </div>
263
+
264
+
265
+ <div class="return-info">
266
+ <strong>Returns:</strong> <span class="param-type">boolean</span> - true if boxes overlap
267
+ </div>
268
+
269
+
270
+ <div class="example">
271
+ <div class="example-title">Example:</div>
272
+ <pre><code>if (checkAABB(player, enemy)) { /* collision! */ }</code></pre>
273
+ </div>
274
+
275
+ </div>
276
+
277
+ <div class="function">
278
+ <div class="function-sig">checkCircle(circle1, circle2)</div>
279
+ <p>Checks if two circles overlap.</p>
280
+
281
+ <div class="param-list">
282
+
283
+ <div class="param">
284
+ <span class="param-name">circle1</span>
285
+ <span class="param-type">object {x, y, radius}</span> - First circle
286
+ </div>
287
+
288
+ <div class="param">
289
+ <span class="param-name">circle2</span>
290
+ <span class="param-type">object {x, y, radius}</span> - Second circle
291
+ </div>
292
+
293
+ </div>
294
+
295
+
296
+ <div class="return-info">
297
+ <strong>Returns:</strong> <span class="param-type">boolean</span> - true if circles overlap
298
+ </div>
299
+
300
+
301
+ <div class="example">
302
+ <div class="example-title">Example:</div>
303
+ <pre><code>if (checkCircle(ball, hole)) { /* scored! */ }</code></pre>
304
+ </div>
305
+
306
+ </div>
307
+
308
+ </section>
309
+
310
+
311
+ <footer>
312
+ <p>Nova64 Fantasy Console © 2025 | <a href="index.html" style="color: var(--accent-cyan);">Back to Documentation</a></p>
313
+ </footer>
314
+ </div>
315
+ </body>
316
+ </html>