Babylonjs for Authoritative Server Simulation .Net Core 10+ AoT Wasm Webview2 running almost native speed

Bonobo-Bepuphysics2-Demos

Main menu with the 30-demo card grid

Why other physic engine and not the plugin Havok? :slight_smile:

A: Future authoritative server simulation with server physic engine in .NET Core 10+… but wait… we can still using Havok or other Typescript/JavaScript engines that runs in the UI for interpolation…

This is a website compiled in WASM that runs in a browser, so in this demo is inside a Windows Host (WinUI 3) but can run in a brower to.

Upstream BepuPhysics2 demos are ported into AOT-safe Bonobo.ECS simulations and rendered by a Babylon.js v9 page through a zero-copy, pure-64-bit pinned signal bridge — the same ABI the Bonobo engine uses (Float64Array over a WebView2 shared buffer on this host). A WinUI 3 + WebView2 + Native AOT host runs the simulations in-process.

This repo is a test harness, not a game: every demo is a fixture that exercises the physics library, the ECS mapping and the host bridge.

Planet

1 Like

I have to say that as a C# lover this sounds super interesting to me, but I have no clue what this is about :smiley:

HI @AlitarSemiramis,in resume, short answer when need to use all the cool features of .NET core like multithreading, on client (UI) and server, in this case of browser environment: separate the heavy logic as example the physic engine using webworkers and compiled in WASM (binary) and AOT Mode (Ahead-of-Time Compilation, the .NET build tools bypass the interpreter), so you have a thread in WASM, and another for UI and render in Javascript; You create the code only once (web wasm + javascript), and deploy to browsers/web and to Windows with winui3 and webview2.

1 Like

You should check out my box3d plugin you can multithread on there too and because its deterministic it works really well on workers.

1 Like