frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: Porting Terraria and Celeste to WebAssembly

https://velzie.rip/blog/celeste-wasm
327•coolelectronics•3d ago

Comments

rlmineing_dead•3d ago
Cool to see FNA/XNA projects projects working in the browser
dwattttt•1d ago
It's really impressive how much worked out of the box, decompiling a C# binary, then recompiling it for a target as different as WASM.
underdeserver•1d ago
And then it's also really impressive how much they did to get to the end.
jasonjmcghee•1d ago
Getting firebase "bandwidth quota exceeded" error when trying the demo.

You shouldn't have to worry about this kind of stuff if it's just a static site.

I'd host this on a cdn like cloudflare or github pages (free!).

coolelectronics•1d ago
My bad! Switched over to the github pages fallback. Cloudflare pages isn't suitable because the wasm files (100mb+) exceed the 25mb limit. (i could bypass this with service worker jank but that tends to be fragile). Github Pages also isn't suitable because it doesn't have a native way of sending the coi/coep headers that are required for SharedArrayBuffer to be available. Can also bypass that with service worker jank but I would prefer not to
hoten•1d ago
btw: this results in a white page on the first load until you manually reload, since the SW has not been loaded yet. May want to force a page reload on the SW install event to fix.

also: this is incredibly cool. thanks for writing this up and sharing!

truemotive•1d ago
Cloudflare R3 might suit the scenario better for you in terms of the heavy assets, it's like AWS S3 except for the cool part where you aren't charged for data egress (last I checked! haha)

I'm about to buy Terraria after all these years, just so I can get the assets and check this out. You're cool :)

vlovich123•1d ago
R2
NortySpock•23h ago
Oh Terraria is totally worth it, especially when spelunking with friends.

Its better than Minecraft, in my opinion.

tech234a•1d ago
Depending on how well the files compress, you could try: https://developer.mozilla.org/en-US/docs/Web/API/Compression...
bakkoting•14h ago
The service worker jank, while conceptually hacky, is actually remarkably un-janky and not really noticeable to users! It's very much fire-and-forget unless you also wanted to have another service worker (in which case it's time for suffering; service workers aren't even a little bit composable).

For anyone wondering: https://github.com/gzuidhof/coi-serviceworker or https://github.com/WebReflection/mini-coi

01HNNWZ0MV43FF•1d ago
This is very cool. However, the blog itself is not hitting 60 FPS on my Firefox. Probably that background effect?
dgb23•1d ago
I found that effect disturbing and distracting. It's rendered in a canvas element that you can delete via the inspector.
caminanteblanco•1d ago
This is absolutely amazing! I intend to use this on my Chromebook ASAP
71bw•1d ago
Your (?) website is so resource-demanding it's insane. I'm struggling to run it at any decent framerate on an i5-7500T. Makes the entire browser just crumble
poink•1d ago
I scrolled through the whole thing on my phone and it was fine
01HNNWZ0MV43FF•1d ago
Weird huh
doix•1d ago
You can disable javascript on the site and it works perfectly. I'm guessing it's this thing that destroys performance https://velzie.rip/static/background.js
kunwon1•21h ago
The moving background is absolutely intolerable, I didn't last ten seconds
midzer•1d ago
Celeste Classic in WASM https://midzer.de/wasm/celeste/
badmintonbaseba•1d ago
For some reason that runs at like double speed for me, very challenging.
flohofwoe•1d ago
Sounds like the game uses a fixed 60hz frame step but maybe you're on a 120hz display? Chrome and FF run requestAnimationFrame at 120hz in this case (while Safari sticks to 60hz)
badmintonbaseba•1d ago
Possibly, I'm indeed on a 120Hz display. I still got up to 1600m, it's a good challenge.

edit: 2000m now that I revisited. Crazy hard.

badmintonbaseba•22h ago
Made it to the summit at double speed.

  :strawberry:x14
  3:17:46
  deaths:1981
nottorp•16h ago
Don't link your world status updates to the frame rate please.

