Sarge
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Javascript Doom
Pages (2): « 1 [2]  
Author
All times are GMT. The time now is 04:37. Post New Thread    Post A Reply
Maes
I like big butts!


Posts: 8664
Registered: 07-06



Ladna's main argument seems to be:
cool as shit


So is a frozen turd, but I wouldn't put it on a pedestal ;-)

TBQH, I'm not a great fan of virtualization just for the sake of it, and the "efforts" of someone who simply slapped a cross-compile together leave me glacially indifferent. It's one of those "sounds cool but actually ain't" things.

Actually, why even bother with cross-compiling individual applications? Let's cross-compile entire OSes, and voila', this brings THOUSANDS of applications to the Web 3.0 without ANY effort!

Maybe you would be content if development simply froze, and everything ran in layer upon layer of virtual machines, emulators, abstraction etc. that would keep the same codebase usable forever (there are some great stories on TheDailyWTF about this, where they are trying to keep COBOL mainframes alive through emulators and screen scraping) but I'd like to think that Doom is not like e.g. the Amadeus airline reservation system, and that it should the very least branch on to an alternative codebase, but without losing its "soul", so to speak.

Last edited by Maes on 06-03-11 at 22:12

Old Post 06-03-11 21:50 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Ladna
Junior Member


Posts: 115
Registered: 04-10



Maes said:

TBQH, I'm not a great fan of virtualization just for the sake of it, and the "efforts" of someone who simply slapped a cross-compile together leave me glacially indifferent. It's one of those "sounds cool but actually ain't" things.


It's not "virtualization just for the sake of it". The most installed application on the planet right now is a web browser. The most popular platform on the planet right now is the web browser. It runs on phones, set-top boxes, televisions, game consoles, car stereos, blah blah blah blah. Why so negative?


Maes said:

Actually, why even bother with cross-compiling individual applications? Let's cross-compile entire OSes, and voila', this brings THOUSANDS of applications to the Web 3.0 without ANY effort!


How wouldn't this be cool as shit? Before you argue "huge waste of time", let me remind you that you've spent the better part of a year (you're not even finished, and you've had help!) converting an 18 year old video game from C to Java, and it will be a good long time before it reaches any type of feature parity with the current advanced source ports like (G)ZDoom, EDGE and EE.


Maes said:

Maybe you would be content if development simply froze, and everything ran in layer upon layer of virtual machines, emulators, abstraction etc. that would keep the same codebase usable forever (there are some great stories on TheDailyWTF about this, where they are trying to keep COBOL mainframes alive through emulators and screen scraping) but I'd like to think that Doom is not like e.g. the Amadeus airline reservation system, and that it should the very least branch on to an alternative codebase, but without losing its "soul", so to speak.


I don't even know what you're talking about anymore. I'm not arguing for or against "virtualization", you're the guy who ported a native application to run on the JVM. In fact, didn't you just use that Java x86 emulator as some kind of proof that no one thinks Java is cool? Like, that emulator is crazy badass (hey, it runs Linux!) - you could say that it "brings THOUSANDS of applications to the Web 3.0 without ANY effort" - but it didn't make the front page of Slashdot or whatever. So you think that emulator is cool, you think the JVM is cool, but you don't think other emulators or virtual machines are cool? Am I being trolled? You can be honest.

Old Post 06-04-11 08:28 #
Ladna is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Maes
I like big butts!


Posts: 8664
Registered: 07-06




I don't even know what you are talking about anymore.
Am I being trolled? You can be honest.

Old Post 06-04-11 10:12 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
WildWeasel
Resident Castlevania Super-Fanboy


Posts: 2587
Registered: 07-03



Ladna said:
How wouldn't this be cool as shit?

Y'know, there's already a Java implementation of DOSBox. =P

Old Post 06-04-11 11:57 #
WildWeasel is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 7046
Registered: 07-07


But is there a DOSBox implementation of Java?

Old Post 06-04-11 12:59 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Maes
I like big butts!


Posts: 8664
Registered: 07-06



Gez said:
But is there a DOSBox implementation of Java?


Well...I recall there was a Windows 3.1 version of Java (really early stuff, 1.1 or 1.2, and with a lot of limitations and workarounds), so stricly speaking, yes ;-)

Ninja edit: here it is (on that page with other such goodies).

I had only tried to use in once or twice in 1998 for my courses, but it was way too tedious. The workaround for DOS's 8.3 filenames was interesting though ;-)

Old Post 06-04-11 13:05 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 7046
Registered: 07-07


DOSBox's support of Windows 3.1 is kinda lacking. If you go on the Vogons forums to ask for help getting Windows to run on DOSBox, you'll most likely be taken for a troll and get your thread locked. :p

Old Post 06-04-11 13:53 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Maes
I like big butts!


Posts: 8664
Registered: 07-06


That's too bad. So I will use that JPC emulator to run Linux to run some virtual box in it, to run DOS, to run Windows 3.1, to run Java ADK 1.2. Hmm...but that's too old to use Mocha with...so hear what, go a couple of steps back and I'll install Windows 7 in JPC instead of Linux and run Javascript Doom in a browser, because, after all, the browser is the machine nowadays, everything is abstract and who needs real hardware, native apps or finely tuned runtime environments...too restrictive! Not future proof! Too much work! Just add it some more Web 2.0 (now 3.0?) bling like e.g. connecting to Twitter, Facebook, and saving games and settings into Google Docs and it will be ace.

Old Post 06-04-11 14:16 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
DaniJ
Senior Member


Posts: 1740
Registered: 08-03


Whilst I hear the sarcasm and understand your point Maes, we are rapidly approaching a time where the virtualizing of another platform can be achieved with enough of a performance clearance to make it the most time and cost effective solution (vs porting to a native implementation). This is already the case where performance is sufficient or not a primary concern in fact.

Also there is the end user convenience to consider; why wouldn't users want to be able to play all their games in a web browser, on any system they happen to have access to at the time? Ignoring all the practical issues which might prevent this, it is an understandable ideal.

As a Java programmer you already accept (at some level at least) that we no longer need a direct interface to the underlying hardware in order to write effective software. Is this not just another level of abstraction? Follow this chain of thought and the web browser (and the associated standards) could now be considered The One platform.

Now, I'm not suggesting we all abandon our choice languages and start writing FPS games with client implementations using JSON and HTML5 canvas but you have to admit that it represents a very possible future.

Old Post 06-05-11 16:15 #
DaniJ is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Maes
I like big butts!


Posts: 8664
Registered: 07-06



DaniJ said:
Whilst I hear the sarcasm and understand your point Maes, we are rapidly approaching a time where the virtualizing of another platform can be achieved with enough of a performance clearance to make it the most time and cost effective solution (vs porting to a native implementation). This is already the case where performance is sufficient or not a primary concern in fact.


Agreed, but I take that you are talking about the sort of virtualization achievable with VMWare or similar VM packages. Those are designed and optimized to run entire OSes and deliver close to 70-80% of actual performance, if you are using them on similar hardware.

Stuff like GWT or Emscripten are in an entirely different league, and work by simulating stuff inside a totally virtual machine, not emulating a concrete architecture (with possible hardware assistance), and porting the source code itself in that environment. So it's a VM (the simulated "C" operating environment) running inside another VM. If your purpose is porting code "as is" and ASAP, with all bugs and quirks, then yeah, it's TOTALLY much more convenient and quick. However it won't magically rewrite stuff for you, that's something that must be done by hand (e.g. imagine a proper Javascript Doom based on Mocha Doom, that would be MUCH easier for browsers to optimize, since there would be one less abstraction layer).


DaniJ said:
Also there is the end user convenience to consider; why wouldn't users want to be able to play all their games in a web browser, on any system they happen to have access to at the time? Ignoring all the practical issues which might prevent this, it is an understandable ideal.


Also, I agree perfectly. What I don't agree with is claiming that this latter approach is superior in every way to a native port, or even to a port to a particularly highly optimized VM such a Java (which had almost 15 years to mature into something that can look C/C++ "in the eye" or even beat it, performance-wise) or .NET, and of course their derivations (Silverlight/JavaFX).


DaniJ said:
As a Java programmer you already accept (at some level at least) that we no longer need a direct interface to the underlying hardware in order to write effective software. Is this not just another level of abstraction? Follow this chain of thought and the web browser (and the associated standards) could now be considered The One platform.


Yes, Browsers are Turing complete, but lag a decade behind environments such as Java/.NET in native performance/optimizations and even OS integration.

BTW, something that everybody seems missing here is that I don't give a rats ass about Mocha Doom being able to run in a browser: too restrictive in terms of file I/O, which would require a major redesign in how data is fetched. I intended Mocha Doom primarily as a desktop app, kinda like a "linuxdoom for the future", upon which other perhaps more future-proof stuff can be built, being it closer to modern OO languages.


