{"author_name":"Hunter X","cat":"LD #33","comments":[{"author_name":"","time":"August 23, 2015 1:56 pm","epoch":1440356160,"text":"Good progress! We also found solution like yours for find farest point from danger using NavMesh.","spam":"N"}],"epoch":1440353940,"likes":2,"metadata":{"p_key":"14387","p_author":"Hunter X","p_authorkey":"11576","p_urlkey":"49650","p_title":"Day 2 Progress Update","p_cat":"LD #33","p_event":"LD33","p_time":"1440353940","p_likes":"2","p_comments":"1","p_status":"UPD5","us_key":"11576","us_name":"Hunter X","us_username":"\/author\/hunter-x\/","event_start":"1440115200","event_key":"29","event_name":"LD33"},"text":"<p>Most of today has been spent alternating between playing video games and working on my Ludum Dare entry. While it still looks extremely ugly, I believe I have the main gameplay mechanics for Patient Zero all fully functional!<\/p>\n <p><a href=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/08\/LD33-Screenshot-2.png\"><img class=\"alignnone size-large wp-image-487567\" src=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/08\/LD33-Screenshot-2-550x309.png\" alt=\"LD33 Screenshot 2\" width=\"550\" height=\"309\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/08\/LD33-Screenshot-2-300x169.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/08\/LD33-Screenshot-2-550x309.png 550w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><\/p>\n <p>In a step up from yesterday&#8217;s work, the player (and subsequent zombies) are now able to infect humans by touching them, and police officers can shoot at the zombies in order to kill them. I also reworked my code for humans running away from zombies (the first version simply had the human select a room at random to run to and head there as quickly as possible, which unfortunately quite often involved running straight past an oncoming zombie), at which point I encountered my first major hurdle &#8211;\u00a0namely, that while Unity&#8217;s pathfinding is straightforward and easy to use for static levels, when attempting to maneuver past other NPCs the algorithm simply attempts to push past them rather than find an alternate route around. Several hours of searching revealed no built-in way of handling this problem in Unity&#8217;s pathfinding, so I ultimately devised a roundabout solution &#8211; when a human sees a zombie, they attempt to find a point as far away as possible with as small an angular difference to directly opposite as possible and head there, regularly updating the target until the zombie can no longer be seen (at which point they then try to use a phone or head to the police station). This resulted in a far more natural-looking effect in which the humans will actively run away from the zombie and take the side corridors if they are empty.<\/p>\n <p><a href=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/08\/LD33-Screenshot-3.png\"><img class=\"alignnone size-large wp-image-487614\" src=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/08\/LD33-Screenshot-3-550x309.png\" alt=\"LD33 Screenshot 3\" width=\"550\" height=\"309\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/08\/LD33-Screenshot-3-300x169.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2015\/08\/LD33-Screenshot-3-550x309.png 550w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><\/p>\n <p>Out of curiosity I decided to spawn a few zombies in the center of the map and see how they fared without any player assistance. While a single zombie is quickly located and destroyed by the police officers, a small group produced some very interesting behaviours &#8211; while the humans are much faster than the zombies, on multiple occasions they would end up trapped by two individuals or groups which had targeted them from each end of a corridor. On the other hand, while a police officer can take out a single zombie before it reaches him, two or more grouped together can easily overwhelm him.<\/p>\n <p>There&#8217;s still a few minor tweaks to make (such as adjusting the sprint values for the player, and possibly adding a few more selectable levels to play on), but on the whole I think the game is shaping up quite nicely! Whether it&#8217;ll actually be fun for anyone but me to play, however, is another story entirely \ud83d\ude1b<\/p>","time":"August 23rd, 2015 1:19 pm","title":"Day 2 Progress Update"}