This project, written in Rust and using [Bevy], aims to re-create the functionality of Minecraft "Classic" (2009) for the sake of creating a game that could be considered finished while developing code and experience that can be used in future projects that have greater ambitions.
# bevy-bloxel-classic
This project, written in Rust and using [Bevy], aims to re-create the functionality of Minecraft "Classic" from 2009, for the sake of creating a game that could be considered finished (because I've been struggling with that), while developing code and experience that can be used in future projects that have greater ambitions.
- Modding API (other than loading block definitions)
- Modding API (other than loading block definitions)
@ -22,30 +27,37 @@ This project, written in Rust and using [Bevy], aims to re-create the functional
Since the game is still way too early in development, there are no releases yet.
Since the game is still way too early in development, there are no releases yet.
To compile and run it yourself, other than setting up Rust (through `rustup` for example), I recommend using [Bevy CLI]. It simplifies some tasks, such as building and testing on web. But if you don't want to use it, just replace `bevy run` with `cargo run` for the following commands.
### Native
To compile and run it yourself, just set up Rust like usual, through `rustup` for example.
```sh
```sh
# Run the game locally.
# Run the game locally.
bevy run
cargo run
bevy run -- local # same as above
cargo run -- local # same as above
bevy run --release -- local # with release optimizations
cargo run --release -- local # with release optimizations
# Host a server for the game and play on it.
# Host a server for the game and play on it.
# When starting up, will print the "certificate digest".
# When starting up, will print the "certificate digest".
bevy run -- host [PORT]
cargo run -- host [PORT]
# Connect to an existing server.
# Connect to an existing server.
bevy run -- connect <ADDRESS[:PORT]><DIGEST>
cargo run -- connect <ADDRESS[:PORT]><DIGEST>
```
```
To test the game in the browser, you can do the following:
### Browser
To easily build and test the game on the web, I recommend using [Bevy CLI].
```sh
```sh
# Run a local webserver to serve the game, and open it.
# Run a local webserver to serve the game.
bevy run web --open
# Automatically opens the page in your browser.
bevy run --release web --open
```
```
If you want to connect to a server, add `?connect=<ADDRESS[:PORT]>&digest=<DIGEST>` to URL. Due to a limitation, hostnames like `localhost` won't work here – use an IP instead. Also note that I had no luck getting WebTransport working in Firefox, so you may want to try with a Chromium-based browser.
- To connect to a server, add `?connect=<ADDRESS[:PORT]>&digest=<DIGEST>` to the URL.
- Due to a limitation, hostnames like `localhost` won't work here – use an IP instead.
- Note that I had no luck getting WebTransport working in Firefox so far.
For multiplayer, you may want to use a Chromium-based browser.