PhilipK / rustcraft

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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" 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

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.

License:MIT License


Languages

Language:Rust 98.9%Language:GLSL 1.0%Language:Makefile 0.1%