{"slug": "show-hn-pywolf3d-a-wolfenstein3d-clone-written-from-scratch-in-python", "title": "Show HN: PyWolf3D, a wolfenstein3D clone written from scratch in Python", "summary": "Developer atifcodesalot released PyWolf3D, a Wolfenstein 3D engine and game clone written from scratch in Python using pygame, published on GitHub and shown via a Show HN post. The clone renders with a raycaster casting 160 rays at a default 54-degree field of view over 64x64 map grids, uses the DDA algorithm for tile collisions, and synthesizes music at runtime through an OPL emulator from the original AUIDOT and AUIDOHED files rather than redistributing copyrighted audio. The author states all code, including WL1/WL6 file parsing, rendering, sound and game logic, was written without AI code generation, with AI tools used only for discussion, research and locating assets; the shareware episode 1 is playable after cloning the repository, and the full six episodes require dropping GAMEMAPS.WL6, MAPHEAD.WL6, AUIDOT.WL6 and AUIDOHED.WL6 from a purchased installation into the assets/maps folder.", "body_md": "## demo3_squashed.mp4\n\nPlease excuse my mouse sounds in the demo 😅\n\nPYWOLF3D is a [Wolfenstein 3D](https://en.wikipedia.org/wiki/Wolfenstein_3D) engine, game clone written from scratch in pygame, Python.\n\nI am a huge Doom and Wolfenstein fan so I just decided to rewrite one of the originals myself 😎. It was mostly for fun and learning.\n\nAll code present in this project was written by me, without AI code generation or coding agents. AI tools were used for discussion, research, and help locating existing game assets and resources. The implementation, including map parsing, rendering, actor behavior, and game logic is entirely my own work. But don't take my word for it: [https://isvibecoded.com/](https://isvibecoded.com/).\n\nTo play the shareware version of episode 1, simply clone this repository:\n\n```\ngit clone https://github.com/atifcodesalot/pyWolf3D\n```\n\nchange the directory to the root of the project:\n\n```\ncd pyWolf3D\n```\n\nThen install the required packages;\n\nFor `Windows`:\n\n```\npy -m pip install -r requirements.txt\n```\n\nFor `Unix`:\n\n```\npython3 -m pip install -r requirements.txt\n```\n\nThen run;\n\nFor `Windows`:\n\n```\npy -m wolfenstein3D\n```\n\nFor `Unix`:\n\n```\npython3 -m wolfenstein3D\n```\n\nIf want to play all of the episodes, you will need to drop the game files: `GAMEMAPS.WL6`, `MAPHEAD.WL6`, `AUIDOT.WL6` and `AUIDOHED.WL6` from your purchased installation into the `./wolfenstein3D/assets/maps` folder, I also wrote a simple script to\ndetect it automatically if you have a steam installation of the game.\n\nI tried to keep this clone as accurate as possible (compared to the original)\nbut some things are probably different. The damage model and actor behaviour are mostly similar, but your bullets pass through enemies in this version, for example.\nThe clone currently supports playing the original 6 episodes but it is incomplete as mentioned. It extracts the original maps from the shareware version files `MAPHEAD.WL1` and `MAPTEMP.WL6` and music from `AUIDOT.WL6` and `AUIDOHED.WL6` files. If you want to play the original episodes, as previously stated, you will need to drop the `GAMEMAPS.WL6`, `MAPHEAD.WL6`, `AUIDOT.WL6` and `AUIDOHED.WL6` from your\npurchased installation, into the `./wolfenstein3D/assets/maps` folder.\n\nThe game employs a raycaster just like the original for rendering, there is no actual rasterization. The default amount of rays cast are 160 and the default fov is 54 degrees. You can play around with it. It is simple and reusable.\n\nThe maps are 64 to 64 grids and the raycaster uses the DDA algorithm to find collisions with the non empty tiles. The special cases are doors and pushwalls, which the raycaster handles explicitly.\n\nSprites, projectiles are rendered via perspective projection.\n\nThe sound engine is responsible for attenuation and directional sound. Directional sound is achieved by panning the audio via hardcoded configurations. The sound propagation is done via the preprocessed area tiles. Some of the sound effects (and music), like treasure pickup, were actually synthesized during runtime in the original, this version uses .wav files for all sound effects.\n\nMusic are actually synthesized during runtime using an OPL emulator using `AUIDOT` and `AUIDOHED` files!\nThe justification is that I can't just redistribute the non-shareware music with this repo, which is under copyright law.\nSo you drop the files that you already got and the music files are created on the fly!\n\n- Code: All of the components, WL1, WL6 file parsing, rendering, sound and game logic were implemented by me, as mentioned; AI wasn't used in anyway for code generation.\n- Sprites, sounds: The sprites, sounds of the original were obtained from the internet, sometimes via LLM's (some sprites are relatively obscure [like fake hitler or mecha hitler sprites])\n- Pacman sprites from Ultimecia\n\n- [game engine black book Wolf3D](https://fabiensanglard.net/gebbwolf3d/) is an awesome book\nand I have read it extensively during the development of this clone. Chase state chains, sprite rendering, sound propagation and many other aspects, I understood from this book and enjoyed its every page, it truly is awesome.\n- [https://www.spriters-resource.com/ms_dos/wolfenstein3d/](https://www.spriters-resource.com/ms_dos/wolfenstein3d/) for the original sprites.\n- [https://sounds.spriters-resource.com/ms_dos/wolfenstein3d](https://sounds.spriters-resource.com/ms_dos/wolfenstein3d) for general sound effects.\n- [https://forum.zdoom.org/viewtopic.php?t=46658](https://forum.zdoom.org/viewtopic.php?t=46658) this forum post for adlib sound effects in .wav format.\n\n- Floor finish screen (working on it)\n- Projectiles, more episode sprites and texture support (working on it, almost done)\n- Episode 1 ending animation\n- Spear of Destiny\n- Multiplayer deathmatch\n\nI have been working on this for some time now, so I decided to just put it out there before it was well... perfect. There are some non game-breaking (in my opinion :D) bugs that I am aware of and will fix it in the future. If you notice any, let me know though.", "url": "https://wpnews.pro/news/show-hn-pywolf3d-a-wolfenstein3d-clone-written-from-scratch-in-python", "canonical_source": "https://github.com/atifcodesalot/pyWolf3D", "published_at": "2026-11-02 16:09:13+00:00", "updated_at": "2026-11-02 16:24:45.023059+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["PyWolf3D", "Wolfenstein 3D", "Python", "pygame", "GitHub", "atifcodesalot", "id Software"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/show-hn-pywolf3d-a-wolfenstein3d-clone-written-from-scratch-in-python", "markdown": "https://wpnews.pro/news/show-hn-pywolf3d-a-wolfenstein3d-clone-written-from-scratch-in-python.md", "text": "https://wpnews.pro/news/show-hn-pywolf3d-a-wolfenstein3d-clone-written-from-scratch-in-python.txt", "jsonld": "https://wpnews.pro/news/show-hn-pywolf3d-a-wolfenstein3d-clone-written-from-scratch-in-python.jsonld"}}