• Stars
    star
    160
  • Rank 234,703 (Top 5 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Yet another block/voxel game; in this one the blocks are made out of blocks. Runs in browsers on WebGL+WebAssembly.

All is Cubes

This project is (will be) a game engine for worlds made of cubical blocks. The unique feature of this engine is that each ordinary block is itself made out of blocks; each block can be directly edited in the same fashion as the outside world.

Or rather, that's the plan; for now, this is just my very first project written in Rust, and I am aiming to duplicate and expand on the functionality of my previous work Cubes. That was written in JavaScript; this compiles to WebAssembly so the result will still run in the browser (hopefully faster), but also support a multiplayer server and storage backend.

Project organization

This repository is divided into several Rust packages:

  • all-is-cubes/ is a library containing all of the fundamental data types and algorithms. It is intended to be usable as a library but also contains the non-platform-specific top-level application logic.
  • all-is-cubes-mesh/ is a library containing algorithms to generate triangle meshes from the voxel data.
  • all-is-cubes-gpu/ is a library containing the GPU-based rendering code, depending on wgpu.
  • all-is-cubes-ui/ is a library containing a widget framework and basic user interface functions (not platform-specific).
  • all-is-cubes-content/ is a library containing “game content” — procedural generation and demos — that does not need to be part of the core library but is used by all of the below binaries.
  • all-is-cubes-desktop/ is a standalone game app which will use winit and wgpu for platform windowing & graphics, or ASCII-art raytracing in the terminal.
  • all-is-cubes-wasm/ is the game app code for the browser/WebAssembly environment (if compiled outside of wasm32 architecture, it will be an empty crate).
  • all-is-cubes-server/ is to be a network server for the game, but right now only contains a preconfigured HTTP static file server.

Building and running

First time setup: Unless you don't intend to build the WebAssembly/WebGL version of all-is-cubes or run the full test suite, you will need to install

  • wasm-pack (cargo install wasm-pack)
  • cargo-about (cargo install cargo-about)

(If you would like to avoid all of this, then descend into the all-is-cubes or all-is-cubes-desktop directories as applicable and work using plain cargo [build|test|run] there, since those directories contain no web dependencies.)

Because of the complication of having some wasm-specific code, some commands for building, testing, and running the entire project are collected in the xtask build tool for convenience and to ensure all non-Rust files are built when needed.

(You must use cargo xtask to build the workspace at least once for all-is-cubes-server to build correctly, as it expects to embed files that are built and copied in by previous steps.)

  • Run all tests: cargo xtask test

  • Build and lint all the code: cargo xtask lint

  • Wasm development server: cargo xtask run-dev

  • Run the desktop/console game: cargo run --bin all-is-cubes -- <options>

  • Run the non-dev-mode game server: cargo xtask run-game-server

Stability and versioning

All is Cubes is an ambitious hobby project; many features necessary to be “complete” are not yet implemented, and implementing them will require incompatible changes. During development, library APIs change regularly, and the version numbering will mark these versions as incompatible (e.g. 0.3 to 0.4); there will be no 1.0 version until I am confident that future versions will at least have save data compatibility. However, I have made some attempt to document API elements that are more likely to change in future versions.

MSRV policy: The current release accurately documents its rust-version in Cargo.toml. Future releases will typically require the current stable Rust version as of that release.

License

All source code and other materials are Copyright © 2020-2023 Kevin Reid, and licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

More Repositories

1

shinysdr

Software-defined radio receiver application built on GNU Radio with a web-based UI and plugins. In development, usable but incomplete. Compatible with RTL-SDR.
Python
1,071
star
2

cubes

Block-based WebGL game engine where the blocks are made out of blocks. Trying not to be yet another Minecraft clone.
JavaScript
63
star
3

visual-dsp

An animated slide deck providing a tour of digital signal processing topics relevant to implementation of software-defined radios, focusing on building visual/geometric intuition for signals.
JavaScript
44
star
4

e-on-cl

E language implementation targeting Common Lisp
Common Lisp
14
star
5

gltoyjs

Porting GLToy <https://switchb.org/kpreid/savers/#gltoy> to WebGL. Work in progress.
JavaScript
11
star
6

keyboard-layout

My customized Mac OS X keyboard layout.
10
star
7

e-on-javascript

E language implementation targeting JavaScript
JavaScript
9
star
8

mathquiz

Streamlined single-web-page math formula error-spotting quiz.
JavaScript
7
star
9

exhaust

Exhaustive iteration trait in Rust
Rust
7
star
10

e-on-java

My git-svn mirror of E-on-Java
Java
6
star
11

timeline-ui

User interface experiment: multiple mini-apps combined into a single timeline view. (Class project)
Java
5
star
12

shinysdr-site

Web site for information about ShinySDR (https://github.com/kpreid/shinysdr)
HTML
4
star
13

3dp-3-axis-coil

This is a 3d-printable supporting frame for three perpendicular electromagnetic coils as a handheld probe.
OpenSCAD
4
star
14

manyfmt

Extensible Rust formatting trait
Rust
4
star
15

e-murepl

Multi-user interactive evaluator for the E language.
Java
3
star
16

measviz

Performance measurement UI for Web games and animation
JavaScript
3
star
17

door

Toy example of distance field ray marching in JavaScript with ascii-art output. Context: https://codegolf.stackexchange.com/a/6630 Live: https://switchb.org/kpreid/2012/door/
3
star
18

yield-progress

Progress reporting and cooperative task yielding in Rust
Rust
2
star
19

3dp-sla-battery-cover

Small SLA battery terminal cover
OpenSCAD
2
star
20

3dp-nested-rings

An easy-to-print fidget toy made of permanently nested rings that can tumble and shift around.
OpenSCAD
2
star
21

norsmu

samselpla gi'e cusku lo jufra be fi la lojban poi no'e se smuni (Lojban random sentence generator chatbot)
Eiffel
2
star
22

E.tmbundle

TextMate bundle (editing support) for the E programming language.
2
star
23

e-benchmark

Tool for benchmarking E implementations
Eiffel
2
star
24

3dp-connector-adapter-box

3D-printable housings for pairs of electronic connectors
OpenSCAD
2
star
25

caja-captp

CapTP (from E) implemented on top of (old) Caja. GSoC 2009. Defunct.
JavaScript
1
star
26

e-modules

Early prototype of a “proper” module system for E. (Note: This is from 2006, and is merely being moved.)
Shell
1
star
27

3dp-field-kit-bnc-box

Antenna adapter for the Field Kit by Koma Elektronik
OpenSCAD
1
star
28

e-xml

XML manipulation library for E (not yet usable)
Java
1
star
29

fire-worms

Fire Worms From Outer Space! — Simple physics game written in Director — (Class project)
Haskell
1
star
30

threader

þreader — web-based thread-emphasizing feed-and-other-content reader
1
star
31

shinysdr-morgue

Long-term inactive branches of ShinySDR development that still might have some use. Someday. THIS REPOSITORY DOES NOT CONTAIN THE LATEST VERSION OF SHINYSDR.
1
star
32

tile-game

Browser-based 3D block puzzle game. (Based off a class project)
JavaScript
1
star
33

e-aui

User interface framework for E based on views directly corresponding to objects; borrows ideas from Self and CLIM. (Note: This is currently a very rough import from Darcs of a very old project, which I have not tested. I reserve the right to rebase all branches other than master.)
Eiffel
1
star
34

3dp-hyve-case

Case for the Hyve Touch Synthesizer, incorporating a 9V battery compartment and mounting hole for a toggle switch.
OpenSCAD
1
star
35

3dp-vases

OpenSCAD
1
star
36

3dp-tape-cassette-case

Printable audio tape cassette case
OpenSCAD
1
star