A simple 2D raycasting visualization built with Rust and SDL2.
This project is based on my previous work in C++ adapted to Rust. The player is represented on-screen and follows the mouse pointer. The demo also spawns random line "walls" and renders rays from the player.
- Real-time raycasting visualization
- Player movement and interaction
- Ray-wall collision detection
- SDL2-based rendering
- Rust (stable toolchain, Rust 2021/2024 edition as specified in Cargo.toml)
- SDL2 libraries
cargo(comes with Rust)
From the project root (where Cargo.toml lives):
cargo runThis will compile the project and open a window. Move the mouse inside the window — the player should follow the mouse pointer and rays/walls should render in white.
- Mouse movement: move the player
- Esc or close window: exit the program