{"id":59,"date":"2026-05-08T15:39:50","date_gmt":"2026-05-08T15:39:50","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/e_henderson\/?p=59"},"modified":"2026-05-08T15:39:50","modified_gmt":"2026-05-08T15:39:50","slug":"free-friday-5-8","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/e_henderson\/2026\/05\/08\/free-friday-5-8\/","title":{"rendered":"free-friday 5\/8"},"content":{"rendered":"\n<p>So sadly, i was stuck de-bugging the game almost the entire time, trying to fix my game&#8217;s errors, and the power system(which still DOESN&#8217;T work.)<br><br><br>With the help of my teacher (Mr.Wilmoth), He helped me update my Main.py, so it can pass anything in the game instead of me having to go in each file and pass it myself.<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nclass Game:\n    def __init__(self):\n        pygame.init()\n        self.screen = pygame.display.set_mode((800, 800))\n        pygame.display.set_caption(\"Five Nights In Atlanta\")\n\n        self.clock = pygame.time.Clock()\n        self.running = True\n\n        # Start with the title screen\n        self.manager = SceneManager(TitleScreen())\n        \n\n    def run(self):\n        while self.running:\n            dt = self.clock.tick(60)\n\n            events = pygame.event.get()\n            for e in events:\n                if e.type == pygame.QUIT:\n                    self.running = False\n\n            # Scene logic\n            self.manager.handle_events(events)\n            self.manager.update(dt)\n            self.manager.draw(self.screen)\n\n            pygame.display.flip()\n\n        pygame.quit()\n\n<\/code><\/pre>\n\n\n\n<p><br><br>Second, I fixed an error that wouldn&#8217;t like the camera&#8217;s switch, updated this<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    def update(self, dt):\n        new_scene = self.current_scene.update(dt)\n        if new_scene:\n            self.current_scene = new_scene<\/code><\/pre>\n\n\n\n<p><br><br>And lastly, I added a placeholder Animatronic.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import pygame\nimport random\n\nclass Animatronic:\n    def __init__(self):\n        self.room = 0\n        self.move_timer = 0\n        self.move_interval = 2000  # ms\n\n    def update(self, dt):\n        self.move_timer += dt\n        if self.move_timer >= self.move_interval:\n            self.move_timer = 0\n            if random.random() &lt; 0.5:\n                self.room = min(self.room + 1, 5)\n<\/code><\/pre>\n\n\n\n<p><br><br>I know I didn&#8217;t get to do much, but figuring this stuff out without A.I is difficult, hopefully next week, i can get the power to display on the screen, and I can add my first enemy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So sadly, i was stuck de-bugging the game almost the entire time, trying to fix my game&#8217;s errors, and the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-59","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/posts\/59","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/comments?post=59"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/posts\/59\/revisions"}],"predecessor-version":[{"id":60,"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/posts\/59\/revisions\/60"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/media?parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/categories?post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/e_henderson\/wp-json\/wp\/v2\/tags?post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}