-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Check your GameScreen draw_screen and draw_unchanging methods that they are not calling pygame.display.flip() or pygame.display.update(). Note that in any of your drawing code, you are not supposed to call pygame.display.flip() or pygame.display.update().
Make sure that all rendering in your game happens within your GameScreen's draw_screen and draw_unchanging methods and nowhere else.
Make sure that you instantiated the super class of all the framework components. Specifically, GameLoopEvents must be instantiated (via super calls) and that its loop_events method must be called. However, as it stands, there should be no reason to override loop_events.
Check that the config passed to your game does not declare a window size of (0, 0) (note that this defaults to (0, 0) in case no value is supplied). See also https://github.com/skytreader/PyGame-Objects/issues/32.
Make sure to add your components to the ui_elements set of GameScreen after creating them. That is, self.ui_elements.add(CommonUIComponent) in the setup method.
To use debug mode, use a GameConfig with the debug_mode config val set to True. To display the debug logs within the game, use self.debug_queue.log in your GameLoopEvents class.
You can specify the log level via a second parameter level. This works in the same way as in Python's native logging library.