Skip to content

Customizing the Pipeline

tobspr edited this page Apr 23, 2016 · 3 revisions

While developing your game, you might want to customize the render pipeline to better fit your game.

Customizing the loading screen

By default, the render pipeline comes with its own loading screen image. If you want to customize the loading screen using your own image, you can call self.render_pipeline.set_loading_screen_image("my_image.png"). The image should be in the format 16:9, and have a high resolution, for example 2560 x 1440, to ensure it is not blurred out.

If you want to customize the loading screen further, you will have to write your own loading screen class. A minimal loading screen class has to at least provide the create() and remove() methods:

class MyLoadingScreen(object):

    def __init__(self, pipeline):
        self.pipeline = pipeline

    def create(self):
        """ Create some fancy loading screen gui or so here """

    def remove(self):
        """" Remove the loading screen gui here, and cleanup everything """

Notice: You should call Globals.base.graphicsEngine.render_frame() twice or so after creating gui elements in the create() method, since otherwise no frames are rendered, and your changes will not be visible.