{"id":906,"date":"2014-11-04T17:03:59","date_gmt":"2014-11-04T17:03:59","guid":{"rendered":"http:\/\/www.visionriders.com\/blog\/?p=906"},"modified":"2014-11-04T17:03:59","modified_gmt":"2014-11-04T17:03:59","slug":"a-2d-sprite-animation-system","status":"publish","type":"post","link":"https:\/\/www.visionriders.com\/blog\/2014\/11\/a-2d-sprite-animation-system\/","title":{"rendered":"A 2D Sprite Animation System"},"content":{"rendered":"<p>One of the things I decided late into the production of <cite>Another Star<\/cite> was that, in the future, I would stop skimming on production tools. In <cite>Another Star<\/cite> I hard coded virtually everything in the game, other than the maps. I never really liked working on tools, so I always looked for work-arounds to weasel my way out of making them. But as I got closer and closer to finishing <cite>Another Star<\/cite>, things got more and more tedious to change.<\/p>\n<p>The one bright spot was that I&#8217;d made a map editor. No big deal; I&#8217;ve made dozens of them over the past twenty or so years I&#8217;ve been programming games. But it really did make a difference, as simple as it was. Tweaking maps was a simple affair whenever I ran into an issue, even moreso because the map editor ran in-game and all I had to do was press a single key to toggle in and out of it. I almost\u2014<em>almost<\/em>\u2014tried hard coding the maps. I&#8217;m so glad I didn&#8217;t.<\/p>\n<p>In any case, as a consequence of this I&#8217;m finally getting around to something I should have worked on five years ago: a 2d animation system for sprites.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.visionriders.com\/blog\/images\/2014\/flipbook_01.png\" alt=\"The Flipbook Application\" class=\"artwork\"><\/p>\n<div class=\"artwork_note\">Here&#8217;s the application in action, selecting areas in a sprite sheet.<\/div>\n<p>I actually did the bulk of predesign work for this back in 2009, but never got around to actually programming more than a couple buttons and a file menu. But for my next game, I <em>really<\/em> wanted it to look good, and I knew I&#8217;d need more than some basic grid-based sprites to pull it off. I&#8217;m hoping that this application, dubbed &#8220;Flipbook&#8221;, will do as much good for future projects as that map editor did for <cite>Another Star<\/cite>. And, to top it all off, I&#8217;m actually sort of enjoying working on this.<\/p>\n<p>I&#8217;m trying to make Flipbook as easy and natural to use as possible, because I&#8217;d like to release it in some form, even if it&#8217;s never properly finished. I don&#8217;t expect it to be popular or anything, but it uses a fairly generic sprite system, so I think more than a few people could probably make use of it for their own projects.<\/p>\n<p>In fact, I&#8217;d like to share several things I&#8217;ve developed, both for this project and <cite>Another Star<\/cite>. I&#8217;m planning to release these through the Vision Riders website starting here in the near future, but in the meantime you can read up on my latest draft of the underlying <a href=\"http:\/\/www.visionriders.com\/dev\/fileformats\/isprite.html\">sprite system and its file structure<\/a>. It&#8217;s not quite finished or finalized yet, but you should get a general idea of how the thing is supposed to work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the things I decided late into the production of Another Star was that, in the future, I would stop skimming on production tools. In Another Star I hard coded virtually everything in the game, other than the maps. I never really liked working on tools, so I always looked for work-arounds to weasel [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,33],"tags":[],"class_list":["post-906","post","type-post","status-publish","format-standard","hentry","category-programming","category-utilities"],"_links":{"self":[{"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/posts\/906","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/comments?post=906"}],"version-history":[{"count":4,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/posts\/906\/revisions"}],"predecessor-version":[{"id":910,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/posts\/906\/revisions\/910"}],"wp:attachment":[{"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/media?parent=906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/categories?post=906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.visionriders.com\/blog\/wp-json\/wp\/v2\/tags?post=906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}