Evolving Steering Behaviors
This sketch is an elaboration on a Coding Challenge (#69)
done on the Coding Train
by Dan Shiffman. I began with the code from the end of part 4 and added several things.
For a list of things that I changed, see the changes.txt file on the side.
You can find this file on the Github Repo for this project.
Explanation of Interaction
Yellow vehicles are healthy and become orange
they are declining in health. A health of 0 causes the vehicle to
die and be removed
Vehicles have a maximum lifespan of 14000 frames and slowly
until they get to their 14000th frame when they
die an are removed
Vehicles are outlined in white when they are
mature enough to reproduce and are half sized when they are younger than 2 seconds old.
Food is cyan, Poison is red, Radioactivity is green
Clicking the mouse lets you launch a nuke. Click the canvas and hold the w key to grow the
nuke radius. hold
s key to shrink the nuke radius.
Release the mouse to detonate or press q to cancel
- You can see statistics and adjust various settings below.
This sketch is largely event driven. Hover the mouse in the upper left to see all events in real time. See here for a full description of the events