DaniJ said:
Now, I'm not suggesting we all abandon our choice languages and start writing FPS games with client implementations using JSON and HTML5 canvas but you have to admit that it represents a very possible future.


It is simply something that will find its application niche with time and as it matures. There will always be proof of concept projects like "Javascript Doom", but practically it will make the development of more marketable games and apps easier (think the stuff that is played on facebook, or something like Google Docs).

BTW, the idea of running existing C/C++ code "natively" in a browser, pimped up with very similar argumentation about "development convenience", "reusing existing codebase directly" etc. was already presented years ago in that "Internet C++ VM" I linked to some pages ago. Yet that didn't quite fly (interestingly enough, there was a port of Doom to it, but I can't find any live links to it, assuming that the VM itself is actually functional).

OFC, Internet C++ came and went without making much of a splash, and now the new Rooster in the Henhouse is JS + HTML5. If THAT ever reaches the level of beating the performance levels of Java or .NET applications, if the idea of a stand-alone, desktop computer with local storage becomes a relic of the past and raw computational power becomes a total non-issue, then yeah, development is going to probably change forever. But at that point there won't be a place for something like Doom except in VERY retro emulated environments anyway, as the very concept of a stand-alone source port (or stand-alone, single player video game) will probably also be dead.

P.S.: actually the premise of that Internet C++ thing makes it sound "cool like shit" in Ladna's words, despite the fact that it didn't exactly leave its mark (well, you could say that modern JS engines + HTML5 are its grandchildren or something...)

Last edited by Maes on 06-05-11 at 17:10

Old Post 06-05-11 16:53 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Xaser
Senior Member


Posts: 1630
Registered: 07-03



Gez said:
But is there a DOSBox implementation of Java?

Am I the only one who read this and immediately thought "RECURSIVE DOSBOX!" ?

Old Post 06-05-11 17:26 #
Xaser is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
DaniJ
Senior Member


Posts: 1740
Registered: 08-03



Maes said:

Agreed, but I take that you are talking about the sort of virtualization achievable with VMWare or similar VM packages. Those are designed and optimized to run entire OSes and deliver close to 70-80% of actual performance, if you are using them on similar hardware.

Stuff like GWT or Emscripten are in an entirely different league...[snip]


Yes I was primarily talking about whole-system virtualization but for me personally, its not a huge leap to stuff like Emscripten; merely the same conceptual abstraction implemented at a different level.


What I don't agree with is claiming that this latter approach is superior in every way to a native port, or even to a port to a particularly highly optimized VM such a Java (which had almost 15 years to mature into something that can look C/C++ "in the eye" or even beat it, performance-wise) or .NET, and of course their derivations (Silverlight/JavaFX).

Agreed, although this too could be considered more of a perspective semantic. From the POV of someone who doesn't understand the target platform, access to a virtualized environment does make the former somewhat redundant.


BTW, something that everybody seems missing here is that I don't give a rats ass about Mocha Doom being able to run in a browser: too restrictive in terms of file I/O, which would require a major redesign in how data is fetched. I intended Mocha Doom primarily as a desktop app, kinda like a "linuxdoom for the future", upon which other perhaps more future-proof stuff can be built, being it closer to modern OO languages.

I hadn't missed that point. I think you made that pretty clear personally.


OFC, Internet C++ came and went without making much of a splash, and now the new Rooster in the Henhouse is JS + HTML5. If THAT ever reaches the level of beating the performance levels of Java or .NET applications, if the idea of a stand-alone, desktop computer with local storage becomes a relic of the past and raw computational power becomes a total non-issue, then yeah, development is going to probably change forever. But at that point there won't be a place for something like Doom except in VERY retro emulated environments anyway, as the very concept of a stand-alone source port (or stand-alone, single player video game) will probably also be dead.

I don't think it will mean inherent obsolescence, more that software will see a much more defined line between server and client implementations. In the case of a DOOM source port this could very well mean a serverside native application with a very thin, web-interfacing client.

Old Post 06-05-11 17:33 #
DaniJ is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Maes
I like big butts!


Posts: 8664
Registered: 07-06



DaniJ said:
In the case of a DOOM source port this could very well mean a serverside native application with a very thin, web-interfacing client.


I'm scared.

However, I stand by my original statement that an environment such as Emscripten just allows reusing the same exact old tired codebase over and over, without stimulating actual development on the codebase itself. E.g. if the Javascript Doom guy had added an option to e.g. save/load stuff from "The Cloud", then yeah, that would be actual innovation, although it would require far more work than one week to do the cross-compile.

