Top
Best
New

Posted by panza 9 hours ago

Half-Life 2 in a Browser(hl2.slqnt.dev)
495 points | 204 comments
modeless 9 hours ago|
And Quake 3: https://thelongestyard.link/q3a-demo/

And Unreal Tournament: https://dos.zone/mp/?lobby=ut

There's also https://noclip.website/ which, while not playable, has hundreds of levels from dozens of older games that you can explore freely. Including Half-Life 2, with more accurate rendering than this web port (which seems to be missing many shaders including character eyes).

notsentient 2 hours ago||
There's also Ultima Online in the browser (sanctioned by the official servers). I'm one of the maintainers.

https://retail.classicuo.org/

doodpants 1 hour ago|||
I visited this page in Firefox and was presented with a message that essentialy said (paraphrasing): "this site best viewed with browser X". Now, I'm not a professional web developer, and maybe there are legitimate reasons why this app is depending on new cutting edge browser features that aren't yet supported by Firefox, but it seems to me that this just shouldn't be a thing anymore.
koolala 38 minutes ago||||
What feature was Firefox missing for it?
mondainx 2 hours ago||||
From this mondain to the maintainers, thanks!
IshKebab 1 hour ago||||
> sanctioned

Oh you mean it is or isn't approved.

nzeid 2 hours ago|||
What!? Amazing.
hoofedear 1 hour ago|||
And Diablo: https://devilutionx.app
todotask2 3 hours ago|||
Doom 3, smoother on Macbook M1 but it's too dark that I need to actually increase brightness on Firefox reliably. Is there a better solutions?

https://wasm.continuation-labs.com/d3demo/

Jolter 3 hours ago|||
I seem to recall that Doom 3 was unplayable dark on my PC, once upon a time.
todotask2 2 hours ago||
Same too, now it's my haze and night blindness vision.
helo- 1 hour ago|||
[dead]
navane 2 hours ago|||
GTA vice city https://quenq.com/apps/vice-city/
Vinnl 1 hour ago||
Sadly that one seems to have been removed.
bmurphy1976 1 hour ago||
Click into the directory. It's there and you can access it that way.
calebj0seph 8 hours ago|||
Also The Simpsons Hit & Run! https://shar-wasm.cjoseph.workers.dev/
dmitshur 29 minutes ago||
It works so seamlessly on macOS at 6016x3384. What a delight.
sho_hn 8 hours ago|||
And Tomb Raider

https://eikehein.com/stuff/sabatu

Fan remake of the levels to avoid asset copy, but it's a downstream of the original engine (and loads the original level files just fine), so the real game.

dmitshur 1 hour ago|||
Also a TR1-4 level and cutscene viewer at https://popov72.github.io/TRN2/.
firasd 7 hours ago|||
Ha fun--works in my regular laptop in Chrome without any CPU/GPU etc spikes
nadermx 7 hours ago|||
And CS: https://play-cs.com
HelloUsername 3 hours ago|||
And Red Alert 2: https://news.ycombinator.com/item?id=45991853
OptionOfT 3 hours ago|||
I have tried that one and it truly baffles me. If you play it you'll notice the movement of the ships is extremely smooth, vs the original where ships only rotated in increments of 45 degrees.

I wonder how they did this.

belinder 2 hours ago||
On first look it looks like interpolated frames
ionwake 2 hours ago|||
I personally love openra. It’s a smooth free online implementation of red alert 2 with multiplayer
kogasa240p 1 hour ago|||
> And Quake 3 There is QuakeJS as well.
modeless 36 minutes ago||
Yeah but my port is better because it supports phones/touch and gamepads and multiplayer over UDP and has better performance and a bunch of other small details.
foldr 6 hours ago|||
I vibe coded this for exploring levels in the original Deus Ex: https://dxwebview.pages.dev/ (https://github.com/addrummond/dxwebview).

It's a bit janky owing to the vibe coding, but the basic functionality works pretty well. You need the original game data files to use it.

plastic-enjoyer 8 hours ago||
What a time to be alive
rvnx 6 hours ago||
What a time, but at what cost ?

Interestingly, these Wasm ports are all about nostalgia games.

