genome meow; int minGenes=2; int maxGenes=5; int maxRepeat=6; int maxNodes=1000; int amount=int(random(minGenes,maxGenes)); scrollBar genomeScroll; PFont uiFont; boolean displayUI=false; boolean displayNeuronUI=false; boolean useSmooth=false; int displayMode=2; boolean dragCreature=true; boolean stimulateNeuron=true; boolean useGravity=false; boolean useMirror=true; cell selected=null; int selectedID=0; position genomeAnchor; float FRICTION_FORCE=0.95; float FLUID_FORCE=.2; vector GRAVITY_VECTOR=new vector(270,.1); lattice rawr; int nodeAmount=0; position rootNode; void setup() { useRK=true; size(500,500); uiFont=loadFont("KnockoutHTF30JuniorWelterwt-48.vlw"); textFont(uiFont); textMode(CORNER); ellipseMode(CENTER); rectMode(CORNER); meow=new genome(amount); rawr=new lattice(nodeAmount); genomeAnchor=new position(25,50); position scrollPos=new position(genomeAnchor.x,genomeAnchor.y-15); genomeScroll=new scrollBar(scrollPos,400); rootNode=new position(width/2,height/2+40); buildCreature(rawr,meow); // framerate(50); } void draw() { if(displayUI) doUI(); else { background(0); stroke(60); noFill(); rect(10,50+70,480,330); fill(160); textFont(uiFont,16); text("press 'h' for interface",15,470); text("press 'c' to create new creature",15,490); } if(mouseY>90) playMode(); rawr.update(); display(); } void mousePressed() { } void playMode() { if(rawr!=null&&rawr.nodes!=null) { if(selected==null) selected=rawr.nodes[0]; position mp=new position(mouseX,mouseY); for(int i=0;i