{"author_name":"beforan","cat":"MiniLD","comments":[{"author_name":"rigg.travis","time":"February 22, 2014 11:10 pm","epoch":1393128600,"text":"This looks so pretty.","spam":"N"}],"epoch":1393110960,"likes":0,"metadata":{"p_key":"33779","p_author":"beforan","p_authorkey":"503221","p_urlkey":"69321","p_title":"Got caught in the optimisation trap","p_cat":"MiniLD","p_event":"LD28","p_time":"1393110960","p_likes":"0","p_comments":"1","p_status":"UPD5","us_key":"503221","us_name":"beforan","us_username":"beforan","event_start":"1386892800","event_key":"20","event_name":"LD28"},"text":"<p>I know it&#8217;s bad to prematurely or pre-emptively optimise, buuut I was concerned about CPU usage, and it all seemed to stem from drawing routines&#8230;<\/p>\n <p>So after a bit of reading around and testing and worrying, I rewrote all the drawing to use a spritebatched tileset image, and it&#8217;s now much much more comfortable. hooray!<\/p>\n <p>If I&#8217;d been using images in the first place for tiles, I&#8217;d probably have done this from the get go, but because this is all solid colours, I thought creating images for them was madness. Turns out I was wrong; at least the images are being created once at runtime each, and only ever sat in memory. Making 32&#215;32 flat coloured squares in Photoshop would have felt really botchy&#8230;<\/p>\n <p>obligatory screenshot of progress:<\/p>\n <p><a href=\"http:\/\/i.imgur.com\/VH8qc5X.png\"><img class=\"alignnone\" alt=\"\" src=\"http:\/\/i.imgur.com\/VH8qc5X.png\" width=\"450\" height=\"300\" \/><\/a><\/p>\n <p>Rooms are now randomly coloured, which I think is nice. Breaks up the monotony. Map view works, for each player. I think it&#8217;s rather nice, even if it is just scaling the live render.<\/p>\n <p>Heading to bed now, tomorrow will see fast implementation of mechanics and UI (hopefully). At least I have a plan for those and they shouldn&#8217;t be too complex &#8211; I knew graphics-y stuff and the procedural thing would be the hard work on this, but I&#8217;m pleased with the results!<\/p>","time":"February 22nd, 2014 6:16 pm","title":"Got caught in the optimisation trap"}