How to avoid Renpy web pixelation?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Chains
Newbie
Posts: 11
Joined: Mon Dec 13, 2021 4:01 pm

How to avoid Renpy web pixelation?

#1 Post by Chains »

I don't know if this has been asked before, I couldn't find anything about it.

My Renpy web game displays images as pixelated (like with a mosaic filter) when they are shown for the first time. It takes about 1 second before the pixelation is gone. I tried resizing the image files since I assumed they are too large for a web build but even small GUI imagebuttons are loaded this way, no matter how much I resize them. I have tried converting all images to webp files but this also didn't change anything.

My game has a 1920 x 1080 resolution and the GUI folder is 1.2MB. Individual character sprites are about 300KB. I don't have this issue when I am playing other people's Renpy web games, so I don't think my device is the issue.

Any ideas how to fix this?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: How to avoid Renpy web pixelation?

#2 Post by PyTom »

This happens when an image is shown, but hasn't been downloaded yet. There are a couple of ways you can fix this:

* You can include the images in the zip file, by not declaring them in progressive_download.txt
* You can make sure Ren'Py can predict the images. That's complex, but this article covers it - it works the same way on web and the rest of Ren'Py.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Chains
Newbie
Posts: 11
Joined: Mon Dec 13, 2021 4:01 pm

Re: How to avoid Renpy web pixelation?

#3 Post by Chains »

PyTom wrote: Thu Mar 17, 2022 8:14 pm This happens when an image is shown, but hasn't been downloaded yet. There are a couple of ways you can fix this:

* You can include the images in the zip file, by not declaring them in progressive_download.txt
* You can make sure Ren'Py can predict the images. That's complex, but this article covers it - it works the same way on web and the rest of Ren'Py.
Thank you for the fast help, PyTom! I included the images in the zip file and it works perfectly now. But I'll also look into the article to avoid these issues in the future.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot]