{"id":246,"date":"2009-12-23T19:00:46","date_gmt":"2009-12-24T01:00:46","guid":{"rendered":"http:\/\/www.philhassey.com\/blog\/?p=246"},"modified":"2009-12-23T19:02:41","modified_gmt":"2009-12-24T01:02:41","slug":"elephants-is-free-on-the-app-store","status":"publish","type":"post","link":"https:\/\/www.philhassey.com\/blog\/2009\/12\/23\/elephants-is-free-on-the-app-store\/","title":{"rendered":"Elephants! is free on the App Store!"},"content":{"rendered":"<p><a href=\"http:\/\/itunes.apple.com\/us\/app\/elephants\/id347134354?mt=8\"><img decoding=\"async\" src=\"http:\/\/www.galcon.com\/games\/elephant\/imgs\/160-icon.png\" alt=\"\" align=\"right\" \/><\/a><\/p>\n<p>My gift to you: A totally FREE iPhone game!  I made this game several years ago with some other <a href=\"http:\/\/www.drpetter.se\/\">way-cool<\/a> game-dev friends.  In &#8220;Elephants!&#8221; you save the giraffes while jumping on a rolled up squirrel!  More fun than a barrel of pigeons!  For Christmas this year I figured I&#8217;d port it over to the iPhone for you \ud83d\ude42  <a href=\"http:\/\/itunes.apple.com\/us\/app\/elephants\/id347134354?mt=8\">Check it out!<\/a><\/p>\n<p>From the dev side, yeah, this is my first attempt at &#8220;python&#8221; on the iPhone.  Even though it&#8217;s actually restricted tinypy code.  Here&#8217;s a sample of game code so you get the idea of what&#8217;s behind this game.  All this code is converted by tinypy into C++ code so I can compile it with Xcode for the iPhone:<\/p>\n<pre>\r\ndef elephant_new(g:Level,pos:List(int))->Sprite:\r\n    s = Sprite('elephant',pygame.Rect(43-14,8,28,48))\r\n    s.rect.set_centerx(pos[0])\r\n    s.rect.set_bottom(pos[1])\r\n    \r\n    g.sprites.append(s)\r\n    \r\n    s.ball = ball_new(g,(int(s.rect.get_centerx()),int(s.rect.get_bottom())))\r\n    s.suit = ElephantSuit()\r\n    s.vy = 0\r\n    s.vx = 0\r\n    s.jump = 0 \r\n    s.facing = 'e'\r\n    s.score = 0\r\n    s.z = 1\r\n    s.state = 'live'\r\n    s.name = 'elephant'\r\n    \r\n    return s\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>My gift to you: A totally FREE iPhone game! I made this game several years ago with some other way-cool game-dev friends. In &#8220;Elephants!&#8221; you save the giraffes while jumping on a rolled up squirrel! More fun than a barrel of pigeons! For Christmas this year I figured I&#8217;d port it over to the iPhone [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,66,2],"tags":[],"class_list":["post-246","post","type-post","status-publish","format-standard","hentry","category-gamedev","category-iphone","category-python"],"_links":{"self":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/246","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=246"}],"version-history":[{"count":3,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/246\/revisions"}],"predecessor-version":[{"id":248,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/posts\/246\/revisions\/248"}],"wp:attachment":[{"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/media?parent=246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/categories?post=246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.philhassey.com\/blog\/wp-json\/wp\/v2\/tags?post=246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}