Babylon Lite but Native! Game engine experiment

Rough writeup as I’ve hadn’t a chance to sleep yet, but I got Babylon Lite running “native”!

This is a part of an engine I’m writing that works on the web and natively, backed by Babylon Lite. The engine is fully networked over websockets, webrtc, IPC (CEF<>Node without sockets) and Steam Networking Sockets, with support for both Havok and Box3D physics.

The screenshot you see above is using CEF (running on Linux on a M1 Macbook), but Babylon isn’t actually running on the web there, it’s running on a NodeJS worker. The Node worker is able to use WebGPU via Dawn, and it renders behind CEF so overlays/etc work just fine. The worker actually has access to the texture CEF copies to (fully in GPU, the CPU never sees any pixels) but right now it is currently blitted/blended in C++.

But everything still works in a browser - this app is actually a Nuxt app that if connected to by a regular browser, uses WebGPU like normal (though in a JS worker to keep it independent of the main thread) and doesn’t even use postmessage for handling input. Works on Windows/Mac/Linux and every major browser.

Happy to answer any questions, @Pryme8 thought you in particular might be interested in this (though not sure if your project uses Babylon Lite or not)

4 Likes

This is a very interesting experiment! I’ll definitely keep an eye on it.

I do not but the methods are still interesting to me. I’m also interested in your Box3d work and want to compare it against mine. I’ve been keeping mine up to date with Erics updates that he commits to the main branch even before releases. Just got the dynamic character controller supported. Basically I wanna see how you handled the conversion and compare gaps then see if there is anything I can learn from yours for efficiency.