{"id":580,"date":"2013-09-18T15:55:58","date_gmt":"2013-09-18T20:55:58","guid":{"rendered":"http:\/\/www.juggleware.com\/blog\/?p=580"},"modified":"2013-09-18T15:55:58","modified_gmt":"2013-09-18T20:55:58","slug":"squadronsk","status":"publish","type":"post","link":"https:\/\/www.juggleware.com\/blog\/2013\/09\/squadronsk\/","title":{"rendered":"First Peek: &#8220;Squadron Leader&#8221; for iOS7"},"content":{"rendered":"<p>Now that iOS7 has been released, I can show you what I&#8217;ve been up to the last couple of weeks.<\/p>\n<p>It&#8217;s a space shooter I first started working on last year after releasing version 1.2 of Sol: Sun Clock. I basically wrote it the hard way, not using any of the 2-D platforms like Cocos2D, thinking that my code would suit my needs better without the bulk. Plus, I wanted to simulate the glow of old vector arcade games, like Tempest, Asteroids, or Star Wars.<\/p>\n<p>I was pretty proud of the code, which for the technically-inclined used Quartz 2D drawing in Objective C, with lots of transforms, way easier than straight up OpenGL, but as it turns out, way too slow. I was getting 15FPS until planets started moving onscreen, and it plummeted to a measly 7FPS. I set the project aside and went to work on Sol: Sun Clock 2.0, while researching other 2D engines for this and Conqueror.<\/p>\n<p>This past June Apple announced Sprite Kit for iOS7, and I knew this was the natural fit for this game. I rewrote the code from scratch (well actually, using Apple sample code as a template), and am getting 30-60FPS easily, even with each star being its own sprite, which is something I&#8217;d normally never do, but hey, I&#8217;ve got the overhead so why not?<\/p>\n<p>Some of the crappiness of this video is my attempt at vector hardware emulation, but most of it is the YouTube encoding, so lower your expectations.<\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/gUXa4AJa68g?rel=0\" height=\"480\" width=\"640\" allowfullscreen=\"\" frameborder=\"0\"><\/iframe><\/p>\n<p>Disclaimer: programmer graphics! Trekkies relax: I doubt that NCC-1701 will be your ship in the final game.<\/p>\n<p>I have a title screen, basic flight paths and missiles (not shown). Amusingly, you can see the aliens leech onto the player like parasites&#8230; this is the result of them trying to execute their flight paths, but getting stuck on SpriteKit&#8217;s physics collision engine. Of course in the real game, you will die&#8230; unless I make Space Leeches!<\/p>\n<p>Hmm, maybe that will be the game&#8217;s title&#8230;.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First alpha demo of new iOS game &#8212; Of course in the real game, you will die&#8230; unless I make Space Leeches! <a href=\"https:\/\/www.juggleware.com\/blog\/2013\/09\/squadronsk\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,3,107],"tags":[110,115,112,113,71,109,108],"class_list":["post-580","post","type-post","status-publish","format-standard","hentry","category-games","category-iphone","category-vector-z","tag-arcade-games","tag-games","tag-iphone","tag-iphone-dev","tag-objective-c","tag-quartz2d","tag-spritekit"],"_links":{"self":[{"href":"https:\/\/www.juggleware.com\/blog\/wp-json\/wp\/v2\/posts\/580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.juggleware.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.juggleware.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.juggleware.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.juggleware.com\/blog\/wp-json\/wp\/v2\/comments?post=580"}],"version-history":[{"count":1,"href":"https:\/\/www.juggleware.com\/blog\/wp-json\/wp\/v2\/posts\/580\/revisions"}],"predecessor-version":[{"id":581,"href":"https:\/\/www.juggleware.com\/blog\/wp-json\/wp\/v2\/posts\/580\/revisions\/581"}],"wp:attachment":[{"href":"https:\/\/www.juggleware.com\/blog\/wp-json\/wp\/v2\/media?parent=580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.juggleware.com\/blog\/wp-json\/wp\/v2\/categories?post=580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.juggleware.com\/blog\/wp-json\/wp\/v2\/tags?post=580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}