Which method is more efficient?

For questions about using Classic.

Post » Tue Jun 08, 2010 12:37 am

Let's say that I want an area of 128x128 to be a solid color. Would it be more efficient to:

Make a sprite 128x128 (white, then I would change the overlay of each instance as needed)
OR
Make a 2x2 (Basically a small image) as a "Tiled Background" and stretch it out to 128x128?
OR
Make a 2x2 "Sprite" and stretch it out?

Which solution gives the best performance- saving VRAM without sacrificing rendering speed, etc...?

Just curious.
B
2
G
4
Posts: 13
Reputation: 1,076

Post » Tue Jun 08, 2010 9:52 am

A 2x2 sprite stretched out is probably the best way. It'll use less video memory (VRAM) than a 128x128 texture, and in some cases Tiled Background may render itself by effectively drawing a grid of sprites (it only does this with non-power-of-two sized textures - but best play it safe, stretching is probably easier than tiling for the graphics card anyway).
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,564

Post » Tue Jun 08, 2010 3:45 pm

All right, thanks for clearing that up.
B
2
G
4
Posts: 13
Reputation: 1,076


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests