Creation and Destruction

Fri, October 16, 2020
Code creates. Code Destroys.

A quick tech demo of me creating someting with code... and destroying it with code.

The code the creates the tower:

(up 400
  (world-above
    gnarly-rock
    (parentify gnarly-rock flames)
    gnarly-rock))

If you're wondering, world-above places the actors that follow above each other at runtime, regardless of height.

And here's the code that destroys everything:

(parentify explosion
           (radial-force 100000 1000))

If you're wondering, parentify is just shorthand for code that makes one actor a parent of an other. And radial-force's two arguments are the amount of force and the radius. The explosion just makes fancy particles to make it look nice; the radial-force does the damage.

- Stephen R. Foster


P.S. Please consider supporting us on Patreon. We can't do this without you!