Minecraft game clone written in Rust, using the Bevy game engine.
Action | Key |
---|---|
Jump | Space |
Strafe Left | A / Arrow Left |
Strafe Right | D / Arrow Right |
Walk Backward | S / Arrow Down |
Walk Forward | W / Arrow Up |
Toggle Fly Mode | F |
Fly Up | Space |
Fly Down | Left Shift |
Action | Key |
---|---|
Destroy Block | Left Mouse Button |
Place Block | Right Mouse Button |
Action | Key/Mouse |
---|---|
Open/Close Inventory | E |
Pick up stack | Left Click |
Pick up half of stack | Right Click (with empty mouse) |
Deposit 1 item | Right Click (over valid stack) |
Deposit MAX items | Left Click (over valid stack) |
Exchange stacks | Left Click (over a different stack or full valid stack) |
A "valid stack" refers to a stack in the inventory that is either empty or contains the same items as the mouse cursor.
Action | Key |
---|---|
Toggle FPS Display | F3 |
Toggle Perspective | F5 |
Toggle Chunk Debug | F4 |
Toggle Block Debug | F6 |
Decrease Render Distance | O |
Increase Render Distance | P |
Exit Game | Escape |
To build and run this project, you need the following tools and dependencies installed:
rustup install nightly
rustup default nightly
rustup component add rustc-codegen-cranelift-preview --toolchain nightly
cargo install just
Note: You can also install Just using your system's package manager.
Install the required dependencies based on your operating system:
sudo pacman -S base-devel mold clang vulkan-radeon vulkan-tools
vulkan-radeon
with:vulkan-intel
for Intel GPUs.nvidia-utils
for NVIDIA GPUs. sudo apt update && sudo apt install -y \
build-essential mold clang mesa-vulkan-drivers vulkan-tools
sudo apt install -y nvidia-driver nvidia-vulkan-icd
Justfile
and scripts run correctly. Download and install Git Bash.PATH
. You can verify it by running:
bash --version
To compile and run the game locally, use the following commands:
Note: the first compilation will be slow depending on your hardware, next compilations will be incremental and thus faster.
# Clone the repository
git clone https://github.com/c2i-junia/minecraft-rust
# Navigate to the project directory
cd minecraft-rust
Debug mode:
./run-server.sh # this will compile the project and run the server
./run1.sh # this will compile the project and run the client
Release mode:
# Build the project in debug or release mode
./build.py release
# Run the executable
./minecraft-rust-client-1/bin/minecraft-rust
Feel free to submit issues or open pull requests. If you want to know where to help, refer to the existing issues.
Run cargo fmt
before committing.
We follow the Conventional Commit specification.
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Our commit types are inspired by the Karma specification
Allowed
Write commit messages in the present tense (e.g., "Add feature X" instead of "Added feature X").
If a commit is co-authored by multiple people, do not hesitate to add a Co-authored-by
field. See GitHub documentation. For example:
$ git commit -m "Refactor usability tests.
>
>
Co-authored-by: NAME <NAME@EXAMPLE.COM>
Co-authored-by: ANOTHER-NAME <ANOTHER-NAME@EXAMPLE.COM>"
<type>/<name>
for branches introducing new features. Only use lowercase letters, numbers, and dashes.main
branch should always compile successfully and be free of warnings. Use cargo check
.