Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Wadzilla. Play DOOM in Zork (github.com/scottvr)
94 points by ycombiredd on May 31, 2024 | hide | past | favorite | 51 comments
Wadzilla is currently a PoC. Although in theory it “works”, it does not create an entertaining experience as a game, although to me it is quite fun just too see it output ZIL for all of the rooms in a DOOM WAD, with all of the objects in all of their correct locations by their plain English names, along with the 8-character names for the textures of the walls, floors, and ceilings in their relative positions in the room. Part of that enjoyment of course comes from knowing what it entails just to get that far, so the amount of entertainment you derive from that may be far less. In fact, I suspect that for most people at this point the most amusing thing about Wadzilla will be the very concept of its existence - and of course the name, which I will take credit for while also acknowledging how fortuitous it is that the project practically named itself. “What should I name a tool that converts WAD to ZIL? Oh yeah, right. Of course. Wadzilla.”

I share it in this early stage because I suspect many in this audience may enjoy just reading about it, and many others might be excited by it and want to contribute to the effort, and also because I welcome feedback here and contributions by way of GitHub issues and PRs.



+1 to what vijayr02 said: you really need at least screenshots, and ideally just post the .z5 file with a link to iplayif so people can play it directly and see what you're talking about. Like this:

    https://iplayif.com/?story=https://raw.githubusercontent.com/Quuxplusone/Advent/gh-pages/advent.z8
I tried and failed to create the .z5 locally myself. It'd be easy if your script generated Inform code, but you generate ZIL, and the only tool I was able to find to compile ZIL is ZILF/ZAPF, which needs Windows. Here's how to create the "output.zil" file using your script...

    git clone https://github.com/scottvr/wadzilla
    cd wadzilla
    curl -O "https://raw.githubusercontent.com/dabignerd/doom-wads/master/zips/Doom%20(v1.9).zip"
    unzip "Doom%20(v1.9).zip"
    pip install bs4
    python wadzilla.py --basewad DOOM.WAD  
But then you need a ZIL compiler to proceed any farther. You can get a compiled ZILF.EXE (for Windows) here:

    curl -O "https://ifarchive.org/if-archive/infocom/compilers/zilf/zilf-0.8.zip"
Or the C# source code and MSVC project files here (seems to use hg, not git, for version control):

    https://foss.heptapod.net/zilf/zilf
But since I'm on Apple Silicon, both of those avenues seem to be dead ends. I verified that ZILF.EXE "cannot be run in DOS mode" as far as DosBox is concerned. There's a thing called WineskinServer that's allegedly supposed to let you run Windows code on Macs, but it didn't help me; I think it's trying to tell me that it needs some proprietary bits (the Windows-system-library equivalent of a disk image or a ROM) in order to do anything useful with an EXE file.


It has somewhat questionable build settings (plain clone -> dotnet run fails with errors, which is not acceptable for .NET projects) but it worked on my M1 Pro just fine with these:

    - Clone repo
    - cd Zilf/src/Zilf
    - dotnet run -c Release -p:WarningLevel=0
To get sdk: download from https://dot.net/download (you can also just get it from brew and then uninstall it but this mode sucks because Homebrew has unsound folder behavior that puts .NET SDK in non-standard path which then creates issues if other tools install SDK in a standard path - .NET has none of the idiocy C/Python/Java and other tools suffer from where you need to manually manage versions and expects a single "muxer" executable to exist in the PATH while the SDK packs are installed in its subfolders, which it manages and uses automatically.

But I shouldn't complain too much, FOSS communities are very nearsighted and usually sleep on .NET, let alone using proper .NET LTS versions (8 currently), which this project does, and it's always something nice to see out there.


Hey thanks for documenting the prereq steps! :-)

I am working on some additional progress toward making it plug-and-play. I’ll work on a demo.

Thanks for the feedback, quuxplusone (and everyone)!


I just downloaded their prebuilt Linux binary and it spewed a bunch of errors (stopped at around 100 of them) as soon as it tried to compile the ZIL file that this project spit out. So I guess I'm kind of at a loss for what this is supposed to have achieved?


Same here. The latest zilf is 0.9 https://foss.heptapod.net/zilf/zilf/-/releases

>bin\Zilf.exe doomv109.zil ZILF 0.9 built 8/11/2019 4:30:42 AM [error MDL0128] doomv109.zil:1: ROOM: arg 1: expected ATOM

