← BACK TO PROJECTS
Logo for Pyxis, in pixel-art
[PX_GAME]
C++
Networking
Game Design
Gameplay Programming
Data structures/Systems
Physics
Simulation
Steam (Future)
GitHub
Engine
> GAME_INFO

Multiplayer falling sand simulation written in C++

Inspired by Noita

Built with my own game engine

gif of title as rigid bodies falling and then water poured on top
[DEMO]

FEATURES

MULTIPLAYER
  • >P2P gameplay using Steamworks API
  • >Connect via Steam Overlay
  • >LAN and direct IP connection
  • >Synchronized simulation
WORLD & PHYSICS
  • >Theoretical infinite world generation
  • >Box2D rigid body physics
  • >Runtime deformable objects
  • >Chunk-based world management
CUSTOMIZABLE
  • >JSON-defined elements
  • >Custom reactions via JSON
  • >Custom nodes via inheritance
SIMULATION
  • >Cellular automata element interactions
  • >Temperature & state changes
  • >Planned Multi-threaded computation
gif of two clients running the game
// Multiplayer demo showing two synchronized clients
FALLING SAND

Based on GDC 2019 talk by Nolla Games on Noita's Falling Everything Engine.

// Core simulation components:
- Cellular automata rules engine
- JSON element definitions
- Planned Multi-threaded update system
- Box2D physics integration
PHYSICS PIPELINE

#include <box2d/b2_world.h>

The Nolla Games GDC talk outlined a great method to integrating Box2D with a falling sand simulation:

Utilize a marching squares algorithm, followed by a Douglas-Peucker line simplification, and finally a triangulation algorithm.

In Pyxis, I use a triple-skew rotation to preserve the integrity of each pixel in a rigid body, and use this to calculate where the pixels should be placed in the simulation

For integrating it with the simulation, you take the rigid bodies out of the simulation, step the simulation once, and put them back in.

TECH SKILLS++

ALGORITHMS

  • Pixel Preserving Triple-Skew Rotation
  • Marching Squares Algorithm
  • Douglas-Peucker Optimization
  • Delaunay Triangulation

NETWORKING

  • Steamworks API
  • TCP/UDP Sockets
  • Client-Server Sync

OPTIMIZATION

  • Planned Multi-threading
  • Visual Studio Performance Debugging
  • Data Compression
  • Memory Management

BUILD SYSTEMS

  • CMake
  • VCPKG Dependencies
  • Cross-Platform Dev