A sandbox library for making FAST voxel games

Overview

voxelize WIP

A well-optimized web-based voxel engine.

Development

Before starting, make sure to install the following:

# clone the repository
git clone https://github.com/shaoruu/voxelize.git
cd voxelize

# download dependencies
yarn

# generate protocol buffers
yarn run proto

# start development
yarn run dev

# in a separate terminal, start both frontend/backend demo
yarn run demo

visit http://localhost:3000

Work in progress, PR Welcomed!!

You might also like...
Highly customizable splash screen library for Bevy games.

bevy_intro_screen This is a versatile Bevy library designed to create engaging and customizable introductory screens for your game. Initially conceive

A Bevy Engine plugin for making 2D paths, smooth animations with Bezier curves
A Bevy Engine plugin for making 2D paths, smooth animations with Bezier curves

bevy_pen_tool A Bevy Engine plugin for making 2D paths and smooth animations with Bezier curves TODO: Mesh-making functionality for building 2D shapes

An ergonomic physics API for bevy games.

Heron An ergonomic physics API for 2d and 3d bevy games. (powered by rapier) How it looks like fn main() { App::build() .add_plugins(DefaultPlug

A frontend to Assets purchased on Epic Games Store
A frontend to Assets purchased on Epic Games Store

Epic-Asset-Manager A frontend to Assets purchased on Epic Games Store Current Screenshot Install Arch Linux Use the AUR package Build flatpak meson _b

A single-threaded polling-based Rust async executor suitable for use in games, embedded systems or WASM.

simple async local executor An Enlightware® software. Overview A single-threaded polling-based executor suitable for use in games, embedded systems or

A simple camera for properly displaying tile-based low resolution pixel perfect 2D games in bevy.
A simple camera for properly displaying tile-based low resolution pixel perfect 2D games in bevy.

Bevy Tiled Camera A simple camera for properly displaying low resolution pixel perfect 2D games in bevy. The camera will adjust the viewport to scale

A Rust promise for games and immediate mode GUIs

⌛ poll-promise A Rust promise for games and immediate mode GUIs Description poll-promise is a Rust crate for polling the result of a concurrent (e.g.

A single-threaded executor for deferred async code for games.

This crate provides a single-threaded, sequential, parameterized async runtime. In other words, this creates coroutines, specifically targeting video game logic, though cosync is suitable for creating any sequences of directions which take time.

Wein2D.js bindings for creating browser games in Rust using WebAssembly.

Wein2D.js-WASM Wein2D.js bindings for creating browser games in Rust using WebAssembly. Wein2D.js-WASM requires Wein2d.js to be loaded in the same doc

Comments
  • Failed to run `yarn run demo`

    Failed to run `yarn run demo`

    It shows the logs:

        Finished release [optimized] target(s) in 0.07s
         Running `target/release/examples/demo`
    [13:19:25] [INFO] [voxelize::server]: 🌎 World created: world1
    [13:19:25] [INFO] [voxelize::server]: 🌎 World created: world2
    [13:19:25] [INFO] [voxelize]: Server running at 0.0.0.0:4000 by Ws
    $ cross-env FORCE_COLOR=true SKIP_PREFLIGHT_CHECK=true craco start | cat
    (node:15595) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
    (Use `node --trace-deprecation ...` to show where the warning was created)
    (node:15595) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
    Starting the development server...
    
    Failed to compile.
    
    Module not found: Error: Can't resolve '@voxelize/client' in '/tmp/voxelize/examples/client/src/containers'
    assets by path static/ 3.4 MiB
      asset static/js/bundle.js 2.75 MiB [emitted] (name: main) 1 related asset
      asset static/media/marble.a3701ce1db620dec8118.jpg 453 KiB [emitted] [immutable] [from: src/assets/marble.jpg] (auxiliary name: main)
      asset static/media/lol.27c9e470a9df0457b0e5.png 214 KiB [emitted] [immutable] [from: src/assets/lol.png] (auxiliary name: main)
    asset index.html 1.73 KiB [emitted]
    asset asset-manifest.json 344 bytes [emitted]
    cached modules 2.6 MiB (javascript) 667 KiB (asset) 28.4 KiB (runtime) [cached] 138 modules
    
    ERROR in ./src/containers/app.tsx 8:0-158
    Module not found: Error: Can't resolve '@voxelize/client' in '/tmp/voxelize/examples/client/src/containers'
    resolve '@voxelize/client' in '/tmp/voxelize/examples/client/src/containers'
      Parsed request is a module
      using description file: /tmp/voxelize/examples/client/package.json (relative path: ./src/containers)
        aliased with mapping '@voxelize/client': '/tmp/voxelize/dist' to '/tmp/voxelize/dist'
          using description file: /tmp/voxelize/examples/client/package.json (relative path: ./src/containers)
            Field 'browser' doesn't contain a valid alias configuration
            root path /tmp/voxelize/examples/client
              using description file: /tmp/voxelize/examples/client/package.json (relative path: ./tmp/voxelize/dist)
                no extension
                  Field 'browser' doesn't contain a valid alias configuration
                  /tmp/voxelize/examples/client/tmp/voxelize/dist doesn't exist
                .web.mjs
                  Field 'browser' doesn't contain a valid alias configuration
                  /tmp/voxelize/examples/client/tmp/voxelize/dist.web.mjs doesn't exist
                .mjs
                  Field 'browser' doesn't contain a valid alias configuration
                  /tmp/voxelize/examples/client/tmp/voxelize/dist.mjs doesn't exist
                .web.js
                  Field 'browser' doesn't contain a valid alias configuration
                  /tmp/voxelize/examples/client/tmp/voxelize/dist.web.js doesn't exist
                .js
                  Field 'browser' doesn't contain a valid alias configuration
                  /tmp/voxelize/examples/client/tmp/voxelize/dist.js doesn't exist
                .web.ts
                  Field 'browser' doesn't contain a valid alias configuration
                  /tmp/voxelize/examples/client/tmp/voxelize/dist.web.ts doesn't exist
                .ts
                  Field 'browser' doesn't contain a valid alias configuration
                  /tmp/voxelize/examples/client/tmp/voxelize/dist.ts doesn't exist
                .web.tsx
                  Field 'browser' doesn't contain a valid alias configuration
                  /tmp/voxelize/examples/client/tmp/voxelize/dist.web.tsx doesn't exist
                .tsx
                  Field 'browser' doesn't contain a valid alias configuration
                  /tmp/voxelize/examples/client/tmp/voxelize/dist.tsx doesn't exist
                .json
                  Field 'browser' doesn't contain a valid alias configuration
                  /tmp/voxelize/examples/client/tmp/voxelize/dist.json doesn't exist
                .web.jsx
                  Field 'browser' doesn't contain a valid alias configuration
                  /tmp/voxelize/examples/client/tmp/voxelize/dist.web.jsx doesn't exist
                .jsx
                  Field 'browser' doesn't contain a valid alias configuration
                  /tmp/voxelize/examples/client/tmp/voxelize/dist.jsx doesn't exist
                as directory
                  /tmp/voxelize/examples/client/tmp/voxelize/dist doesn't exist
            using description file: /tmp/voxelize/package.json (relative path: ./dist)
              no extension
                Field 'browser' doesn't contain a valid alias configuration
                /tmp/voxelize/dist is not a file
              .web.mjs
                Field 'browser' doesn't contain a valid alias configuration
                /tmp/voxelize/dist.web.mjs doesn't exist
              .mjs
                Field 'browser' doesn't contain a valid alias configuration
                /tmp/voxelize/dist.mjs doesn't exist
              .web.js
                Field 'browser' doesn't contain a valid alias configuration
                /tmp/voxelize/dist.web.js doesn't exist
              .js
                Field 'browser' doesn't contain a valid alias configuration
                /tmp/voxelize/dist.js doesn't exist
              .web.ts
                Field 'browser' doesn't contain a valid alias configuration
                /tmp/voxelize/dist.web.ts doesn't exist
              .ts
                Field 'browser' doesn't contain a valid alias configuration
                /tmp/voxelize/dist.ts doesn't exist
              .web.tsx
                Field 'browser' doesn't contain a valid alias configuration
                /tmp/voxelize/dist.web.tsx doesn't exist
              .tsx
                Field 'browser' doesn't contain a valid alias configuration
                /tmp/voxelize/dist.tsx doesn't exist
              .json
                Field 'browser' doesn't contain a valid alias configuration
                /tmp/voxelize/dist.json doesn't exist
              .web.jsx
                Field 'browser' doesn't contain a valid alias configuration
                /tmp/voxelize/dist.web.jsx doesn't exist
              .jsx
                Field 'browser' doesn't contain a valid alias configuration
                /tmp/voxelize/dist.jsx doesn't exist
              as directory
                existing directory /tmp/voxelize/dist
                  using description file: /tmp/voxelize/package.json (relative path: ./dist)
                    using path: /tmp/voxelize/dist/index
                      using description file: /tmp/voxelize/package.json (relative path: ./dist/index)
                        no extension
                          Field 'browser' doesn't contain a valid alias configuration
                          /tmp/voxelize/dist/index doesn't exist
                        .web.mjs
                          Field 'browser' doesn't contain a valid alias configuration
                          /tmp/voxelize/dist/index.web.mjs doesn't exist
                        .mjs
                          Field 'browser' doesn't contain a valid alias configuration
                          /tmp/voxelize/dist/index.mjs doesn't exist
                        .web.js
                          Field 'browser' doesn't contain a valid alias configuration
                          /tmp/voxelize/dist/index.web.js doesn't exist
                        .js
                          Field 'browser' doesn't contain a valid alias configuration
                          /tmp/voxelize/dist/index.js doesn't exist
                        .web.ts
                          Field 'browser' doesn't contain a valid alias configuration
                          /tmp/voxelize/dist/index.web.ts doesn't exist
                        .ts
                          Field 'browser' doesn't contain a valid alias configuration
                          /tmp/voxelize/dist/index.ts doesn't exist
                        .web.tsx
                          Field 'browser' doesn't contain a valid alias configuration
                          /tmp/voxelize/dist/index.web.tsx doesn't exist
                        .tsx
                          Field 'browser' doesn't contain a valid alias configuration
                          /tmp/voxelize/dist/index.tsx doesn't exist
                        .json
                          Field 'browser' doesn't contain a valid alias configuration
                          /tmp/voxelize/dist/index.json doesn't exist
                        .web.jsx
                          Field 'browser' doesn't contain a valid alias configuration
                          /tmp/voxelize/dist/index.web.jsx doesn't exist
                        .jsx
                          Field 'browser' doesn't contain a valid alias configuration
                          /tmp/voxelize/dist/index.jsx doesn't exist
     @ ./src/index.tsx 6:0-39 10:33-36
    
    webpack 5.72.0 compiled with 1 error in 605 ms
    Files successfully emitted, waiting for typecheck results...
    Issues checking in progress...
    No issues found.
    

    My environment

    node: 18.1.0 yarn: 1.22.18 rustc:

    rustc 1.60.0 (7737e0b5c 2022-04-04)
    binary: rustc
    commit-hash: 7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c
    commit-date: 2022-04-04
    host: x86_64-unknown-linux-gnu
    release: 1.60.0
    LLVM version: 14.0.0
    
    opened by lomirus 5
  • Build command failing due to missing 'protoc'

    Build command failing due to missing 'protoc'

    yarn run dev

    ...
     Compiling tiff v0.6.1
       Compiling prost-build v0.11.1
       Compiling image v0.23.14
       Compiling voxelize v0.8.16 (/Users/a3voices/experiments/voxelize)
       Compiling serde_urlencoded v0.7.1
       Compiling splines v4.1.1
    error: failed to run custom build command for `voxelize v0.8.16 (/Users/a3voices/experiments/voxelize)`
    
    Caused by:
      process didn't exit successfully: `/Users/a3voices/experiments/voxelize/target/release/build/voxelize-31e9bf6d5fa972cb/build-script-build` (exit status: 101)
      --- stderr
      thread 'main' panicked at '
      Could not find `protoc` installation and this build crate cannot proceed without
      this knowledge. If `protoc` is installed and this crate had trouble finding
      it, you can set the `PROTOC` environment variable with the specific path to your
      installed `protoc` binary.
    
      For more information: https://docs.rs/prost-build/#sourcing-protoc
      ', /Users/a3voices/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-build-0.11.1/src/lib.rs:1227:10
      stack backtrace:
         0:        0x1028f4d54 - std::backtrace_rs::backtrace::libunwind::trace::ha03082fdb36b8e44
                                     at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
         1:        0x1028f4d54 - std::backtrace_rs::backtrace::trace_unsynchronized::hf1acb3d3fce46837
                                     at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
         2:        0x1028f4d54 - std::sys_common::backtrace::_print_fmt::hbc7deaf5374edfd8
                                     at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys_common/backtrace.rs:66:5
         3:        0x1028f4d54 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha9a1a8bf7485458d
                                     at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys_common/backtrace.rs:45:22
    
    
    opened by atrefonas 3
  • Setup issue in new repo

    Setup issue in new repo

    When I clone it to a new repo, I get this error for the command on the 3rd step:

    voxelize % yarn --cwd transport run proto
    
    yarn run v1.22.19
    $ yarn run proto:js && yarn run proto:ts && cp src/protocol.* dist/
    $ pbjs -t static-module -w commonjs -o ./src/protocol.js ../messages.proto
    $ pbts -o ./src/protocol.d.ts ./src/protocol.js
    cp: dist is not a directory
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    a3voices@Alexanders-MBP voxelize2 % 
    
    opened by atrefonas 3
  • Questions about block.rs

    Questions about block.rs

    Hi there!

    I am trying to understand the design decisions around block.rs in the server code. I hope you don't mind answering my questions (I have yet to go through much of the code).

    Specific questions I have:

    • At first I thought you will package all the block data into a single u32 (because of the comment on line 5). This won't mean name, rotation, light levels, faces etc. also?
    • Would rotation be limited to one axis only at a time? E.g. either rotate around X axis or Y axis. Never both?
    • On line 33 you state there are 6 possible rotations. At first glance it almost feels like there should be only 3? Why 6?
    • Why have both a block id and block name?
    • What do you mean by block stage?

    It will help a lot of you could explain the above to me. 😄

    Thanks!

    opened by Fractally 1
Owner
Ian Huang (Shaoru)
Comfortably Numb · Pink Floyd
Ian Huang (Shaoru)
Dwarf Fortress inspired frontend to Veloren, the multiplayer RPG voxel game written in Rust

velobracket ('veloren' + 'bracket-lib') velobracket is Dwarf Fortress inspired frontend to Veloren, the multiplayer RPG voxel game written in Rust. Us

Rodion Martynov 13 Dec 25, 2022
Minecraft-esque voxel engine prototype made with the bevy game engine. Pending bevy 0.6 release to undergo a full rewrite.

vx_bevy A voxel engine prototype made using the Bevy game engine. Goals and features Very basic worldgen Animated chunk loading (ala cube world) Optim

Lucas Arriesse 125 Dec 31, 2022
bevy-hikari is an implementation of voxel cone tracing global illumination with anisotropic mip-mapping in Bevy

Bevy Voxel Cone Tracing bevy-hikari is an implementation of voxel cone tracing global illumination with anisotropic mip-mapping in Bevy. Bevy Version

研究社交 208 Dec 27, 2022
An adventure survival voxel game written using Bevy and Rust.

An adventure survival voxel game written using Bevy and Rust.

Rigidity 3 Jun 4, 2022
Vulkan rendering sandbox for raytracing

sol-rs ☀ sol-rs is a small rendering toolkit for Vulkan, with a focus on real-time raytracing (which is not currently available via other APIs such as

Éric Renaud-Houde 65 Dec 7, 2022
Sandbox is a pixel physics simulator inspired by other such like Sandspiel and Noita

Sandbox Sandbox is a pixel physics simulator inspired by other such like Sandspiel and Noita. It's also a precursor for an ongoing game project. Sandb

Okko Hakola 76 Nov 3, 2022
Manage light-weight sandbox environments for development

Cubicle development container manager Cubicle is a program to manage containers or sandbox environments. It is intended for isolating development envi

Diego Ongaro 8 Nov 29, 2022
An online judge sandbox server in Rust, inspired by go-judge, for SAST OJ.

RsJudge An online judge sandbox server in Rust, inspired by go-judge, for SAST OJ. Table of Contents Features Build from source Prerequisites Build Fe

NJUPT SAST 4 Dec 10, 2023
Synchronize games from other platforms into your Steam library

BoilR Description This little tool will synchronize games from other platforms into your Steam library, using the Steam Shortcuts feature. The goal is

Philip Kristoffersen 823 Jan 9, 2023
Using USBPcap to side-step anticheat in games, in order to reroute rumble packets to sex toys via The Buttplug Sex Toy Control Library

Using USBPcap to side-step anticheat in games, in order to reroute rumble packets to sex toys via The Buttplug Sex Toy Control Library.

qDot 23 Jan 3, 2023