Very strange behavior with tiles and fps (Ashley, David)

For questions about using Classic.

Post » Sat Feb 27, 2010 3:12 pm

Ok, so I was making an example of why you shouldn't use huge none pow2 textures. When I noticed the following.

The examples have unlimited frame-rate mode on intentionally.

First example:
2000x2000 png on a tiled background (or sprite for this first example, it makes no difference as it looks the same) at 2000x2000 size.


Notice the frame rate. The VRAM can be ignored as it's obviously going to be 16mb

Second example:
16x16 tile png on a tiled background (tiled background only this time obviously) at 2000x2000 size.


Notice the frame rate. The VRAM can be ignored as it's obviously going to be 0mb for a single 16x16 tile.

Third example:
128x128 tile png on a tiled background (again, tiled background only) at 2000x2000 size.


Notice the frame rate AND notice how it's not tiling correctly. Bare in mind both 16x16 and 128x128 are pow2 sizes.

But most importantly is the HUGE drop in frame rate when doing it correctly, yet next to no difference when doing it wrong. Now I can understand tiling a 16x16 image would use some resources. But effecting the frame rate this much?

Also copy/pasting (not cloning) the 16x16 tiled background doubles the fps loss each time. (As does cloning but that's more likely to be expected).

This has been tested by others in chat and it's happening to them too.

Version 0.9.83
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Sat Feb 27, 2010 4:02 pm

Why is this strange?
Its still going to draw each texture each frame, you've just varied the size. So instead of drawing one texture, your drawing 70 each frame.
Image Image
B
161
S
48
G
90
Posts: 7,352
Reputation: 66,759

Post » Sat Feb 27, 2010 4:11 pm

[quote="newt":1d8m52r6]Why is this strange?
Its still going to draw each texture each frame, you've just varied the size. So instead of drawing one texture, your drawing 70 each frame.[/quote:1d8m52r6]

It's strange because a none pow2 texture, at the horribly large size of 2000x2000 has utterly NO effect on frame rates.

While a 16x16 texture, tiled and therefore SUPPOSED to be using less resources, as is the point of tiling and the tiled background object. Kills frame rate almost completely.


It's like a religious person realizing there's no god. All those times we've told people to use pow2 textures and keep them small. Besides less VRAM usage, why bother. The big shit causes less damage to frame rate than the small optimized stuff, lol! Does that not seem utterly backwards to you?? Does to me! :)
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Sat Feb 27, 2010 4:19 pm

Yes its a trade off, 16x16 may not take up much memory, but then your using the processor to generate the texture. 16 x16 is not good for tiling, it eats up frame rate, and it makes up patterns, even though its seamless.
Image Image
B
161
S
48
G
90
Posts: 7,352
Reputation: 66,759

Post » Sat Feb 27, 2010 4:23 pm

[quote="newt":3t6xnakd]Yes its a trade off, 16x16 may not take up much memory, but then your using the processor to generate the texture. 16 x16 is not good for tiling, it eats up frame rate, and it makes up patterns, even though its seamless.[/quote:3t6xnakd]

It's a pretty big trade off if you ask me. The tiled background object is meant for this kind of thing, but not at the expense of such a frame rate drop. And this is just one tiled object. :(
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Sat Feb 27, 2010 6:12 pm

It's more likely a problem with the FPS counter. I remember reading someone else was having trouble with it reporting wildly inaccurate results recently.

Anyway... post your .cap!
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Feb 27, 2010 6:35 pm

[quote="deadeye":1egixc27]It's more likely a problem with the FPS counter. I remember reading someone else was having trouble with it reporting wildly inaccurate results recently.

Anyway... post your .cap![/quote:1egixc27]

I thought it might be to do with the fps counter too, but I'm not so sure. For some reason I've always been able to hear a high pitch noise (barely noticeable but it's there) when frame rates are very very high, such as 4000fps or something. Which it does in the 2000x2000 version, but not the 16x16 one.

Anyways, here are both the caps. Though as I understand it, this is repeatable and happens to others when they try it too. Though of course it's not as noticeable as nobody would use such large tiles or images normally. I only noticed it because I was doing a very over the top example for a tutorial, on why tiles are better than single big images. But now I'm all like, Santa isn't real?? lol.

16x16 version cap

2000x2000 version cap

Didn't bother uploading the 128x128 example with the funky tiling issue, as I recall that's a known recent problem.
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Sat Feb 27, 2010 8:06 pm

I guess it is because it still redraws each tile to fill the screen. Since one tile fills the whole screen (the 2000x2000), it doesn't have to redraw at all. In the case of 16x16, the tiled background behavior interacts with renderer to draw each of them.

Just a wild guess.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Sat Feb 27, 2010 8:17 pm

Supposedly your graphics card only has to keep one copy of the tile in VRAM and can produce several hundred copies without much slowdown. Slowdown should only start happening if the graphics card has to keep swapping textures back and forth to start blitting different objects in proper Z order. Since that's not the case, tiling shouldn't be a problem. The 16x16 tile version should be much more efficient than the large image. As I said before, it's probably an error in the FPS counter.

But yeah it'd be nice to have an official word on this one, instead of guesses and conjecture.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Feb 27, 2010 8:56 pm

The highest I got with the 2000x2000 version was 357 FPS. I opened up the tile and cut size to 16x16 then ran it again and it had a higher FPS of about 430.
B
2
S
2
G
2
Posts: 372
Reputation: 1,794

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests