frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: TTF-DOOM – A raycaster running inside TrueType font hinting

https://github.com/4RH1T3CT0R7/ttf-doom
16•4RH1T3CT0R•4h ago
TrueType fonts have a hinting VM that grid-fits glyphs. It has a stack, storage area, conditionals, function calls, and it turns out it's Turing-complete. So I built a raycasting engine in the hinting bytecode.

The glyph "A" in the font has 16 vertical bar contours. The hinting program reads player coordinates from font variation axes via GETVARIATION, does DDA ray marching against a tile map in the storage area, and repositions bar heights with SCFS. It ends up looking like a crude Wolfenstein-style view.

Small visuzlization: https://github.com/4RH1T3CT0R7/ttf-doom/blob/main/docs/media...

About 6.5 KB of bytecode total - 13 functions, 795 storage slots, sin/cos lookup tables.

JS handles movement, enemies, and shooting, then passes the coordinates to the font through CSS font-variation-settings. The font is basically a weird GPU.

The weirdest parts: - TrueType MUL does (ab)/64, not ab. So 1*4=0. The DIV instruction is equally cursed. - No WHILE loops. Everything compiles to recursive FDEFs. FreeType limits call depth to ~64 frames. - SVTCA[0] is Y, SVTCA[1] is X. Of course.

There's a small compiler behind this - lexer, parser, codegen - that turns a C-like DSL into TT assembly.

Demo GIF: https://github.com/4RH1T3CT0R7/ttf-doom/blob/main/docs/media...

Live demo: https://4rh1t3ct0r7.github.io/ttf-doom/ (Chrome/Edge, WASD+arrows, Space to shoot, Tab for debug overlay)

This is a DOOM-style raycaster, not a port of the original engine - similar to DOOMQL and the Excel DOOM. The wall rendering does happen in the font's hinting VM though. Press Tab in the demo to watch the font variation axes change as you move.

Comments

emanuele-em•2h ago
Ok the MUL workaround got me. MUL does (ab)/64 so you have to DIV first to get a64, then MUL finally gives you a*b. And recursive FDEFs because there's no WHILE? All in 6.5KB? What kind of frame rate do you actually get out of this?
4RH1T3CT0R•2h ago
Frame rate depends on the browser - Chrome gives around 30-60fps on my machine, but the bottleneck is actually Chrome deciding whether to re-run hinting at all (had to add axis jitter to force it). The TT bytecode itself executes fast, it's maybe a few thousand instructions per frame

  The recursive FDEF thing is the worst part honestly. Every while loop is a function that calls itself, and FreeType kills you at ~64 deep. So you're constantly juggling how many columns vs how many ray steps you can afford
tombert•45m ago
I tried playing the demo, and it was just green bars for me. The walls didn't scale up or shrink, it was just a bunch of solid static green bars.

The enemies did scale up and shrink as I got closer, and the minimap worked.

Tried with Brave on Linux, and Google Chrome on macOS.

tadfisher•35m ago
You are (or I suspect your LLM is) not correct about Doom using a raycasting engine. Wolfenstein fits that description, yes. Doom rather famously introduced BSP for level data and it draws sorted polygons front-to-back without ray-marching.

Show HN: Ghost Pepper – Local hold-to-talk speech-to-text for macOS

https://github.com/matthartman/ghost-pepper
177•MattHart88•3h ago•79 comments

Launch HN: Freestyle – Sandboxes for Coding Agents

https://www.freestyle.sh/
185•benswerd•7h ago•103 comments

Sam Altman may control our future – can he be trusted?

https://www.newyorker.com/magazine/2026/04/13/sam-altman-may-control-our-future-can-he-be-trusted
591•adrianhon•13h ago•185 comments

A cryptography engineer's perspective on quantum computing timelines

https://words.filippo.io/crqc-timeline/
288•thadt•8h ago•126 comments

Show HN: Hippo, biologically inspired memory for AI agents

https://github.com/kitfunso/hippo-memory
28•kitfunso•1h ago•12 comments

