{"author_name":"Julio","cat":"LD #36","comments":[],"epoch":1472316660,"likes":1,"metadata":{"p_key":"4306","p_author":"Julio","p_authorkey":"501085","p_urlkey":"39757","p_title":"Day 2: I can make spaghetti","p_cat":"LD #36","p_event":"LD36","p_time":"1472316660","p_likes":"1","p_comments":"0","p_status":"UPD5","us_key":"501085","us_name":"Julio","us_username":"Julio","event_start":"1472169600","event_key":"35","event_name":"LD36"},"text":"<p>Previously, in LD36&#8230;<img class=\"aligncenter size-large wp-image-574303\" src=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-27-at-9.28.09-AM-550x349.png\" alt=\"Event queue and debug statements\" width=\"550\" height=\"349\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-27-at-9.28.09-AM-300x190.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-27-at-9.28.09-AM-768x487.png 768w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2016\/08\/Screen-Shot-2016-08-27-at-9.28.09-AM-550x349.png 550w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/p>\n <p>The design\u00a0is simple. The <em>mule<\/em>\u00a0creature in the center is basically a bio-mechanical caravan housing a family of post-apocalyptic pilgrims. (Mmm, <em>bio-mechanical<\/em>. What a sweet\u00a0word, Mr. Giger.) Things happen to your people along the way &#8212; think FTL without real-time elements. The main challenge for the player will be resource management.<\/p>\n <p>I made an events queue system. The game will be divided into days, and each day will be divided into time periods. Each of these time periods will constitute a turn. On each turn, an Event will take place. Events can be added to the queue as needed (e.g. if a trader appears, queue up\u00a0a Trade\u00a0event) but only\u00a0one\u00a0event will be played on each turn. If there are no events in the queue, a NoOp event is created, and the game renders that as &#8220;Nothing happens&#8221;.<\/p>\n <p>Events\u00a0can be flagged as &#8220;major&#8221;; major events are immediately moved to the top of the queue. This is essential for critical events such as character deaths &#8212; after all, if you&#8217;ve got a bunch of minor events queued up and a character falls into the furnace, you&#8217;d want to get notified for\u00a0their death as soon as possible rather than watch\u00a0them burn for multiple\u00a0turns as the queue empties out.<\/p>\n <p>As is typical of game jam entries, this is all driven by a GameManager god class.\u00a0It looks deceptively clean for now, but I know what&#8217;s coming. The bugs are out there, waiting to sneak into my haphazardly written, tightly coupled, singleton-oriented spaghetti code. And I shall\u00a0let them in, in the name of progress and speed, and in the hope that a few\u00a0of them manage to transcend their cursed nature and reveal themselves as&#8230; features.<\/p>","time":"August 27th, 2016 11:51 am","title":"Day 2: I can make spaghetti"}