We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › Zombie Infection Simulator
Page Index Toggle Pages: 1
Zombie Infection Simulator (Read 5606 times)
Zombie Infection Simulator
Mar 25th, 2009, 10:41am
 
Here is my take on the Zombie Infection Simulators. I designed from scratch. Use the build mode to design a city layout, and populate with humans. Then, drop a zombie in and see it spread. It gets really interesting when the zombies outnumber the humans by a lot, and you notice groups of humans seemingly traveling and working together to avoid the zombies.

Humans don't know that a zombie is a zombie directly. Once they see a zombie attack, they add that zombie to their individual list of known zombies and start running. When they see that zombie again, they know to run. They inform other humans also, and they too flee. Zombies take a similar approach, and notify surrounding zombies of a human that is close.

Let me know what you think, and what I should add / remove.


You can check it out at www.geocities.com/shaggin_k/zombies/zombies
Re: Zombie Infection Simulator
Reply #1 - Mar 28th, 2009, 6:54pm
 
Very interesting. Better than most zombie sim's around.

Just a quick qurestion: How did you get it on your geocity page? i'm unfamiliar with how you put proccessing on websites. Thankyou.
Re: Zombie Infection Simulator
Reply #2 - Mar 29th, 2009, 5:13pm
 
Hey, this was awesome!
I liked putting out a bagillion humans and then just one zombie and watching the infection spread.
Re: Zombie Infection Simulator
Reply #3 - Mar 29th, 2009, 7:12pm
 
Interesting bug: if you press the arrow keys enough in build mode, you can invert the size of the rectangle. It looks normal but (I assume) because it has a negative height or width the people / zombies can pass right though.

I accidentally built my whole city like this. Sad

Can you tell me about how you're building the city, in terms of the human's recognition of where to walk?
Re: Zombie Infection Simulator
Reply #4 - Mar 31st, 2009, 5:28pm
 
Diabeticrabbit
Thank you. I usually use Netbeans to develop my code. Then I transfer that code to the processing IDE and use the File-Export command. It should then pop up a folder with your jar/pde/html/etc in the folder. I upload everything from that folder to my geocities file manager.

AceFace
Thanks for pointing that bug out. I noticed the inversion but never realized that there was no collision. For the application that is currently available, the humans and zombies are essentially "blind" so they don't actually react to solids around them, other than not being able to go through them. In the one that I am working on, I have implemented a line of sight algorithm so that zombies can't see humans through walls and vice versa. I suppose that I can do this to create wall avoidance for humans so they will not run into walls when running/walking. It also allows me to create interesting in-doors experiments where the humans are inside a building and the zombies try to get in.
Re: Zombie Infection Simulator
Reply #5 - Apr 1st, 2009, 6:01pm
 
4/1/09    --UPDATE--

I have made a few updates to the Zombie applet.

Line of View
I enhanced the zombie/ human logic and senses with the addition of a LOV(Line of View) algorithm. Now, zombies cannot see humans through walls and vice versa. It also affects which zombies are notified by other zombies of close humans and how humans notify each other of close zombies (cannot notify a person if they cannot see them).

Graphics
Updated the city graphics, along with generating a starting map to play around in. Along with the addition of a standard map comes the ability to hit the 'a' key to remove all walls/humans/zombies on a map.

Building Inversion
Fixed the building inversion bug. Thank you AceFace. Cool

I would suggest giving it another look. The implementation of sight changes the simulation quite a bit and you can get some interesting scenarios.

Also, I would appreciate if you let me know of any bugs/design issues. Thank you! Grin
Re: Zombie Infection Simulator
Reply #6 - Apr 2nd, 2009, 1:42am
 
Excellent zombie simulator.

I have a suggestion that the zombies and humans could take several more steps in the same direction before turning randomly. It would be more visually appealing.
Re: Zombie Infection Simulator
Reply #7 - Apr 6th, 2009, 4:24pm
 
very nice. I like it a lot. Cheesy

although, if you place two humans on almost the same spot, they don't move. Sad
Re: Zombie Infection Simulator
Reply #8 - Apr 6th, 2009, 8:31pm
 
Great! thank you for the feedback,
OgreProgrammer:
I think that is a great Idea and I am now implementing a waypoint system for the humans so that they will have destinations to walk towards. These waypoints can either be some of the solid buildings or rally points for humans running from zombies.

Xitherun:
Thanks for pointing that bug out, I have been meaning to fix that. I just need to check on mouse click if the mouseX and mouseY are within a solid area or human/zombie.

Current new features:

Observation Mode
When you hit the 'o' key, it will toggle the observation mode. This will allow you to click on the human or zombie to get current stats. For the human it will list their name, which is generated randomly from the 2002 US Census. Also, it will show their current state and how long they have been alive. For zombies, it will display who they used to be, their state, and how many humans they have eaten.

This update is not yet online. I will let you know when it goes up (planning on fixing the bugs and adding waypoints before new release).

Keep the feedback coming and thanks again! Cheesy
Re: Zombie Infection Simulator
Reply #9 - Apr 17th, 2009, 12:04pm
 
Update

Observation Mode
Enter observation mode (key 'o') and then click on a zombie or human to see stats. Names are generated from top 60 first and last names in US. Will also show the waypoint that the humans are walking towards, or in the case of running, what they are running from.

Waypoints
Added a waypoint system so that humans have waypoints that they randomly select. They then exhibit a more lifelike movement. I plan on implementing this waypoint system completely in the program so that the humans can dynamically create waypoints that they will move towards on their own. Press key 'w' to enter waypoint mode to see waypoints and create more.

Escape
Humans can now escape from being attacked. This is based on a "resistance" attribute that is assigned randomly. They try to escape while being attacked, while zombies try to "bite" while attacking. The combination allows for a human to be bitten and still escape. Other humans are not aware of the bite, so they do not run from the bitten human, creating some interesting situations where humans turn into zombies while in large groups of humans.


Modifications
Without using a path finding algorithm it is hard to implement the waypoint system. I ended up trying to determine when a human was stuck, and if so, randomly select another waypoint. This works for now, but humans tend to stay around the center of the city. Also modified the way humans notify others of zombies. If a human being notified of a zombie attack does not have a direct view of the zombie, it doesn't add it to the list of known zombies, but will still run.

New direct link to the game: http://mavdisk.mnsu.edu/kallhw
(Geocities does not allow adding font files  Tongue)

Thanks for input and let me know of any bugs/issues!
Re: Zombie Infection Simulator
Reply #10 - Apr 18th, 2009, 2:29pm
 
Awesome, I like the resistance feature a lot. Cheesy
Re: Zombie Infection Simulator
Reply #11 - Apr 28th, 2009, 8:25am
 
gonna let us peek at the code...?
Re: Zombie Infection Simulator
Reply #12 - Apr 28th, 2009, 1:35pm
 
cool sim, I really like when the little human dots shake from fear.
Page Index Toggle Pages: 1