Zombie apocalypse simulation written in PHP and Symfony with a docker-compose
support for building and running it
The entire simulation is a small (20 in width and 20 in height) 2D world divided into equal square cells. In each cell unlimited number of entities (humans, zombies and resources) can be placed. Each kind of entity behaves in its own unique way, described down below:
- move away from zombies (twice as fast if they have eaten food)
- try to pick up available resources
- shoot zombies if they are close enough and ammo is available (1 bullet is needed to kill a single zombie)
- chase humans
- wander randomly around the world if no humans are left
- bite humans that are in the exact same cell (which instantly turns them into zombies)
- increase the number of ammo or food after being picked up by humans
State of the simulation is updated regularly every 1 second
- Install
docker
anddocker-compose
on your machine (Make sure that docker engine is running) - Open a new terminal session in a folder with
docker-compose.yml
file - Run the following command:
$ docker-compose up
- Wait a few dozen seconds until all 3 containers are ready and running
- Open you browser and go to http://localhost:8000/ (Make sure that you use HTTP protocol, unfortunately HTTPS is not supported out of the box)
- You should be able to see a page with the menu and the simulation
Below the menu you will find 6 links to add different kind of entities to the simulation or to see their current state