logoalt Hacker News

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

46 pointsby ragnaroekXtoday at 3:52 PM17 commentsview on HN

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


Comments

ninkendotoday 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...
show 3 replies
ameliustoday at 5:28 PM

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

show 1 reply
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

yuppiepuppietoday at 7:01 PM

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

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

xeonmctoday at 6:25 PM

Game would be considered too politically incendiary if released today.

show 3 replies
beemboytoday at 6:44 PM

Sweet memories...

vunderbatoday 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!

show 2 replies
hexotoday at 7:16 PM

again?