Live data from Hacker News

Web Game Engines and Libraries

webgamedev.com

31–37 of 37 posts

Re: Web Game Engines and Libraries

#31
post #3

I'm building a JavaScript game in my own engine, which in retrospect was a big mistake considering the game utilizes a lot of multithreading (the game is "Noita meets Factorio" so it's required for the simulation). You can only share memory between threads using a SharedArrayBuffer with raw binary data and you need special headers from the web server to even enable it. This means that I've had to write a lot of convo…

We use multi threading in the netcode for our browser based games built in Godot. I've been considering looking into using web workers _without_ shared array buffer so that we can use threads in all environments, even without cross origin isolation. Is that something youve looked into?

Re: Web Game Engines and Libraries

#32

https://godotengine.org/ and export to web .

While you absolutely can use Godot to export to web, I found the exports themselves to be pretty lacking. For one, the export size is much larger compared to other game engines and frameworks. Because we're targeting web and not desktop, small size is a must-have as many people who play web games are more likely to leave and never come back if they're waiting for the game to load.

Export size is very important. We got our Godot export (assets + wasm) down to https://goobershot.winterpixel.io/

I believe the wasm is about 5mb and the .pck is about 5mb.

You can shrink the wasm by disabling unused modules in your Godot compilation and not compile stuff you don't need. You can remove debug symbols, and enable link time optimization as well. We could push our export size even smaller, but I have higher priorities.

Re: Web Game Engines and Libraries

#33
post #22

three.js is not a game engine. it’s a 3d rendering library. It has no feature of a game engine. No collisions, no physics, no input systems, no facilities for game objects or ai or state machines etc… I have a feeling other libraries on the list are similar

Three js has quite a few examples of collision and LOD in its examples folder, I feel you are underestimating it

Re: Web Game Engines and Libraries

#34
I really like Phaser 3, but if you're more accustomed to a traditional polling-style engine loop (inputs, logic, physics, render), it does take a little getting used to.

It's very much a "batteries included" game framework with the exception of a built-in map editor though you can just use something like Tiled.

Re: Web Game Engines and Libraries

#35
post #2

Some time ago I needed some 3d on web so I did simple rotating textured cube demo and out of 30 webgl libraries tested only 2 achieved 60fps for such a simple demo. On web you have no performance to spare so when you plan on making larger project test performance first. If it's slow with simple stuff, it's only get worse as you add more and more stuff. (Sorry I don't remember which 2 were fastest, you should do your…

Check out Renderlet https://www.renderlet.com/

Yes! You should be able to get nearly native performance for that sort of pipeline out of a WebGL backend.

Re: Web Game Engines and Libraries

#36
A bit off-topic,

But I just want to raise awareness that currently it is impossible to get 60fps for a canvas in chrome on MacOS without dropped frames:

https://www.vsynctester.com/

I have tested with an M2 Air and an older Intel MacBook Pro. I think this is related to this bug report (open for many years) but I am not sure:

https://issues.chromium.org/issues/41136434

One might say MacOS users use Safari most of the time, but sadly it is not possible to get a pixel perfect (or at least not wildly off) canvas if a user changes the zoom settings:

devicePixelRatio does not change on zoom as it does in other browsers and I believe the spec. https://developer.mozilla.org/en-US/docs/Web/API/Window/devi...

This is a decision made for accessibility reasons on Apples part, but I can’t find the quote on that anymore. Alternative mechanisms to size the internal resolution of a canvas correctly are also not supported on Safari.

Re: Web Game Engines and Libraries

#37

Missing one of the best choices as long as "maturity" isn't on the top of your list: Bevy - https://bevyengine.org/ Game engine written in Rust, leveraging ECS in almost every place and way, with a really capable WASM export option. Wrestling ECS for the first time might take you some time, but in my experience helps you keep game code as clean and decoupled as game code could be.

Bevy doesn't have great wasm support currently especially with multithreading but they are working on it.
Post reply on HN