{"id":336,"date":"2025-12-05T16:40:37","date_gmt":"2025-12-05T16:40:37","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/k_rai\/?p=336"},"modified":"2025-12-05T16:40:37","modified_gmt":"2025-12-05T16:40:37","slug":"snail-chase","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/k_rai\/2025\/12\/05\/snail-chase\/","title":{"rendered":"Snail Chase"},"content":{"rendered":"\n<p>Today I continued my Snail game <\/p>\n\n\n\n<p>I started with the snail moving  but today I started with removing the white background on the snail to what matches with the background<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"397\" height=\"193\" src=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/12\/pygame-5.png\" alt=\"\" class=\"wp-image-337\" srcset=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/12\/pygame-5.png 397w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/12\/pygame-5-300x146.png 300w\" sizes=\"auto, (max-width: 397px) 100vw, 397px\" \/><\/figure>\n\n\n\n<p>I started my game with this problem but I added changes to my code<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"707\" height=\"46\" src=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/12\/pygame-6.png\" alt=\"\" class=\"wp-image-338\" srcset=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/12\/pygame-6.png 707w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/12\/pygame-6-300x20.png 300w\" sizes=\"auto, (max-width: 707px) 100vw, 707px\" \/><\/figure>\n\n\n\n<p>The convert_alpha() helps  remove the slpha values helping to merge the image into the background <\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1080\" style=\"aspect-ratio: 1920 \/ 1080;\" width=\"1920\" controls src=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/12\/2025-12-05-10-25-38.mkv\"><\/video><\/figure>\n\n\n\n<p>this is what it looks like with the snail moving<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"978\" height=\"742\" src=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/12\/pygame-7.png\" alt=\"\" class=\"wp-image-341\" srcset=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/12\/pygame-7.png 978w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/12\/pygame-7-300x228.png 300w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/12\/pygame-7-768x583.png 768w\" sizes=\"auto, (max-width: 978px) 100vw, 978px\" \/><\/figure>\n\n\n\n<p>The highlighted code are responsible for the collisions between the player and the snail  and when they collide it outputs 0 and when they collide it outputs 1 which is helpful for if statements.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"610\" height=\"728\" src=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/12\/pygame-8.png\" alt=\"\" class=\"wp-image-342\" srcset=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/12\/pygame-8.png 610w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/12\/pygame-8-251x300.png 251w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/figure>\n\n\n\n<p>This highlighted code helps with the colors of the title on top of the screen <\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I continued my Snail game I started with the snail moving but today I started with removing the white background on the snail to what matches with the background I started my game with this problem but I added changes to my code The convert_alpha() helps remove the slpha values helping to merge the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":337,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-336","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-free-friday"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/posts\/336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/comments?post=336"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/posts\/336\/revisions"}],"predecessor-version":[{"id":343,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/posts\/336\/revisions\/343"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/media\/337"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/media?parent=336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/categories?post=336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/tags?post=336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}