9 comments

  • ninkendo2 hours ago
    Was this translated automatically from C? I picked a spot totally at random and saw in <a href="https:&#x2F;&#x2F;github.com&#x2F;Ragnaroek&#x2F;iron-wolf&#x2F;blob&#x2F;main&#x2F;src&#x2F;act1.rs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Ragnaroek&#x2F;iron-wolf&#x2F;blob&#x2F;main&#x2F;src&#x2F;act1.rs</a> in place_item_type:<p><pre><code> let mut found_info = None; for info in &amp;STAT_INFO { if info.kind == item_type { found_info = Some(info); break; } } </code></pre> When typically in rust this is just:<p><pre><code> let found_info = STAT_INFO.iter().find(|info| info.kind() == item_type); </code></pre> 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...
    • ragnaroekX53 minutes ago
      Yes, the code is _very, very_ close to the C-Code. All over the place.
    • klaussilveira1 hour ago
      As a non-Rust guy, I keep writing the example above. I didn&#x27;t even know about the second option!<p>If you do that, please share a link so I can learn from you! This is awesome!
    • derwiki1 hour ago
      Sounds like something an LLM agent might be good at?
  • amelius5 hours ago
    Wolfenstein is peanuts compared to writing your own doubly linked list.
  • hamza_q_2 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<p><a href="https:&#x2F;&#x2F;github.com&#x2F;hamzaq2000&#x2F;wolf3d-reimpl-rs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;hamzaq2000&#x2F;wolf3d-reimpl-rs</a>
  • klaussilveira4 hours ago
    Somewhat related: <a href="https:&#x2F;&#x2F;github.com&#x2F;Henrique194&#x2F;iron-doom" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Henrique194&#x2F;iron-doom</a>
  • yuppiepuppie3 hours ago
    This is cool! Wolfenstein will always have a place in my heart.<p>You should add it to <a href="https:&#x2F;&#x2F;hnarcade.com" rel="nofollow">https:&#x2F;&#x2F;hnarcade.com</a>
  • xeonmc4 hours ago
    Game would be considered too politically incendiary if released today.
    • yorwba4 hours ago
      Or the other way around. Wolfenstein 3D was first banned in Germany in 1994, but unbanned in 2018: <a href="https:&#x2F;&#x2F;arstechnica.com&#x2F;gaming&#x2F;2018&#x2F;08&#x2F;german-ratings-board-starts-allowing-nazi-symbols-in-video-games&#x2F;" rel="nofollow">https:&#x2F;&#x2F;arstechnica.com&#x2F;gaming&#x2F;2018&#x2F;08&#x2F;german-ratings-board-...</a>
    • legitster3 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.<p>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.
      • TehCorwiz2 hours ago
        The first game has zombies with guns in their chest and a mecha hitler.
  • vunderba6 hours ago
    Nice job. Couple notes for the web version:<p>- Once started the shareware game on Chromium browsers seems to flicker like crazy which displays the &quot;B.J. Blazkowicz&quot; face.<p>- You missed adding the classic code that everyone knows, M-L-I!
    • midzer1 hour ago
      Can confirm the flicker.<p>I did a WASM port of the shareware from <a href="https:&#x2F;&#x2F;github.com&#x2F;fabiangreffrath&#x2F;wolf4sdl" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fabiangreffrath&#x2F;wolf4sdl</a> playable at <a href="https:&#x2F;&#x2F;midzer.de&#x2F;wasm&#x2F;wolfenstein&#x2F;" rel="nofollow">https:&#x2F;&#x2F;midzer.de&#x2F;wasm&#x2F;wolfenstein&#x2F;</a>
    • Freak_NL5 hours ago
      The flickering happens in Firefox too.
  • beemboy3 hours ago
    Sweet memories...
  • hexo3 hours ago
    again?