\

Show HN: Iron-Wolf – Wolfenstein 3D source port in Rust

48 points - today at 3:52 PM


The goal is to have a pixel, mod-friendly perfect recreation of Wolfenstein 3D in Rust.

Source
  • ninkendo

    today at 8:14 PM

    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...

      • klaussilveira

        today at 9:03 PM

        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!

        • ragnaroekX

          today at 9:48 PM

          Yes, the code is _very, very_ close to the C-Code. All over the place.

          • derwiki

            today at 9:10 PM

            Sounds like something an LLM agent might be good at?

        • amelius

          today at 5:28 PM

          Wolfenstein is peanuts compared to writing your own doubly linked list.

            • today at 7:15 PM

          • hamza_q_

            today at 8:25 PM

            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

            • xeonmc

              today at 6:25 PM

              Game would be considered too politically incendiary if released today.

                • yorwba

                  today at 6:38 PM

                  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-...

                  • legitster

                    today at 7:28 PM

                    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.

                      • TehCorwiz

                        today at 8:13 PM

                        The first game has zombies with guns in their chest and a mecha hitler.

                    • today at 6:48 PM

                  • klaussilveira

                    today at 6:07 PM

                    Somewhat related: https://github.com/Henrique194/iron-doom

                    • yuppiepuppie

                      today at 7:01 PM

                      This is cool! Wolfenstein will always have a place in my heart.

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

                      • vunderba

                        today at 4:34 PM

                        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!

                      • beemboy

                        today at 6:44 PM

                        Sweet memories...

                        • hexo

                          today at 7:16 PM

                          again?