Zombie Infection!

Zombie Infection Applet 1.0, (c) 2003 Tom Anderson <twic@urchin.earth.li>

This is my knockoff of the other zombie infection applet. It does more or less the same thing (although it does lack one or two features, and does some things differently), but less in the way of user interface (indeed, the only way you can get through to it is by reloading the page). The differences are that since i am a brilliant programmer, the code is of superb quality (so it's easier to modify if you want to) and it's highly customisable via applet parameters (all of which are optional, there being sensible defaults), which are listed in the table below (and also in the applet's built-in parameter info - old skool!).

NameTypeDescription
widthintthe east-west width of the world
heightintthe north-south height of the world
buildingCoveragefloat (0-1)the approximate fraction of the total area covered by buildings
buildingSizeintthe average size (edge length) of the buildings
buildingVariancefloat (0-1 ish)the relative variance in the sizes of the buildings (0 = perfectly uniform)
numHumansintthe initial number of humans
numZombiesintthe initial number of zombies
humanSpeedint (1-10ish)the speed at which humans walk
zombieSpeedint (1-5ish)the speed at which zombies shamble
panicMultiplierfloat (>1)the speed of a panicked human, relative to a calm one
humanTurnProbabilityfloat (0-1)the chance that a human will change direction at the start of an iteration
zombieTurnProbabilityfloat (0-1)the chance that a zombie will change direction at the start of an iteration
fightProbabilityfloat (0-1)the chance that a human who sees a zombie will decide to fight rather than panic
killProbabilityfloat (0-1)the chance that a fighting human who attacks a zombie will kill it
calmdownProbabilityfloat (0-1)the chance that a panicked human who can no longer see a zombie will calm down at the end of an iteration
humanVisionRangeint (>humanSpeed)the range of human vision
zombieVisionRangeint (>zombieSpeed)the range of zombie vision
iterationTimeintthe number of milliseconds per iteration (defaults to 100)
seedlongthe seed for the random number generator

Note that 'int', 'long' and 'float' refer to the Java datatypes of the parameters; int and long are integers (just strings of denary digits) and float is a floating-point number (decimal point and scientific notation allowed).

If you want to play with the applet, download the JAR, which has source, binary and HTML files.