<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: calebj0seph</title><link>https://news.ycombinator.com/user?id=calebj0seph</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Thu, 16 Apr 2026 15:47:35 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=calebj0seph" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by calebj0seph in "Show HN: The Simpsons Hit and Run Running in the Browser (WASM/WebGL)"]]></title><description><![CDATA[
<p>Back in 2021, the source code for The Simpsons Hit & Run leaked online. As someone who does a lot of WebGL for work, my first thought seeing the leak was "it'd be cool to get this running in a browser". So that's exactly what I did (for fun and science).<p>I did a full port of PC version of the game to WASM and WebGL. It runs at native resolution, fetches game data on-demand over the network, and comes with extra features from the Xbox version like lens flares, widescreen support, and the refraction effect on Frink's hover car.<p>Haven't done a full write-up on the process yet, but I'd say the hardest parts in order were:<p>1. Audio<p>The game models sound as many individual tracks with properties like gain and pan, and either a static or streaming buffer containing the raw audio samples. It expects a synchronous-style audio API from the host, e.g. if it tells a sound to play, then it expects to be able to immediately query the state of the track to see that it is playing and how many audio samples have elapsed.<p>In order to accurately match the mixing logic of the game, we need full control over the audio samples being played and for this to be done with low-latency. The Web Audio API gives you AudioWorklets to achieve this. They are called very frequently (a few hundred times per second) to deliver the next batch of samples. This means they need to return very quickly to avoid stalling the audio stream. They are also run on a separate thread, so it's up to you to figure out how to provide them with the data they need.<p>So I had to build a small set of lock-free shared memory structures (locks would be able to stall the audio) to transfer the constantly updating track descriptors (e.g. gain, pan) and their PCM data to the worklet. For example, for the track descriptors I used a double buffer in shared memory with an atomic flag to indicate which buffer is 'live'. When the main thread needs to write, it writes to the non-live side and flips the flag. When the worklet reads, it reads the flag and the data, then reads the flag again to make sure it didn't change in the middle of reading.<p>This was coupled with a bunch of state management needed so the game would see the current state of each track even if the worklet hadn't picked the changes up yet. Overall, audio was quite fiddly and hard to debug!<p>2. File I/O<p>The game has a lot of small assets read as whole files (e.g. 3D models, scripts), but also larger archives which it reads small slices from (e.g. sound). The former is easy to do with a simple fetch, but the latter would require either loading the whole ~500 MB file or using a Range header which doesn't cache very well. I also needed to serve all the assets somewhere where they'll load fast and not cost me a fortune in bandwidth.<p>I ended up going with Cloudflare R2 for its free egress, and wrote a Cloudflare worker in front to provide an interface to fetch assets in 1MB chunks thus avoiding the use of a Range header. This provides the ability to load assets on-demand with full caching.<p>Safari was also a huge pain here. The game does some blocking I/O for things like save data. I originally implemented this by performing the IndexedDB operations n a worker thread, with a short spin lock on the main thread (since Atomics.wait() can't be used on the main thread). This works in Chrome and Firefox but causes a deadlock in Safari - I assume because it proxies the actual work to the main thread. So I had to rework all of the places where the game touches save and config data to poll every frame for completion which was a pain.<p>3. Graphics<p>The game is built around a DirectX 8-era fixed-function rendering pipeline, so emulating it with 'modern' WebGL 2 wasn't too difficult. I built a single uber shader that takes all the fixed-function inputs like bone weights, a fixed light array, flat shading toggle, etc. Modern GPUs handle branching pretty well when all shader units take the same path, so this kept the rendering simple without needing to manage dozens of shader permutations.<p>The main performance issue I ran into was CPU overhead from the number of WebGL calls I was making per frame. This was mostly solved by keeping track of the last set WebGL state to avoid making redundant calls (e.g. rendering particle effects might call gl.disable(GL_DEPTH_TEST) several times) and writing all the shader uniforms with a uniform buffer instead of thousands of gl.uniform*() calls per frame.<p>Lens flares were interesting to port from the Xbox version as they use occlusion queries which allow you to check if any pixels from a mesh are visible on the screen. The game assumed occlusion queries would be available to read on the next frame, but it can actually take longer, so I had to rework that. The refraction effect for the hover car was also fun to wire up, since it's the only thing in the game which requires access to the framebuffer as a texture.<p>Oh and for FMVs, I just converted them to H264 MP4s and play them with a HTML <video> overlay. Nice and simple.<p>Have fun! It should run well on most hardware. Runs great on my Pixel 10 as an example (but a physical keyboard is needed). Firefox on macOS is quite stuttery - if there's a Mozilla engineer here I'd love for you to tell me why!</p>
]]></description><pubDate>Wed, 15 Apr 2026 18:26:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=47783145</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=47783145</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47783145</guid></item><item><title><![CDATA[Show HN: The Simpsons Hit and Run Running in the Browser (WASM/WebGL)]]></title><description><![CDATA[
<p>Article URL: <a href="https://shar-wasm.cjoseph.workers.dev/?skipmovie">https://shar-wasm.cjoseph.workers.dev/?skipmovie</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=47783061">https://news.ycombinator.com/item?id=47783061</a></p>
<p>Points: 4</p>
<p># Comments: 1</p>
]]></description><pubDate>Wed, 15 Apr 2026 18:19:58 +0000</pubDate><link>https://shar-wasm.cjoseph.workers.dev/?skipmovie</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=47783061</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=47783061</guid></item><item><title><![CDATA[New comment by calebj0seph in "Microsoft Will Preload Windows 11 File Explorer to Fix Bad Performance"]]></title><description><![CDATA[
<p>The File Explorer in Windows has so much tech debt behind it.<p>It's quite obvious to see which parts are still Win32 and which are XAML. The two different context menus are a well-known example, but one that really annoys me is the Home view vs. the This PC view.<p>If you make Explorer open with the This PC view by default, you get a blinding flash of white every time you create a new tab in dark mode. That doesn't happen with the Home view which has been updated to XAML.<p>It's one of the many things you experience day to day that really makes me disappointed in the level of quality in modern Windows.</p>
]]></description><pubDate>Sat, 22 Nov 2025 03:34:39 +0000</pubDate><link>https://news.ycombinator.com/item?id=46011856</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=46011856</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46011856</guid></item><item><title><![CDATA[New comment by calebj0seph in "Show HN: Handwriter.ttf – Handwriting Synthesis with Harfbuzz WASM"]]></title><description><![CDATA[
<p>Damn, this is impressive!<p>We built a WebGL text renderer with full CJK support using Harfbuzz for our production whiteboard web app. I thought that was complicated until now.</p>
]]></description><pubDate>Wed, 21 Aug 2024 15:10:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=41311083</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=41311083</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41311083</guid></item><item><title><![CDATA[New comment by calebj0seph in "ShadPS4 – PlayStation 4 emulator"]]></title><description><![CDATA[
<p>Very true. I suppose Wine has to do this as well for Direct3D?</p>
]]></description><pubDate>Wed, 21 Aug 2024 14:03:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=41310405</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=41310405</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41310405</guid></item><item><title><![CDATA[New comment by calebj0seph in "ShadPS4 – PlayStation 4 emulator"]]></title><description><![CDATA[
<p>Makes sense! Slightly amusing given that originally Wine was a recursive acronym for "Wine is not an emulator".</p>
]]></description><pubDate>Wed, 21 Aug 2024 12:15:49 +0000</pubDate><link>https://news.ycombinator.com/item?id=41309503</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=41309503</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41309503</guid></item><item><title><![CDATA[New comment by calebj0seph in "ShadPS4 – PlayStation 4 emulator"]]></title><description><![CDATA[
<p>Genuine question - under the hood is this more of an emulator like PCSX2 or a compatibility layer like Wine?<p>Since the PS4 is more or less an x86 computer, I imagine most of the hard work would be implementing the system/graphics APIs of the PS4. Or are there major hardware differences between an x86 PC and the PS4 that also need to be handled?</p>
]]></description><pubDate>Wed, 21 Aug 2024 10:42:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=41308900</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=41308900</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41308900</guid></item><item><title><![CDATA[New comment by calebj0seph in "Figma OSS Alternative"]]></title><description><![CDATA[
<p>It's becoming more common. Confluence whiteboards is all WebGL, even the text rendering.</p>
]]></description><pubDate>Thu, 02 May 2024 02:08:16 +0000</pubDate><link>https://news.ycombinator.com/item?id=40232016</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=40232016</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40232016</guid></item><item><title><![CDATA[New comment by calebj0seph in "Infinite Craft"]]></title><description><![CDATA[
<p>Same here with Monkey Island 2 + Monkey Island 3 = Monkey Island 4.<p>I'm now at Monkey Island 12357990.</p>
]]></description><pubDate>Wed, 31 Jan 2024 23:50:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=39211164</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=39211164</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=39211164</guid></item><item><title><![CDATA[New comment by calebj0seph in "Android App Devs now require 20 people to test before publishing to Play Store"]]></title><description><![CDATA[
<p>So glad I saw this on November 10 before the deadline. I quickly set up a Play Console account, verified my ID and set up a draft of my app to ensure I'd be in the clear.<p>Been working on an indie game for the last couple of years - would have been a huge pain trying to find 20 people with Android devices to meet this arbitrary threshold.</p>
]]></description><pubDate>Tue, 14 Nov 2023 05:16:38 +0000</pubDate><link>https://news.ycombinator.com/item?id=38259447</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=38259447</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38259447</guid></item><item><title><![CDATA[Triangles at work: GPU rendering shapes and connectors in Confluence whiteboards]]></title><description><![CDATA[
<p>Article URL: <a href="https://www.atlassian.com/engineering/gpu-rendering-shapes-and-connectors-in-confluence-whiteboards">https://www.atlassian.com/engineering/gpu-rendering-shapes-and-connectors-in-confluence-whiteboards</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=38247353">https://news.ycombinator.com/item?id=38247353</a></p>
<p>Points: 4</p>
<p># Comments: 0</p>
]]></description><pubDate>Mon, 13 Nov 2023 05:42:59 +0000</pubDate><link>https://www.atlassian.com/engineering/gpu-rendering-shapes-and-connectors-in-confluence-whiteboards</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=38247353</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=38247353</guid></item><item><title><![CDATA[New comment by calebj0seph in "ChatGPT Enterprise"]]></title><description><![CDATA[
<p>Nope, I don't know anyone who has access to the 32k model. The best that's widely available is GPT 3.5 16k.</p>
]]></description><pubDate>Tue, 29 Aug 2023 01:26:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=37302440</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=37302440</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37302440</guid></item><item><title><![CDATA[New comment by calebj0seph in "This page crashes Google Chrome"]]></title><description><![CDATA[
<p>We added an AbortSignal (<a href="https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal</a>) to our frontend and noticed that Chrome started randomly crashing occasionally for engineers on our team.<p>At first we thought it was just bad luck, but after it kept happening after for a week we investigated. After managing to debug Chrome itself we narrowed it down to the 'abort' event on an AbortSignal. It seems that attaching an 'abort' handler in a certain way, and then aborting the signal, causes a hard crash of the content process.<p>Source code: <a href="https://github.com/calebj0seph/chrome-crash/blob/main/index.html">https://github.com/calebj0seph/chrome-crash/blob/main/index....</a><p>Bug report: <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1472739" rel="nofollow noreferrer">https://bugs.chromium.org/p/chromium/issues/detail?id=147273...</a></p>
]]></description><pubDate>Mon, 14 Aug 2023 14:47:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=37121647</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=37121647</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37121647</guid></item><item><title><![CDATA[This page crashes Google Chrome]]></title><description><![CDATA[
<p>Article URL: <a href="https://calebj0seph.github.io/chrome-crash/">https://calebj0seph.github.io/chrome-crash/</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=37121646">https://news.ycombinator.com/item?id=37121646</a></p>
<p>Points: 3</p>
<p># Comments: 1</p>
]]></description><pubDate>Mon, 14 Aug 2023 14:47:35 +0000</pubDate><link>https://calebj0seph.github.io/chrome-crash/</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=37121646</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37121646</guid></item><item><title><![CDATA[Building a 60fps whiteboarding tool with WebGL]]></title><description><![CDATA[
<p>Article URL: <a href="https://www.atlassian.com/engineering/rendering-like-butter-a-confluence-whiteboards-story">https://www.atlassian.com/engineering/rendering-like-butter-a-confluence-whiteboards-story</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=37044802">https://news.ycombinator.com/item?id=37044802</a></p>
<p>Points: 4</p>
<p># Comments: 0</p>
]]></description><pubDate>Tue, 08 Aug 2023 05:19:30 +0000</pubDate><link>https://www.atlassian.com/engineering/rendering-like-butter-a-confluence-whiteboards-story</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=37044802</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37044802</guid></item><item><title><![CDATA[New comment by calebj0seph in "Figma Is a File Editor"]]></title><description><![CDATA[
<p>> Currently, durable objects are available in 9.89% of Cloudflare PoPs.<p>I really hope this becomes higher, the less latency the more compelling Durable Objects become for real-time applications.</p>
]]></description><pubDate>Thu, 13 Jul 2023 08:59:20 +0000</pubDate><link>https://news.ycombinator.com/item?id=36706555</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=36706555</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=36706555</guid></item><item><title><![CDATA[New comment by calebj0seph in "Figma Is a File Editor"]]></title><description><![CDATA[
<p>I'm an engineer on Atlassian's new whiteboard feature for Confluence, which has real-time collaboration like Figma. We've been highly successful using Cloudflare Durable Objects to act as a simple relay for WebSocket messages.<p>One of the best things is that the Durable Object will automatically run in the closest Cloudflare data center to the first user who connects, which helps keep latency very low.<p>The alarms feature they added last year has also been great at allowing us to asynchronously snapshot the state of a board certain intervals, rather than us needing to schedule the job from an external system.</p>
]]></description><pubDate>Thu, 13 Jul 2023 06:43:01 +0000</pubDate><link>https://news.ycombinator.com/item?id=36705745</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=36705745</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=36705745</guid></item><item><title><![CDATA[New comment by calebj0seph in "Simpsons Hit and Run source code (2003)"]]></title><description><![CDATA[
<p>Sounds like it'd be such a fun project to modernize the game, I wonder how quickly Activision will DMCA any such attempt though.</p>
]]></description><pubDate>Thu, 13 Jul 2023 05:02:37 +0000</pubDate><link>https://news.ycombinator.com/item?id=36705197</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=36705197</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=36705197</guid></item><item><title><![CDATA[New comment by calebj0seph in "The Condiment Packet Gallery"]]></title><description><![CDATA[
<p>Yes, this. Also as someone who likes a lot of sauce on my pie, the little packets are never enough!</p>
]]></description><pubDate>Sat, 01 Jul 2023 04:30:22 +0000</pubDate><link>https://news.ycombinator.com/item?id=36546602</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=36546602</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=36546602</guid></item><item><title><![CDATA[New comment by calebj0seph in "The world’s most liveable cities in 2023"]]></title><description><![CDATA[
<p>Yep, Sydney is ranked #4 yet is currently experiencing a severe shortage of rental properties where the average rent is now 40% higher[1] than 2 years ago.<p>[1] <a href="https://sqmresearch.com.au/weekly-rents.php?region=nsw-Sydney&type=c&t=1" rel="nofollow noreferrer">https://sqmresearch.com.au/weekly-rents.php?region=nsw-Sydne...</a></p>
]]></description><pubDate>Thu, 22 Jun 2023 05:00:02 +0000</pubDate><link>https://news.ycombinator.com/item?id=36428159</link><dc:creator>calebj0seph</dc:creator><comments>https://news.ycombinator.com/item?id=36428159</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=36428159</guid></item></channel></rss>