Imagine if e.g. Lee Killough had reasoned that it would be pointless to develop something like Boom, because, after all, linuxdoom was good enough, the source code was eternal and whoever wanted to play Doom could just compile it even in the far future, so why bother studying/understand it at all, except for fixing a few obviously broken things and minor interfacing? Why bother with new features, extensions, higher resolutions, OpenGL, etc.?

Last edited by Maes on 06-05-11 at 17:47

Old Post 06-05-11 17:38 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
DaniJ
Senior Member


Posts: 1740
Registered: 08-03


Point taken. Although a not-dissimilar architecture model is looking more and more the likely "winner" imo.

Old Post 06-05-11 17:44 #
DaniJ is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Maes
I like big butts!


Posts: 8664
Registered: 07-06



DaniJ said:
Although a not-dissimilar architecture model is looking more and more the likely "winner" imo.


I sincerely hope not, for the same reason that I shun pure digital distribution in general. I'm hoping that "The Cloud" will only be a passing fad, and that the future will settle on a form of computing that will still leave enough client-side computrons and will still be able to do work when the "Cloud" is down.

Realistically, I expect to see a market differentiation that will extend what's going on today: e.g. in the USA e-commerce is more developed because so many resources go into it from all directions and everybody owns a credit card and is used to a service-oriented mentality, while in Europe or less developed countries having something concrete that you can count on will still matter something.

Old Post 06-05-11 17:48 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
DaniJ
Senior Member


Posts: 1740
Registered: 08-03


I think that ultimately the final decision on native vs virtualized implementations will depend entirely on the reason you cited, namely, the on-going development/maintenance costs of a particular software. If one considers that games are rarely maintained or even updated post commercial release (ideally that is, from a business perspective) then this lends more weight to the virtualization argument for this application.

Old Post 06-05-11 17:56 #
DaniJ is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Ladna
Junior Member


Posts: 115
Registered: 04-10



Maes said:

However, I stand by my original statement that an environment such as Emscripten just allows reusing the same exact old tired codebase over and over, without stimulating actual development on the codebase itself.



I'm not sure I understand what you mean by this.

Old Post 06-06-11 06:26 #
Ladna is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 7046
Registered: 07-07


A JavaScript developer looking into this "JavaScript Doom" could be thinking he might tinker a bit with it, only to discover that the code is illegible and that he should instead modify the C code and run the conversion tool on it. In essence, it's in JavaScript from the user's point of view, but still in C from the developer's.

Old Post 06-06-11 10:25 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Ladna
Junior Member


Posts: 115
Registered: 04-10


Oh I see. Sure this Doom in JavaScript thing isn't a real source port, but no one's claiming it is. I still think the ability to run a C/C++ source port natively in the browser is a net gain, however you look at it.

Old Post 06-06-11 10:35 #
Ladna is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Maes
I like big butts!


Posts: 8664
Registered: 07-06



Ladna said:
Oh I see. Sure this Doom in JavaScript thing isn't a real source port, but no one's claiming it is. I still think the ability to run a C/C++ source port natively in the browser is a net gain, however you look at it.


Sure, if there is no other viable option, which is why I thought of desperate cases like this. Also, I understand that Doom has spoiled us, in a way: it's not like the source of everything under the sun is out there for anyone to read and modify, so some stuff must be outright emulated, and a few things have a source code so intricate that it's too hard to port...but Doom proved not to be uncrackable, in this sense.

