Ren'Py animated web presplash

Home Edit


This post goes over how to create an animated presplash image for your Ren’Py web game.

Background

When building Ren’Py for the web, it uses a default web-presplash.jpg image:

Web Presplash

But you can replace that image with web-presplash.webp, which is an animated image format:

WebP

WebP

If you have a GIF or video, you can convert the file to WebP using FFmpeg:

ffmpeg -i input.gif -c:v libwebp -lossless 0 -compression_level 6 -q:v 75 -loop 0 -an web-presplash.webp

Replace input.gif.

Set the options to resize the dimensions:

-vf scale=WIDTH:HEIGHT

Replace WIDTH and HEIGHT.

Alternatively, you can use a free online converter if you don’t want to use FFmpeg.

Build

After building for the web using the Ren’Py launcher, change to the web directory:

cd my-renpy-game-web/

Copy web-presplash.webp to the web directory and replace web-presplash.jpg in all files:

rm web-presplash.jpg
grep -lr web-presplash.jpg | xargs sed -i 's/web-presplash.jpg/web-presplash.webp/g'

Start a server to verify that the animated image is working:

python3 -m http.server
open http://localhost:8000