Hacker News new | past | comments | ask | show | jobs | submit login
Dune II ported to the Web with Emscripten (play-dune.com)
185 points by experiment0 on Nov 30, 2012 | hide | past | favorite | 64 comments



Emscripten is fantastic. https://github.com/kripken/emscripten

LLVM -> JavaScript. The possibilities are many, wish I had more time to play with this kind of stuff.

I believe it's how http://repl.it and similar sites work.

Tangentially, aside from porting games, http://luatut.com/crash_course.html is one of the better uses [of Emscripten] I've seen. Press Escape and a console drops down. Handy way to learn a language.


OpenTTD in Emscripten is particularly impressive: http://play-ttd.com/


See my port of my little scripting language (NCD) to Emscripten: http://badvpn.googlecode.com/svn/wiki/emncd.html


repl.it uses biwascheme, a scheme interpreter written in javascript


They also use Empythoned (CPython compiled with Emscripten, https://github.com/replit/empythoned) and Emscripted-Ruby (Ruby compiled with Emscripten, https://github.com/replit/emscripted-ruby) and a version of Lua compiled with Emscripted (https://github.com/replit/jsrepl/tree/master/extern/lua), among others.


I'm sure this site will be taken offline for copyright infringement almost immediately, but it really is a decent recreation of the original. It's also historically significant: Dune II is to the real-time strategy genre what Wolfenstein 3D is to the first-person-shooter: not necessary the very first example ever, but the first to achieve notable popularity, and the progenitor of most of the following examples.


No copyright issues; it's based off of OpenDUNE: http://www.opendune.org/


The source-code is probably based off OpenDUNE but I'm pretty sure the art isn't. They'll be taken down for the art for sure ...


Dune 2 was released as freeware if memory serves me right. I know they still can send them C&D letter, but I don't think westwood/ea will bother.


Yep, looks like they just recreated the game engine. You still need a copy of the original Dune 2 data files to play the game.


Haters gonna hate.


As far as I can tell from their wiki, OpenDUNE was created by disassembling the original game and recoding the assembly in C. I wouldn't say the copyright issue is clear-cut, here.


And thank god for the original C&C. I still think the soundtrack was brilliant: http://www.youtube.com/watch?v=kZAaq5JIhW0


I was always partial to Red Alert: http://www.youtube.com/watch?v=Tb-gI_pFog0


Rapidly heading off on a tangent, but there was an AMA by the creator of the RA soundtrack on Reddit[1] quite recently. I had no idea Hell March was that well-known (and I finally found out what the correct lyric[s] was!)

[1] http://www.reddit.com/comments/11n1xk/c6o41e1/


Except they're not the real lyrics. For some reason, even the composer believe is German, when is an Spanish commander guiding his troops in a march.


For me, it's also the predecessor to tower defense games.


This took a moment to sink in but that's quite exactly how I played it (and Dune 2000) back in the day. Way before I even knew Tower Defense games :-)


Ah, I miss those long windy trails of concrete and rocket turrets built right at their base :)

Also the first game I learned to 'hack', and it's what set me on the path to learning programming: I discovered a hex file editor on a floppy and had a hunch about how things might fit together.

So I saved a game, waited a second until some money was spent in the game and then saved again into a different slot. Thereafter I went through the two save game files, visually figured out which parts were different between the files, changed the magical numbers I saw, reloaded the game and slowly figured out how to make myself rich :)

(This worked much better than my earlier attempt with the disk editor I found where I thought I was really clever compressing files by changing their size to 0.)


Yea I remember that! Was it a utility or something off a bbs? I remember a hex editor!


Indeed, and I often came up with solutions that looked like Vauban star forts[0]. I also remember having a hard time in a C&C3 mission (where you raid the Nod temple), whose defense is tiered similarly.

[0]: http://en.wikipedia.org/wiki/Star_fort


Maybe a silly question: do copyrights for games (art or whatever) ever expire?


I believe this would be the correct copyright term for a game made by a game company.(every body who made it works for the game company so it should all fall under work for hire). Instead of the usual death + 70.

http://en.wikipedia.org/wiki/List_of_countries%27_copyright_...

95 years from publication or 120 years from creation whichever is shorter (anonymous works, pseudonymous works, or works made for hire, published since 1978)


Yes, but not for a long time.


By "long time" you mean "as long as large copyright holders lobby to keep extending the window" which could mean "never" in practice.


Why don't we just settle on "so long as to make expiry irrelevant for video games".


I don't know what you're complaining about. Pong will be public domain in 2092.


