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

 Is this normal? 6 texture swaps/frame when I have only 1 texture page?

G

Guest

Guest
I'm using GMS2. Running the game in Test -> VM, the debug overlay consistently shows 6 texture swaps per frame and 10-13 vertex batches per frame. But my game has 1 texture page. In both the Windows and Android settings, the texture page size is 2048x2048. When I preview the texture page, I'm shown a 48k png with my graphics, and it's got plenty of space left on it. When I run the game in Android -> YYC, the number of texture swaps increases to 7 and the vertex batches stays at a constant 10.

I am confused. How can I have 6 texture swaps per frame if I only have 1 texture page? The manual says that this number--texture swaps--reflects the swapping of texture pages.
 
G

Guest

Guest
A new project with nothing except "show_debug_overlay(true);" in the room create code has a constant 3 texture swaps and 3 vertex batches ... which is also recognized in the manual ("texture swaps and vertex batches will never be zero and will normally show values of 2 or 3, since even with an empty room an no objects GameMaker Studio 2 still has to draw and batch things"). But:
  1. This doesn't make sense if texture swaps relates to texture pages, which the manual also says. ("Textures (sprites and backgrounds) are stored on texture pages, and if you have a lot of image assets in your game, then GameMaker Studio 2 has to swap between texture pages to draw them all...").
  2. What else is it referring to? How can a game with zero textures except maybe the font (?) need to swap textures?
  3. How do I get to 6?
 
L

Lahssoo

Guest
I'm guessing you are using surfaces? That adds to the texture swap. (try it yourself on an empty project : application_surface_enable(false) should drop the texture swap and vertex batch by one)

That being said, nothing to worry about : 6 surface swap won't hurt your performances :p
 

Mike

nobody important
GMC Elder
If using surfaces, or even flat shaded things the batch count will go up...
 
I

icuurd12b42

Guest
you drawing stuff off of your texture page, 1 swap
show_debug_overlay(true), 1 swap, it draws text off a system texture page included for debugging and for default particle sprites
system drawing the app surface, 1 swap
drawing text without a font, uses that texture page mentioned above 1 swap for each draw text if it occurs when your texture page is in use
drawing particles you did not specify the sprite for, 1 swap (same concept as drawing text without a font), uses that system texture I mentioned
 

rwkay

GameMaker Staff
GameMaker Dev.
On GMS2 on Windows Desktop we are not seeing the same performance penalty with texture swaps (as it is not DX11) I do not think you should be as concerned with the texture swaps as we were on GMS1 (which uses DX9).

The pixel fill rate is probably more important now, that is the number of pixels that you are touching on the screen (and so the amount your are rendering, along with the over draw that is happening).

Russell
 
On GMS2 on Windows Desktop we are not seeing the same performance penalty with texture swaps (as it is not DX11) I do not think you should be as concerned with the texture swaps as we were on GMS1 (which uses DX9).

The pixel fill rate is probably more important now, that is the number of pixels that you are touching on the screen (and so the amount your are rendering, along with the over draw that is happening).

Russell
What's result of the texture swaps on IOS.
is it performance penalty with texture swaps?
 
G

Guest

Guest
Z

zendorf

Guest
On GMS2 on Windows Desktop we are not seeing the same performance penalty with texture swaps (as it is not DX11) I do not think you should be as concerned with the texture swaps as we were on GMS1 (which uses DX9).

The pixel fill rate is probably more important now, that is the number of pixels that you are touching on the screen (and so the amount your are rendering, along with the over draw that is happening).

Russell
Well that is very good news! Does that mean that I don't really need to worry about setting up texture groups for desktop games any more? How do I find out the fill rate in GMS2?

cheers!
 

rwkay

GameMaker Staff
GameMaker Dev.
I would still use texture groups as a way of organising things and ensuring that you are not asking the engine to do ridiculous work, but it is less of an issue - but uploading a 2048x2048 texture to draw a 16x16 graphic is still a lot to ask (and keep performance) - so it is still good practice

Russell
 
Top