Skip to content

mhamzaqayyum/wolf3d-reimpl-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wolfenstein 3D Re-implementation

An in-progress, from-scratch, re-implementation of the FPS-genre pioneering game, Wolfenstein 3D, released by id Software in 1992, in Rust. The goal is to re-implement all of the game's original functionality, as well as potentially add custom features like networked multiplayer.

Current Engine Demo

latest_engine_demo.mov

Remaining Features to Implement

  • Enemy AI
  • More weapons
  • WAD parser
  • Minimap
  • Networked multiplayer (aspirational)
  • Compile to WebAssembly

Completed

  • Raycasting
  • Texture mapping
  • Sprites (objects & enemies)
  • Doors
  • Controls (WASD, arrow keys, mouse)
  • Custom map creation
  • General sprite animation system
  • Walking enemies
  • Shooting at enemies

macOS Build Instructions

brew install sdl2 sdl2_image

Might need 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

Controls

  • W A S D to move around
  • Mouse (or trackpad) to look around
  • Left mouse click to shoot
  • Space to open doors
  • ~ to unlock/relock mouse from game window
  • Esc to quit game

What is written from scratch, what isn't

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.

Credits & Disclaimer

As this is a re-implementation 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 re-implementation); all the logic and algorithms required. 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 just want that sweet sweet technical street cred.

I found all the original artwork from the game here.