In any case, Mocha Doom is more like a heavy foundation work that had to be done at some point: having a reference, readable and modifiable codebase which is not dependent on the C/C++ memory model and libraries at all (the Delphi one doesn't count, in that respect) but which is still as Doom as it can possibly be.

TO a degree it does define its own API and internal organization of objects etc. but it's still reasonably close to the original (unlike e.g. a recreation using a totally different engine).

If one day someone wishes to make a "real" Javascript port out of it, or in another non-C language without resorting to cross compilation or emulation, or if he wishes to use another language's features directly "in" the codebase, it will surely be a much better starting point. E.g. take for example Boom's hashtable system. I could ofc have copied it, but instead I simply plugged in Java's built-in Hashtable: that's using a "native" capability, so to speak. Or the multithreaded renderer, using java.util.Concurrent's efficient thread management etc. Cross-compiling simply denies those opportunities, that's why I said that it "offers nothing new", development-wise.

Whether it's cool or not in its own right is another story.

Old Post 06-06-11 11:16 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Ladna
Junior Member


Posts: 115
Registered: 04-10



Maes said:

Sure, if there is no other viable option



Ehhhh I don't really think the Emscripten approach is the worst way to get a C/C++ source port running in a browser. Let's say I wanted to do so with ZDoom using Java. I'd have to:

- get my users to download Java
- completely reimplement ZDoom as a Java applet

Compared with that, spending a week running ZDoom through Emscripten starts to look pretty appealing.

It all really just depends on what your goal is. Reimplementing Doom in Java is cool in and of itself, and although I'm not totally sure I understand your motivations, I think using a higher-level language like Java or JavaScript so that would-be contributors don't need to learn C/C++ is great, really! But not everyone shares your opinions or goals. When something like this "JavaScript Doom" thing comes out, the first thing I think is, "hey cool, more exposure for Doom and maybe someday this will allow source ports to run in the browser", not "bah, this guy cheated and just ran a script on linuxdoom" or "oh, so you still have to work on the old, busted C/C++ code huh, lame".

Old Post 06-06-11 12:08 #
Ladna is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Maes
I like big butts!


Posts: 8664
Registered: 07-06


Exactly. Which brings me to one of my initial statements: different goals.

But I don't hide that by seeing "Javascript Doom" in the thread's title I hoped that someone had developed something similar to Mocha independently (in which case we could share some ideas, that "novelty" and "contribution" thing I was talking about) or that he ran Mocha through GWT, and realizing it was yet another cross-compiling affair like "Flash Doom" automatically lowered its appeal for me.

And BTW, why are those cross-compilation affairs almost always based on linuxdoom, rather than any of the advanced source ports? (Not even Chocolate Doom, for instance).

A tentative answer on my behalf is that to take advantage of the features of an advanced source port you'd also need a way to load DEHs, PWADs, etc. in other words, to abstract away the file system, and actually learn a thing or two about the code, which will require either another layer of abstraction, more effort etc. or the ability to make modifications to the source code that will carry over through the cross-compilation project and look "beyond" the abstraction layer. And the latter is something much easier to do in something like Mocha Doom, for now.

For the former, at that point it would be preferable to just have a complete platform emulator with its file system, OS calls etc. rather than addressing every application's quirks one by one. Cross compilation sort of gives you the worst between a full-fledged emulator and a complete port.

Its only advantage is that, if all you want is porting ONE specific application ASAP by reusing as much code as possible without caring about target platform optimization, it's faster than both developing a full-fledged generic emulator, and of course from making a hand-optimized adaption to a different language/platform. Ofc, that one specific application could be an emulator ;-)

Last edited by Maes on 06-06-11 at 13:04

Old Post 06-06-11 12:51 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Ladna
Junior Member


Posts: 115
Registered: 04-10


I don't think it has to do with filesystem access. It's just that stuff like JS Doom or Flash Doom are proofs of concept and like Gez said, Doom separates the wheat from the chaff there; it's not a real platform if it can't run/convert/interpret Doom.

I haven't looked at the source for JS Doom, but I wonder if it's not reasonable to start with something like Emscripten. I downloaded the source to JS doom (oldest modification 2011-05-18, newest 2011-05-29) but it isn't actually the JS source, it's the small modifications made to the Doom source, a couple HTML files, and a Python script that runs Emscripten. Wwwwwwwwhich I don't really feel like installing right now. Maybe later.

===

This is the author's blog, if anyone wants more information.

Old Post 06-06-11 13:26 #
Ladna is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Maes
I like big butts!


Posts: 8664
Registered: 07-06


Well... GWT does have a way to embed "native" Javascript functions through Java code (which won't be cross-compiled to GWT's special Javascript bytecode), so I guess a modified C-to-Javascript compiler with some custom defined #pragmas or other kinds of annotations could be used to define some functions in JS to use "as is" without cross compiling them, e.g. to implement AJAX connectors with cloud services or somesuch, and provide a way for the C functions to call those "native" Javascript functions and access the DOM (what I call "punching a hole through the VM (in the VM)").

But unless that guy is serious about doing something like this, as you said, he probably won't bother and will move on to something else.

Old Post 06-06-11 13:33 #
Maes is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 04:37. Post New Thread    Post A Reply
Pages (2): « 1 [2]  
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Javascript Doom

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Forums Directory