[error MDL0113] doomv109.zil:2: unrecognized value in DECL pattern: -48 [error MDL0215] doomv109.zil:2: GVAL: atom 'CEILING' has no global value

[error MDL0113] doomv109.zil:2: unrecognized value in DECL pattern: 80 [error MDL0113] doomv109.zil:3: unrecognized atom in DECL pattern: Unknown [error MDL0113] doomv109.zil:4: unrecognized atom in DECL pattern: Unknown [error MDL0113] doomv109.zil:5: unrecognized atom in DECL pattern: - [error MDL0113] doomv109.zil:17: unrecognized atom in DECL pattern: ROOM [error MDL0113] doomv109.zil:20: unrecognized value in DECL pattern: -48 [error MDL0215] doomv109.zil:20: GVAL: atom 'CEILING' has no global value

[error MDL0113] doomv109.zil:20: unrecognized value in DECL pattern: 80 [error MDL0113] doomv109.zil:21: unrecognized atom in DECL pattern: Unknown [error MDL0113] doomv109.zil:22: unrecognized atom in DECL pattern: Unknown [error MDL0113] doomv109.zil:23: unrecognized atom in DECL pattern: - [error MDL0113] doomv109.zil:47: unrecognized atom in DECL pattern: - [error MDL0128] doomv109.zil:48: GVAL: arg 1: expected ATOM

[error MDL0128] doomv109.zil:50: ROOM: arg 1: expected ATOM

[error MDL0113] doomv109.zil:51: unrecognized value in DECL pattern: 0 [error MDL0215] doomv109.zil:51: GVAL: atom 'CEILING' has no global value

>bin\Zilf.exe freedoom1.zil ZILF 0.9 built 8/11/2019 4:30:42 AM [error MDL0128] freedoom1.zil:1: ROOM: arg 1: expected ATOM

[error MDL0113] freedoom1.zil:2: unrecognized value in DECL pattern: 0 [error MDL0215] freedoom1.zil:2: GVAL: atom 'CEILING' has no global value

[error MDL0113] freedoom1.zil:2: unrecognized value in DECL pattern: 104 [error MDL0113] freedoom1.zil:3: unrecognized atom in DECL pattern: Unknown [error MDL0113] freedoom1.zil:4: unrecognized atom in DECL pattern: Unknown [error MDL0113] freedoom1.zil:5: unrecognized atom in DECL pattern: - [error MDL0113] freedoom1.zil:7: unrecognized atom in DECL pattern: STARGR1 [error MDL0215] <internally created FORM>: GVAL: atom 'Left' has no global value

[error MDL0113] freedoom1.zil:8: unrecognized atom in DECL pattern: SKSNAKE2 [error MDL0113] freedoom1.zil:9: unrecognized atom in DECL pattern: SKSNAKE2 [error MDL0113] freedoom1.zil:10: unrecognized atom in DECL pattern: SKSNAKE2 [error MDL0113] freedoom1.zil:11: unrecognized atom in DECL pattern: SKSNAKE2 [error MDL0113] freedoom1.zil:12: unrecognized atom in DECL pattern: ROOM [error MDL0113] freedoom1.zil:15: unrecognized value in DECL pattern: 0 [error MDL0215] freedoom1.zil:15: GVAL: atom 'CEILING' has no global value


I woudn't use that Doom WAD but the FreeDoom one as it aims for compatibility:

https://github.com/freedoom/freedoom/releases/download/v0.13...

If that's the complete Doom IWaD, you can be in trouble as it's copyrighted.


C# ".exe" files aren't at all the same thing as either DOS or native Windows .exe files. They are .NET code, similar to Java bytecode. You need a .NET environment such as dot-net (which is available on Macs) to run them. Given that the ZILF compiler is text-based, it ought to run fine on dot-net.


No screenshots? ;p

Also - IMNSHO the obvious name for this project is Zoom - but that's been taken by a similar game where you slay your coworkers by talking too much.

The next obvious candidate therefore is Dork :)


No argument from me; your suggested names are spot on for the game comprised of the resultant melange. Albeit, I still maintain that Wadzilla is the exactly correct name for the tool that creates the mashup.

Also.. screenshots? Of text. Text describing a 2.5D world comprised of 2D graphics rendered in 3D for presentation on a 2D display in our 3D world? Yeah, you’ve got the spirit! :-)


