Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/styzex/rust_ray
A simple ray casting game engine written in Rust.
https://github.com/styzex/rust_ray
game-development game-engine raycasting raycasting-engine rust rust-crate rust-game-developement rust-gamedev rust-lang rust-library
Last synced: about 2 months ago
JSON representation
A simple ray casting game engine written in Rust.
- Host: GitHub
- URL: https://github.com/styzex/rust_ray
- Owner: Styzex
- License: apache-2.0
- Created: 2024-10-29T22:02:18.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-09T14:53:33.000Z (about 2 months ago)
- Last Synced: 2024-11-09T15:35:09.605Z (about 2 months ago)
- Topics: game-development, game-engine, raycasting, raycasting-engine, rust, rust-crate, rust-game-developement, rust-gamedev, rust-lang, rust-library
- Language: Rust
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust Ray
A simple raycasting-based game engine written in Rust.
## License
Rust Ray is released under the [Apache 2.0 License](http://www.apache.org/licenses/).
## Dependencies
- glu-sys
- imgui
- libm
- sdl2## Prerequisites
- Run the Visual Studio 2019 build tools installer
- For easy setup, select the Desktop development with C++ workload in the installer.
- For a minimal setup, follow these steps:
- In the installer, navigate to Individual components
- Select the latest MSVC for your architecture and version of Windows
- Select the latest Windows SDK for your version of Windows
- Select the C++ CMake tools for Windows component
- Install the components## Compiling
### Windows
To compile the game engine just run this commmand `cargo build` everything should work out of the box.### Linux
#### Debian/Ubuntu
```bash
sudo apt install libsdl2-dev libgl1-mesa-dev libglu1-mesa-dev
```
#### Fedora
```bash
sudo dnf install SDL2-devel mesa-libGL-devel mesa-libGLU-devel
```
#### Arch Linux
```bash
sudo pacman -S sdl2 mesa
```
#### NixOS
Add this to your configuration.nix:
```
environment.systemPackages = with pkgs; [
SDL2
libGL
glu
];
```
Or for a temporary shell:
```bash
nix-shell -p SDL2 libGL glu
```
After that you should be able compile the game engine with this commmand `cargo build` the build.rs will set everything you need for it to compile on linux.### MacOS
To compile the game engine just run this commmand `cargo build` everything should work out of the box.
## Planned Features
- Implement a simple 3D renderer for obj models (experimental)
- ImGui-based debug menu
- Variable manipulation
- Position viewing
- Performance statistics
- A simple level editor
- Baked lighting (experimental)## Implemented Features
- Fake 3D rendering from the raycasting
- 2D rendering
- Raycasting
- Player movement
- Map from a **_*map*_.rrm** file
- Currently only supports maps with the size of 8 blocks
## The custom map file format- The name of the file will be shown in the map selection menu so map if its called map.rrm
- It doesn't support comments
- Any number that is a 1 or 0 will break it and possibly crash the gamemap.rrm
```
SIZE=8
[1, 1, 1, 1, 1, 1, 1, 1],
[1, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 1, 0, 1],
[1, 1, 1, 1, 0, 1, 1, 1],
[1, 0, 0, 1, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 0, 0, 1],
[1, 0, 0, 1, 0, 0, 0, 1],
[1, 1, 1, 1, 1, 1, 1, 1],
```