I don't know much about image compression/decompression, so please be clear if possible
I'm using Lily to load some big resources (pre-rendered 3D animations), but my game frequently freezes for a long time and even crashes sometimes while loading them. I found the site https://tinypng.com that compresses images and saves a lot of space, but i'm not sure if it would really improve the loading speed or do the opposite.
Does compressed png takes longer time to load?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- FloatingBanana
- Prole
- Posts: 22
- Joined: Sat Mar 02, 2019 4:57 pm
- Contact:
Does compressed png takes longer time to load?
Code: Select all
if anyMistake(self.english) then
print("Sorry, english is not my first language")
end
Re: Does compressed png takes longer time to load?
It depends. If reading (IO speed) the files is the limit, smaller files will load faster. If CPU power is the limit, less compressed images will be faster to load.
In soviet russia, code debugs you.
Re: Does compressed png takes longer time to load?
"Crash" sounds like very unspecific. Compressiong your PNG further (in the website you linked, it performs lossy compression) doesn't really affect the loading times much, but if you're size constraint then compressing it more may give you benefits.
Profile. Do you encounter crashes in LÖVE Android and wanna send me logcats? Please hit me up in LÖVE Discord and send the full logcat file!
Re: Does compressed png takes longer time to load?
During development I recently moved over to tga as those load a lot faster on my pc. Originally I used tga because I worked/debugged my asset pipeline/tools and, obviously writing pngs is a lot slower than just dumping to uncompressed tgas. Out of curiosity I tried those in the game and the startup time improved a lot. I do lazy asset loading already and the typical dev level I usually work on required about 3-4 seconds to start but with tgas it's probably less than a second. May not sound like a lot but to me one of the huge benefits of using Löve/Lua is extremely fast iteration times so this improved my happiness even more.
Re: Does compressed png takes longer time to load?
Crashes while loading are likely to come from VRAM exhaustion. Further compressing the PNGs will save nothing in that respect, because Löve needs to expand them while loading in order to send them to VRAM.
There is an image format that is compressed even in VRAM. That is DXT. That would help saving VRAM, and probably also reducing load time because no CPU-side decompression is necessary (besides the default zip compression in .love files, which you can avoid by forcing zip to store the images without compression).
There is an image format that is compressed even in VRAM. That is DXT. That would help saving VRAM, and probably also reducing load time because no CPU-side decompression is necessary (besides the default zip compression in .love files, which you can avoid by forcing zip to store the images without compression).
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 65 guests