/* Freeze Tag Particle System Hunters chase and freeze captives blprnt@blprnt.com */ //OpenGL is way faster than p3d for this, so let's import it. import processing.opengl.*; //Here's a bunch of variables that you can change. int taggercount = 100; int huntercount = 10; int tagreach = 50; int taggerscope = 400; float hunterspeed = 0; float huntedspeed = 0.7; float huntermax = 7; float huntedmax = 6; int freezetime = 50; //Here are some variables that are just declared - no values yet Tagger[] taggers = new Tagger[taggercount]; Tagger[] leaders = new Tagger[huntercount]; Tagger[] freezers = new Tagger[taggercount]; float ax; float ay; float gbestx; float gbesty; float gbestfit; int lastkill = 0; int freezecount; void setup() { //Now we set things up by sizing the stage, setting the framerate, and making all of our players. ax = 0; ay = 0; freezecount = 0; framerate(60); size(600,600,P3D); background(20); for (int i=0; i 0) lastkill *= 0.9; };