Coder Social home page Coder Social logo

fainges / fallingsandjava Goto Github PK

View Code? Open in Web Editor NEW

This project forked from davidmclaughlin208/fallingsandjava

0.0 0.0 0.0 10.38 MB

Falling Sand Simulation implemented in Java. Every pixel is simulated every frame and has its own state and intrinsic motivations.

JavaScript 0.01% Java 99.10% CSS 0.33% HTML 0.56%

fallingsandjava's Introduction

FallingSandJava

Falling sand simulation written in Java and LIBGDX

YouTube video tutorial on how to build this: https://youtu.be/5Ka3tbbT-9E

Overview:

Inspired by classic falling sand games I am making one of my own. The intent is to build and release a falling sand simulation simlar to the ones from the early 2000's. Plans past that are to create a local multiplayer combat game within the falling sand simulation taking influence from Duck Game and integrating the falling sand simulation with Box2D taking influence from Noita.

Online multiplayer would require extremely sophisticated systems to allow for smooth gameplay when each game object is one pixel square. This would be too much to synchronize with basic online implementations. However, With recent improvements in streaming online multiplayer should be possible through Steam Remote Play or Parsec.

Integrating Box2D

Integrating Box2D with a falling sand simulation presents unique technical challenges. The Noita developers have gone into some detail in their video Exploring the Tech and Design of Noita

The basic steps are:

  • Take a 2D array of elements and use marching squares algorithm to get the contour
  • Use a Douglas-Peucker line simplification algorithm to reduce the amount of vertices
  • Pass the simplified set of vertices to a triangulation algorithm
  • Create a Box2D rigidbody from all the resulting triangles
  • If any elements in the rigidbody are destory repeat the process

fallingsandjava's People

Contributors

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