I am currently using full resolution, 1920x1080 PNG image buttons with most of the pixels being transparent. I am doing this for the simplicity of positioning them. I create and position them in photoshop against the backgrounds, then export. They are like 98% transparent and only 45kb in size. I then use the same image as the focus mask in instances where a hover is not needed. Everything works great.
My question is, over time will this effect performance, and why? I have noticed slow down in some areas and am wondering if it is because of these buttons. They are mostly transparent and so tiny, so I am unsure how it could be them. Thank you.
Full screen imagebuttons and performance.
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.
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.
- Ocelot
- Lemma-Class Veteran
- Posts: 2438
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: Full screen imagebuttons and performance.
Yeah, buttons overlapping like that are killing perfomance.
IIRC even if your image is mostly transparent, it will still take a large amount of cache. If you have more than several screen worth of those images (for full screen image it means just several images), they won't fit in cache. And since your buttons take the whole screen, eac time you do something, like move your mouse, it has to go over all images, potentially loading some from disc and test if that pixel is transparent or not.
IIRC even if your image is mostly transparent, it will still take a large amount of cache. If you have more than several screen worth of those images (for full screen image it means just several images), they won't fit in cache. And since your buttons take the whole screen, eac time you do something, like move your mouse, it has to go over all images, potentially loading some from disc and test if that pixel is transparent or not.
< < insert Rick Cook quote here > >
Re: Full screen imagebuttons and performance.
Thank you for the info!Ocelot wrote: ↑Mon Jul 03, 2023 2:41 pm Yeah, buttons overlapping like that are killing perfomance.
IIRC even if your image is mostly transparent, it will still take a large amount of cache. If you have more than several screen worth of those images (for full screen image it means just several images), they won't fit in cache. And since your buttons take the whole screen, eac time you do something, like move your mouse, it has to go over all images, potentially loading some from disc and test if that pixel is transparent or not.
Who is online
Users browsing this forum: Ahrefs [Bot], giorgi1111, Google [Bot]