Coder Social home page Coder Social logo

nilstrieb / all-is-cubes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kpreid/all-is-cubes

0.0 0.0 0.0 6.52 MB

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

Home Page: https://kpreid.dreamwidth.org/tag/all+is+cubes

License: Apache License 2.0

JavaScript 0.15% Rust 99.41% CSS 0.17% HTML 0.13% Handlebars 0.14%

all-is-cubes's Introduction

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-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.

all-is-cubes's People

Contributors

dependabot[bot] avatar kpreid 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.