{"id":239,"date":"2025-10-17T14:04:45","date_gmt":"2025-10-17T14:04:45","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/k_rai\/?p=239"},"modified":"2025-12-05T14:29:41","modified_gmt":"2025-12-05T14:29:41","slug":"python-platform","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/k_rai\/2025\/10\/17\/python-platform\/","title":{"rendered":"Python Platform"},"content":{"rendered":"\n<p style=\"border-radius:18px\">Today I tried VS Code platform game from a tutorial<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"428\" height=\"168\" src=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/10\/platform-pic-1.png\" alt=\"\" class=\"wp-image-242\" srcset=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/10\/platform-pic-1.png 428w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/10\/platform-pic-1-300x118.png 300w\" sizes=\"auto, (max-width: 428px) 100vw, 428px\" \/><\/figure>\n\n\n\n<p>I first started with importing  [ pygame and Os ] that helps  so I don&#8217;t have to manually type out the file, images and spritesheet. <\/p>\n\n\n\n<p>The [ pygame.display ] helps to set the caption at the top of the window.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"847\" height=\"309\" src=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/10\/platform-pic-2.png\" alt=\"\" class=\"wp-image-243\" srcset=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/10\/platform-pic-2.png 847w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/10\/platform-pic-2-300x109.png 300w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/10\/platform-pic-2-768x280.png 768w\" sizes=\"auto, (max-width: 847px) 100vw, 847px\" \/><\/figure>\n\n\n\n<p>This code basically sets the how the window is seen like the colors and height.<\/p>\n\n\n\n<p>[ FPS is the frames per second ]         [ PLAYER_VEL code is how fast the player moves on the screen ]<\/p>\n\n\n\n<p>The window [ pygame.display ] helps to put the window on the screen. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"549\" src=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/10\/platformer-pic-3-1024x549.png\" alt=\"\" class=\"wp-image-244\" srcset=\"https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/10\/platformer-pic-3-1024x549.png 1024w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/10\/platformer-pic-3-300x161.png 300w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/10\/platformer-pic-3-768x412.png 768w, https:\/\/theroyalscode.com\/students\/k_rai\/wp-content\/uploads\/2025\/10\/platformer-pic-3.png 1355w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This is the window that appears when finished <\/p>\n\n\n\n<p class=\"has-moderate-font-size\"><strong>[ I lost most of my time trying to work the godot because it was restricted and i choose to do pygame instead ]<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I tried VS Code platform game from a tutorial I first started with importing [ pygame and Os ] that helps so I don&#8217;t have to manually type out the file, images and spritesheet. The [ pygame.display ] helps to set the caption at the top of the window. This code basically sets the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":335,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-239","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\/239","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=239"}],"version-history":[{"count":2,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/posts\/239\/revisions"}],"predecessor-version":[{"id":261,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/posts\/239\/revisions\/261"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/media\/335"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/media?parent=239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/categories?post=239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/k_rai\/wp-json\/wp\/v2\/tags?post=239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}