{"author_name":"diiq","cat":"LD #33","comments":[],"epoch":1440167280,"likes":0,"metadata":{"p_key":"16198","p_author":"diiq","p_authorkey":"50429","p_urlkey":"51484","p_title":"Prepping my build system","p_cat":"LD #33","p_event":"LD33","p_time":"1440167280","p_likes":"0","p_comments":"0","p_status":"UPD5","us_key":"50429","us_name":"diiq","us_username":"diiq2","event_start":"1440115200","event_key":"29","event_name":"LD33"},"text":"<p>Last Dare, I used <a href=\"http:\/\/fabricjs.com\">FabricJS<\/a> and coffeescript to build an in-browser <a href=\"http:\/\/diiq.org\/#\/art\/snowball\">my game<\/a>. It was my first time using fabric, and I liked it; it was easy to use, vector based so it looked slick, and stayed out of my way.<\/p>\n <p>I made a couple of mistakes, though:<\/p>\n <p><strong>Experimental Build System<\/strong><\/p>\n <p>First, the build system: I experimented with using <a href=\"https:\/\/github.com\/broccolijs\/broccoli\">Broccoli<\/a> and <a href=\"http:\/\/browserify.org\/\">Browserify<\/a> for my build system. They&#8217;re both cool technologies, but they&#8217;re simply not ready for prime time. I spent a lot of time fussing with them to make sure that sourcemaps were working, that incremental builds were working, that live reload was working &#8212; and for most of the weekend, one thing or another about the build system was getting in my way.<\/p>\n <p>This time around, I&#8217;ll be using a tried-and-true system built around <a href=\"http:\/\/gulpjs.com\/\">Gulp<\/a>. I use it at work and it&#8217;s blindingly fast, very reliable, and should stay out of my way.<\/p>\n <p><strong>Controlling the redraw loop myself<\/strong><\/p>\n <p>This was an <em>obvious<\/em> mistake. Fabric is already optimized to handle redrawing parts of a whole canvas; I chose to ignore that and redraw the whole screen every frame. What was I thinking? Of course, before the end of the weekend I was facing major performance issues.<\/p>\n <p>This time around, I&#8217;ve done a little prep work, figuring out how to interact with fabric in a more natural way, just updating the objects that are moving. There&#8217;s still a lot to learn, here, but I think I&#8217;m in a much better place than I was last time.<\/p>\n <p><strong>Waiting too long for image assets and juice<\/strong><\/p>\n <p>This one is hard to escape in compo, but I think my game was a really nice game, and I just didn&#8217;t spend enough of the balance of my time on assets, levels, and juicy interactions. A downside of fabricjs is that I\u00a0<em>don&#8217;t\u00a0<\/em>have particle systems or camera shake just waiting to be added; any juice I add has to be build from scratch &#8212; so I need to start thinking about it earlier.<\/p>\n <p>&nbsp;<\/p>\n <p>&nbsp;<\/p>\n <p>All in all, I think I did pretty well last dare, and I think I&#8217;m in an even better position this time around.<\/p>","time":"August 21st, 2015 9:28 am","title":"Prepping my build system"}