Even "AI"s know to show you how to do it in spite of requestAnimationFrame. I know, I asked.

But you have to ask them specifically to decouple game world updates from drawing, or they'll give you the dumb solution.

delusional•1d ago
> One of my favorite genres of weird project is "thing running in the browser that should absolutely not be running in the browser". Some of my favorites are the [...] the direct recompilation of Minecraft 1.12

Heh, you'd think Minecraft would be exactly the sort of thing that absolutely should be running in the browser, considering it was originally a Java applet.

I understand the point, I just find it amusing.

pjmlp•1d ago
Even more interesting is this idea of running WebAssembly on the server, in containers, with orchestration services among them, and communicating across sandboxed environments.

Somehow it reminds me of something, but memory is getting fuzzier nowadays. /s

baq•1d ago
You’re obviously talking about the 1972 VM/370 right?
pjmlp•22h ago
Naturally.
pjc50•22h ago
WebSphere!
voidUpdate•1d ago
Early minecraft versions did run in the browser before it was made a standalone app, and they recreated it recently https://classic.minecraft.net
HelloUsername•14h ago
> recently

6 years ago? https://news.ycombinator.com/item?id=19861584

James_K•1d ago
I've recently started trying to do a bit of basic game development targeting the web through WASM+OpenGL+SDL, and I must say, I'm shocked with how easy it is. I spent more time fiddling with CMake files than I did trying to the code to run on the web. There are still some limitations and rough spots on the web platform, but I've honestly had a much harder time compiling things for Windows or MacOS than for WASM.
Fraterkes•1d ago
Dumb question: do you have access to any of the nice text rendering features of the browser when you use Wasm, or is it basically just drawing to a canvas
James_K•16h ago
There is an Emscripten library which cross-compiles things to WASM. The means you can generally just pull in a dependency for font rendering, such as SDL_ttf.
parallax_error•1d ago
Safari on ios really hates this, all 3 demos crash upon loading lol
kkukshtel•23h ago
This post presupposes a bit of knowledge about C#/WASM and Native code linking in the C# ecosystem. I wrote a post a while back that could be a complement to this that does some more level setting about what's possible these days with compiling C#-based engines to the web for those that don't already have the context:

So You Want To Compile Your C# Game Engine To The Web With WASM

https://kylekukshtel.com/csharp-wasm-game-engine-compile-web...

modeless•20h ago
Porting games to the web is a fun hobby! I've done Quake III [1] and Cave Story [2]. Just like in this story it's all about the details. Getting the game loading is just the start. Things like adding touch controls for mobile, handling multiplayer, managing save files, supporting modern screen resolutions and frame rates, they take more time than the initial port.

[1] Single player: https://thelongestyard.link/q3a-demo/ Multiplayer: https://thelongestyard.link/q3a-demo/?server=HN

[2] https://thelongestyard.link/cave-story/

Spunkie•17h ago
It seems cool but haven't been able to get it working. I'm downloading terraria assets with the from steam option but its at only 5% after an hour.
acheong08•10h ago
This is so cool. Last time I played Terraria was back in 2014. One minor complaint: the resolution is too high & everything is scaled down a ton. It would be nice if we could have it scaled at 200% so i can actually see the text and icons

The radix 2^51 trick (2017)

https://www.chosenplaintext.ca/articles/radix-2-51-trick.html
218•blobcode•6h ago•30 comments

Radio Astronomy Software Defined Radio (Rasdr)

https://radio-astronomy.org/rasdr
14•zeristor•1h ago•2 comments

Modern C++ – RAII

https://green7ea.github.io/modern/modern.html
21•green7ea•1h ago•3 comments

Bridged Indexes in OrioleDB: architecture, internals and everyday use?

https://www.orioledb.com/blog/orioledb-bridged-indexes
3•pella•20m ago•0 comments

Atomics and Concurrency

https://redixhumayun.github.io/systems/2024/01/03/atomics-and-concurrency.html
12•LAC-Tech•2d ago•1 comments

