-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
417 lines (402 loc) · 23.7 KB
/
Copy pathindex.html
File metadata and controls
417 lines (402 loc) · 23.7 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
<!doctype html>
<!-- SPDX-License-Identifier: AGPL-3.0-or-later
Copyright (C) 2026 Tobias Bäumer — part of Codeenstein 3D (see LICENSE) -->
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Codeenstein 3D</title>
<!-- SEO — see doc/dev/decisions.md's SEO entry for the choices behind these -->
<meta
name="description"
content="Turn any codebase into a playable retro 3D shooter — every file, function, and comment becomes a level, enemy, or secret. No level design, just your own code."
/>
<link rel="canonical" href="https://codeenstein3d.mcdope.org/" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Codeenstein 3D" />
<meta property="og:title" content="Codeenstein 3D — turn your code into a playable dungeon" />
<meta
property="og:description"
content="Turn any codebase into a playable retro 3D shooter — every file, function, and comment becomes a level, enemy, or secret. No level design, just your own code."
/>
<meta property="og:url" content="https://codeenstein3d.mcdope.org/" />
<meta property="og:image" content="https://codeenstein3d.mcdope.org/og-image.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:locale" content="en_US" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Codeenstein 3D — turn your code into a playable dungeon" />
<meta
name="twitter:description"
content="Turn any codebase into a playable retro 3D shooter — every file, function, and comment becomes a level, enemy, or secret. No level design, just your own code."
/>
<meta name="twitter:image" content="https://codeenstein3d.mcdope.org/og-image.png" />
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "VideoGame",
"name": "Codeenstein 3D",
"description": "Turn any codebase into a playable retro 3D shooter — every file, function, and comment becomes a level, enemy, or secret.",
"url": "https://codeenstein3d.mcdope.org/",
"image": "https://codeenstein3d.mcdope.org/og-image.png",
"genre": ["Shooter", "Roguelike"],
"applicationCategory": "Game",
"operatingSystem": "Any (runs in a web browser)",
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
}
}
</script>
<!-- Favicons — see doc/dev/decisions.md's Favicons entry for how these were generated -->
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="48x48" href="/favicon-48x48.png" />
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="manifest" href="/site.webmanifest" />
<meta name="theme-color" content="#1a1a1f" />
<meta name="msapplication-config" content="/browserconfig.xml" />
</head>
<body>
<noscript
>Codeenstein 3D requires JavaScript (WebAssembly parsing + Canvas rendering, entirely
client-side) to run — please enable it to play.</noscript
>
<div id="app">
<aside id="sidebar">
<header id="sidebar-header">
<h1><img src="/sidebar-logo.webp" alt="Codeenstein 3D" class="sidebar-logo" /></h1>
<p class="sidebar-section-title">Workspace</p>
<div id="launch-tabs" class="launch-tabs" role="tablist" aria-label="Workspace and settings tabs">
<button id="tab-local" class="tab-btn" type="button" role="tab" aria-selected="true" aria-controls="tab-panel-local">Local</button>
<button id="tab-continue" class="tab-btn" type="button" role="tab" aria-selected="false" aria-controls="tab-panel-continue" style="display: none">Continue</button>
<button id="tab-repo" class="tab-btn" type="button" role="tab" aria-selected="false" aria-controls="tab-panel-repo">Repo</button>
<button id="tab-demo" class="tab-btn" type="button" role="tab" aria-selected="false" aria-controls="tab-panel-demo">Demos</button>
<button id="tab-multiplayer" class="tab-btn" type="button" role="tab" aria-selected="false" aria-controls="tab-panel-multiplayer" disabled style="display: none">Multiplayer</button>
<!-- The one tab that doesn't start a run: all persisted settings
live behind it (the sections used to sit permanently below,
eating vertical space the file tree can now use). The gear
glyph keeps six flex tabs from squeezing the text labels. -->
<button id="tab-settings" class="tab-btn" type="button" role="tab" aria-selected="false" aria-controls="tab-panel-settings" aria-label="Settings" title="Settings">⚙</button>
</div>
<div id="tab-panel-local" class="tab-panel" role="tabpanel" aria-labelledby="tab-local">
<button id="select-workspace" type="button">📁 Select Workspace</button>
</div>
<div id="tab-panel-continue" class="tab-panel" role="tabpanel" aria-labelledby="tab-continue" hidden>
<button id="continue-run" type="button">📁 Continue Run</button>
</div>
<div id="tab-panel-repo" class="tab-panel" role="tabpanel" aria-labelledby="tab-repo" hidden>
<label id="repo-input-label" for="repo-input" class="settings-label">Repository</label>
<input
id="repo-input"
type="text"
placeholder="GitHub / GitLab / Codeberg URL"
autocomplete="off"
spellcheck="false"
/>
<button id="load-repo" type="button" disabled title='Enter a repo as "owner/repo", or paste a GitHub, GitLab or Codeberg URL'>Load repository</button>
<p id="repo-status" class="muted"></p>
<label id="repo-suggestions-label" class="settings-label">Suggested repos</label>
<div id="repo-suggestions" class="repo-suggestions">
<button
type="button"
class="suggestion-btn"
data-repo="EnterpriseQualityCoding/FizzBuzzEnterpriseEdition"
title="EnterpriseQualityCoding/FizzBuzzEnterpriseEdition"
>Easy</button>
<button
type="button"
class="suggestion-btn"
data-repo="id-Software/DOOM"
title="id-Software/DOOM"
>Medium</button>
<button
type="button"
class="suggestion-btn"
data-repo="webpack/webpack"
title="webpack/webpack"
>Hard</button>
<button
type="button"
class="suggestion-btn"
data-repo="magento/magento2"
title="magento/magento2"
>Nightmare</button>
</div>
</div>
<div id="tab-panel-demo" class="tab-panel" role="tabpanel" aria-labelledby="tab-demo" hidden>
<p class="muted">A bundled multi-language showcase campaign — no local files needed.</p>
<button id="launch-demo-campaign" type="button">Launch Demo Campaign</button>
</div>
<div id="tab-panel-multiplayer" class="tab-panel" role="tabpanel" aria-labelledby="tab-multiplayer" hidden>
<div id="multiplayer-subtabs" class="subtabs" role="tablist" aria-label="Host or join a session">
<button id="multiplayer-subtab-host" class="tab-btn" type="button" role="tab" aria-selected="true" aria-controls="multiplayer-subtab-panel-host">Host</button>
<button id="multiplayer-subtab-join" class="tab-btn" type="button" role="tab" aria-selected="false" aria-controls="multiplayer-subtab-panel-join">Join</button>
</div>
<div id="multiplayer-subtab-panel-host" class="tab-panel" role="tabpanel" aria-labelledby="multiplayer-subtab-host">
<label id="multiplayer-display-name-label" for="multiplayer-display-name-input" class="settings-label">Display name (optional)</label>
<input
id="multiplayer-display-name-input"
class="settings-text-input"
type="text"
placeholder="Tobi's Demo Run"
maxlength="100"
autocomplete="off"
spellcheck="false"
/>
<label id="multiplayer-public-label" class="checkbox-label">
<input id="multiplayer-public-checkbox" type="checkbox" />
List in public lobby
</label>
<label id="multiplayer-max-players-label" for="multiplayer-max-players" class="settings-label">Max players</label>
<select id="multiplayer-max-players" class="settings-select">
<option value="2">2 (you + 1 guest)</option>
<option value="3">3 (you + 2 guests)</option>
<option value="4">4 (you + 3 guests)</option>
</select>
<button id="multiplayer-host-create" class="settings-btn" type="button">Create Session</button>
<button id="multiplayer-host-cancel" class="settings-btn" type="button" hidden>Cancel</button>
<div id="multiplayer-host-code-wrap" class="multiplayer-code-wrap" hidden>
<p id="multiplayer-host-code" class="multiplayer-code"></p>
<button id="multiplayer-host-code-copy" class="multiplayer-code-copy-btn" type="button" title="Copy session code">Copy</button>
</div>
<p id="multiplayer-guest-count" class="muted" hidden></p>
<button id="multiplayer-start-session" class="settings-btn" type="button" hidden>Start Session</button>
</div>
<div id="multiplayer-subtab-panel-join" class="tab-panel" role="tabpanel" aria-labelledby="multiplayer-subtab-join" hidden>
<label id="multiplayer-join-code-label" for="multiplayer-join-code-input" class="settings-label">Session code</label>
<input
id="multiplayer-join-code-input"
class="settings-text-input"
type="text"
placeholder="R4KJ9X"
autocomplete="off"
spellcheck="false"
/>
<button id="multiplayer-join-connect" class="settings-btn" type="button">Join</button>
<button id="multiplayer-browse-lobby" class="settings-btn" type="button">Browse Lobby</button>
</div>
<p id="multiplayer-status" class="muted"></p>
<p id="multiplayer-guest-live-count" class="muted" hidden></p>
</div>
<div id="tab-panel-settings" class="tab-panel" role="tabpanel" aria-labelledby="tab-settings" hidden>
<p class="sidebar-section-title">Gameplay</p>
<!-- One name for the whole game: it labels your highscore entries
and, in multiplayer, floats above your character. Persisted,
unlike the multiplayer-only field this replaced. -->
<label id="player-name-label" for="player-name-input" class="settings-label">Player name</label>
<input
id="player-name-input"
class="settings-text-input"
type="text"
placeholder="Player"
maxlength="24"
autocomplete="off"
spellcheck="false"
/>
<label id="gore-label" for="gore-select" class="settings-label">Gore</label>
<select id="gore-select" class="settings-select">
<option value="none">None</option>
<option value="normal" selected>Normal</option>
<option value="more">More</option>
<option value="extreme">Extreme</option>
<option value="excessive">Excessive</option>
<option value="absurd">Absurd</option>
</select>
<label id="difficulty-label" for="difficulty-select" class="settings-label">Difficulty</label>
<select id="difficulty-select" class="settings-select">
<option value="easy">Easy</option>
<option value="normal" selected>Normal</option>
<option value="hard">Hard</option>
</select>
<!-- The paired quality choice from the 2026-08 frame-budget audit:
Sharp = 1280x800 internal + half-res floor, the only measured
configuration that stays inside the frame budget. There is
deliberately no separate resolution / floor-detail knob. -->
<label id="render-quality-label" for="render-quality-select" class="settings-label">Render quality</label>
<select id="render-quality-select" class="settings-select">
<option value="classic" selected>Classic (640×400)</option>
<option value="sharp">Sharp (1280×800)</option>
</select>
<label id="automap-rotate-label" for="automap-rotate-select" class="settings-label">Automap orientation</label>
<select id="automap-rotate-select" class="settings-select">
<option value="facing" selected>Rotate with you</option>
<option value="north">Fixed (north up)</option>
</select>
<p class="muted">Gore and render quality apply from the next level you launch. Difficulty does too, but locks once a run starts — a score is only comparable if it held for the whole run.</p>
<hr class="sidebar-divider" />
<p class="sidebar-section-title">Audio</p>
<label id="master-vol-label" for="master-vol" class="settings-label">Master Volume</label>
<input id="master-vol" class="volume-slider" type="range" min="0" max="100" value="50" />
<label id="sfx-vol-label" for="sfx-vol" class="settings-label">SFX Volume</label>
<input id="sfx-vol" class="volume-slider" type="range" min="0" max="100" value="100" />
<label id="bgm-vol-label" for="bgm-vol" class="settings-label">Music Volume</label>
<input id="bgm-vol" class="volume-slider" type="range" min="0" max="100" value="50" />
<button id="select-bgm-folder" class="settings-btn" type="button">📁 Select BGM Folder</button>
<p id="bgm-status" class="muted">No custom music loaded</p>
<p class="muted">Local only — not shared with other players in a multiplayer session.</p>
<hr class="sidebar-divider" />
<p class="sidebar-section-title">Texture Pack</p>
<div id="wad-tabs" class="subtabs" role="tablist" aria-label="Texture pack source">
<button id="wad-tab-local" class="tab-btn" type="button" role="tab" aria-selected="true" aria-controls="wad-tab-panel-local">Local File</button>
<button id="wad-tab-online" class="tab-btn" type="button" role="tab" aria-selected="false" aria-controls="wad-tab-panel-online">Online</button>
</div>
<div id="wad-tab-panel-local" class="tab-panel" role="tabpanel" aria-labelledby="wad-tab-local">
<button id="load-wad-textures" class="settings-btn" type="button">📄 Load WAD Texture Pack</button>
<input id="wad-file-input" type="file" accept=".wad" hidden />
</div>
<div id="wad-tab-panel-online" class="tab-panel" role="tabpanel" aria-labelledby="wad-tab-online" hidden>
<ul id="online-wad-list" class="online-wad-list"></ul>
</div>
<button id="clear-wad-textures" class="settings-btn" type="button" hidden>↺ Use built-in textures</button>
<p id="wad-status" class="muted">Using built-in default textures</p>
<p class="muted">Local only — not shared with other players in a multiplayer session.</p>
</div>
<p id="workspace-name" class="muted">No workspace selected</p>
<hr class="sidebar-divider" />
<p class="sidebar-section-title">Info</p>
<button id="view-highscores" class="settings-btn" type="button">Highscores</button>
<button id="take-tour" class="settings-btn" type="button">🧭 Take the Tour</button>
<a
id="player-guide-link"
class="settings-btn"
href="https://github.com/mcdope/codeenstein3d/tree/master/doc/user"
target="_blank"
rel="noopener noreferrer"
>📖 Player Guide</a
>
</header>
<!-- One pane per workspace *source*, not per tab: Local and Continue
both pick a local folder, so they share `#file-tree-local`. Only
the pane for the visible tab is shown (`showWorkspacePaneFor` in
main.ts) — panes are toggled, never re-rendered, so each tree
keeps its own expanded folders and scroll position for the
session. `#file-tree` itself stays the scroll container (and the
intro tour's anchor). -->
<nav id="file-tree" aria-label="File tree">
<div id="file-tree-local" class="file-tree-pane"></div>
<div id="file-tree-github" class="file-tree-pane" hidden></div>
<div id="file-tree-demo" class="file-tree-pane" hidden></div>
<p id="file-tree-empty" class="file-tree-empty muted" hidden></p>
</nav>
<footer id="sidebar-footer" class="sidebar-footer">
<p>
© 2026 Tobias Bäumer<br />
licensed under
<a
href="https://www.gnu.org/licenses/agpl-3.0.html"
target="_blank"
rel="noopener noreferrer"
>AGPL-3.0-or-later</a
>
</p>
<a
href="https://github.com/mcdope/codeenstein3d"
target="_blank"
rel="noopener noreferrer"
>github.com/mcdope/codeenstein3d</a
>
</footer>
</aside>
<main id="viewport">
<div id="intro-screen" class="intro-screen">
<h2 class="intro-title">Turn your legacy code into a playable retro 3D shooter</h2>
<p class="intro-lede">
Codeenstein 3D reads real source code and procedurally builds it into a raycasted
dungeon — then drops you in to fight your way through it.
</p>
<div class="intro-grid">
<section class="intro-card intro-card--full">
<h3>New to coding?</h3>
<p>
You don't need to write or even read code to play. Click <strong>Demos</strong>
in the sidebar for a ready-made example with no setup — or point it at any
folder of code and Codeenstein 3D turns it into a dungeon automatically. Think
of it this way: every function becomes a monster to fight, and reaching the
end of the file clears the level. The card below explains the exact mapping in
more technical detail, for anyone curious what's actually happening under the
hood.
</p>
</section>
<section class="intro-card">
<h3>How it works</h3>
<ul class="intro-mapping">
<li><span class="intro-mapping-from">File</span><span class="intro-mapping-arrow">→</span><span class="intro-mapping-to">Level</span></li>
<li><span class="intro-mapping-from">Function</span><span class="intro-mapping-arrow">→</span><span class="intro-mapping-to">Room + Enemy (HP scales with complexity)</span></li>
<li><span class="intro-mapping-from">Global variable</span><span class="intro-mapping-arrow">→</span><span class="intro-mapping-to">Acid pool</span></li>
<li><span class="intro-mapping-from">Private/protected method</span><span class="intro-mapping-arrow">→</span><span class="intro-mapping-to">Locked door</span></li>
<li><span class="intro-mapping-from">goto / label</span><span class="intro-mapping-arrow">→</span><span class="intro-mapping-to">Teleporter</span></li>
<li><span class="intro-mapping-from">Large comment</span><span class="intro-mapping-arrow">→</span><span class="intro-mapping-to">Lore terminal</span></li>
<li><span class="intro-mapping-from">Dead code, empty catches, deprecated tags, big comment blocks, magic blobs</span><span class="intro-mapping-arrow">→</span><span class="intro-mapping-to">Secret room</span></li>
</ul>
</section>
<section class="intro-card">
<h3>What you'll do</h3>
<p>
Shoot your way from start to exit with the echo pistol, the Regex Shotgun and
the SIGKILL Knife to start — four more to unlock, including gdb (machine gun),
ghidra (rocket launcher) and Friday Hotfix (flamethrower).
Higher-complexity functions hit harder and soak
more damage. Read lore terminals, grab keys for locked rooms, dodge acid pools
and spike traps, and reach the green <code>return</code> tile to clear the
level.
</p>
<p>
Clearing a level rolls straight into the next file it can read, carrying your
health, ammo, and weapons forward — an entire codebase becomes one continuous
campaign.
</p>
</section>
<section class="intro-card intro-card--full">
<h3>Privacy</h3>
<p>
Everything runs client-side. A local workspace is read and parsed entirely in
your browser (WebAssembly, no server) and its contents never leave your
machine — no backend, no account, no analytics.
</p>
<p>
Network calls only happen for the features that need them: loading a repo from
the <strong>Repo</strong> tab, hosting or joining a <strong>Multiplayer</strong>
session (which contacts a signaling server, and a relay if your network blocks a
direct connection), and picking an online texture pack (served from this site).
A local workspace never touches the network at all.
<a
href="https://github.com/mcdope/codeenstein3d/blob/master/doc/user/privacy.md"
target="_blank"
rel="noopener noreferrer"
>Full privacy details</a
>.
</p>
</section>
</div>
<p class="intro-cta">
Pick a <strong>Local</strong> workspace, load a <strong>Repo</strong>, launch the
<strong>Demos</strong>, or <strong>Continue</strong> a saved run from the sidebar to begin.
</p>
</div>
<div id="loading-screen" class="loading-screen" hidden>
<div class="loading-spinner" aria-hidden="true"></div>
<p id="loading-status" class="loading-status">Loading…</p>
</div>
</main>
<aside id="console-sidebar" class="console-sidebar">
<h2>Console</h2>
<div id="console-log"></div>
</aside>
</div>
<dialog id="highscore-dialog">
<h2>Highscores</h2>
<div id="highscore-list"></div>
<button id="close-highscores" class="settings-btn" type="button">Close</button>
</dialog>
<dialog id="multiplayer-lobby-dialog">
<h2>Public Lobby</h2>
<ul id="multiplayer-lobby-list"></ul>
<button id="close-multiplayer-lobby" class="settings-btn" type="button">Close</button>
</dialog>
<script type="module" src="/src/main.ts"></script>
</body>
</html>