{"id":1880,"date":"2019-04-26T06:55:21","date_gmt":"2019-04-26T04:55:21","guid":{"rendered":"https:\/\/pythonprogramming.altervista.org\/?p=1880"},"modified":"2019-04-26T08:29:19","modified_gmt":"2019-04-26T06:29:19","slug":"pythonista-game-collisions","status":"publish","type":"post","link":"https:\/\/pythonprogramming.altervista.org\/pythonista-game-collisions\/","title":{"rendered":"Pythonista Game: Collisions"},"content":{"rendered":"<h2>Pythonista and collisions<\/h2>\n<p>Today we are going to code the detection of the collitions in the game we are making (part 12). We create a list of the coins that falls and then with Rect we check if this Rect with the position of the player intersects one of the coin.<\/p>\n<p><iframe loading=\"lazy\" title=\"Pythonista game 12 - Collisions!!!\" width=\"747\" height=\"560\" src=\"https:\/\/www.youtube.com\/embed\/diAljhYnGDg?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>Adding a Score to the Screen<\/h2>\n<p>What if we cannot know the score we are making? Here is how to put a label on the screen!<\/p>\n<p><iframe loading=\"lazy\" title=\"Pythonista game 13 - Score on Screen!\" width=\"747\" height=\"560\" src=\"https:\/\/www.youtube.com\/embed\/h7-D150uqJ8?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","protected":false},"excerpt":{"rendered":"Detect the collisions in the game made with Pythonista for Ipad among players and coins falling from the sky.\n<a class=\"moretag\" href=\"https:\/\/pythonprogramming.altervista.org\/pythonista-game-collisions\/\"> [...]<\/a>","protected":false},"author":1,"featured_media":1881,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[154,363,230],"tags":[124,364,137,225,4,226],"class_list":["post-1880","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-games","category-pythonista-game","category-pythonista-ipad","tag-app","tag-collisions","tag-game","tag-ipad","tag-python","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\/1880","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=1880"}],"version-history":[{"count":2,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/posts\/1880\/revisions"}],"predecessor-version":[{"id":1885,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/posts\/1880\/revisions\/1885"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/media\/1881"}],"wp:attachment":[{"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/media?parent=1880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/categories?post=1880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/tags?post=1880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}