Giter Club home page Giter Club logo

rust-event-driven-simulation's Introduction

Rust event driven simulation

GitHub

Simulation itself

Event-driven programming is a widely spread technique used in many areas, from web servers to physical simulations.
This project aims to implement a relatively simple 2D particle collision system. That's it, we have some closed domain, several obstacles, and a bunch of moving particles. Particles can have different radiuses and masses. Obstacles and domain consist of straight-line segments. To calculate physics I used an idealized hard disc model.

The project is mainly based on the chapter from Princeton algorithm course (II part). Check it out here. It contains a lot of useful information and good references to scientific papers about this topic. Another source I used was rust-wasm Convey's game of life implementation guide.

Check out the live example.

The project contains following components:

  • red-simulation
  • red-demonstration
  • red-server

red-simulation

Rust library with all this fancy event-driven logic and physical calculations inside. Built using wasm-pack tools into a .wasm module. All core functionality can be found there.

red-demonstration

Vue3 application with red-simulation wasm library as a dependency. Created with demonstration purposes.

red-server

A small web server that's written on rust using rocket and diesel. Created to store game results from the live example website.

How to build

See detailed instructions in child directories. Better yet you can find ready-to-go example in the example subdirectory.

rust-event-driven-simulation's People

Contributors

greshilov avatar

Watchers

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