Rustcraft
A simple Minecraft engine in Rust
About The Project
Welcome to RUSTCRAFT! Rustcraft is a simple Minecraft engine written in rust using wgpu.
But Why?
I wanted to work on a project to learn more about wgpu as well as practice my Rust skills. I then randomly saw this youtube video and got inspired to try to make a simple Minecraft engine in Rust!
Inspiration
As I explained I was inspired by this video and the corresponding codebase. This is why you will probably see a lot of design similarities between my project and this one. Jdah, your video was awesome. (I also copied his blocks atlas because I liked it a lot).
Current State
I am pretty happy with the current state of the engine. There are a few problems with it but they are outside of my MVP scope. I am aware that the game is not as efficient and smooth as it should be. I initially set as a goal to not use any threading or unsafe rust. Turns out it is hard to generate the world efficiently without any of that so I did end up eventually using rayon (but I should really be using Tokio). This would require some not trivial redesign and maybe I will update this in the future
The noise library I am using is also a bit slow. There are some issues with integrating it nicely into a bigger project but I don't really want to write my own noise library right now so this works.
Potential Updates
- Transparent water
- Lighting (real sun or "hacked" lighting)
- Block memory map (saves location of broken/placed blocks)
- Game physics
- additional sprites: (tree, flowers)
- Block selection during placement
- Biomes
- "Real" concurency for chunk generation (Tokio).
Prerequisites
Running
cargo run --release
Arguments
Running in wireframe mode:
cargo run --release -- -w
Running with coordinate system at [0,0,0] (for debugging):
cargo run --release -- -c
Running a flat world:
cargo run --release -- -f
Running on Windows
On windows-msvc, make sure that you have a version of ninja.exe (download here) available in your PATH varaible.
Controls
awsd
to move aroundspace
move upwardsshift
move downleft click
break blockright click
place block
Authors
- Raphael Van Hoffelen - website
License
This project is licensed under the MIT - see the LICENSE file for details.