(Feature request)Make .tiff importable

Started by FanOfHumor, Mon 18/04/2022 02:35:42

Previous topic - Next topic

FanOfHumor

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?

Crimson Wizard

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.

Snarky

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?

FanOfHumor

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.

eri0o

#4
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 )

Crimson Wizard

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.

FanOfHumor


FanOfHumor

Do the room backgrounds use the original file type or something else?

Crimson Wizard

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).

Crimson Wizard

The import file filter has been updated in 3.6.0.

SMF spam blocked by CleanTalk