- Doom! (permalink)
Finally it's "done". I added a page - "cacowards" link in the home - with most single-player doom mods, all directly playable in browser, from the past 5+ years of CacoWards winners, plus some extras like GZPT!
I don't think most people realize how active and vibrant the doom modding community is to this day - I hope this make it easy to check things out. It started from me wanting to "easily" explore myHouse... and then programming happened.
Thu, 28 May 2026 12:43:24 -0700
- GzDoom to Wasm (permalink)
Lately I've been porting GzDoom to Wasm/WebGL. Some notes on what I've found so far (mostly for an eventual future self):
1) Latest GzDoom repo (nov 16, 2025) added post-effects - nice, but broke some VM commands that Brutal Doom needs. Luckily the authors of LzDoom figured that out and porting the fix was simple.
2) The post-effects implementation is terrible, both low-quality and slow, doing a ton of unnecessary passes - which are particularly slow with wasm/webgl. Had to fix that.
3) In general the GL backend is quite bad, doing a lot of unnecessary state sets and gets (!!) which are slow in general but incredibly slow in wasm. Added a simple state shadowing layer to fix that, improved perf by orders of magnitude.
4) The browser is... complicated. I'm still not sure about all the focus/blur interaction between the page and SDL and so on - I'm sure I didn't get it 100% right.
5) Safari on mac sends the arrow keys as numpad arrows (KeyboardEvent.location=3) - breaking the doom menu system! Took me a long time to figure that one out! 6) For local testing, localhost vs the actual local machine IP work differently - beware! Also, as browsers like to aggressively ignore errors - "fail gracefully" - it can be hard to understand why things behave weirdly.
7) A ton of browser APIs change based on security, CORS, COOP+COEP etc. Particularly surprising was timers - you can't get precise timings anymore (due to rowhammer etc), so you have to account for that in engine functions that rely on time (and time progressing forwards etc - if two consecutive empscriten_gen_now are identical, I bump them by a tick). Also, have to remove all engine busy-waits, stuff blocking the JS event loop.
8) When wasm runs, nothing runs on the same browser thread. If you need to invoke JS stuff and have it return some time later (i.e. in most cases as browser APIs are async) - you need to use worker threads.
9) Speaking of async APIs - loading - http requests. In the end for this I rely on emscripten's lazy mount, which streams in parts of a file as needed via XHR range requests. Needs a bit of configuration on the host, but it's easy and works well. Care has to be taken to cache stuff not to issue infinite requests - that was a problem here specifically for mp3 music streaming.
10) Of course - had to remove all dynamic library loads etc. Not too hard as emscripten already has ports of popular libraries (SDL, OpenAL...) - albeit they can subtly be different than the "desktop" ones...
11) Wasm heap is fixed-ish. It can resize, but when it does it reallocates and copies data over. Should ensure initial size is correct / resizes don't happen often. Also, JS can see the wasm heap via typed overlays, it's important never to keep absolute addresses.
Mon, 25 May 2026 10:02:58 -0700
- Friction (permalink)
Everything on my blogging system is made to reduce friction for me. Yet it was not enough, especially for the links and journal sections, I've made them so they are "fed" from emails, which is also how I used to collect links when I ran internal (company) mailing lists... But opening gmail to send a link everytime I found something interesting was still a bit too clunky. Now I have a go app (ofc AI made) that I can keep always open and streamlines that. Seems a tiny thing, but it really helps.
Fri, 22 May 2026 17:21:40 -0800
- AI content has won. (permalink)
Genie 3 makes take-2 stock dip.
A fad. People are dumb. Yes, to an extent. But dumbness cut both ways.
We underestimate how much AI has already won, because we think that it displaces "like for like" - and that clearly is not happening. AI is not making GTA 6. AI is not writing code to the quality of a senior engineer.
AI is not better than human artists, and companies are not downsizing because they think AI directly replaces people.
But AI can produce great stuff. Different - but great. And this is where the "displacement" happens. Not that the next PS6 game is going to be made 90% from AI prompting AI. But tiktok "vertical" stuff is. Instagram stuff is. And people engage with it - it's already popular, in practice, today.
Remember, it's a competition for hours. It's the attention economy. If something else grabs attention, consumes time, your job is at risk.
Genie 3 is - for a large number of reasons, an incredibly dumb idea. At the same time, it might be - if stuff like that works, the next tiktok. And that's a risk, for "AAA". That's why it's not completely insane for the stocks to dip - even if I'm sure they will recover, simply because the technology is far from being ready. Yet.
Sun, 1 Mar 2026 17:21:40 -0800