JALSE-Zombies
JALSE-Zombies copied to clipboard
Example project for JALSE
Zombies
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).
Building and running with Gradle
- Build using
./gradlew build(see Building Java Projects with Gradle) - Run using
./gradle run(See The Application Plugin)
Simulation details
- Initially, 100
Healthypeople (white circles) are spawned and wander randomly about the screen. - To start a simulation, click a person. That person becomes
Infected(red circle). Infectedpeople move 1.5x faster thanHealthyones, butHealthypeople see 1.5x as far.Healthypeople always move away from the nearest visibleInfected(or randomly if noInfectedpeople are visible), andInfectedalways move toward the nearestHealthyperson.- When an
Infectedperson touches aHealthyone, theHealthyperson is bitten and becomes aCarrier.Carriers move randomly and are ignored by bothHealthyandInfectedpeople as they transition fromHealthytoInfected. - If an
Infectedperson does not bite aHealthyperson within 10 seconds, they starve to death and become aCorpse(gray circle). This timer resets every time they bite aHealthyperson. - Eventually, all
Infectedwill die off; usually, at this point, all that remain areCorpses.
Controls
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 ofHealthypeople. - Healthy Sight Range: How far
Healthypeople can see, in pixels. - Infected Sight Range: How far
Infectedpeople can see, in pixels. - Infection Time (s.): How long it takes a person to transition from
HealthytoInfected. Nominally in seconds, but may be longer depending on performance. - Starvation Time (s.): How long it an
Infectedperson can go between bites without starving.
Screen capture

More
See the Wiki for more information.