Giter Club home page Giter Club logo

rezcraft's Introduction

  • Voxel engine written in rust using wgpu
  • Supports both native targets and wasm

Screenshots

Sunlight Lighting UI

Features

  • Parallelised world and mesh generation
  • Efficient meshes using greedy meshing
  • Easily add custom textures and blocks, modify blocktypes at runtime
  • Colored lighting system, sunlight
  • Configurable through in-app settings
  • Transparency (native only)
  • Savegame system (native only)

How to

Installation

  • Run the web version without installing anything

  • Precompiled binaries can be found under releases, these binaries have all assets baked into themselves, so you need no resource directory

  • Alternatively, if you compile rezcraft without the portable feature enabled, setup your file structure like this:

    • Have the binary rezcraft (or rezcraft.exe on windows) and the res directory are in the same directory
    • Your directory tree should look like this:
├── res
│   ├── block
│   │   └── ...
│   ├── icon.png
│   ├── shader
│   │   └── ...
│   └── texture
│       └── ...
└── rezcraft (rezcraft.exe on windows)
    • The location of the save and resource directories (defaults are ./saves and ./res) can be change by setting the SAVES_PATH and RESOURCE_PATH enviromental variable

Adding custom textures and blocks

Textures

  • Add a .png image to ./res/texture/, it will be loaded after programm restart
  • All texture must be square and all textures must have the same resolution

Blocks

  • Add a .yaml block describing file to ./res/block/, use one of the exisitng files as a tempalte
  • Blocks and their textures, light souces, and properties such as transparency and solidness can also be edited at runtime (Edit block menu while paused)

Controls

Key Action
Mouse motion Rotate camera
W / ArrowUp Move forward
S / ArrowDown Move back
A / ArrowLeft Move left
D / ArrowRight Move right
Space / K Move up
LShift / J Move down
X / MouseRight Delete block
C / MouseLeft Place block
V / MouseMiddle Pick block
M Reload chunk at players position
F5 Save
F9 Load
F11 Toggle fullscreen
F12 Reload settings from config file
Tab Pause / Resume
Escape Exit

Building using cargo

  • Have rust installed, or optionally use the included dev shelle: nix develop
  • Pick feautres
Feature Description Notes
portable Doesn't read resources (textures, shaders...) from disk, but instead bakes them into the binary Must be enabled when compiling for wasm
save_system Allow for saving and olding of the world Doesn't work with wasm
rayon Extra pararelism for loading terrain and saving Doesn't work with wasm
  • Manually
    • To build - cargo build --no-default-features --release --features "Feature1 Feature2"
    • To run - cargo run --no-default-features --release --features "Feature1 Feature2"
    • To build for wasm - wasm-pack build --release --no-default-features --features portable --target web --features wasm_thread/es_modules
  • Using the build script

Links

Possible plans for future updates

  • Improved worldgen
  • Editable controls
  • Physics, improved collision detection
  • Optionally bake assets into the binary
  • Fancy shader effects
  • Multiplayer

rezcraft's People

Contributors

shapur1234 avatar

Stargazers

Jasper Honkasalo avatar LieutenantSparkles avatar Andréy Lesnikóv avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.