A screenshot as in a graphical representation of a typical screen during a game would be nice. It could be a text block in monospaced font.


There are other fun "terminal capture tools" like https://asciinema.org/


Yeah guys, I was just joshing, and actually if it isn’t obvious, I was joshing in a positive way (hence the “spirit” comment; I think it’s a good idea.)

In the mean time, I tried to document the limitations and make it clear that I didn’t consider it plug-and-play, and that I will appreciate feedback, bug reports, and PRs.

I will prioritize addressing things from the comments here, as well as taking advantage of the documentation talk are graciously writing. ;-)


Please no dictionary words! Some of us search for things around here you know.

How about calling it "d41d8cd98f00b204e9800998ecf8427e" ?


There was an old joke floating around the internet about text-adventure Doom. It went something like:

    There is a demon here.
    
    > shoot demon
    
    The demon is dead.
    There is another demon here.
When jokes like that turn into serious projects... that's pure hack value.


> throw BFG-9000 at demon


Have you considered an Inform 7 version at some point? (https://ganelson.github.io/inform-website/)


Well I certainly have now!

I hoped that proffering this idea here would be fruitful and prosperous, and already I am satisfied. Thanks.


I fooled around with Inform for a while a few years back, it's like writing an adventure game within the natural language interpreter itself, complete with all the interpreter's quirks and deficiencies. Battling against this was a fun challenge and a game in itself. Some people are productive in it, somehow.


That echoes my experience as well. I think it may be easier for those who have not had formal training in a traditional programming language, who happen to also be especially detail-oriented writers.


The target machine it's the same. If any, glulx could do more stuff.


This seems interesting to me in the context of ML research (not that I know anything about that). We have generative AI and this is sort-of the reverse doing compression like turning an interactive movie into an interactive book. I know it's reading the code of the graphics, but that could serve as labelled data for training image to text generation. Image to text isn't new, but if the sequences of images to text could tell a coherent story that could be interesting. Perhaps we need many people playing Doom with running commentary on the evolving story for data.

Or we could do the same for an adventure game which has more story than Doom.


It’s fun to guess what something is on HN just from the title before going there or the comments. In this case my guess was that someone was

- rendering Doom then using an LLM to get a text description of the scene

- asking the user what to do

- converting their text action into a couple seconds of doom input

- re-render and repeat until dead or stage clear.

I was wrong but still fun to think about!


The Zmachine it's far easier, but you are mostly limited to nswe, the corners, up and down. And, maybe, in/out, inside/outisde.

Albeit an action game (a roguelike) remade into an adventure interface exists today:

https://ifdb.org/viewgame?id=f7zdhxmiraht53d1

But, OFC, any MUD did this since forever. Attacks, spells, avoidings, parries, dashes, steals, stabs...


> The Zmachine it's far easier, but you are mostly limited to nswe, the corners, up and down. And, maybe, in/out, inside/outisde.

The Z-Machine was far more capable than that. It had a complicated LISP-inspired object system and a parser capable of a relatively huge vocabulary and you could map just about whatever "spatial relationships" you wanted between the vocabulary and objects. Even the original Zork itself you'd be unable to complete if you assumed the only available directions were compass directions/corners/up/down/in/out. There are some tricky shortcuts and couple places the Zork dungeon violates a strict grid. DOOM has the much more limited map structure than the Z-Machine (given the way its BSP worked it had a very strong Euclidean graph and lots of limits on how rooms connect; which its amazing MyHouse.WAD works at all, it would have been a lot easier to build on the Z-Machine).

Also, further the features of the Z-Machine depend on the version of the Z-Machine and some of the later Z-Machines got extremely complex. Versions 6, 7, and 8 even had modest graphics support. (It might be neat with the project here to try to screenshot DOOM rooms and include in Z6+ Z-Machine files.)


I know that; and ofc I played Dungeon/Zork with that semi Non-Euclidean geometry. But my point is mostly, by default, under inform6/inform6lib, you move in eight dirs and up/down. That's it. And yes, I'm aware about objects and inside/outside relations, the Inform6 flags map directly to them. But you can't do relative moves as you could do in a MUD, for instance for combats. Altough there was some roguelike written in Inform7 which was close. Yes, you can implement them as grammars/objects but you would have to track the entire map at once in order to track the projectiles per turn.


It's useful to remember that Inform6 and especially its default library are limited in ways the Z-Machine itself is not. Inform7 is both better and worse with a heavier default library, but the language is more expressive in some surprising places than Inform6's syntax most easily allows for.

I'm not sure what MUDs you are specifically thinking about, but most things in MUDs that were single player are generally expressible in the Z-Machine with the right libraries. Writing those libraries might be a chore because maybe not enough people want much more than I6/I7 standard libraries.

Also, it's an interesting experience to try to write in ZIL directly instead of Inform, now that there are a growing number of ZIL compilers and even some of the original Infocom games are source available in ZIL from leaks now. ZIL can be interesting to see a lower level idea of the Z-Machine. It's a weirdly capable virtual machine even in its most raw. That raw low level isn't what you'd expect if you expect something like Inform6 and the Inform6 standard library.


Ha this is amazing! Seeing BeautifulSoup in the list of dependencies confused me for a second. Had to look through the code to see that had code to scrape the type information directly from the wiki!


@quuxplusone and all I fixed my dunderheaded debug output commit that meant the "outputs ZIL" was a lie. This temporarily puts us back to a state where the Things have no locations in the ZIL, but I am working on that. I just wanted to show that it is back on track. Thanks Q+1!

https://github.com/scottvr/wadzilla/commit/b92f90070726088ba...


Next step: Play Zork in Doom in Zork.


Yes! We have it in Call of Duty : Black Ops https://youtu.be/QOgK0sV6RLU?si=5YdNNwbigBEvm9f6



Kill Slayer with little rusty shotgun $ You Miss Reload Kill Slayer with little rusty shotgun $ You hit Go South ....


Exactly. I knew you guys would get it. :-)


