Sandbox is a pixel physics simulator inspired by other such like Sandspiel and Noita

Overview

Sandbox

CI Apache

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

Screenhot

Download for MacOS, Windows and Ubuntu

Download from Releases. MacOS release build still requires VulkanSDK to be installed and libs found in /usr/local/lib. Linux and Windows should work as is.

Features

  • Vulkan renderer with Vulkano
  • Gui with Egui using egui_winit_vulkano
  • Cellular Automata simulation with Compute Shaders (Why? To see if I can)
  • Deformable pixel objects with Matter from .png images
  • Customizable matters & their reactions
  • Simple physics using Rapier
  • More

Development

Windows

Ensure following libs are installed: cmake, ninja, python

Ubuntu

sudo apt-get install build-essential git python cmake libvulkan-dev vulkan-utils libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev

MacOS

See MacOS installation. Basically you need Vulkan SDK on mac and it should then work out of the box.

Running

cargo run --package sandbox --release

Run tests & checks with ./run_checks.sh before pushing & making a PR.

Building Cross Compiled Releases on Ubuntu

Run run_build_dist.sh.

Notes

I'd be very happy to see improvement suggestions. This is very unoptimized at this point, thus there are plenty of things to improve on. For example, there is barely any parallelization apart from some par_iters.

You might also like...
Verlet physics plugin for bevy.
Verlet physics plugin for bevy.

bevy_verlet Simple Verlet points and sticks implementation for bevy. Features You can simply add a VerletPoint component on any entity with a Transfor

Little 2D physics engine used for my game Crate Before Attack.
Little 2D physics engine used for my game Crate Before Attack.

Circle2D Circle2D is a little physics library used for my game CrateBeforeAttack. Live demo: https://koalefant.github.io/circle2d/ It is not productio

Reimplementation of Matthias Müller's "Ten Minute Physics" demos in Rust with WASM + WebGL

ten-minute-physics-rs reimplements Matthias Müller's "Ten Minute Physics" demos in Rust with WASM + WebGL. Compared with the source pure Javascript im

A networked (p2p), cross-platform physics simulation example using rollback netcode

bevy_gaff (work in progress) bevy_gaff is an attempt at making a networked (p2p), cross-platform physics simulation using rollback netcode. It synchro

Pixel-Perfect, 2D Renderer for Bevy that Seamlessly Targets Desktop and Web
Pixel-Perfect, 2D Renderer for Bevy that Seamlessly Targets Desktop and Web

