• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Texure Page Size vs Count

Hi all.

We are trying to optimize our game. We use allot of large graphical assets and because of this we have allot of texture swaps.

Reading this post: http://www.yoyogames.com/blog/23 , this is not ideal. So we made efforts to reduce our swap count. By using the largest texture page size, we can reduce the swaps from 30 to 13. Which is a huge improvement.... but apparently not.

Doing 30 texture swaps on smaller texture we get a stable 60fps. Doing 13 texture swaps on larger pages gives us between 45-60 fps. Which is obviously bad.

We are running this game on windows btw. (Apparently texture flushing doesn't work on windows)

The only way this makes sense is if pulling textures from bigger pages is more expensive then swapping to smaller pages more often and pulling them from there instead. I can't find any solid answer for that online though so here I am.

The other possible cause I've found is that on the smaller pages GM scaled down our backgrounds to fit them on. This isn't the case for the larger pages so maybe GM is struggling to draw the larger backgrounds?
Our biggest background is 2160x1600 with the game drawing about 6 backgrounds of that size per frame at minimum as they are used as parallax layers.

I'm basically just looking for more possible causes or some confirmation that what I think might be the cause is actually the reason.

Thanks in advance to anyone with some insight.
 
I've managed to collect some information on this:

--------------texture size 2048 (no texture pages)
levelSelect:
-fps: 60 (700)
-swaps: 73
level1:
-fps: 60 (400)
-swaps: 26

--------------texture size 8192 (no texture pages)
levelSelect:
-fps: 60 (150)
-swaps: 44
level1:
-fps: 60 (70)
-swaps: 20

--------------texture size 2048
levelSelect:
-fps: 60 (120)
-swaps: 60
level1:
-fps: 60 (75)
-swaps: 22

--------------texture size 8192
levelSelect:
-fps: 60 (300)
-swaps: 32
level1:
-fps: 55 (55)
-swaps: 15

2048 pages cause most background to be halved in scale.
8192 pages are full size backgrounds.

(no texture pages) = letting GM handle it by only having the default texture page.
The others are with more organized texture pages sorted based on graphics which are used together within the game.


levelSelect = the level select screen.
level 1 = level one.
Both of these were viewed from the same position to keep data consistent.

Sum of it all seems to be that letting GM handle it on the smaller pages is more efficient than trying to handle texture pages manually let alone using larger pages to reduce texture swaps.

Still looking for extra insight into this so if anyone has any idea as to why things are this way please do feel free to share.
Thanks in advance.
 
Top