{"id":134,"date":"2026-10-11T10:00:00","date_gmt":"2026-10-11T08:00:00","guid":{"rendered":"https:\/\/www.salzwerk.app\/sprites-schmetterling-tiny-garden-days\/"},"modified":"2026-10-11T10:00:00","modified_gmt":"2026-10-11T08:00:00","slug":"sprites-schmetterling-tiny-garden-days","status":"publish","type":"post","link":"https:\/\/www.salzwerk.app\/en\/sprites-schmetterling-tiny-garden-days\/","title":{"rendered":"Why my butterfly flew backwards"},"content":{"rendered":"<p>In Tiny Garden Days, the garden should feel alive. So I wanted a butterfly and a bird to fly across the screen. To do that, I worked with sprites for the first time.<\/p>\n<h2>What is a sprite?<\/h2>\n<p>A sprite is basically a flip book on a single sheet. Several frames sit side by side on one canvas, and each shows the character in a slightly different pose. For the butterfly, the wings are sometimes wide open, sometimes half open and sometimes almost closed.<\/p>\n<p>The app then plays these frames in quick succession. The eye turns them into movement, and suddenly the butterfly flutters. It\u2019s simple, needs little memory and has worked this way since the early video games.<\/p>\n<h2>The butterfly in reverse gear<\/h2>\n<p>The animation was built in quickly. The wings flapped, everything looked lovely. Then I let it fly across the screen.<\/p>\n<p>It flew. But backwards. It faced one direction and moved in the other. Flapping its wings dutifully, it pushed its way across the screen tail first. I had to laugh quite a bit.<\/p>\n<p>The reason is mundane: I had never told the app which direction the butterfly flies. The animation only knew how the wings flap, not where the journey is headed.<\/p>\n<h2>What I\u2019m taking away<\/h2>\n<ul>\n<li>Sprite animations are quick to make and bring a lot of life into an app.<\/li>\n<li>Moving across the screen is a separate thing. I always have to tell the app which direction the object should move in.<\/li>\n<li>For the opposite direction I don\u2019t need new images. The same frames, simply mirrored, and it flies the right way round.<\/li>\n<\/ul>\n<p>By now the butterfly flies head first. Feel free to watch it yourself: <a href=\"https:\/\/apps.apple.com\/ch\/app\/tiny-garden-days\/id6821144578\">Tiny Garden Days on the App Store<\/a>. \ud83e\udd8b<\/p>","protected":false},"excerpt":{"rendered":"<p>For Tiny Garden Days I animated sprites. It was easy \u2013 until the butterfly fluttered across the screen in reverse.<\/p>","protected":false},"author":1,"featured_media":135,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_breakdance_hide_in_design_set":false,"_breakdance_tags":"","iawp_total_views":3,"_xspeed_no_cache":false,"_xspeed_expiry_hours":0,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-134","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hinter-den-kulissen"],"_links":{"self":[{"href":"https:\/\/www.salzwerk.app\/en\/wp-json\/wp\/v2\/posts\/134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.salzwerk.app\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.salzwerk.app\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.salzwerk.app\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.salzwerk.app\/en\/wp-json\/wp\/v2\/comments?post=134"}],"version-history":[{"count":0,"href":"https:\/\/www.salzwerk.app\/en\/wp-json\/wp\/v2\/posts\/134\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.salzwerk.app\/en\/wp-json\/wp\/v2\/media\/135"}],"wp:attachment":[{"href":"https:\/\/www.salzwerk.app\/en\/wp-json\/wp\/v2\/media?parent=134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.salzwerk.app\/en\/wp-json\/wp\/v2\/categories?post=134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.salzwerk.app\/en\/wp-json\/wp\/v2\/tags?post=134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}