Show HN: Iron-Wolf – Wolfenstein 3D source port in Rust
50 points by ragnaroekX 8 hours ago | 19 comments
The goal is to have a pixel, mod-friendly perfect recreation of Wolfenstein 3D in Rust.

ninkendo 4 hours ago
Was this translated automatically from C? I picked a spot totally at random and saw in https://github.com/Ragnaroek/iron-wolf/blob/main/src/act1.rs in place_item_type:

    let mut found_info = None;
    for info in &STAT_INFO {
        if info.kind == item_type {
            found_info = Some(info);
            break;
        }
    }
When typically in rust this is just:

    let found_info = STAT_INFO.iter().find(|info| info.kind() == item_type);
Now I want to go through and feng shui all the code to look more like idiomatic rust just to waste some time on a saturday...
reply
klaussilveira 3 hours ago
As a non-Rust guy, I keep writing the example above. I didn't even know about the second option!

If you do that, please share a link so I can learn from you! This is awesome!

reply
ragnaroekX 2 hours ago
Yes, the code is _very, very_ close to the C-Code. All over the place.
reply
derwiki 3 hours ago
Sounds like something an LLM agent might be good at?
reply
iberator 11 minutes ago
is it faster than original?

Port it to 286, and then claim RUST victory

reply
amelius 7 hours ago
Wolfenstein is peanuts compared to writing your own doubly linked list.
reply
hamza_q_ 4 hours ago
Cool! I did an incomplete version in Rust a while back as well. Not a source port, tried to recreate the game from scratch myself, without looking at the C src code

https://github.com/hamzaq2000/wolf3d-reimpl-rs

reply
xeonmc 6 hours ago
Game would be considered too politically incendiary if released today.
reply
yorwba 5 hours ago
Or the other way around. Wolfenstein 3D was first banned in Germany in 1994, but unbanned in 2018: https://arstechnica.com/gaming/2018/08/german-ratings-board-...
reply
legitster 5 hours ago
Wolfenstein 3D was pretty squarely a WWII fantasy shooter. Only later does it get into the alternate history post-war stuff which does get somewhat more squarely political.

I think it cuts both ways. The Wolfenstein franchise has obviously relished in violence against Nazis, but also inadvertently is part of the trend of glorifying them.

reply
TehCorwiz 4 hours ago
The first game has zombies with guns in their chest and a mecha hitler.
reply
bombcar 39 minutes ago
Someone's not up to date on the History Channel documentaries about WWII!
reply
yuppiepuppie 5 hours ago
This is cool! Wolfenstein will always have a place in my heart.

You should add it to https://hnarcade.com

reply
vunderba 8 hours ago
Nice job. Couple notes for the web version:

- Once started the shareware game on Chromium browsers seems to flicker like crazy which displays the "B.J. Blazkowicz" face.

- You missed adding the classic code that everyone knows, M-L-I!

reply
midzer 3 hours ago
Can confirm the flicker.

I did a WASM port of the shareware from https://github.com/fabiangreffrath/wolf4sdl playable at https://midzer.de/wasm/wolfenstein/

reply
Freak_NL 7 hours ago
The flickering happens in Firefox too.
reply
beemboy 5 hours ago
Sweet memories...
reply
hexo 5 hours ago
again?
reply