Re:Doom 3 in WebAssembly
by johndough on Thursday January 03, 2019 @03:19PM
(#18818898)
I don't know how this port is doing it, but with emscripten it might be as easy as adding the `-s LEGACY_GL_EMULATION=1` compile flag.
[ Parent
| on HN ]
The author used Regal rather than the LEGACY_GL_EMULATION feature in Emscripten, which I doubt was complete enough as Doom 3's fixed-function pipeline was easily one of the most demanding OpenGL 1.x games. Anyway, I don't think it's particularly valuable criticizing how hard or not-hard the effort was when the end result is novel and impressive.
One of the difficult thing was not knowing during the whole porting process if in the end it would really work, or not...
I almost gave up several time :)
I used to develop an emulator. Different scope, but I guess there are a lot of similarities, so I feel your pain.
Getting things working on platforms other than originally intended is really hard. Nice work!
Re:Doom 3 in WebAssembly
by blackbeard334 on Friday January 04, 2019 @07:48AM
(#18823591)
How long did it take to port?
First commits on the repos (D3 and Regal) are from 17/12. I started to work on this a week or so before the first commits, so it took roughly 4 weeks, with daily progress and commits. In the end the amount of changes in the code is relatively small. Time was mostly spent investigating and figuring out WHAT changes needed to be done for things to work
Re:Doom 3 in WebAssembly
by blackbeard334 on Friday January 04, 2019 @09:07AM
(#18824097)
Impressive man!
Can you talk a bit about the biggest problems you faced?
Also, I'm a bit familiar with the doom 3 code, and the loading a 400mb pk4 file issue can easily be fixed by extracting it and loading/streaming the necessary stuff for each level and such.
I am preparing a Readme file with more explanations. Yes I think I think I'll extract everything on the server, and implement some form of lazy loading thanks to some emscripten mechanism
Re:Doom 3 in WebAssembly
by ornitorrincos on Thursday January 03, 2019 @04:47PM
(#18819623)
from pasts experiences a porting a moderate codebase(300k) is not quite fire and forget with emscriptem, but had no idea of that flag(last attempt a couple of years ago, didn't follow on changes)