frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: I ported Xonotic (arena FPS) to WebAssembly with full P2P multiplayer

https://dpgame.xonotic.workers.dev/
10•astlouis44•5h ago

Comments

astlouis44•5h ago
Hey HN! I've been using Claude Code a lot lately and got curious whether it could port a full open-source game to run in the browser. Xonotic (a fast open-source arena FPS, think Quake III / Unreal Tournament) seemed like a good candidate: it's built on the DarkPlaces engine (real C + OpenGL), ships gigabytes of assets, and has actual multiplayer.

It's fully playable in the browser, no install or plugins. Pick a map like g-23 to drop into a match against bots.

Some of the technical work I wanted to highlight that I/Claude focused on that went into making it actually fast:

- The engine runs off the main thread. DarkPlaces is compiled to WASM/WebGL2, but the whole engine runs on a worker via Emscripten's PROXY_TO_PTHREAD, with the WebGL context owned directly by the worker through an OffscreenCanvas (zero cross-thread GL dispatch). That let me remove Asyncify entirely — the payoff is a steady frame loop (~4 ms/frame, 99.8% of frames under 16 ms in a profiled match).

- GPU texture transcoding. Every texture is Basis Universal / KTX2, transcoded at load time to whatever compressed format your GPU supports (BC7 on desktop, etc). That took the texture set from ~5.3 GB of TGAs down to a few hundred MB on disk and cut GPU memory ~4×. Audio is re-encoded to Ogg Vorbis.

- Streamed on-demand filesystem. Nothing is bundled. The engine reads through a virtual filesystem backed by Cloudflare R2; only a tiny boot set loads upfront, then each map prefetches its working set in parallel and streams the rest as surfaces actually draw. A full map's assets dropped from ~2.3 GB to ~320 MB per session.

- SIMD. Built with -msimd128, so the math and skeletal-animation paths vectorize to wasm128.

- Hosting. Cloudflare R2 (zero egress) behind a Worker, with COOP/COEP headers for SharedArrayBuffer/threads. Assets are immutable-cached and the engine binary revalidates, so reloads are cheap.

Multiplayer is peer-to-peer. Click Host Game and you get a 6-character invite code; a friend enters it and you connect directly browser-to-browser over a WebRTC DataChannel (configured unreliable/unordered to match the engine's UDP netcode).

A tiny Cloudflare Worker only relays the one-time WebRTC handshake — once you're connected, no game traffic touches any server. I tested a real 1v1 between Edmonton and Bangkok and it held up across the Pacific.

Would love feedback, so please report any bugs or glitches here and I'll patch asap.

koolala•2h ago
Man I wish Xonotic made this official and added a WebSocket prototol to official multiplayer server program so it could connect to public servers too. It's awesome you got P2P for it.
astlouis44•2h ago
Thank you! I already added Websocket support actually, along with dedicated client/server, just have to push it as this point.
astlouis44•2h ago
Also if you like it please upvote it, share it, etc!

Show HN: Keybench – Scriptable, extensible performance tool for key value stores

https://github.com/guycipher/keybench
6•alexpadula•1h ago•0 comments

Show HN: Infinite canvas notes in the non-Euclidean Poincaré disk

https://uonr.github.io/poincake/
118•uonr•4d ago•22 comments

Show HN: Ironwall, a safety-first native programming language and compiler

12•bOZbfU4YdRnJQ•1h ago•5 comments

Show HN: VaultSQL – Open-Source Zero-Trust SQL Workbench

https://vaultsql.com/
3•antileet•1h ago•0 comments

Show HN: Aquifer – an MCP runtime for spiky agent tool traffic

https://github.com/rjpruitt16/aquifer
3•rjpruitt16•1h ago•0 comments

Show HN: A beautiful and local-first PDF reader for studying dense things

https://www.tryquincy.live
3•oleksg•2h ago•0 comments

Show HN: Soft Body Jiggle Physics

https://github.com/xloveee/jiggle-physics
51•vesperance•5d ago•19 comments

Show HN: Aegis – post-quantum cyberdefense proxy (471 attacks, 0 breaches)

https://github.com/conchaestradamiguelangel-droid/aegis
3•conchaestrada•3h ago•0 comments

Show HN: Dap-mux – Connect your editor and REPL to the same debug session

6•YesJustWolf•3h ago•1 comments

Show HN: Formally verified polygon intersection – Opus 4.8 oneshots, prev failed

https://github.com/schildep/verified-polygon-intersection
84•permute•2d ago•17 comments

Show HN: Lowfat – pluggable CLI filter that saved 91.8% of my LLM tokens

https://github.com/zdk/lowfat
146•zdkaster•1d ago•73 comments

Show HN: Typedframes – Pandas/polars column name checking at lint time

https://github.com/w-martin/typedframes
3•w-martin•4h ago•2 comments

Show HN: ABC Classic 100 Rankings visualised

https://classic100.gotski.workers.dev/
35•gotski•23h ago•17 comments

Show HN: Resonate – Low-latency, high-resolution spectral analysis

https://alexandrefrancois.org/Resonate/
3•arjf•6h ago•3 comments

Show HN: On-device transcriber that's 97% accurate at identifying speakers

https://mimicscribe.app/
27•marshalla•1d ago•8 comments

Show HN: Ccgs – Collaborative Claude Code sessions, stored in Git branches

https://github.com/ingram-technologies/claude-git-sessions
6•scrollaway•8h ago•2 comments

Show HN: Edsger – A handwritten Clojure REPL for the reMarkable 2

https://handwritten.danieljanus.pl/2026-06-01-edsger.html
258•nathell•4d ago•34 comments

Show HN: I reverse-engineered the world maps of Test Drive III (1990 DOS game)

https://github.com/s-macke/Test-Drive-3-Maps
215•s-macke•6d ago•56 comments

Show HN: Prela – Purely Algebraic Relation Combinators

https://github.com/remysucre/prela
71•remywang•5d ago•13 comments

Show HN: Scale Physics – a physics encyclopedia with WebGL animations

https://scalephysics.com/
3•WizardK•11h ago•0 comments

Show HN: StructOCR – API for parsing global passports, invoices, and containers

https://structocr.com
4•glyph_miner•12h ago•2 comments

Show HN: Uruky (EU-based Kagi alternative) now has Image Search and URL Rewrites

https://uruky.com/?il=en
232•BrunoBernardino•2d ago•224 comments

Show HN: Mercek – A Desktop IDE for AWS ECS

https://www.mercek.dev/
62•utibeumanah•2d ago•29 comments

Show HN: NullRead – A simple HN Android client

https://nullread.0x96f.dev/
4•0x96f•13h ago•1 comments

Show HN: Sub-Agent MCP: LLM delegation and sub-agent orchestration via MCP

https://github.com/stormaref/Sub-Agent-MCP
5•avestura•13h ago•0 comments

Show HN: I used to pin street parking by hand in Google Maps. Now it's an app

https://apps.apple.com/us/app/curbie/id6770876635
5•ayranlahmacun•13h ago•1 comments

Show HN: Eyeball

https://eyeball.rory.codes/
292•mrroryflint•4d ago•88 comments

Show HN: Open-source X Bookmark Manager

3•ssarisen•14h ago•1 comments

Show HN: I ported Xonotic (arena FPS) to WebAssembly with full P2P multiplayer

https://dpgame.xonotic.workers.dev/
10•astlouis44•5h ago•4 comments

Show HN: Omni – Local-first multimodal file search on macOS

https://hanxiao.io/omni/
5•artex_xh•1d ago•2 comments