An in-progress, from-scratch reimplementation of the FPS-genre pioneering game, Wolfenstein 3D, released by id Software in 1992, in Rust. The goal is to reimplement all of the game's original functionality, as well as potentially add custom features like networked multiplayer.
Demo.mp4
- Enemy AI
- More weapons
- WAD parser
- Minimap
- Networked multiplayer (aspirational)
- Compile to WebAssembly
- Raycasting
- Texture mapping
- Sprites (objects & enemies)
- Doors
- Controls (WASD, arrow keys, mouse)
- Custom map creation
- General sprite animation system
- Walking enemies
- Shooting at enemies
brew install sdl2 sdl2_image
Might need to add these in your ~/.zshrc:
export LIBRARY_PATH="$LIBRARY_PATH:/opt/homebrew/lib"
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/lib"
Then, from the root of this repo:
cargo run --release
WASDto move around- Mouse (or trackpad) to look around
- Left mouse click to shoot
Spaceto open doors~to unlock/relock mouse from game windowEscto quit game
The core game logic and the rendering algorithm are written from scratch. The things not written from scratch are opening a window, putting pixels into it, reading mouse and keyboard inputs, managing textures, GPU-accelerated texture scaling, and doing all this in a cross-platform manner. To do all this for me, I'm using the excellent SDL library. Doing all these tasks from scratch as well would be an interesting challenge, but I feel that would stray from the scope of the project.
As this is a reimplementation of a classic game, I'd like to state the obvious and say that this isn't "my" game. It is id Software's game, released by them in 1992. The entire concept of the game, the design, the mechanics, all of the artwork is most definitely not my creation, it is theirs.
My creation and original work in this project lies purely in the technical realm of writing the code to replicate the workings of the game (hence, a reimplementation); all the required logic and algorithms. This is a purely educational pursuit for myself, I'm not trying to make any money off this (and if I tried, I'd have a lawsuit on my hands).
I found all the original artwork from the game here.