I sort-of wish we would live in 1998 (when HL1 was released). Less social network, a more creative internet, LAN parties, IRC / ICQ, easier new connections.

We now have tailwind / material UI, a locked-down Apple ecosystem, Photoshop with millions of nagging screens, centralized mega-corps like OpenAI, and the first bits of World War 3 where drones and robotics are made to kill people.

Misses a lot this free internet (though 1 USD / minute)

bigfishrunning 2 hours ago|||
It is so easy to not use tailwind, apple, photoshop, or openai. It's really easy to stay off of social networks. Computers are smaller/easier to move so lan parties are easier (although as a real adult with a real job they're harder to pull off).

The world war 3 bits suck, i'll admit, but most of the "early internet" stuff that people are nostalgic about still exists, you just have to look for it.

freedomben 2 hours ago||
> you just have to look for it.

Any tips for finding these things like communities? Seems like most communities are private now unless you know people in meat space. Living in a rural area, those opportunities are far and few between for me.

vovavili 4 hours ago||||
https://static.wikia.nocookie.net/memepediadankmemes/images/...
freedomben 2 hours ago||||
Happy Monday everybody!
peepee1982 4 hours ago|||
Your comment is jarringly out of place, which is why it's getting downvoted.
mrtksn 8 hours ago||
Interesting, I am not able to play HL2 on Steam because macOS no longer has 32-bit support and Valve never compiled if for 64-bit but here we are, it’s playable on the same OS in the browser.

BTW IIRC there was some method to convert the 32-bit game binaries to make them run on recent macs. I remember doing it.

gonzalohm 4 hours ago||
How is that possible? 32 bits should be compatible with a 64 bit machine. You can always use less bits for your memory addresses.

Are there any other architecture changes that are preventing 32 bits binaries from running? Does that also mean that old software no longer runs unless there is a 64 bit version?

In windows you can run x32 and x64 executables in a 64 bits machine

lynguist 3 hours ago|||
Monsieur, on Windows this problem was solved with a large development effort, that's why it goes unnoticed on you. Note that CPU level instruction emulation is literally the easiest problem of emulation. (Why do you think you can't just go and execute Nintendo Switch binaries on your Mac M1? Both run ARM64.)

On Windows, this was is implemented as SysWOW64. WOW64 means Windows on Windows 64. It makes the userland emulation and pretends towards the process that everything around him (incl. drivers) are the 32-bit ones.

Source: Microsoft.

https://devblogs.microsoft.com/oldnewthing/20081222-00/?p=19...

odo1242 43 minutes ago||
One of the big things here is that Intel and ARM processors are backwards-compatible with 32-bit instructions, even if they are 64-bit processors. Apple Silicon on the other hand is not, which is why Apple completely dropped support before switching.
Retr0id 1 hour ago||||
In the case of hl2 the source code for the engine has leaked, so you can recompile it for your target platform of choice, no "conversion" needed. I got it running natively on aarch64 linux a while back, with no issues.
naikrovek 1 hour ago||
So why can’t Valve do it?
Retr0id 1 hour ago||
Not a priority I guess.
MrDOS 4 hours ago||||
Only the very first few models of Intel Macs had strictly 32-bit processors (the 2006 iMac and Mac minis with Core Solo/Core Duo processors), and none of them were realistically capable of playing Half-Life 2. Apple is guilty of many sins, but this isn't one of them. Valve should never have shipped a 32-bit application in the first place. The binary was already obsolete before it even left Bellevue.
jmmv 1 hour ago|||
> Only the very first few models of Intel Macs had strictly 32-bit processors (the 2006 iMac and Mac minis with Core Solo/Core Duo processors), and none of them were realistically capable of playing Half-Life 2.

What? First, those chips were plenty powerful to run HL2 (the game predates them). And second, all x86_64 chips can run older x86 32-bit code unmodified.

