{"author_name":"Amused","cat":"LD #19 - Discovery - 2010","comments":[],"epoch":1292643540,"likes":1,"metadata":{"p_key":"68546","p_author":"Amused","p_authorkey":"2233","p_urlkey":"104349","p_title":"Neck deep in code","p_cat":"LD #19 - Discovery - 2010","p_event":"LD19","p_time":"1292643540","p_likes":"1","p_comments":"0","p_status":"UPD5","us_key":"2233","us_name":"Amused","us_username":"twilsoncom","event_start":"1292544000","event_key":"5","event_name":"LD19"},"text":"<p>I wish I had something to show, but right now I&#8217;m neck-deep in Javascript. I&#8217;m building an isometric tile engine for the HTML canvas element. This is something I&#8217;ve worked on before, so I&#8217;ve got some bits and pieces laying around, but now I&#8217;m sort of pulling it all together to get a scrolling map going ASAP.<\/p>\n <p>The basic idea is to load resource images into the DOM then use them as you normally would in a tile engine. So I copy a rectangular region from the resource image onto the canvas, wash-rinse-repeat. Since it&#8217;s isometric, I&#8217;m working with squashed diamond shapes. For this implementation I&#8217;m using tiles that are 300 x 150 pixels. Every other row has to be offset by a half-tile so they tile up nicely. Anyway, this is all probably stuff you know.<\/p>\n <p>I&#8217;m working on a few interesting bits with canvas. One is shadows, which I&#8217;ve got some prototype code for and will probably use. With that I copy the sprites in a translucent black and then apply a matrix when copying them onto the map so they&#8217;re skewed properly. I&#8217;d like to figure out a good way to blur them too, but may not get to that. Another thing I want to experiment with here is particles. I might try using the mousewheel for zooming in and out a bit, but that will be a Sunday thing, I reckon. I have the concept worked out in my head, but we&#8217;ll see.<\/p>\n <p>As for the game itself, I&#8217;m planning to sleep on it and see what details may emerge.<\/p>","time":"December 17th, 2010 10:39 pm","title":"Neck deep in code"}