This Website Lead Tracker Demo Python Game JavaScript Particle Sim C++ Embedded Design
Lead Tracker
Contact Info Certifications Resume LinkedIn

4.5. Strings

The original goal for this simulator was to serve as an experimental platform for testing concepts that would eventually form a chemistry-like game. And you obviously can't have chemistry without atom-to-atom bonding. Although correctly modeling covalent atomic bonds is a job for super and quantum computers, I thought I could maybe approximate their behavior and consequences by modeling a simpler spring-like bond. Eventually, I wanted to build a rule set for how these bonds are formed and broken in a way that would mimic chemistry, but for now the simulator can simply create the bonds at startup and break them once the distance between the particles gets too large.

In this demo, you can either simply watch the bonded chains fall amongst the spikes and break, or you can try to save them by disabling gravity before they fall too far. The spikes are not magical, and only cause breaking because they can wedge between the particles if there's enough force applied. So even if the chains touch the spikes, if you catch them soon enough before they pick up speed, they won't split against the spikes and will lightly bounce off instead. Conversely, once the spikes have done their damage, you can also disable gravity to lift the broken chains into the air and wait for them to be above the spikes again before reactivating gravity and shattering the chains into even tinier pieces.