The reason macOS stopped supporting 32-bit code has nothing to do with the processors but more about them wanting to remove support for 32-bit binaries from the kernel and from all user-space libraries. To run a 32-bit binary, you need itself and all libraries it depends on to be 32-bit too, including the syscall boundary, which is "fine" (both Windows and Linux do this just fine, so it's really on Apple to have removed this). And I suppose Apple removed those because it was building towards a 64-bit-only world to simplify the Apple Silicon transition.

MrDOS 1 hour ago||
The CPUs were powerful enough, sure. The GPUs (Intel GMA950) absolutely weren't. Even on Windows with better drivers, Half-Life 2 is a slideshow on that class of hardware.
ajross 2 hours ago|||
> Valve should never have shipped a 32-bit application in the first place.

It's literally a 2004 game! That's ridiculous. A handful of opterons existed in the market, but Intel wouldn't get there for years still and it was well over a decade until x86_64 crossed 50% market share in consumer stuff.

Good grief, as it were.

MrDOS 1 hour ago||
In 2004, sure, but Valve didn't (publicly) ship Mac OS X software before 2010.
functionmouse 4 hours ago||||
Apple goes way out of their way every few years to ensure old games stop working
naikrovek 1 hour ago||
The don’t let backwards compatibility stop them from doing anything, but I don’t think they go out of their way to target games. That doesn’t make any sense to me.
wat10000 1 hour ago|||
Everything in the process has to agree on how big the pointers are, or you need code to convert between the formats at the boundary. That means you either need 32-bit versions of all OS libraries, or you need a complicated shim layer. Apple went for having 32-bit versions of all OS libraries. But this isn't free to maintain, and they dropped them after a few years.
freetonik 1 hour ago|||
There's a way to compile HL2 on ARM Macs, I've written a guide here: https://rakhim.exotext.com/how-to-play-half-life-2-on-mchip-...
Klonoar 6 hours ago|||
I admit that Valve’s approach to Steam on macOS has never made sense to me.
shakna 5 hours ago|||
I think Apple may have burned a lot of developer bridges with Metal, deprecating OpenGL, and ignoring Vulkan.
charcircuit 5 hours ago||
To be fair Microsoft ignored Vulkan with Windows leaving it up to 3P to implement.
shakna 4 hours ago|||
I don't think Valve funded Proton and Linux development by accident.
robhlt 1 hour ago||||
Microsoft is not a GPU manufacturer, Apple is. The 3rd parties Microsoft left it up to are the GPU manufacturers.
xnickb 4 hours ago|||
How is that "fair"?
bjord 3 hours ago||
they're not saying it's fair to consumers, they're saying "it's not just apple, microsoft does it too", i.e. that judgement on apple should be made in the context of how its competitors behaved
zamadatix 37 minutes ago||
I think they are saying the fair comparison should be what another 1st party GPU maker supports in their 1st party drivers, not whether or not Windows provides 1st party Vulkan implementation for 3rd party hardware.
doublerabbit 6 hours ago|||
This was more Apple's doing rather than Valve's.

Valve wanted steam to co-exist on the mac in the early days and John Sculley of Apple didn't want Apple to be seen as a gaming device or a "personal home computer". So they ceased contact with Valve and the rest is history. https://www.youtube.com/watch?v=lPTLPXNtb2I

Apple refused to license joysticks so they could prevent customers from considering early mac's as game machines and deliberately refused to support games on the machine. Myst was only few that were exclusive to the Mac; that they then ported to PC.

Wowfunhappy 6 hours ago|||
Your timeline doesn't make sense. Steam launched in 2003. Scully was forced out of Apple in 1993.
hypercube33 4 hours ago|||
Most valve games are 32bit macos binaries I assume for powerpc or Intel or something but they flat out refuse to run on modern ox
russelg 4 hours ago||
If they were Intel 64bit binaries they'd still run due to Rosetta 2, however the majority of their games did not get a 64bit upgrade on macOS.
doublerabbit 5 hours ago|||
So, your right. But the still holds true, that seed was what was sown not to encourage games for the Mac.

If you watch the YT video they go in to depth that they attempted to port the game and was axed by apple.

doginasuit 4 hours ago|||
Apple is so obsessed with how their product is marketed and perceived that they all but eliminated gaming on the platform. It's hard to argue that it hasn't been effective, but I'll never understand why people accept that the people who make the computer should decide how you use it.
parasubvert 1 hour ago|||
I wouldn't say 'eliminated gaming', they just have they've put a lot of encouragement into Mac gaming in recent years to the point that they're maintaining Rosetta 2 for game ports (via Crossover/Wine/Proton) even after its broader deprecation.

The main issue IMO is the Apple hardware itself isn't focused on raw performance, it's on energy efficiency and mobility. You'd need a MacBook Pro or Mac Studio at least to have the GPU cores & RAM to play the most recent PC games. And so they just tend to lead with casual games, live service games, and second run AAA games. Technically Apple maintains the world's largest gaming platform (by users & revenue) in iOS.

And plenty of AAA games have been ported to macOS like Cyberpunk 2077, the last few Assassin Creeds (Shadows, Mirage), or even iOS/iPadOS/visionOS like Control & Death Stranding, the recent Assassin's Creeds, Resident Evil 2 & 4 Remakes, RE 7 & 8, Civ 6 & Civ 7, etc.

mghackerlady 1 hour ago|||
It's weird, they still try to market it as a machine you can play games on. They make sure a lot of games make it over. It's just never the new cool ones, it's always stuff like a resident evil game from a few years ago or death stranding
parasubvert 1 hour ago||
It's because the hardware can't really handle the latest and greatest games unless you get the top end hardware. Their GPU innovation is on letting you run an AAA game from 5 years ago on a tablet.
dgb23 5 hours ago|||
Disheartening. macOS seems to get less and less support in a way. For example some of the Blizzard remakes don't run on macOS but the originals do.
jillesvangurp 7 hours ago|||
On paper qemu should be able to do this. The hard part is hardware acceleration for the GPU. Without Apple putting effort into supporting this with e.g. documentation, that's a bit hard. That's also holding back linux support on Apple hardware. But it's a fixable problem that will only get easier as hw gets better and faster over time.
ErroneousBosh 6 hours ago||
> The hard part is hardware acceleration for the GPU

Is it, though?

How Hard Can It Possibly Be to just do a software GL renderer that emulates a mid-2000s Radeon, these days?

account42 6 hours ago||
At what resolution. You're not going to software render 4K120FPS even with 2000s graphics. But you also don't need a software implementation since translating to a host API isn't really any harder than that (and often much easier). And this already exists in Wine.
anthk 2 hours ago|||
Wine 11 for Mac will run 32 bit binaries without neeeding 32 bit libraries.
philipwhiuk 2 hours ago|||
MacOS removing 32bit support was a massive pain. A bunch of Ambrosia Software games no longer work too (e.g. Escape Velocity Nova, Apeiron).
taylor-tg 1 hour ago||
I know it's not a remake, but Endless Sky[0] seems to be a pretty faithful "reimagining" of the EV series. Even has an Android port on F-Droid. I haven't played through much of it, but the first few minutes gave me immediate nostalgia.

[0] https://endless-sky.github.io/

iberator 3 hours ago||
wine?
postatic 3 hours ago||
Cool!

I recently ported Doom on browser so that you can easily play multi-player (up to 4) completely free (you can host it yourself on Cloudflare)

https://playdoom.ossy.dev/

chamomeal 1 minute ago||
That is so wicked cool, I’m going to try this later today!!
rwoerz 1 hour ago||
Cool, so now I can leave my lawnmower where it belongs.

https://news.ycombinator.com/item?id=39521535

memoryuns4f3fff 7 hours ago||
Here is a link to the blog post since I didn’t see it mentioned

https://www.slqnt.dev/blog/hl2-in-web

Mossy9 45 minutes ago||
How (why) does that site block reader mode... At least on Firefox Android it offers the reader mode button, but turning it on just redirects back to the page (which is too wide, hence the reader mode attempt)
Cthulhu_ 6 hours ago||
Yeah probably better to link to this instead, else everyone clicking will start downloading the big files.
hwc 2 hours ago||
With WASM and WebGL being mature technologies, I'm not sure why there aren't more video games published this way. For really big games with lots of assets, having those assets in local storage makes sense. But I wouldn't mind if a game "installer" is just your browser asking "This game wants to use up to 20 GB of local disc space. Is that okay?"
dandersch 1 hour ago||
Technical reasons I know of:

- Support from major engines is still bad: Unreal Engine does not have web exports. Godot 4 does not support them when using C#. That only leaves Unity.

- While WebGL is mature, it's based on openGL es3, which is an ancient api/shading language with limited features. If you were previously targeting vulkan/dx12, now you have to restrict your feature set or find (costly) workarounds to make webgl support happen

- WebGPU could be a better fit, but support is still not ubiquitous (Firefox, Linux or older phones are especially bad)

- SDL_GPU (SDL3) still has no WebGPU backend

nickpeterson 2 hours ago|||
I’ve always wondered a bit about the ssr side of these things a bit. Something like time crisis where the main video is pre-rendered and streamed but the interactive elements (enemies, explosions) are superimposed in front on the client. Feels like you could make a very low bandwidth experience (around the same cost as a YouTube video plus some assets?).
Rohansi 17 minutes ago||
But why not just render everything 3D? GPUs are more than good enough and it will look more consistent.
kllrnohj 51 minutes ago|||
For what purpose, though? Why saddle yourself with the overhead & restrictions of WASM and the limitations of WebGL (or even WebGPU), just to run in a browser? The typical answer for running in a browser is the fast deployment, but if the user has to sit through a 20GB download anyway, then what's the point? Just to avoid needing an install wizard? And in case you aren't aware, 20GB would actually be a relatively small game. 60GB+ is quite common now (the more recent call of duties tip the scales at 140GB)
Rohansi 10 minutes ago||
> but if the user has to sit through a 20GB download anyway, then what's the point?

They don't have to unless the game makes them. Assets can be streamed in. This Half Life 2 port streams in each chapter so you are playing without having the entire game downloaded. World of Warcraft is over 100GB but you can start playing with only a fraction complete and it will continue downloading as you play

nnevatie 2 hours ago|||
Because you'd be missing the market and monetization layer that Steam so conveniently provides.
hbn 58 minutes ago||
Remember that any time the browser gets more free-reign on the PC it will be 0.01% used in good faith and 99.99% either unintentionally misused or maliciously abused to make computers worse for people who don't know how to diagnose these things.

Just look at web notifications. Maybe it's nice that you can get email alerts on your PC without having to install an app, but now every news site and sketchy clickfarm on the planet is trying to send notifications to get grandma back on their website, showing her ads.

Users are so accustomed to popups and cookie banners and what have you, they've been trained to click "sure, accept, whatever, just let me use the website" so permissions prompts may as well not exist.

I do not like the effort to make webapps as capable as desktop apps. Visiting a website and hitting "accept" which could easily be done by accident should not be offering anywhere near the level of trust and permissions to my system as installing an application. The friction of installing an application is not an inconvenience, it's a feature.

utopiah 7 hours ago||
That's also the kind of Website, beside the impressive technical result, that reminds me nothing can be blocked.

It's not about bypassing VPN or deep pack inspection, rather it's about how once anything, including a very complex video game (like here) to an entire OS with a host machine (like QEMU on WASM, or a random InternetArchive link about emulation) is "just" a Web page that can be hosted... on anything (including a 10 bucks Rasperry Pi Zero which can also be an AP, a phone obviously, heck even a e-cig!) then it doesn't matter what is "blocked" as it can be brought to anyone with no installation.

account42 6 hours ago|
Sounds like companies should start locking down browsers to disable WebGL, WASM and other similar APIs targeted at apps as opposed to web pages. I would welcome this if it got web developers to stop using more than they actually need.
utopiah 2 hours ago|||
Tricky to block WASM. A lot of useful Websites use for genuinely good usage. Can be for syntax highlighting, chess engine, etc and the same goes for WebGL or WebGPU, they are used for responsive UI in dashboard, for data visualization, for video rendering with effects e.g. blurring a background behind a person thus privacy, etc. Blocking either of those would break a lot of modern useful Websites.
itomato 4 hours ago|||
You’re thinking of Facebook, and you can still get that.
paganartifact 33 minutes ago||
The ugliest site in the world that just starts loading and saving files without user interaction.

Give me a play button, let me initiate the install, show me what the hell it is first.

This looks no different than a scam phishing link

zamadatix 20 minutes ago||
It only loads the first 50 MB needed to start the game at first, as you interact/progress it loads more. 50 MB is definitely at the boundary of "how many users appreciate a button vs how many are ignored they have to click it to load the initial page" size.

Having to click a button to see anything itself is even a scammy pattern as it's used by scam sites to get more permissions before the user has a chance to doubt the content at all.

Rohansi 20 minutes ago||
Pretty sure it's just the default Emscripten page. It is bad and most demos don't bother changing it.
entropyneur 9 hours ago||
Whew. Crashed before I sunk my day there.
butlike 1 hour ago|
Did it also crash on the part where you exit into the city square? Cause that's where it crashed for me.
LandenLove 9 hours ago||
As much as I dislike webdev stuff, I love the way you can distribute entire programs through WASM. Super cool stuff! For those who are interested, I recommend checking out Godot for exporting games on the web. It's really easy to do and you can host it on Itch.io
roflcopter69 5 hours ago|
Isn't Godot kinda flawed for deploying to the web? For example, no C# as of now, although there have been plenty of efforts to make it work. Or AFAIU audio being forced to stay in the main thread which can cause glitches. I just mean that it's not all fun and games as soon as you want to make a more ambitious game and not just a quick demo or game jam thingy.
tapoxi 3 hours ago|||
Godot 3.x supports C# on the web because it uses Mono.

Godot 4.x migrated to CoreCLR since Mono is a dead end, but Microsoft insists on .NET being the entrypoint in a WASM build. MS initially promised support for .NET being invoked by something else but dropped the feature, leaving Godot stranded. The current proposal is to make Godot a library (libgodot) invoked by .NET.

LandenLove 5 hours ago|||
I found GDScript to be quite powerful in terms of functionality. I don't have experience in professional game Dev to be aware of the benefits of C# beyond it being the industry standard for Unity.

Single threaded audio is a big concern. I haven't implemented music in my game yet to know if it is a deal breaker.

The main problem that I have run into is shader compilation stutters on the compatibility render. Makes the game basically unplayable. My work around was to spawn certain objects on the main menu out of sight to force compilation. I believe the forward renderer has some pre-compilation.

tancop 3 minutes ago|||
gdscript is missing basic features like interfaces (only abstract classes with no multiple inheritance) or custom value types. spawning scenes from code is tricky and not type safe. asset loading and globals are a mess. the engine is built around using a lot of nodes but nodes are expensive, so you need to drop down to confusing low level server apis if you have performance issues.

the worst part is theres no defined build step so `@tool` scripts run both in the editor and at export time. its easy to accidentally crash the editor or mess up your scene with a bad editor script missing one line of code. and as far as i remember its impossible to undo so remember to save often.

godot is still the best option if you want a open source engine for your game but only because bevy is not production ready yet.

roflcopter69 4 hours ago|||
Of course it's a matter of perspective and I can totally get how one would be happy with GDScript. Tbh, it's hard to beat GDScript when it comes to making small games. It's quite evident that only GDScript has first-class integration into the Editor, C# comes second and all the other serious language bindings come third.

I might state the obvious here, but static typing, null-safety, being able to refactor and such things make C# much much better for bigger games. Slay the Spire 2 has been made with Godot + C# and people have already decompiled and peeked under the hood (for example here https://www.youtube.com/watch?v=SpB4-W9L4ec) and imo it shows quite well how certain patterns simply require a more powerful language than GDScript or would at least be very painful and fragile to make in GDScript.

Your workaround for shader stuttering sounds quite hilarious :D I don't mean it's bad. It seems pragmatic in a good sense. But yeah, it's those limitations that pile up when making Godot target the web...

mynameajeff 2 hours ago|
Does anyone know some of the rebinded controls? The main menu doesn't show them and I can't figure out how to reopen the menu during gameplay or any using the bindings that are usually set to the function keys. The page doesn't seem to have any info included like that kind of thing.

Edit 1: crouch is bound to C according to the blog post, but that's the only one mentioned. Edit 2: You can use key_listboundkeys from console. Also can just open the menu with `

More comments...