Rust Doom is a Doom 1 & 2 renderer implemented in Rust. Initially created as a learning project, this renderer offers a fresh take on the classic Doom games with an emphasis on idiomatic Rust code and modern OpenGL rendering techniques.
Rust Doom utilizes a modern OpenGL 3+ renderer, eschewing immediate mode in favor of VBOs (Vertex Buffer Objects) and shaders. This approach ensures more efficient rendering and takes advantage of contemporary graphics hardware capabilities. Notably, the floors are rendered as convex polygons computed from the BSP (Binary Space Partitioning), which eliminates certain visual glitches found in other ports.
The renderer faithfully replicates the original game's lighting effects using the original palette and colormaps. This involves performing 256 color palette lookups in a fragment shader, a technique that preserves the classic visual style of Doom.
Rust Doom features a free-flying camera controlled via mouse and keyboard, providing full six degrees of freedom. This allows players to explore the game world in a way not possible in the original games.
A key design goal of Rust Doom is to maintain 100% safe code, with no unsafe
blocks. This ensures that the renderer adheres to Rust's safety guarantees, minimizing the risk of bugs and undefined behavior.
Rust Doom is designed to build with the latest stable version of Rust. The build process is straightforward:
Cargo.toml
is located).You can customize the gameplay experience by specifying the level, FOV, and resolution preferences using command-line flags. Run the program with the -h
flag to see all available options.
Rust Doom has a clear set of goals aimed at enhancing the Doom experience with modern technologies:
These features ensure that Rust Doom not only replicates the original game's look and feel but also enhances it with modern graphics techniques and controls.
Rust Doom is an open-source project, and contributions are welcome. The codebase is available on GitHub, and contributors are encouraged to submit pull requests. The project aims to be a valuable resource for those learning Rust and graphics programming.
Rust Doom is a fascinating project that blends nostalgia with modern technology. By reimagining Doom in Rust, it offers a unique perspective on game development and showcases the power and safety of the Rust programming language.