{"id":65,"date":"2013-10-26T06:13:11","date_gmt":"2013-10-26T06:13:11","guid":{"rendered":"http:\/\/www.alexsikora.com\/news\/?p=65"},"modified":"2013-10-26T07:23:48","modified_gmt":"2013-10-26T07:23:48","slug":"gold-hunter-part-1","status":"publish","type":"post","link":"http:\/\/alexsikora.com\/news\/2013\/10\/26\/gold-hunter-part-1\/","title":{"rendered":"Gold Hunter: Part 1"},"content":{"rendered":"<p>Figured I&#8217;d keep a mini blog going on a project I&#8217;m working on (because it&#8217;s worked so well before) to do a game inspired by Lode Runner: The Legend Returns (later, Lode Runner Online), and reposting it on iDevGames.com. I really liked the no direct-combat style of Lode Runner for planning and running around a level and gathering loot, and I&#8217;d like to bring a faster level of twitch gameplay to the old school mechanics, as well as a smaller field of view (rather than exposing the entire map to the player) and maybe play around with ideas of lighting\/physics to the game. As you can probably tell, I&#8217;ve played a decent amount of the new Spelunky lately, and it&#8217;s inspired me to make a similar game.<\/p>\n<p>My first step this week was to mess around with a random level generator. I&#8217;m using SpriteKit (technically a KoboldKit wrapper around it, not sure what advantages KoboldKit has for me just yet. <a title=\"Link for the lazy\" href=\"http:\/\/koboldkit.com\" target=\"_blank\">http:\/\/koboldkit.com<\/a>).<\/p>\n<p>I started with Big Bad Waffle&#8217;s <a title=\"random cave generator\" href=\"http:\/\/bigbadwofl.me\/random-cave-generator\" target=\"_blank\">http:\/\/bigbadwofl.me\/random-cave-generator<\/a>, because it required no prep work. I just implemented it in Objective-C (using Objective-C NSMutableArrays, probably not the best for performance reasons so that will probably switch to pure C later). It created some pretty good (importantly: re-producible) results based on a seed value I initially drew it using SKSpriteNodes of different colors, but then figured I&#8217;d steal the ever-useful Cute sprites available to make a quick map and off it went! I did a little shift in the y direction to make the ground appear a little bit lower just for fun visual effect.<\/p>\n<p>Note: Images used are just for a more interesting rendering of the map, not a decision on style.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.alexsikora.com\/news\/wp-content\/uploads\/2013\/10\/map1.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-66 aligncenter\" alt=\"map1\" src=\"http:\/\/www.alexsikora.com\/news\/wp-content\/uploads\/2013\/10\/map1-1024x824.png\" width=\"614\" height=\"494\" srcset=\"http:\/\/alexsikora.com\/news\/wp-content\/uploads\/2013\/10\/map1-1024x824.png 1024w, http:\/\/alexsikora.com\/news\/wp-content\/uploads\/2013\/10\/map1-300x241.png 300w, http:\/\/alexsikora.com\/news\/wp-content\/uploads\/2013\/10\/map1.png 1828w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/a> <a href=\"http:\/\/www.alexsikora.com\/news\/wp-content\/uploads\/2013\/10\/map2.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-67 aligncenter\" alt=\"map2\" src=\"http:\/\/www.alexsikora.com\/news\/wp-content\/uploads\/2013\/10\/map2-1024x824.png\" width=\"614\" height=\"494\" srcset=\"http:\/\/alexsikora.com\/news\/wp-content\/uploads\/2013\/10\/map2-1024x824.png 1024w, http:\/\/alexsikora.com\/news\/wp-content\/uploads\/2013\/10\/map2-300x241.png 300w, http:\/\/alexsikora.com\/news\/wp-content\/uploads\/2013\/10\/map2.png 1828w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/a> <a href=\"http:\/\/www.alexsikora.com\/news\/wp-content\/uploads\/2013\/10\/map3.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-68 aligncenter\" alt=\"map3\" src=\"http:\/\/www.alexsikora.com\/news\/wp-content\/uploads\/2013\/10\/map3-1024x824.png\" width=\"614\" height=\"494\" srcset=\"http:\/\/alexsikora.com\/news\/wp-content\/uploads\/2013\/10\/map3-1024x824.png 1024w, http:\/\/alexsikora.com\/news\/wp-content\/uploads\/2013\/10\/map3-300x241.png 300w, http:\/\/alexsikora.com\/news\/wp-content\/uploads\/2013\/10\/map3.png 1828w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>I&#8217;ve also been reading into how Spelunky does their code generation and it&#8217;s pretty interesting. Apparently a simple variety of the Drunken Walk algorithm (or something along those lines). More details <a title=\"here\" href=\"http:\/\/tinysubversions.com\/spelunkyGen\/\" target=\"_blank\">here<\/a> from a guy who ported Spelunky to the web and posted his findings. It&#8217;s great to create a guaranteed procedural path to an exit. It required a little more setup as you need &#8220;rooms&#8221; with exits on different sides (and a decent assortment of them as well) in order to get going, but it looks pretty simple and I might give it a try later!<\/p>\n<p>Next up: Making a player able to walk around and blow up walls! Still deciding on top-down, angle, or side view for this game.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Figured I&#8217;d keep a mini blog going on a project I&#8217;m working on (because it&#8217;s worked so well before) to do a game inspired by Lode Runner: The Legend Returns (later, Lode Runner Online), and reposting it on iDevGames.com. I really liked the no direct-combat style of Lode Runner for planning and running around a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24,28,13],"tags":[],"class_list":["post-65","post","type-post","status-publish","format-standard","hentry","category-game-development","category-games","category-project-update"],"_links":{"self":[{"href":"http:\/\/alexsikora.com\/news\/wp-json\/wp\/v2\/posts\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/alexsikora.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/alexsikora.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/alexsikora.com\/news\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/alexsikora.com\/news\/wp-json\/wp\/v2\/comments?post=65"}],"version-history":[{"count":0,"href":"http:\/\/alexsikora.com\/news\/wp-json\/wp\/v2\/posts\/65\/revisions"}],"wp:attachment":[{"href":"http:\/\/alexsikora.com\/news\/wp-json\/wp\/v2\/media?parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/alexsikora.com\/news\/wp-json\/wp\/v2\/categories?post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/alexsikora.com\/news\/wp-json\/wp\/v2\/tags?post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}