Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
lazarv

Wolfenstein 3D HTML5

Recommended Posts

Looks impressive, but how is it played exactly? I suppose one has to download the wolf3D.html file from somewhere and put it in a directory alongside the Wolf3D data files (vswap & co.)? Is it actually available somewhere? Does it handle Spear of Destiny and the lost chapters?

Share this post


Link to post

It's probably a cross-compilation of the original C source code to a Javascript VM using a tool like Emscripten, in which case the data is "embedded" or read from the hosting site. There had been a similar port of Doom a year or so ago.

Share this post


Link to post

It's not a cross-compilation, but a full rewrite in JavaScript. It works directly from the browser like any other web page, without any plugins.
id Software is the copyright owner and I fully respect their work, so I decided not to publish the full game, only the video.

Share this post


Link to post

If you do not distribute the data files, only the web page that uses them, then it's not different from distributing any other source port and it is fully compliant with the respect of their work.

In fact, the have released the source code under the GPL (informally), and have reused an existing GPL source port as the base to build the iPhone port of Wolf 3D.

Share this post


Link to post

Also, there's a shareware episode. No idea what the license file looks like, but only using the shareware episode's data archives would surely be a lot less legally infringing than using the full game.

Share this post


Link to post

The game is not using the original data files. The graphics were extracted with the WDC map editor, the music and the sound effects were taken from the Wolf3D Redux project and the maps were converted from the WDC map file format with a custom tool.

Actually I tried to contact id software about having my HTML5 version as the official one, but I have not yet received a favorable response. Still hoping though...

Share this post


Link to post
Maes said:

It's probably a cross-compilation of the original C source code to a Javascript VM using a tool like Emscripten

If you had read the video's description, you'd find that the author says that he rewrote it from scratch, and specifically didn't use Emscripten.

lazarv said:

Actually I tried to contact id software about having my HTML5 version as the official one, but I have not yet received a favorable response. Still hoping though...

Did they respond at all? If so, what did they say, specifically?

Share this post


Link to post
GooberMan said:

Also, there's a shareware episode. No idea what the license file looks like, but only using the shareware episode's data archives would surely be a lot less legally infringing than using the full game.

Oh dear no. JavaScript Doom got DMCAd even if though it only contained the demo version.

Share this post


Link to post
lazarv said:

The game is not using the original data files. The graphics were extracted with the WDC map editor, the music and the sound effects were taken from the Wolf3D Redux project and the maps were converted from the WDC map file format with a custom tool.

Well, you could still distribute the port with the custom tool in question. Then it'd be up to the users to set it up. It's not unprecedented, there are other ports out there which use a converter as well (example).

lazarv said:

Actually I tried to contact id software about having my HTML5 version as the official one, but I have not yet received a favorable response. Still hoping though...

I doubt they'd acknowledge any third-party port as official, for a number of reasons, starting with "it's not us who did it".

Share this post


Link to post
Sodaholic said:

If you had read the video's description, you'd find that the author says that he rewrote it from scratch, and specifically didn't use Emscripten.


Did they respond at all? If so, what did they say, specifically?


Yes, I received a respond from John Carmack. It was not absolutely bad, but also not what I wished for. We are still in contact and the story is not over yet...

printz said:

Oh dear no. JavaScript Doom got DMCAd even if though it only contained the demo version.


That's the reason why I haven't published the game online. :)

Gez said:

Well, you could still distribute the port with the custom tool in question. Then it'd be up to the users to set it up. It's not unprecedented, there are other ports out there which use a converter as well (example).


I doubt they'd acknowledge any third-party port as official, for a number of reasons, starting with "it's not us who did it".


A version where the user must set up the whole game is against the concept of HTML5 and would be very complicated. A total conversion would be the only good choice, with high-res textures and graphics, first of all a much better main menu, but I'm not an artist. In the future I would like to create an RPG-styled game with the engine.

I uploaded the video, so I can prove that I did the whole game in HTML5 first! :)

Share this post


Link to post
printz said:

Oh dear no. JavaScript Doom got DMCAd even if though it only contained the demo version.

Really?! I never expected id to care how the shareware was distributed; they have been very liberal about it's use. It makes me uneasy about the possibility of some of the community at large being DMCA'd

Share this post


Link to post

That was Zenimax deciding to care. They also like flinging shit at mobile ports that distribute the shareware IWAD. I recall a spirited thread about this somewhere around here. I think it was in the sourceports forum.

Share this post


Link to post
Sodaholic said:

If you had read the video's description, you'd find that the author says that he rewrote it from scratch, and specifically didn't use Emscripten.


In that case, are we talking about a recreation/lookalike with a different engine (wouldn't be surprised if a Wolf3D-like engine existed for Javascript), or a painstaking line-by-line translation of the original C source code into 100% pure Javascript?

Could it be used e.g. to port other Wold3D-engine games verbatim? Is there a near 1:1 correspondence between the data structures/code with the original (a VM would destroy those)? Can you follow the state of the game via e.g. a DOM inspector or Firebug?

And, so that I'm don't appear to be talking out of my ass, I remind everybody that I did precisely a painstaking line-by-line etc. conversion of Doom to Java, which means no X-compilation, no cheap virtualization tricks, and no "Doom look-alike" engines either. It really works with the original IWAD and PWAD data (and soon DEHACKED, once I get back to it).

Share this post


Link to post
Mr. T said:

Release it or STFU


I wish I could do that! Even the shareware version is not tolerated by ZeniMax lawyers these days...

Share this post


Link to post
lazarv said:

I wish I could do that! Even the shareware version is not tolerated by ZeniMax lawyers these days...


Maybe you could release just the converter tool and the engine, if it's 100% your own work or even a substantial reworking of an existing one.

A real-time Wold3D-like engine in pure Javascript, especially if particularly optimized and easily customizable to run other similar games, would be a good contribution to the Open Source community.

I'd stay a good deal away from packing it with any id files though: everybody in the Doom source port community has refrained from bundling the shareware IWAD with their ports ever since that Javascript Doom debacle (well...unless you count ZDaemon and getwad.exe ;-)

Share this post


Link to post
Maes said:

In that case, are we talking about a recreation/lookalike with a different engine (wouldn't be surprised if a Wolf3D-like engine existed for Javascript), or a painstaking line-by-line translation of the original C source code into 100% pure Javascript?

Could it be used e.g. to port other Wold3D-engine games verbatim? Is there a near 1:1 correspondence between the data structures/code with the original (a VM would destroy those)? Can you follow the state of the game via e.g. a DOM inspector or Firebug?

And, so that I'm don't appear to be talking out of my ass, I remind everybody that I did precisely a painstaking line-by-line etc. conversion of Doom to Java, which means no X-compilation, no cheap virtualization tricks, and no "Doom look-alike" engines either. It really works with the original IWAD and PWAD data (and soon DEHACKED, once I get back to it).


It's a recreation. As far as I know, there aren't any Wolf3D-like JavaScript engines in existence. 3D JavaScript engines are real 3D engines, not a 2D map with semi-3D projection. Originally I just wanted to create a simple raycast engine in JavaScript and that emerged to be a Wolf3D port.

The data structures of the port are not compatible with the original, it uses absolutely different types of data (JSON files actually). The reason is that the engine is coming from a HTML5-CSS3-JavaScript point of view. Beside that, creating other Wolf3D-engine game ports is really fast, e.g. all WDC maps can be converted, the graphics are simply exchangeable (only plain PNG-images), adding new music, graphics, enemies are nothing and even new engine features are easy to implement.

I don't fully understand what do you mean by following the game state. Currently there isn't any console logging implemented (that would be a waste of precious performance time), and following the game state with browser developer tools is fairly complicated.

The advantage of the HTML5 port is that it doesn't matter, which type of OS you have, just open a browser and navigate to the website, and the game starts immediately. You don't need any compilation!

Share this post


Link to post
lazarv said:

I don't fully understand what do you mean by following the game state. Currently there isn't any console logging implemented (that would be a waste of precious performance time), and following the game state with browser developer tools is fairly complicated.


Well, in an Emscripten "port" you'd just see the state of the VM which is running on top of Javascript (mapping of C methods to pseudo-registers, call stack emulation, flat memory emulation, datatype emulation for int32/char/short etc. ) and the obfuscated/very terse auto-generated functions which would give no hints as to what they really do, and so it would be hard to "follow".

In your engine, OTOH, I suppose you can simply watch a user-defined variable directly to see e.g. the x,y position of the player or the current lives/score, or debug gameplay functions directly, even step by step, e.g. whenever you press "fire", simply by using a DOM inspection tool like Firebug or Chrome's console.

Share this post


Link to post
Maes said:

Well, in an Emscripten "port" you'd just see the state of the VM which is running on top of Javascript (mapping of C methods to pseudo-registers, call stack emulation, flat memory emulation, datatype emulation for int32/char/short etc. ) and the obfuscated/very terse auto-generated functions which would give no hints as to what they really do, and so it would be hard to "follow".

In your engine, OTOH, I suppose you can simply watch a user-defined variable directly to see e.g. the x,y position of the player or the current lives/score, or debug gameplay functions directly, even step by step, e.g. whenever you press "fire", simply by using a DOM inspection tool like Firebug or Chrome's console.


Yes, you can watch player stats, get information about the map, you can even hack the game if you know how, and modify it in real-time! :)

Share this post


Link to post
lazarv said:

I wish I could do that! Even the shareware version is not tolerated by ZeniMax lawyers these days...


Release the source then, or I am calling BS. Like that guy who showed apps running on his AppleTV, if you don't release it then it might as well not exist.

Share this post


Link to post
Mr. T said:

Release the source then, or I am calling BS.


That's entirely up to him, and from my own experiences with JS I consider his project to be technically feasible and commendable (surely it was no cake walk!).

When I started Mocha Doom, I had decided that it should be Open Source since the beginning, also because I didn't want to create a situation like the one that plagued Doomcott or the STARK engine, which simply resulted in perpetuating a needless veil of mystery and even risking total wiping from the Web: once Java Doom was finally a reality, after 15 years of the language's existence, it should be open for everyone.

Lazarv might have a different view on the subject, that's fine, and should be respected whatever it might be.

Share this post


Link to post

That looks awesome! Even though I have the 6 Episode version of Wolfenstein 3D, I would like to try out that version.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×