12-18-2013

posted Dec 18, 2013, 5:22 AM by Samuel Konstantinovich   [ updated Dec 18, 2013, 5:22 AM ]

Lab: Zombies vs Humans

1. Overview:

-You will work on this today. Do not work with you partner on this project, if you want help, please ask someone else. After tomorrow you will be required to swap your file with your partner, and add new features to your partner's code. This means you should be writing things in a readable and clear way (no crazy variable names or poor spacing/newlines)


2. Zombie Behavior:

-When there is a human in a radius of zombie_vision_radius (make a slider), the Zombies chase after the closest human at a speed of 1. Otherwise they shamble. Shamble is a slow wiggle (.3 speed). 

-When a zombie catches a person (the person is on the same patch as the zombie) the person dies, and a new zombie is created it should look like the other zombies. 


3. Human Behavior

-Humans normally wiggle.

-When one or more zombies are closer than human_vision_radius (make a slider) units away, they try to run from the zombies.

 -When a person is running they check their stamina. 

When there is 2 or more stamina, the person move away from the nearest zombie at speed 1.5. When there is less than 2 stamina, the person just wiggles away from the nearest zombie. People start with maximum_stamina (make a slider). Their stamina decreases by 2 every time they successfully run.

-When a person wiggles, they rotate randomly, then move forward .5 and they also they gain 1 stamina (but no more than max_stamina.


4. Miscellaneous:

- Make Sliders for starting_zombies ( 1-20), starting_humans (1-100)

- Make Slider for maximum_stamina (20-100)

- Make Sliders for zombie_vision_radius, and human_vision_radius

- Make Monitors for : the number of zombies and the number of humans

- Your project should run at an appropriate speed.

- Zombies are all green, humans are all orange.


- OPTIONALLY AT HOME: make a custom shape “zombie” in the shapes editor (spend NO MORE THAN 2 minutes on this) Make sure you duplicate the “person” shape instead of just editing it, or you will lose the person shape.

Comments