bevy_retro ( Screenshot of Bounty Bros. game made with Bevy Retro and Skip'n Go ) Bevy Retro is a 2D, pixel-perfect renderer for Bevy that can target

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

Learning rust with the olc Pixel Game Engine.

olc rust sketches Learning Rust with the olc Pixel Game Engine. This project is based on olcPixelGameEngine-rs, a Rust API by Ivan Sadikov for the olc

Smooth pixel-perfect camera for Bevy

bevy_smooth_pixel_camera A bevy plugin that adds a simple smooth pixel camera. The smoothing is based on this video from aarthificial which explains h

A game of life🔬 simulator on an infinite♾️ plane
A game of life🔬 simulator on an infinite♾️ plane

game-of-life A game of life 🔬 simulator on an infinite ♾️ plane NOTE: This is a toy project! I did this just for fun, not as a packaged product. Abou

Comments
  • Crash when deforming objects

    Crash when deforming objects

    thread '<unnamed>' panicked at 'index out of bounds: the len is 2 but the index is 2', /home/okko/.cargo/git/checkouts/parry-cfbedab32ac7a479/d6629d0/build/parry2d/../../src/shape/convex_polygon.rs:131:48
    stack backtrace:
       0: rust_begin_unwind
                 at /rustc/092e1c9d23158d81be27bb6f71bdd0c6282478fb/library/std/src/panicking.rs:498:5
       1: core::panicking::panic_fmt
                 at /rustc/092e1c9d23158d81be27bb6f71bdd0c6282478fb/library/core/src/panicking.rs:110:14
       2: core::panicking::panic_bounds_check
                 at /rustc/092e1c9d23158d81be27bb6f71bdd0c6282478fb/library/core/src/panicking.rs:77:5
       3: <parry2d::shape::convex_polygon::ConvexPolygon as parry2d::shape::polygonal_feature_map::PolygonalFeatureMap>::local_support_feature
       4: parry2d::query::contact_manifolds::contact_manifolds_pfm_pfm::contact_manifold_pfm_pfm
       5: <parry2d::query::default_query_dispatcher::DefaultQueryDispatcher as parry2d::query::query_dispatcher::PersistentQueryDispatcher<ManifoldData,ContactData>>::contact_manifold_convex_convex
       6: parry2d::query::contact_manifolds::contact_manifolds_composite_shape_composite_shape::contact_manifolds_composite_shape_composite_shape::{{closure}}::{{closure}}::{{closure}}::{{closure}}
       7: parry2d::query::contact_manifolds::contact_manifolds_composite_shape_composite_shape::contact_manifolds_composite_shape_composite_shape::{{closure}}::{{closure}}
       8: parry2d::partitioning::qbvh::QBVH<T>::traverse_depth_first
       9: parry2d::query::contact_manifolds::contact_manifolds_composite_shape_composite_shape::contact_manifolds_composite_shape_composite_shape
      10: <parry2d::query::default_query_dispatcher::DefaultQueryDispatcher as parry2d::query::query_dispatcher::PersistentQueryDispatcher<ManifoldData,ContactData>>::contact_manifolds
      11: rapier2d::geometry::narrow_phase::NarrowPhase::compute_contacts
      12: rapier2d::pipeline::physics_pipeline::PhysicsPipeline::detect_collisions
      13: rapier2d::pipeline::physics_pipeline::PhysicsPipeline::step
      14: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
      15: <rayon_core::job::StackJob<L,F,R> as rayon_core::job::Job>::execute
      16: rayon_core::registry::WorkerThread::wait_until_cold
      17: rayon_core::registry::ThreadBuilder::run
    note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    
    
    opened by hakolao 1
Releases(v.1.0.1-alpha)
Owner
Okko Hakola
A Rust enthusiast interested in game engines & graphics.
Okko Hakola
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
2 and 3-dimensional rigid body physics engine for Rust.

Users guide | 2D Documentation | 3D Documentation | Forum ⚠️ **This crate is now passively-maintained. It is being superseded by the Rapier project.**

dimforge 1.6k Jan 6, 2023
2D and 3D physics engine based on Extended Position Based Dynamics for Bevy.

Bevy XPBD Bevy XPBD is a 2D and 3D physics engine based on Extended Position Based Dynamics (XPBD) for the Bevy game engine. Design Below are some of

Joona Aalto 203 Jul 6, 2023
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
A sandbox library for making FAST voxel games

voxelize WIP A well-optimized web-based voxel engine. Development Before starting, make sure to install the following: rust node.js cargo-watch # clon

Ian Huang (Shaoru) 146 Dec 30, 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 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

Jonathan Cornaz 313 Dec 16, 2022
Game physics in one weekend with bevy

Game Physics in a Weekend (in Rust) This project is an implementation of the Game Physics in a Weekend book using the Rust programming language and th

Cameron Hart 28 Dec 23, 2022
A physics lib for the bevy game engine based on physme

physimple Physimple aims to be the simplest(and capable) physics engine(currently for bevy) WARNING Beware for breaking changes with each update for n

null 24 Oct 28, 2022
Atomic Physics Library

Iridium Atomic Physics Library Attempt at making a atomic database. Uses Nubase2020, ENSDF for decay chains, atomic masses, and half-lives. Nubase2020

J.A Sory 14 Jun 19, 2022