{"author_name":"SusanTheCat","cat":"LD #31","comments":[],"epoch":1418134560,"likes":1,"metadata":{"p_key":"22340","p_author":"SusanTheCat","p_authorkey":"5150","p_urlkey":"57709","p_title":"Ooops!  I forgot a title","p_cat":"LD #31","p_event":"LD31","p_time":"1418134560","p_likes":"1","p_comments":"0","p_status":"UPD5","us_key":"5150","us_name":"SusanTheCat","us_username":"susanthecat","event_start":"1417737600","event_key":"26","event_name":"LD31"},"text":"<p>In the game I created, you play as the security guard for the High Brow Museum. \u00a0Unfortunately, you only have one screen to see all four floors of the museum.<\/p>\n <p><a href=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2014\/12\/logo10.png\"><img class=\"alignnone wp-image-423524 size-medium\" src=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2014\/12\/logo10-300x187.png\" alt=\"logo\" width=\"300\" height=\"187\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2014\/12\/logo10-300x187.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2014\/12\/logo10.png 480w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n <p><strong>The game play:<\/strong><\/p>\n <p>Each floor has a number of objects. \u00a0There are visitors that walk around the museum. \u00a0One visitor on each floor is a thief that will steal an object then stand there with a slightly different icon. \u00a0The player must hit the alarm button before the delay timer.<\/p>\n <p><strong>What did I learn:<\/strong><\/p>\n <p>The hardest part to code was having the visitors walk around in a somewhat sensible manner. \u00a0I eventually decided to use an <a href=\"http:\/\/www.briangrinstead.com\/blog\/astar-search-algorithm-in-javascript-updated\">A* pathfinding library<\/a>. \u00a0Each visitor picks an object to visit. \u00a0It calculates the best path avoiding walls, objects, and other visitors current position. Each tile on the route is stored in an array and it tries to get to each tile in turn. \u00a0If it runs into something, it jumps to the center of the closest tile and then waits for a random amount of time. \u00a0At that point it recalculates and starts again.<\/p>\n <p>I had to reprogram the library to not let it cut corners if there was a wall there. \u00a0I also had to program the visitors with a fudge factor to decide how close was close enough to the way-point. Nothing too difficult, but it did suck 6 hours of programming time since I went in knowing nothing.<\/p>\n <p><strong>What went right:<\/strong><\/p>\n <p>I used a JavaScript game library called <a href=\"http:\/\/www.html5quintus.com\/\">Quintus<\/a>. Once I got used to how it did things, it was a pleasure to use. \u00a0The best part was using <a href=\"http:\/\/www.mapeditor.org\/\">Tiled <\/a>to make my levels &#8211; objects and all! \u00a0There was a lack of information about how to do it, but I figured it out using the examples.<\/p>\n <p><strong><a href=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2014\/12\/level_1.png\"><img class=\"alignright size-medium wp-image-423540\" src=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2014\/12\/level_1-300x193.png\" alt=\"level_1\" width=\"300\" height=\"193\" \/><\/a>What I would do to improve the game:<\/strong><\/p>\n <p>&#8211; different kinds of visitors<br \/>\n &#8211; thief wouldn&#8217;t steal the first object<br \/>\n &#8211; Thief would have to run away instead of a delay time<br \/>\n &#8211; prettier interface<br \/>\n &#8211; intro video<\/p>\n <p>I had fun making the game. \u00a0This was my first time making a 2D game in JavaScript. \u00a0I think I might explore Quintus some more and see what I can do with it.<\/p>\n <p>Game page:\u00a0<a href=\"http:\/\/ludumdare.com\/compo\/ludum-dare-31\/?action=rate&amp;uid=5150\">http:\/\/ludumdare.com\/compo\/ludum-dare-31\/?action=rate&amp;uid=5150<\/a><\/p>\n <p>Play it here: <a href=\"http:\/\/garionthecat.com\/guard_screen\/\">http:\/\/garionthecat.com\/guard_screen\/<\/a><\/p>\n <p>Susan<\/p>","time":"December 9th, 2014 9:16 am","title":"Ooops!  I forgot a title"}