Skip to content

Rustcraft is a simple Minecraft engine written in rust using wgpu.

License

Notifications You must be signed in to change notification settings

dskart/rustcraft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Link MSRV license


Rustcraft

A simple Minecraft engine in Rust

Logo

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" concurrency 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 around
  • space move upwards
  • shift move down
  • left click break block
  • right click place block

Authors

License

This project is licensed under the MIT - see the LICENSE file for details.

About

Rustcraft is a simple Minecraft engine written in rust using wgpu.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages