What is graphic format better to use?

New releases and general discussions.

Post » Wed Jul 01, 2009 7:40 pm

Hi!

If I use a large number of sprites in the application, it slows down (FPS decreases). Tell me, please, what graphic format is better to use to optimize the speed of application? Which is faster?
Must it be compressed? Or is it better to use uncompressed format?
What is best to use if I don't need an alpha channel? Or if on the contrary, it is necessary?
My priority is the speed of the game, rather than the final size of application, so I'd like to know, what is the format processed more faster?
B
3
S
2
G
3
Posts: 146
Reputation: 1,567

Post » Wed Jul 01, 2009 7:50 pm

Doesn't really matter, everything is converted to png.
All you can really do is make smaller images, and reuse what you can.
Image Image
B
161
S
48
G
90
Posts: 7,350
Reputation: 66,755

Post » Wed Jul 01, 2009 8:51 pm

So, JPEG, BMP and PNG are processed for the same time?
I.e. the application with 1000 jpeg files or 1000 bmp files or 1000 png files(probably with alpha channel) will have the same FPS?
B
3
S
2
G
3
Posts: 146
Reputation: 1,567

Post » Wed Jul 01, 2009 9:14 pm

yes, whenever you load an image into construct it's automatically converted to a png with alpha. Changing your graphics to another format does nothing once they are imported into construct.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Wed Jul 01, 2009 9:59 pm

Construct converts everything you import to lossless 32-bit PNG files, which doesn't affect the quality. When you run the game, DirectX loads the PNG files effectively as uncompressed BMP files, because textures cannot be compressed in VRAM. So the source file format affects neither the .cap file size nor the runtime speed or VRAM usage.

How many sprites are you talking about? 100? 10,000? You could also check out the optimisation tips article.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,574

Post » Sat Jul 04, 2009 2:52 pm

Also it's faster to use power-of-two sizes. Most old hardware can't support odd texture resolutions, causing them to painfully resample the texture itself on load (and look blurry while adding some load time).
B
3
S
1
G
3
Posts: 48
Reputation: 1,121

Post » Mon Jul 06, 2009 5:17 pm

Graphics cards don't resample images that aren't power of two. They just create a texture in VRAM of the next biggest power of two size and copy it into it. Shouldn't be any slowdown.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Thu Jul 16, 2009 9:40 am

[quote="Ashley":2gjsbmqw]When you run the game, DirectX loads the PNG files effectively as uncompressed BMP files, because textures cannot be compressed in VRAM. So the source file format affects neither the .cap file size nor the runtime speed or VRAM usage.[/quote:2gjsbmqw]
I'm sorry for being a little late here, but you can use DDS textures for compressed textures, as they remain compressed even in the VRAM with no cost in perfomance whatsoever. The graphics card have built-in support for them since 2004, and seeing how rapidly the perfomance is consumed, perhaps it would be a good idea to look at it...
B
1
G
5
Posts: 8
Reputation: 1,241

Post » Thu Jul 16, 2009 12:19 pm

Damizean

Wow! Thank you so much! :D

One question. Does ATI Radeon support this DDS format? Because as I understand it's NVIDIA own format...
B
3
S
2
G
3
Posts: 146
Reputation: 1,567

Post » Thu Jul 16, 2009 12:50 pm

[quote="Mary Jane":2tu9d7rj]Damizean

Wow! Thank you so much! :D

One question. Does ATI Radeon support this DDS format? Because as I understand it's NVIDIA own format...[/quote:2tu9d7rj]
It has been included in the DirectX specifications since DX6.0, it should be supported by any graphics card compliants with the specifications. Anyway, I'm talking about the possibility of using them in the future, it's not implemented as of yet.
B
1
G
5
Posts: 8
Reputation: 1,241

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests