def __init__(self, preferred_backbuffer_size=(-1, -1), window_name="Ragnarok Game", icon_path=None):
        global world
        """
        Prepares the Ragnarok library for use.
        preferred_back_size attempts to set the resolution of the window to the specified size. 
        (-1, -1) attempts native resolution.
        window_name is the text that displays on the top-left of the pygame window.
        """

        print('Booting Ragnarok', __version__)

        if icon_path:
            pygame.display.set_icon(pygame.image.load(icon_path))

        pygame.init()

        self.__is_running = True

        # The number of times our engine should update per second.
        self.preferred_fps = 60

        # Create a clock to manage our update frequency
        self.__clock = pygame.time.Clock()

        # Init our world
        world = World()
        if preferred_backbuffer_size == Vector2(-1, -1):
            world.set_display_at_native_res()
        else:
            world.set_backbuffer(preferred_backbuffer_size)

        pygame.display.set_caption(window_name)

        # Used to print the fps of the game onto the console window.
        self.fpsTimer = 0.0

        # Should Ragnarok print the number of frames the game is running at?
        self.print_frames = False

        # The number of milliseconds between printing out the frame rate
        self.print_fps_frequency = 1000

        # Used to tell Ragnarok how to handle certain events.
        # Once set, it must be explicitely unset
        # Flag 0 means to skip updating
        # Flag 1 means to skip drawing
        # Flag 2 means to discard timing values
        self.event_flags = []
def __init__ ( self , preferred_backbuffer_size = ( - 1 , - 1 ) , window_name = "Ragnarok Game" , icon_path = None ) : global world print ( 'Booting Ragnarok' , __version__ ) if icon_path : pygame . display . set_icon ( pygame . image . load ( icon_path ) ) pygame . init ( ) self . __is_running = True self . preferred_fps = 60 self . __clock = pygame . time . Clock ( ) world = World ( ) if preferred_backbuffer_size == Vector2 ( - 1 , - 1 ) : world . set_display_at_native_res ( ) else : world . set_backbuffer ( preferred_backbuffer_size ) pygame . display . set_caption ( window_name ) self . fpsTimer = 0.0 self . print_frames = False self . print_fps_frequency = 1000 self . event_flags = [ ]
Prepares the Ragnarok library for use.
        preferred_back_size attempts to set the resolution of the window to the specified size. 
        (-1, -1) attempts native resolution.
        window_name is the text that displays on the top-left of the pygame window.