{"id":1444,"date":"2017-12-01T17:28:30","date_gmt":"2017-12-02T01:28:30","guid":{"rendered":"http:\/\/www.bradleycbuchanan.com\/b\/?p=1444"},"modified":"2018-01-21T20:59:42","modified_gmt":"2018-01-22T04:59:42","slug":"wildflower-child-github-game-off","status":"publish","type":"post","link":"https:\/\/www.bradleycbuchanan.com\/b\/wildflower-child-github-game-off\/","title":{"rendered":"Wildflower Child &#8211; GitHub Game Off"},"content":{"rendered":"<p><a href=\"http:\/\/www.bradleycbuchanan.com\/b\/wp-content\/uploads\/2017\/12\/Wildflower-Child-1.0-Cover-Image.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.bradleycbuchanan.com\/b\/wp-content\/uploads\/2017\/12\/Wildflower-Child-1.0-Cover-Image.png\" alt=\"\" width=\"451\" height=\"359\" class=\"aligncenter size-full wp-image-1445\" srcset=\"https:\/\/www.bradleycbuchanan.com\/b\/wp-content\/uploads\/2017\/12\/Wildflower-Child-1.0-Cover-Image.png 451w, https:\/\/www.bradleycbuchanan.com\/b\/wp-content\/uploads\/2017\/12\/Wildflower-Child-1.0-Cover-Image-300x239.png 300w\" sizes=\"auto, (max-width: 451px) 100vw, 451px\" \/><\/a><\/p>\n<p>This year I submitted an entry to <a href=\"https:\/\/itch.io\/jam\/game-off-2017\">GitHub Game Off 2017<\/a>.  It&#8217;s called <a href=\"https:\/\/islemaster.itch.io\/wildflower-child\">Wildflower Child<\/a>.<\/p>\n<p><!--more--><\/p>\n<p>The challenge for the game jam was to create a game on the theme <b>throwback<\/b> during the month of November.  I actually started right away, and came up with a very cool idea that I&#8217;d still like to implement someday.  To nobody&#8217;s surprise, I didn&#8217;t carve out enough time to actually work on the game.  I got as far as downloading <a href=\"https:\/\/godotengine.org\/\">the Godot engine<\/a> and walking through a few of it&#8217;s tutorials before realizing I&#8217;d probably picked something too ambitious, given the holidays and this being a busy time of year at work.  So I gave up on the jam.<\/p>\n<p>Alleson encouraged me to pick something up again, and when I got sick enough to miss work in the last week of the month I started noodling on an old idea for a gardening game.  I wanted to play with dynamically generated and animated flowers, so I threw together a little JavaScript that would build them in SVG.<\/p>\n<blockquote class=\"twitter-tweet\" data-lang=\"en\">\n<p lang=\"en\" dir=\"ltr\">Well, I totally failed to make time for <a href=\"https:\/\/twitter.com\/hashtag\/GitHubGameOff?src=hash&amp;ref_src=twsrc%5Etfw\">#GitHubGameOff<\/a> &#8211; so I&#39;m at least doing some initial exploration for an old idea, and generating some SVG flowers. <a href=\"https:\/\/t.co\/ajyHtkg9tp\">pic.twitter.com\/ajyHtkg9tp<\/a><\/p>\n<p>&mdash; Bradley C Buchanan (@islemaster) <a href=\"https:\/\/twitter.com\/islemaster\/status\/936114236039688193?ref_src=twsrc%5Etfw\">November 30, 2017<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>In the space of about four hours I was generating a matrix of randomized nice-looking flowers with a sort of antique illustration look.  It was kind of fun just to reload the page and see what new flowers appeared, so I figured I might be on to something.  I went to bed that night thinking I&#8217;d be done with the project, and I could feel good about building something game-like this month.<\/p>\n<blockquote class=\"twitter-tweet\" data-lang=\"en\">\n<p lang=\"en\" dir=\"ltr\">At this point happy about my one-evening SVG floral wallpaper thing, plus all the surrounding Webpack+Babel setup that I haven&#39;t practiced in a while.  It&#39;s no game, but at least I built something. <a href=\"https:\/\/twitter.com\/hashtag\/GitHubGameOff?src=hash&amp;ref_src=twsrc%5Etfw\">#GitHubGameOff<\/a> <a href=\"https:\/\/t.co\/kOjZ5WL1Bu\">pic.twitter.com\/kOjZ5WL1Bu<\/a><\/p>\n<p>&mdash; Bradley C Buchanan (@islemaster) <a href=\"https:\/\/twitter.com\/islemaster\/status\/936162324003487745?ref_src=twsrc%5Etfw\">November 30, 2017<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>The next morning I woke up sicker than the day before, so I figured I could at least use my sick day to turn my experiment into something worth sharing.  The first step was to change flower generation, giving each flower a &#8216;genome&#8217; so I could generate exact copies on demand.  I could still generate random flowers by generating a random genome.<\/p>\n<blockquote class=\"twitter-tweet\" data-lang=\"en\">\n<p lang=\"en\" dir=\"ltr\">Silver lining to my sinus infection is maybe having time to turn this thing into a game before the deadline.  Step 1: Generate flowers deterministically from a genome so they can be copied (and mixed!) <a href=\"https:\/\/twitter.com\/hashtag\/GitHubGameOff?src=hash&amp;ref_src=twsrc%5Etfw\">#GitHubGameOff<\/a> <a href=\"https:\/\/t.co\/bjO5lGbccZ\">pic.twitter.com\/bjO5lGbccZ<\/a><\/p>\n<p>&mdash; Bradley C Buchanan (@islemaster) <a href=\"https:\/\/twitter.com\/islemaster\/status\/936346372260839424?ref_src=twsrc%5Etfw\">November 30, 2017<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>A flower genome is just a string of hex characters, with every pair representing a gene and controlling one characteristic of the flower.  In some cases a gene is treated as a raw random seed, in other cases it&#8217;s used as a normalized value (out of 0xFF) to replace a Math.random() result.<\/p>\n<p>Next of course, was mixing genomes.<\/p>\n<blockquote class=\"twitter-tweet\" data-lang=\"en\">\n<p lang=\"en\" dir=\"ltr\">Middle flower pulls traits from parents (left and right). <a href=\"https:\/\/twitter.com\/hashtag\/GitHubGameOff?src=hash&amp;ref_src=twsrc%5Etfw\">#GitHubGameOff<\/a> <a href=\"https:\/\/t.co\/APL7whdsW4\">pic.twitter.com\/APL7whdsW4<\/a><\/p>\n<p>&mdash; Bradley C Buchanan (@islemaster) <a href=\"https:\/\/twitter.com\/islemaster\/status\/936350679802683392?ref_src=twsrc%5Etfw\">November 30, 2017<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>Then I realized arranging flowers in a hex grid might be nicer visually, and provide a nice logic for generating descendants from neighbors.<\/p>\n<blockquote class=\"twitter-tweet\" data-lang=\"en\">\n<p lang=\"en\" dir=\"ltr\">It&#39;s starting to _look_ like a puzzle game&#8230; <a href=\"https:\/\/twitter.com\/hashtag\/GitHubGameOff?src=hash&amp;ref_src=twsrc%5Etfw\">#GitHubGameOff<\/a> <a href=\"https:\/\/t.co\/ECK8HWVeRO\">pic.twitter.com\/ECK8HWVeRO<\/a><\/p>\n<p>&mdash; Bradley C Buchanan (@islemaster) <a href=\"https:\/\/twitter.com\/islemaster\/status\/936387244750802945?ref_src=twsrc%5Etfw\">December 1, 2017<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>The remaining work (drag-and-drop with snapping to the hex grid, flower generation rules) took quite a while, but I ended up with something you can &#8220;play.&#8221;<\/p>\n<blockquote class=\"twitter-tweet\" data-lang=\"en\">\n<p lang=\"en\" dir=\"ltr\">Flower mixing is looking better!  Some predictability, some surprises. <a href=\"https:\/\/twitter.com\/hashtag\/GitHubGameOff?src=hash&amp;ref_src=twsrc%5Etfw\">#GitHubGameOff<\/a> <a href=\"https:\/\/t.co\/oU9yWE6xyX\">pic.twitter.com\/oU9yWE6xyX<\/a><\/p>\n<p>&mdash; Bradley C Buchanan (@islemaster) <a href=\"https:\/\/twitter.com\/islemaster\/status\/936470698934988800?ref_src=twsrc%5Etfw\">December 1, 2017<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>I gave up on coming up with a compelling objective and decided to leave it as a toy.  Maybe in the future I&#8217;ll revisit this and build a puzzle game, but for now I&#8217;m proud of building a cool little HTML5 toy and submitting it to the game jam!<\/p>\n<ul>\n<li>Play Wildflower Child on <a href=\"https:\/\/islemaster.itch.io\/wildflower-child\">its itch.io page<\/a> or <a href=\"https:\/\/islemaster.github.io\/wildflower-child\/\">on GitHub Pages<\/a><\/li>\n<li>View the source <a href=\"https:\/\/github.com\/islemaster\/wildflower-child\">on GitHub<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This year I submitted an entry to GitHub Game Off 2017. It&#8217;s called Wildflower Child.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,5,417,8],"tags":[432,465],"class_list":["post-1444","post","type-post","status-publish","format-standard","hentry","category-featured","category-game-designer","category-portfolio","category-programmer","tag-open-source","tag-side-projects"],"_links":{"self":[{"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/posts\/1444","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/comments?post=1444"}],"version-history":[{"count":5,"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/posts\/1444\/revisions"}],"predecessor-version":[{"id":1450,"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/posts\/1444\/revisions\/1450"}],"wp:attachment":[{"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/media?parent=1444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/categories?post=1444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/tags?post=1444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}