{"id":88,"date":"2025-11-21T16:30:55","date_gmt":"2025-11-21T16:30:55","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/a_ploss\/?p=88"},"modified":"2025-11-21T16:30:55","modified_gmt":"2025-11-21T16:30:55","slug":"11-21-25-free-friday","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/a_ploss\/2025\/11\/21\/11-21-25-free-friday\/","title":{"rendered":"11-21-25 free Friday"},"content":{"rendered":"\n<p>today i worked on the dodging game i finished the code but i just wanna make sure there&#8217;s lil to no errors(better safe than sorry) soo here&#8217;s the video i used and some screenshots of the code and some code snippets<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"689\" height=\"470\" src=\"https:\/\/theroyalscode.com\/students\/a_ploss\/wp-content\/uploads\/2025\/11\/image-1.png\" alt=\"\" class=\"wp-image-89\" style=\"width:537px;height:auto\" srcset=\"https:\/\/theroyalscode.com\/students\/a_ploss\/wp-content\/uploads\/2025\/11\/image-1.png 689w, https:\/\/theroyalscode.com\/students\/a_ploss\/wp-content\/uploads\/2025\/11\/image-1-300x205.png 300w\" sizes=\"auto, (max-width: 689px) 100vw, 689px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code> while run:\n        star_count += clock.tick(60)\n        elapsed_time = time.time() - start_time\n\n        if star_count > star_add_increment:\n            for i in range(5):\n                star_x = random.randint(0, WIDTH - STAR_WIDTH)\n                star = pygame.Rect(star_x, - STAR_HIEGHT, STAR_WIDTH, STAR_HIEGHT)\n                stars.append(star)\n\n            star_add_increment = max(200, star_add_increment - 50)    \n            star_count = 0<\/code><\/pre>\n\n\n\n<p>so this piece of the code will have the game run and add the stars(obstacles) so that the player can dodge it and it&#8217;ll also have the timer count and have the stars come out by random and more as the game continues and somewhat faster as more stars appear here is a link to the video i used<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"How to Make a Game in Python\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/waY3LfJhQLY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>today i worked on the dodging game i finished the code but i just wanna make sure there&#8217;s lil to no errors(better safe than sorry) soo here&#8217;s the video i used and some screenshots of the code and some code snippets so this piece of the code will have the game run and add the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-88","post","type-post","status-publish","format-standard","hentry","category-free-friday"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/a_ploss\/wp-json\/wp\/v2\/posts\/88","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/a_ploss\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/a_ploss\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/a_ploss\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/a_ploss\/wp-json\/wp\/v2\/comments?post=88"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/a_ploss\/wp-json\/wp\/v2\/posts\/88\/revisions"}],"predecessor-version":[{"id":90,"href":"https:\/\/theroyalscode.com\/students\/a_ploss\/wp-json\/wp\/v2\/posts\/88\/revisions\/90"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/a_ploss\/wp-json\/wp\/v2\/media?parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/a_ploss\/wp-json\/wp\/v2\/categories?post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/a_ploss\/wp-json\/wp\/v2\/tags?post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}