Ben Turner (@Xeus)
Nature of Code Final Project, Spring 2012, Prof. Daniel Shiffman
Project for my NYU ITP Introduction to Computational Media/Nature of Code classes.
Intended to create the building blocks for a system of people with randomly generated characteristics who age, breed, pass along genetic information to offspring, and interact with their environments, religious traits, and governments/cultures.
Coded in Processing. Also uses a node.js express server.
Repo includes back sketches as well as a Wolfram CA sketch and the node.js express JSON server which are also used for this sketch.
Most recent code uses these directories: genetic_crossing_noc_final
, WolframCA_test
, and galapagus_json
.
- Prof. Dan Shiffman for all his documentation and code from Nature of Code, particularly his chapters on forces, genetic algorithms, ToxicLibs, and cellular automata
- Prof. John Schimmel for his Processing-Nodejs code
Download these files (if you didn't just git clone git@github.com:Xeus/Genetic-Crossing.git
the whole directory and run them on your system; they're already built as applications.
MacOSX:
- https://github.com/Xeus/Genetic-Crossing/tree/master/genetic_crossing_noc_final/application.macosx
- https://github.com/Xeus/Genetic-Crossing/tree/master/WolframCA_test/application.macosx
Windows:
- https://github.com/Xeus/Genetic-Crossing/tree/master/genetic_crossing_noc_final/application.windows
- https://github.com/Xeus/Genetic-Crossing/tree/master/WolframCA_test/application.windows
Download the latest version of Processing.
Clone my git repo. Open your Terminal and go to the directory parent you want to install to. Then type git clone git@github.com:Xeus/Genetic-Crossing.git
.
Navigate to the ./Genetic-Crossing
directory. Type ./galapagus_json
to change directories so you can do node.js stuff.
See package.json
for dependencies. Type npm install
to install them. Uses
MongoDB and the Heroku toolbelt.
Set up your .env
file to include your MONGOLAB_URI
variable, which has your
user/pass to connect to MongoDB.
It should look like this:
MONGOLAB_URI=mongodb://username:password@127.0.0.1:27017/json
Finally, type foreman start
to start up the node.js express server.
From your file explorer or finder, open the genetic_crossing_noc_final.pde
file in the genetic_crossing_noc_final
directory so that it opens in Processing, where you can run it. You'll also want to open WolframCA_test.pde
from the WolframCA_test
directory AFTER the node.js express server and the other sketch are running.
You'll end up having two Processing sketches running, plus a node.js express instance.
Then, experiment! Right-click on the screen to move God. Type u
to pause physics, space bar
to freeze the sketch completely, f
to toggle funerals (hide dead people from the view).
Also upped to OpenProcessing.org: http://www.openprocessing.org/visuals/?visualID=47390
Last update 02 May 12: Demo'd in class and upped to Github.
Search for "TODO:" to find things requiring more work/fixes.