{"id":1830,"date":"2019-04-20T17:16:40","date_gmt":"2019-04-20T15:16:40","guid":{"rendered":"https:\/\/pythonprogramming.altervista.org\/?p=1830"},"modified":"2019-04-21T11:01:15","modified_gmt":"2019-04-21T09:01:15","slug":"pythonista-game-on-ipad-part-2","status":"publish","type":"post","link":"https:\/\/pythonprogramming.altervista.org\/pythonista-game-on-ipad-part-2\/","title":{"rendered":"Pythonista Game on Ipad (part 2)"},"content":{"rendered":"<p>In this second part we are going to make\u00a0 our Alien fire a laser. See how in this video.<\/p>\n<p><iframe loading=\"lazy\" title=\"Pythonista Game on Ipad: fire! (Part 6)\" width=\"747\" height=\"560\" src=\"https:\/\/www.youtube.com\/embed\/RzD2m-MxSNk?feature=oembed&amp;enablejsapi=1\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h2>Animate the walk of the alien<\/h2>\n<p>After shooting, we think to how animate the walk of the alien. We are going to use just three images (texture).<\/p>\n<p><iframe loading=\"lazy\" title=\"Pythonista Game on Ipad: The alien walks (part 7)\" width=\"747\" height=\"560\" src=\"https:\/\/www.youtube.com\/embed\/7T-O21ksH-w?feature=oembed&amp;enablejsapi=1\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>In the next video we will see how to make the Alien turn on the left when he walks in that direction.<\/p>\n\t<script>\r\n\t\tvar title = \"Game on Ipad with Pythonista\";\r\n\t\tvar links = [\r\n\t\t\t\/\/ ['final part of the address'],['title']\r\n\t\t\t[\"https:\/\/pythonprogramming.altervista.org\/ipad-and-python-make-a-game\/\",\"The background of the scene\"],\r\n\t\t\t[\"https:\/\/pythonprogramming.altervista.org\/ipad-and-pythonista-make-a-game-2\",\"Draw the sprites\"],\r\n\t\t\t[\"https:\/\/pythonprogramming.altervista.org\/create-a-game-with-an-ipad-and-python-video-1-and-2\/\",\"Pythonista game p-1\"],\r\n\t\t\t[\"https:\/\/pythonprogramming.altervista.org\/pythonista-game-on-ipad-part-2\/\",\"Pythonista game p.2\"],\r\n\t\t\t]\r\n\t\t];\r\n<\/script>\r\n<script>\r\n\t\r\nif (typeof next2 != \"undefined\"){let next2 = 0;}\r\n\t\r\nnext2 = 0;\r\n\thtml = \"\";\/\/<b style='color:coral;font-size:1.2em'>Other posts about \" + title + \"<\/b><br>\";\r\nfor (address of links) \r\n{\r\n\r\n\tif (next2 == 1){\r\n\t\thtml += \"<div style='background:coral'>\";\r\n\t\thtml += \"Next link => <a href='\" + address[0] + \"'>\" + address[1] + \"<\/a>\";\r\n\t\thtml += \"<\/div><br>\";\r\n\t\tnext2 = 0;\r\n\t}\r\n\tif (address[0] == document.URL) {\r\n\t\tnext2 = 1;\r\n\t}\r\n}\r\n\r\nif (typeof next != \"undefined\") {let next = 0;}\r\nif (typeof addressStart != \"undefined\") {let addressStart = \"\";}\r\nnext = 0;\r\naddressStart = \"<a href='\";\r\nfor (address of links) {\r\n\tif (next == 1){\r\n\t\thtml += \">>>\" + addressStart + address[0] + \"'>\" + address[1] + \"<\/a><br>\";\r\n\t\tnext = 0;\r\n\t}\r\n\telse if (addressStart + address[0] != document.URL)\r\n\t{\r\n\t\thtml += addressStart + address[0] + \"'>\" + address[1] + \"<\/a><br>\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\tnext = 1;\r\n\t\tnext_address = address[0]\r\n\t\tnext_title = address[1]\r\n\t\thtml += \"<span style='color:gray'>\" + address[1] + \"<\/span><br>\";\r\n\t}\r\n\r\n}\r\n\r\n\thtml += `<span style=\"font-size:8px\">Powered by <a href=\"https:\/\/pythonprogramming.altervista.org\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2673\" src=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/06\/altervista2.png\" alt=\"\" width=\"70\" height=\"25\" srcset=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/06\/altervista2.png 156w, https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/06\/altervista2-150x56.png 150w\" sizes=\"auto, (max-width: 70px) 100vw, 70px\" \/>pythonprogramming.altervista.org<\/a><\/span>`\r\n\thtml = \"<div style='background:yellow'>\" + html + \"<\/div>\";\r\n\tdocument.write(html)\r\n<\/script>\r\n\r\n\t<h3>External links<\/h3>\r\n\t<a href=\"https:\/\/youtu.be\/kBnt7kiZf1o\">Video about pythonista in classroom<\/a>\r\n\r\n\n","protected":false},"excerpt":{"rendered":"A game with Pythonista on the Ipad, second part. Let&#8217;s fire the laser!\n<a class=\"moretag\" href=\"https:\/\/pythonprogramming.altervista.org\/pythonista-game-on-ipad-part-2\/\"> [...]<\/a>","protected":false},"author":1,"featured_media":1808,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[230],"tags":[137,359,226],"class_list":["post-1830","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pythonista-ipad","tag-game","tag-laser","tag-pythonista"],"avopt_banners_inside_post":true,"avopt_banners_on_page":true,"av_copy_from":"","av_sharing_message":"","av_sharing_allowed":false,"av_sharing_on":{"fb":[],"tw":[]},"av_allow_affiliate_banner":false,"av_allow_affiliate_multi_banner":false,"av_show_affiliation_buy_button":false,"av_post_rating":true,"av_have_post_rating_value":false,"av_is_artificial_intelligence_content":false,"_links":{"self":[{"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/posts\/1830","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/comments?post=1830"}],"version-history":[{"count":4,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/posts\/1830\/revisions"}],"predecessor-version":[{"id":1833,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/posts\/1830\/revisions\/1833"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/media\/1808"}],"wp:attachment":[{"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/media?parent=1830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/categories?post=1830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/tags?post=1830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}