Bring the graphics-dev collaborator's dpl3-revive into the repo as first-class
project code (they've handed it off; it's ours now). This is the proven
Division renderer that our in-process rt_draw has been trying to be.
What's here:
- parser/ B2Z/V2Z/SVT/SCN/SPL/BGF/BMF/BSL decoders (pure Python).
- spec/ reverse-engineered format + the definitive VelociRender wire
protocol (from the original DIVISION source, matches our live
VPX node/action tables exactly).
- source-ref/ read-only copies of the original DIVISION C (BIZREAD.C,
DPLTYPES.H, DPL.H) that define the formats.
- patha/ the "virtual VelociRender board": vrboard.py (24-action protocol
server), vrview.py (numpy software rasterizer, the reference),
vrview_gl.py (moderngl GPU backend, 832x512@60Hz), plus the
run/replay/regress tooling and evidence renders. Drives FLYK/BLADE/
Star Trek demos AND our btl4opt/rpl4opt game binaries.
- viewer/ WebGL archive generators (.py); prebuilt HTML/data regeneratable.
- samples/ small test models/textures.
- bt*.raw.bin real BTL4OPT arena wire captures (kept for offline renderer
testing/regression against OUR game).
.gitignore keeps the multi-hundred-MB demo capture dumps + debug logs +
regeneratable viewer bundles out of history (they stay on disk).
Phase 0 of the integration is validated: their board decodes our bt8 capture
with zero errors (3748 nodes, 507 instances, 4 mechs) and renders our arena
(terrain/dome/sky, correct Division DAC gamma). Plan + status in memory;
integration continues in emulator/RENDERER-COLLAB.md.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
43 lines
1.1 KiB
Python
43 lines
1.1 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
serve.py -- launch the DPL3 scene archive locally.
|
|
|
|
The archive viewer lazy-loads scene JSON via fetch(), which browsers block over
|
|
file://. This serves the viewer/ folder over http so it works. Run it, then the
|
|
browser opens automatically.
|
|
|
|
Threaded (parallel requests don't queue behind a large scene download) and sends
|
|
Cache-Control: no-store so a truncated response can never be cached and replayed
|
|
by the browser.
|
|
|
|
python viewer/serve.py
|
|
"""
|
|
import http.server
|
|
import os
|
|
import webbrowser
|
|
|
|
PORT = 8765
|
|
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
|
|
class Handler(http.server.SimpleHTTPRequestHandler):
|
|
def end_headers(self):
|
|
self.send_header("Cache-Control", "no-store")
|
|
super().end_headers()
|
|
|
|
def log_message(self, fmt, *args): # quieter console
|
|
pass
|
|
|
|
|
|
url = "http://localhost:%d/archive.html" % PORT
|
|
print("DPL3 scene archive -> %s (Ctrl+C to stop)" % url)
|
|
try:
|
|
webbrowser.open(url)
|
|
except Exception:
|
|
pass
|
|
with http.server.ThreadingHTTPServer(("", PORT), Handler) as httpd:
|
|
try:
|
|
httpd.serve_forever()
|
|
except KeyboardInterrupt:
|
|
print("\nstopped")
|