Show HN: GovAuctions lets you browse government auctions at once

https://www.govauctions.app/
181•player_piano•7h ago•59 comments

Anthropic expands partnership w Google and Broadcom for multiple GW of compute

https://www.anthropic.com/news/google-broadcom-partnership-compute
18•l1n•1h ago•0 comments

German police name alleged leaders of GandCrab and REvil ransomware groups

https://krebsonsecurity.com/2026/04/germany-doxes-unkn-head-of-ru-ransomware-gangs-revil-gandcrab/
250•Bender•9h ago•130 comments

What being ripped off taught me

https://belief.horse/notes/what-being-ripped-off-taught-me/
309•doctorhandshake•10h ago•173 comments

Issue: Claude Code is unusable for complex engineering tasks with Feb updates

https://github.com/anthropics/claude-code/issues/42796
699•StanAngeloff•9h ago•446 comments

Book review: There Is No Antimemetics Division

https://www.stephendiehl.com/posts/no_antimimetics/
192•ibobev•10h ago•135 comments

HackerRank (YC S11) Is Hiring

1•rvivek•2h ago

The anatomy of SMS delivery: from request to carrier

https://blog.bridgexapi.io/the-anatomy-of-sms-delivery-from-request-to-carrier
6•Bridgexapi•1d ago•1 comments

Show HN: Tusk for macOS and Gnome

https://shapemachine.xyz/tusk/
34•factorialboy•2d ago•15 comments

Sky – an Elm-inspired language that compiles to Go

https://github.com/anzellai/sky
118•whalesalad•8h ago•40 comments

Battle for Wesnoth: open-source, turn-based strategy game

https://www.wesnoth.org
363•akyuu•6h ago•93 comments

Agent Reading Test

https://agentreadingtest.com
41•kaycebasques•4h ago•9 comments

Show HN: TTF-DOOM – A raycaster running inside TrueType font hinting

https://github.com/4RH1T3CT0R7/ttf-doom
16•4RH1T3CT0R•4h ago•4 comments

Show HN: Anos – a hand-written ~100KiB microkernel for x86-64 and RISC-V

https://github.com/roscopeco/anos
11•noone_youknow•2d ago•3 comments

The cult of vibe coding is dogfooding run amok

https://bramcohen.com/p/the-cult-of-vibe-coding-is-insane
442•drob518•5h ago•371 comments

The Last Quiet Thing

https://www.terrygodier.com/the-last-quiet-thing
135•coinfused•2d ago•82 comments

AI singer now occupies eleven spots on iTunes singles chart

https://www.showbiz411.com/2026/04/05/itunes-takeover-by-fake-ai-singer-eddie-dalton-now-occupies...
73•flinner•7h ago•86 comments

Eighteen Years of Greytrapping – Is the Weirdness Finally Paying Off?

https://nxdomain.no/~peter/eighteen_years_of_greytrapping.html
42•jruohonen•2d ago•4 comments

Show HN: Docking – Extensible Linux dock in Python

https://docking.cc
17•edumucelli•2d ago•5 comments

Ask HN: How do you handle marketing as a solo technical founder?

17•lazarkap•2h ago•12 comments

SOM: A minimal Smalltalk for teaching of and research on Virtual Machines

http://som-st.github.io/
17•tosh•4h ago•0 comments

Adobe modifies hosts file to detect whether Creative Cloud is installed

https://www.osnews.com/story/144737/adobe-secretly-modifies-your-hosts-file-for-the-stupidest-rea...
205•rglullis•6h ago•101 comments

Zooming UIs in 2026: Prezi, impress.js, and why I built something different

77•tinchox6•4h ago•34 comments

Reducto releases Deep Extract

https://reducto.ai/blog/reducto-deep-extract-agent
43•raunakchowdhuri•7h ago•6 comments

France pulls last gold held in US

https://www.mining.com/france-pulls-last-gold-held-in-us-for-15b-gain/
554•teleforce•15h ago•297 comments