Skip to content

u/tomqmasters

In this archive from Mar 2024 to Oct 2026

14
posts
191
comments
1
media
502
score
3 saved before deletion

Top posts

Top comments

wow, I figured this would have just wrapped the original code in three.js, but it actually reimplemented all the game logic.

● This is a full JavaScript port of the Quake engine - not a wrapper around the original code.

Key findings:

- ~52,500+ lines of hand-ported JavaScript with no .wasm, no Emscripten, and no original C code anywhere

- Core files like sv_phys.js, pmove.js, world.js, and pr_exec.js are direct ports of the original Quake C source, with

comments like "Ported from: WinQuake/sv_phys.c"

- It includes a full QuakeC bytecode interpreter (pr_exec.js) that executes the compiled .qc game logic

- Physics, BSP collision, entity/AI systems, and networking are all reimplemented in JavaScript

Three.js's role is purely the renderer. It replaces Quake's original OpenGL calls - vid.js sets up a THREE.WebGLRenderer,

gl_rsurf.js builds Three.js geometries from BSP surface data, and gl_rmain.js runs the BSP traversal and calls

renderer.render() at the end of each frame.

The original pak0.pak data file is loaded for assets (textures, models, maps, sounds), but the engine itself runs

entirely in JS.

15 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.