Adventure Game Studio

AGS Development => Editor Development => Topic started by: FanOfHumor on Mon 18/04/2022 02:35:42

Title: (Feature request)Make .tiff importable
Post by: FanOfHumor on Mon 18/04/2022 02:35:42
I just started using .tiff images recently because tiff is 2x faster loading than png.When I import it I have to rename it as just .tif.This is troublesome since converters to tif aren't as common as tiff converters.Could support be added for tiff please?
Title: Re: (Feature request)Make .tiff importable
Post by: Crimson Wizard on Mon 18/04/2022 02:58:09
As far as I know, TIF and TIFF is just the same thing, so it's a matter of adding new extension to a file filter.
Title: Re: (Feature request)Make .tiff importable
Post by: Snarky on Mon 18/04/2022 07:25:30
Quote from: Pajama Sam on Mon 18/04/2022 02:35:42
I just started using .tiff images recently because tiff is 2x faster loading than png.

You do realize that once you have imported it into AGS, this will not make any difference, since AGS stores sprites in its own internal format regardless of the format of the original files?
Title: Re: (Feature request)Make .tiff importable
Post by: FanOfHumor on Mon 18/04/2022 16:27:41
QuoteYou do realize that once you have imported it into AGS, this will not make any difference, since AGS stores sprites in its own internal format regardless of the format of the original files?
No,I didn't realize that.But why is it faster loading in a game with imported tiff files?I know it's changed to sprites but why is it faster even though its changed? Could it be because of a different way of displaying colors?I've gone through a few tests in my game and it seems much faster with imported tiff files. ???

QuoteAs far as I know, TIF and TIFF is just the same thing, so it's a matter of adding new extension to a file filter.
That's what I figured.
Title: Re: (Feature request)Make .tiff importable
Post by: eri0o on Mon 18/04/2022 16:38:41
It's not faster in the engine, both will be converted to the same format.

One thing that can happen is the OS may allocate the main game process to a core that is doing something else, so the game performance will be lowered. Other than this not much else could vary the performance - perhaps if you have both a SSD and a HDD, and you place the game in the HDD, it will load slower from disk.

Once AGS loads the sprite to RAM it won't load it again from disk, unless it has been pushed out from the sprite cache because of other thing that is occupying the sprite cache memory.

How are you measuring the difference between in the time the sprites are loaded? Or are you talking about room backgrounds?

Ah, and there are ways to preload the sprite so when they are used at runtime the engine can then get it directly from RAM, although there are no current specific script API for this, I think it could be worked around in some ways.

(This thread talks a bit about preloading, but there are only workaround, there's no specific API for it today: https://www.adventuregamestudio.co.uk/forums/index.php?topic=53247.0 )
Title: Re: (Feature request)Make .tiff importable
Post by: Crimson Wizard on Mon 18/04/2022 16:52:41
Quote from: Pajama Sam on Mon 18/04/2022 16:27:41
But why is it faster loading in a game with imported tiff files?I know it's changed to sprites but why is it faster even though its changed? Could it be because of a different way of displaying colors?I've gone through a few tests in my game and it seems much faster with imported tiff files. ???

We won't be able to answer this question without knowing full details about your game resolution and color depth, and measurements of sprites and parameters of the sprite import.

But, as eri0o mentioned, there may be various factors why the game may work faster or slower, so it all depends on how do you measure the perfomance.
Title: Re: (Feature request)Make .tiff importable
Post by: FanOfHumor on Mon 18/04/2022 17:11:10
Ok...Thanks for the info.
Title: Re: (Feature request)Make .tiff importable
Post by: FanOfHumor on Wed 20/04/2022 01:03:47
Do the room backgrounds use the original file type or something else?
Title: Re: (Feature request)Make .tiff importable
Post by: Crimson Wizard on Wed 20/04/2022 01:08:16
Quote from: Pajama Sam on Wed 20/04/2022 01:03:47
Do the room backgrounds use the original file type or something else?

No, they are also converted to AGS internal format (it's a LZW compressed bitmap now).
Title: Re: (Feature request)Make .tiff importable
Post by: Crimson Wizard on Wed 24/01/2024 05:13:25
The import file filter has been updated in 3.6.0.