{"id":128,"date":"2008-06-19T20:06:24","date_gmt":"2008-06-20T02:06:24","guid":{"rendered":"http:\/\/www.philhassey.com\/blog\/?p=128"},"modified":"2008-06-19T20:06:24","modified_gmt":"2008-06-20T02:06:24","slug":"igalcon-real-men-use-multi-touch-rah","status":"publish","type":"post","link":"https:\/\/www.philhassey.com\/blog\/2008\/06\/19\/igalcon-real-men-use-multi-touch-rah\/","title":{"rendered":"iGalcon &#8211; real men use Multi-Touch!  Rah!"},"content":{"rendered":"<p>The ever slightly changing screenshot &#8211; demonstrating multi-touch (I&#8217;m selecting the two green planets, and I&#8217;m about to send a fleet to the red planet):<\/p>\n<p><a href=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2008\/06\/igalcon6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-129\" title=\"igalcon6\" src=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2008\/06\/igalcon6.png\" alt=\"\" width=\"320\" height=\"480\" srcset=\"https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2008\/06\/igalcon6.png 320w, https:\/\/www.philhassey.com\/blog\/wp-content\/uploads\/2008\/06\/igalcon6-200x300.png 200w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a><\/p>\n<p>I also optimized the OpenGL code quite a bit, so it&#8217;s all fast .. except for the fonts, which I can still do a bit of work on yet.\u00a0 But it goes full speed with any number of ships and explosion particles on screen now \ud83d\ude42<\/p>\n<p>I also implemented multi-touch support in the game, which was a bit of a challenge.\u00a0 See, usually when I make games, I&#8217;m only thinking about a single mouse pointer or whatever.\u00a0 So, err, imagine now that you&#8217;ve got unlimited mouse pointers trying to play Galcon together at the same time.\u00a0 And then imagine that you&#8217;ve got no sure way of knowing what clicks are coming from which mouse.\u00a0 (The iphone docs are sketchy on this point, they say that the UITouch object will remain the same throughout the life of a touch, but then go on to say that you better not save a pointer to it.)\u00a0 I might have misunderstood something entirely about that bit, but whatever.<\/p>\n<p>As it turns out, it was easier to deal with MT if I just handled the events as they came and didn&#8217;t try to keep track of what touch was connected to which finger.\u00a0 After a lot of messing about, and fixing a bunch of bugs in my own code, I&#8217;m now able to handle multi-touch events!\u00a0 Yay!<\/p>\n<p>Anyway, for those of you with exceptionally small fingers, Galcon now supports game play for people with up to 32 fingers!\u00a0 As for me, I&#8217;m doing pretty good if I can coordinate two or three at once.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The ever slightly changing screenshot &#8211; demonstrating multi-touch (I&#8217;m selecting the two green planets, and I&#8217;m about to send a fleet to the red planet): I also optimized the OpenGL code quite a bit, so it&#8217;s all fast .. except for the fonts, which I can still do a bit of work on yet.\u00a0 But [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,66],"tags":[68],"class_list":["post-128","post","type-post","status-publish","format-standard","hentry","category-galcon","category-iphone","tag-multi-touch"],"_links":{"self":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/128","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=128"}],"version-history":[{"count":0,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/128\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/media?parent=128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/categories?post=128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/tags?post=128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}