Tokenization for language modeling: BPE vs. Unigram Language Modeling (2020)

https://ndingwall.github.io/blog/tokenization
7•phewlink•1h ago•0 comments

Practical SDR: Getting started with software-defined radio

https://nostarch.com/practical-sdr
158•teleforce•9h ago•39 comments

Triangle splatting: radiance fields represented by triangles

https://trianglesplatting.github.io/
86•ath92•6h ago•34 comments

WeatherStar 4000+: Weather Channel Simulator

https://weatherstar.netbymatt.com/
616•adam_gyroscope•19h ago•115 comments

Germany eyes 10% digital tax on global tech groups

https://www.ft.com/content/39d4678d-a7e1-4fce-b8d8-eb799cfed3e6
29•saubeidl•58m ago•11 comments

Turn a Tesla into a mapping vehicle with Mapillary

https://blog.mapillary.com/update/2020/12/09/map-with-your-tesla.html
29•faebi•1d ago•9 comments

FLUX.1 Kontext

https://bfl.ai/models/flux-kontext
389•minimaxir•17h ago•99 comments

Show HN: MCP Server SDK in Bash (~250 lines, zero runtime)

https://github.com/muthuishere/mcp-server-bash-sdk
69•muthuishere•6h ago•19 comments

Buttplug MCP

https://github.com/ConAcademy/buttplug-mcp
170•surrTurr•3h ago•88 comments

OpenBAO (Vault open-source fork) Namespaces

https://openbao.org/blog/namespaces-announcement/
44•gslin•7h ago•19 comments

The atmospheric memory that feeds billions of people: Monsoon rainfall mechanism

https://phys.org/news/2025-05-atmospheric-memory-billions-people-monsoon.html
26•PaulHoule•2d ago•5 comments

Dr John C. Clark, a scientist who disarmed atomic bombs twice

https://daxe.substack.com/p/disarming-an-atomic-bomb-is-the-worst
92•vinnyglennon•2d ago•60 comments

Player Piano Rolls

https://omeka-s.library.illinois.edu/s/MPAL/page/player-piano-rolls-landing
46•brudgers•7h ago•30 comments

Smallest Possible Files

https://github.com/mathiasbynens/small
41•yread•2d ago•16 comments

Show HN: I wrote a modern Command Line Handbook

https://commandline.stribny.name/
349•petr25102018•20h ago•87 comments

Why do we get earworms?

https://theneuroscienceofeverydaylife.substack.com/p/mahna-mahna-do-doo-be-do-do-why-do
3•lentoutcry•2h ago•1 comments

How to Do Ambitious Research in the Modern Era [video]

https://www.youtube.com/watch?v=w7DVlI_Ztq8
30•surprisetalk•5h ago•1 comments

The David Lynch Collection

https://www.juliensauctions.com/en/auctions/julien-s-auctions-turner-classic-movies-present-the-david-lynch-collection
56•Duanemclemore•5h ago•51 comments

Superauthenticity: Computer Game Aspect Ratios

https://datadrivengamer.blogspot.com/2025/05/superauthenticity-computer-game-aspect.html
13•msephton•3d ago•4 comments

I'm starting a social club to solve the male loneliness epidemic

https://wave3.social
210•nswizzle31•10h ago•364 comments

Show HN: templUI – The UI Kit for templ (CLI-based, like shadcn/UI)

https://templui.io/
34•axadrn•6h ago•20 comments

Show HN: Donut Browser, a Browser Orchestrator

https://donutbrowser.com/
39•andrewzeno•6h ago•18 comments

Why is everybody knitting chickens?

https://ironicsans.ghost.io/why-is-everybody-knitting-chickens/
138•mooreds•2d ago•103 comments

Making C and Python Talk to Each Other

https://leetarxiv.substack.com/p/making-c-and-python-talk-to-each
118•muragekibicho•2d ago•74 comments

Human coders are still better than LLMs

https://antirez.com/news/153
521•longwave•18h ago•603 comments