[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] async shader compiliation



That's not really the fault of the programming language, but of the
engine design. UE4 (and similar 'traditional' game engines) are huge
million-line codebases which haven't been designed for a small
executable size. It is possible to create full 3D MMO clients at a
fraction of the size (0.5..2 MBytes), the whole code base just needs
to be designed from the ground up for a small size, unnecessary engine
features must not be included in the build, and the compiler needs to
be able to perform aggressive dead code elimination (e.g. minimal use
of dynamic-dispatch/runtime-polymorphism).

Those games won't look quite as fancy and won't have the latest
realtime 3D-hair and GPU-accelerated physics, but they can start fast
and stream their assets during gameplay.

We did a proof-of-concept a few months ago where we built a simple 3D
action-client/server game with a WebSocket backend written in Go, and
3 different clients, one in C++ via emscripten, one in Typescript with
Babylon.js, and one in Unity exported to HTML5. The Typescript client
was around 350 KBytes (most of this was the minified/compressed
babylon.js blob), the C++ client was 410 KByte, and the Unity client
was around 4.5 MByte, all sizes compressed. We didn't write an UE4
client (although it would be interesting how it compares to Unity, I'm
pretty sure it would be quite a bit bigger).

On Tue, Mar 7, 2017 at 8:02 PM, Florian Bösch <pyalot@gmail.com> wrote:
> On Tue, Mar 7, 2017 at 7:51 PM, Maksims Mihejevs <max@playcanvas.com> wrote:
>>
>> WebAssembly compilation is still stalling a browser for about 15 seconds.
>
>
> Well they are compiling Unreal Engine (which is a bunch of C++ code) trough
> emscripten (which is known to produce copious amounts of output. I think a
> WebAssembly and Web optimized language will have far smaller bytecode, load
> faster and have faster development times than running a C++ compiler
> everytime you change a line.

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------