BTW, there was a demo IF for Quake for the ZMachine (probably written with Inform 6)


Cool. The point here is more about the actual (ludicrous) technical process, than about replicating the mythos and playability, but it would be amazing if an actually enjoyable Doom IF in its own right emerged from the process.

Also, I appreciate you turning me on to the existence of glulx.


Is this entirely text based? This may sound like a stupid question, but there were later Zork games had supported rudimentary graphics. There need to be some screenshots to show what it actually looks like.


Yeah, it's text-only, like the really original Zork games. I'm working on more documentation, but first I've got some issues to resolve in code. Thanks!


Relevant xkcd (and personal favorite of mine) since no one else posted it yet: https://xkcd.com/91/ :)


It would be awesome to have some kind on playable demo in-browser, or sample output. Nice work


Based. Unfathomably based.


Have you tried the challenge of feeding it MyHouse.WAD yet?


Please show a playthrough of the Okuplok WAD.


Yeah, and I know that it would be far easier and probably immensely more playable and practical to just craft a good prompt for an LLM, presto! Play Doom in Zork with ChatGPT. The ludicrous technical implementation is actually the point though in this case.


now make a multiplayer client and let's flee together.


[flagged]


While that does often describe me, I take it you didn’t actually look at the code.


I had other plans for today, but this is a compelling argument.


OFC you don't know what Zork and the ZMachine are about. Zork it's propietary, but the standard virtual machine isn't.

You have several interpreters to choose form: Frotz, Fizmo, DFrotz, ScummVM (yes, that one, albeit a simple terminal with Frotz it's much better), Lectrote...

Altough I'd call the original MIT Zork 'Schrodinger licensed', because today they are fighting back and forth with MIT veterans so the original source from Dungeon gets a libre compatible license instead of a non-commercial one.

BTW, a libre licensed ZMachine game, Tristam Island (and Calypso, too) will run on far more plataforms than Doom itself. From C64's, to smartphones, pens and even a Game Boy.


As I understand it, the essence of the post is not to benefit the IT industry, but to promote something unnecessary, while it is significant to minus absolutely all the answers of those whose opinions radically differ from the author’s


I don’t know how you can possibly think exercises implementing ludicrous ideas are unnecessary, nor why you consider either Doom or Zork irrelevant to the IT industry.


because this is a project in the “I do it because I can” style and not in the “project that brings benefits” type. time wasted on yet another opportunity to launch doom on a Chinese plastic spoon. I would support it if this was a post about options for improving the user interface, or about optimizing some specific software. about creating backward compatibility with old OSes and PCs. but no! This is just another doom. of which there are already thousands. pure show off. but no benefit.


Sir, Facebook is over there [points west]. This is HN.




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

Search: