justgook / platformer

Demo: https://game.z0.lv/
20 stars 3 forks source link

Refactor physics to bubbles and lines #29

Open justgook opened 5 years ago

justgook commented 5 years ago

Almost any shape can be represented as bunch of lines, and line to line collisions is easy.. Additionally need to create constraints to join lines together:

  1. Static - one master line and others follow it
  2. Distance - one master and other keep same distance
  3. Range- all try keep in distance range
justgook commented 5 years ago

https://github.com/RandyGaul/cute_headers/blob/master/cute_c2.h - capsule stuff https://github.com/shakiba/planck.js - Box2D.. http://brm.io/matter-js/docs/classes/Bodies.html