Readit News logoReadit News
Posted by u/ycombiredd 2 years ago
Show HN: Wadzilla. Play DOOM in Zorkgithub.com/scottvr/wadzil...
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.

quuxplusone · 2 years ago
+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.

neonsunset · 2 years ago
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.

ycombiredd · 2 years ago
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)!

viccis · 2 years ago
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?
b7kich · 2 years ago
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

anthk · 2 years ago
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.

jhbadger · 2 years ago
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.
vijayr02 · 2 years ago
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 :)

ycombiredd · 2 years ago
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! :-)

notachatbot1234 · 2 years ago
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.
HocusLocus · 2 years ago
Please no dictionary words! Some of us search for things around here you know.

How about calling it "d41d8cd98f00b204e9800998ecf8427e" ?

bitwize · 2 years ago
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.

kevindamm · 2 years ago
> throw BFG-9000 at demon
crooked-v · 2 years ago
Have you considered an Inform 7 version at some point? (https://ganelson.github.io/inform-website/)
ycombiredd · 2 years ago
Well I certainly have now!

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

card_zero · 2 years ago
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.
anthk · 2 years ago
The target machine it's the same. If any, glulx could do more stuff.
karmakaze · 2 years ago
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.

ryanschneider · 2 years ago
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!

anthk · 2 years ago
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...

WorldMaker · 2 years ago
> 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.)

doix · 2 years ago
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!
ycombiredd · 2 years ago
@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...

scovetta · 2 years ago
Next step: Play Zork in Doom in Zork.
davidjhall · 2 years ago
Yes! We have it in Call of Duty : Black Ops https://youtu.be/QOgK0sV6RLU?si=5YdNNwbigBEvm9f6