Zombies is a JALSE example project. Is is a small simulation in which a healthy person or people can be "infected." Infected people chase and "bite" healthy people, until the entire population is infected (and eventually dies).
- Build using
./gradlew build
(see Building Java Projects with Gradle) - Run using
./gradle run
(See The Application Plugin)
- Initially, 100
Healthy
people (white circles) are spawned and wander randomly about the screen. - To start a simulation, click a person. That person becomes
Infected
(red circle). Infected
people move 1.5x faster thanHealthy
ones, butHealthy
people see 1.5x as far.Healthy
people always move away from the nearest visibleInfected
(or randomly if noInfected
people are visible), andInfected
always move toward the nearestHealthy
person.- When an
Infected
person touches aHealthy
one, theHealthy
person is bitten and becomes aCarrier
.Carrier
s move randomly and are ignored by bothHealthy
andInfected
people as they transition fromHealthy
toInfected
. - If an
Infected
person does not bite aHealthy
person within 10 seconds, they starve to death and become aCorpse
(gray circle). This timer resets every time they bite aHealthy
person. - Eventually, all
Infected
will die off; usually, at this point, all that remain areCorpse
s.
Various properties of the simulation can be adjusted using the sliders on the right. All changes take place immediately, but you can click Reset Simulation if you'd like to start a new simulation with your selected settings.
- Population: The total number of people in the field.
- Infected Relative Speed (%): The speed of
Infected
, as a percentage of the speed ofHealthy
people. - Healthy Sight Range: How far
Healthy
people can see, in pixels. - Infected Sight Range: How far
Infected
people can see, in pixels. - Infection Time (s.): How long it takes a person to transition from
Healthy
toInfected
. Nominally in seconds, but may be longer depending on performance. - Starvation Time (s.): How long it an
Infected
person can go between bites without starving.
See the Wiki for more information.