{"id":784,"date":"2010-11-17T17:11:12","date_gmt":"2010-11-17T23:11:12","guid":{"rendered":"http:\/\/www.philhassey.com\/blog\/?p=784"},"modified":"2010-11-17T17:11:12","modified_gmt":"2010-11-17T23:11:12","slug":"stealth-target-day-36-more-ipad-support","status":"publish","type":"post","link":"https:\/\/www.philhassey.com\/blog\/2010\/11\/17\/stealth-target-day-36-more-ipad-support\/","title":{"rendered":"Stealth Target: Day 36 &#8211; More iPad support"},"content":{"rendered":"<p>So, Nan did a test run of the iPad version of Stealth Target today.  There&#8217;s always a handful of platform issues to deal with in porting!<\/p>\n<p>Like, on the iPad I don&#8217;t need a Quit button!<\/p>\n<p>Or, I need to use some ObjectiveC code to open a web page.  Thanks to OS 4.x I won&#8217;t need to figure out how to embed web browsing in the game due to multi-tasking support.  I haven&#8217;t added that to the game yet, but I&#8217;ll do that before release.  (Which reminds me to add that to my tracker so I don&#8217;t forget!)<\/p>\n<p>As always, I need to modify the interface a bit more for touch.  The mouse and touch interfaces are really quite different, so I always want to make the experience work &#8220;the best&#8221; given the interface being used.<\/p>\n<p>A new challenge for me is adding pinch to grow\/zoom support to the game.  In the desktop version the mouse-wheel controls this.  To implement this for a touch interface, I need to track where the center of all touch events is, so when a motion happens I can see if that motion is going towards or away from the center.  This is a bit tricky, since finding where the center of a multi-touch event keeps changing as motion keeps happening.<\/p>\n<p>I found that technique didn&#8217;t work.  What did work was passing along with the event a distance value between that touch and each other touch.  This way, no matter how many touches are down, a reasonable zoom value will be passed. <\/p>\n<p>-Phil<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, Nan did a test run of the iPad version of Stealth Target today. There&#8217;s always a handful of platform issues to deal with in porting! Like, on the iPad I don&#8217;t need a Quit button! Or, I need to use some ObjectiveC code to open a web page. Thanks to OS 4.x I won&#8217;t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[116],"tags":[],"class_list":["post-784","post","type-post","status-publish","format-standard","hentry","category-dynamite"],"_links":{"self":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/comments?post=784"}],"version-history":[{"count":1,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/784\/revisions"}],"predecessor-version":[{"id":785,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/784\/revisions\/785"}],"wp:attachment":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/media?parent=784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/categories?post=784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/tags?post=784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}