DEV Community

Rachel Ombok
Rachel Ombok

Posted on

How to add Splashscreen and Presplash screen in Renpy

This article is a tutorial explaining how to specify a splashscreen and presplash screen in Renpy. Because this took me almost a whole weekend to figure out I decided to make this post so maybe someone else can save some time doing this :)

What is a splashscreen? (or presplash screen)

From Renpy themselves; “A splashscreen is an image or movie that appears when the game is starting up and before it goes to the menu. Usually these are logos or intro videos.” A presplash screen is an image shown while Ren'py is reading the scripts and launching the game.

A good usage example of this I can think of is in Grand Theft Auto 5. When you open the game from your console, it first opens with the girl in the red bikini taking a selfie. Then after a few seconds, the GTA V logo appears with police lights, and siren and gunshot noises. This is an example of a presplash screen showing key art of the game as a quick intro as it loads, and then the game logo displays before leading the user into the main menu, or directly into the game.

gta 5 bikini girl presplash screen

Adding Spashscreen

  1. Add your splash image to your images folder, or wherever in your project you keep your images
  2. Define your image with appropriate styling. My splash image is a webp file that I transformed to display contained within the window, vertically aligned on the page.
image splash:
   Transform("images/splashscreen.webp", fit='contain', yalign=0.5)
Enter fullscreen mode Exit fullscreen mode
  1. Add a splashscreen label with how you want to display the image. It must be named splashscreen
label splashscreen:
   scene black


   show splash with dissolve
   with Pause(2)


   scene black with dissolve
   with Pause(1)


   return
Enter fullscreen mode Exit fullscreen mode

The splash screen starts with black, then shows the splash image with a dissolve event, holds it there for 2 seconds, then fades back to black and holds for 1 second before going to the main menu.

You can also show movie splash screen with something like;

$ renpy.movie_cutscene('movie.ogv')
Enter fullscreen mode Exit fullscreen mode

Adding Presplash screen

  1. Get your image presplash.png or presplash.jpg and put it in your game folder , ie myGame/game
  2. If you are publishing your game to web, instead put it into your root folder, aka myGame and name it web-presplash.png or web-presplash.jpg
  3. Bonus; config.minimum_presplash_time will specify the minimum time the presplash should be displayed. It is defaulted to 0.0, but you can override this in your game.
define config.minimum_presplash_time = 2.0 #makes presplash display for at least 2 seconds
Enter fullscreen mode Exit fullscreen mode

And there you have it! That is how you set your splash and presplash screen in Renpy.

Top comments (0)