Same as for anything. In the United States there's a chart for looking up rights and determining if a property has reverted to the public domain: http://copyright.cornell.edu/resources/publicdomain.cfm

1923 is the base-line year for any works with a proper copyright notice. 1977 for any works at all, as the requirement for a notice or registration was eliminated.


For anyone interested in playing Dune II natively I highly recommend Dune Legacy[0] - an open source implementation which I personally found much better than OpenDUNE, which the link is based on.

[0] http://sourceforge.net/apps/mediawiki/dunelegacy/index.php?t...


Nice! It fixes most annoyances of the original Dune II, e.g. you can use your right mouse button to order units to move somewhere, and there is finally a production queue.


Oh wow, this takes me back.

My first job was at Virgin Games as an artist. I got a beta version of Dune II, and played it obsessively.

The artwork Westwood Studios created was very inspiring - their artists were very good and developed some wonder palettes.


Funny, I've been replaying Dune 2 over the past week and a half. Despite the controls being somewhat clunky (no selecting multiple units, your units won't defend themselves in a lot of cases, etc.) this game has character and charm, not to mention hours and hours of gameplay. I have been hoping that games like this, King's Bounty, Settlers, XCom, and others from that era would show up for mobile platforms. A lot of them would work really well on a touchscreen device.


iDos is great for this. Playing Ultima V on my iPad is fantastic.


There's a decent Settlers (Settlers 3-ish) port for the iPad.


Just awesome. Dune II was a big part of my childhood. :)


Same here. I spent countless hours playing this in 1992, back when I was tiny and my English skillz were severely lacking. Words like "siege tank" were beyond me, so the siege tank was nicknamed after my fat aunt, the MVC after my handy uncle etc.

Brings back memories.


Haha, us too. It got to where me and my friends who played it would call someone a harvester if they kept getting lost IRL due to their stupidity


These being my introduction to the Dune universe, I was quite surprised when I finally read the books to not come across a single mention of the House Ordos :)


i recall it took 8 floppies to install or something like that, i remember coming across the base plans my older neighbor had made. totallychanged they way i played


+1 i spent many nights with this. Sonic Tank FTW!



Awesome. I'm not so excited about the tiny 320x200 viewport though. Why not zoom it to fit the browser window?

Strangely, they seem to have managed to disable the browser's built-in zooming.

So yeah, fun, but squinty.


If you are on an OS X system, just use Ctrl+touchpad two-finger scroll to zoom in/out (presuming you've enabled that)


> Strangely, they seem to have managed to disable the browser's built-in zooming.

I believe it captures all keyboard input. But if you click the URL bar, you should then be able to zoom in and out (since then the page doesn't get key events).


Sometimes browser zooming breaks pixel calculations... yeah, one more edge case to the already long list of edge cases.


I played this game a lot a few years ago :).

It amazing/annoying how different the UI is from the modern games. For example to move a unit you must click the "move" button and the click the place where you want to go. There are a million of details that make modern games easier to play.


Haha, yeah, I noticed that immediately because I tried to "micro" like in Starcraft. Cycling units being attacked out of battles and units attacking in, etc.. Not sure if I had the same concepts back when I played it as a kid, heh.


In the DOS version you could also use 'm' on the keyboard


Also possible in the online version


Oh man... yeah. Seems like I am going to waste a few hours this weekend on this game :-)


Can you still save and reload until the Death Hand actually hits something useful?


Anyone else having trouble getting it running? I'm on a very fast internet connection and it's been 2-3 minutes of black screen already.


Doesn't run on Firefox for me, but does on Chrome. (Man I hate saying that as I am a Firefox fanboy)


Works with Firefox 16.0.2, unfortunately on Windows.


It took quite a while to load, but it worked fine on Firefox for me.


The download is pretty massive, it is 6235641 bytes. Which is slow even on the multihomed fiber connection I am on. Still pretty neat.


That's only 6MB, I think the server is just getting hit pretty bad from all the traffic


played a lot of Dune II in programming class back in the days. Also got caught a couple of times. Learned two thing you can't teach in a class room, culture and how to slack like a pro


small bug : you can attack and kill your own units :)


That's not a bug.


it seems to have some bugs. I lost a unit in the first level (I know, I know) and tile graphics went bonkers


No sound effects :(


The music brings back memories, though :)


FYI, there is a post from the author, describing some game designs and listing existing bugs (unfortunately, Russian only) - http://habrahabr.ru/post/159501/

In short, he says that sync model used in OpenDune ran very badly in JS, so he had to replace it with async model (thus introducing some bugs).

He also lists hotkeys:

Attack, Move, Harvest, Retreat, Guard, Tab, Build




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: