Live data from Hacker News

Diablo in JavaScript

mitallast.github.com

91–100 of 116 posts

Re: Diablo in JavaScript

#91

Earlier quoted context omitted.

The implicit frame of the implicit frame might be "so let's move everything into the browser". Look at it from the perspective of someone who just wants to use a computer for something a computer could do in 1997. Doing it in a browser today would still sometimes be a downgrade from doing it in a (well written) native application in 1997. I am eager to seeing how much of a difference asm.js can make.

I totally agree that doing something ins browser today would be worse than the 1997 era native app equivalent.... ... but to agree with a sibling comment: wow-- you can just download the code in, like 10 min? And I can read/modify it it because it doesn't even have to be compiled to run? These were both two very big limitations on my user experience in 1997... I'm not saying that we should move back to having everyth…

I was doing that in Smalltalk in 1995.

Re: Diablo in JavaScript

#92

Can't move in Firefox 18. What is so out of date with Firefox that this cannot work? I see more and more of these demos flat out not working in FF, but work fine in Chrome. What is the explanation?

WebKit is the new IE.

Re: Diablo in JavaScript

#93

Earlier quoted context omitted.

The problem with this demo isn't that it's pretty alpha (and to be fair, it is, you can move, and attack, that's about it). The problem is that it uses stolen assets from another game. That is 100% not ok, even for a tech demo. (...there are plenty of free game assets out there, creative commons license; drawing attention to yourself by stealing someone elses art is douche behaviour)

Related question. Can I use the Quake 3 sounds for debugging purposes in my open source project? Or are they copyrighted and I would be doing something bad by including them in my project's folder.

You would commit copyright infringement. Check out the sounds of games like OpenArena, Sauerbraten, Zonotic, etc. Not good but ok as placeholders.

Re: Diablo in JavaScript

#94

Earlier quoted context omitted.

It appears to be Chrome only which might explain your problem with controls... Edit: Yes, I did only test in Firefox and Chrome. According to the comments below, it appears to work for modern browsers except Firefox.

Man, I can understand people writing Firefox-hating demos if they're trying to show off some feature that recently landed in WebKit, I can almost understand it if they just did a weekend-hack and couldn't be bothered testing in any browsers other than their own. I can't understand this - in 2013, how on earth do you break mouse events in JavaScript? We've had events like onmousedown working reliably across browser im…

The click handler is registered on the canvas and it checks e.offsetX. On Firefox, some people use e.layerX, but it's not exactly the same thing [0]. Someone posted a useful polyfill on JQuery's bugtracker [1].

Firefox should just support offsetX as well, but they don't, for whatever reason.

[0] https://bugzilla.mozilla.org/show_bug.cgi?id=122665#c3

[1] http://bugs.jquery.com/ticket/8523#comment:16

Re: Diablo in JavaScript

#95

Not a commentary on this project per se, but I can't help but think when I see "X in javascript" voted up that the implicit frame is: "isn't it impressive what you can do in javascript now?" But if you flip that statement on its head, the equivalent is "The web has finally caught up with what we could do on a 1997 desktop!"

Yeah, only now with javascript we can transmit HD videos in realtime via webcam with Chrome or Firefox, just like in 1997... no wait... the cherry picking of an example went wrong on that one. But maybe we can still devalue Javascript by saying HD videos is a separate thing and that speed connections is more important than Javascript in that example?

That argument works for anything, as long as you can convince the browser vendors to implement support for it and provide it as an api. So I would argue that's much closer to the definition of cherry picking an example.

Re: Diablo in JavaScript

#96

Pretty cool. The full source code's on Github as well: https://github.com/mitallast/diablo-js The code's not commented very heavily, but it's pretty readable nonetheless.

Is this your code? I would like to contribute (I'm not so proficient with JavaScript though, but a huge fan of diablo. (usually re-install it every two years)

Re: Diablo in JavaScript

#98
post #90

Great! Now the browser finally caught up with MS-DOS games!

Diablo was a Windows game - it didn't run on MS-DOS.

You are right, I was just trying to point out the quality one gets out of so many layers instead of using desktop applications directly.

Re: Diablo in JavaScript

#99

Earlier quoted context omitted.

Yeah, only now with javascript we can transmit HD videos in realtime via webcam with Chrome or Firefox, just like in 1997... no wait... the cherry picking of an example went wrong on that one. But maybe we can still devalue Javascript by saying HD videos is a separate thing and that speed connections is more important than Javascript in that example?

That argument works for anything, as long as you can convince the browser vendors to implement support for it and provide it as an api. So I would argue that's much closer to the definition of cherry picking an example.

So I guess I can't talk about the DOM; many functions are just an API for it; and canvas is just an API for drawing accelerated by the CPU; so... Javascript is nothing and nothing can be blamed on it?

Re: Diablo in JavaScript

#100

Earlier quoted context omitted.

It won't impact Blizzard but it's going to make it to the front page of HN. If the same demo was made with custom sprites, we would probably never have heard of it since it indeed doesn't do much.

He is sucking someone's else popularity! What an evil and selfish mind he has!

No, but it's sucking our "precious" time :) We're all thinking we're going to see Diablo in JavaScript, and then this...
Post reply on HN