high pan ms/frame without showing panels

Posted By: Reconnoiter

high pan ms/frame without showing panels - 07/31/14 14:26

Howdy,

With one of my games, the ms/frame 'pan' value under f11 window shows ~15. I have panels (incl. texts) in the game, but the 'show' flag is not set for them (for testing purposes). Removing some of the panels does not seem to help too. I also don't have any screen entities I think (depending a bit on what is exactly meant by that, ent_createlayer?). The cursor is also just a non-transparant 32x32 bmp image.

So do panels eat resources even while they are invisible? Or could it be something else?
Posted By: Quad

Re: high pan ms/frame without showing panels - 07/31/14 14:34

that statistics panel is a panel too.
Posted By: DLively

Re: high pan ms/frame without showing panels - 07/31/14 15:00

is this effecting your fps too? check the amount memory your project is using, located under MEMORY MB
Posted By: Reconnoiter

Re: high pan ms/frame without showing panels - 07/31/14 15:39

Thanks for commenting.

@Quad, it not ~15 in other projects however, in other maps (e.g. directly loading a wmb without a script) it is more like ~1,5.

@DLively, normally 14 mb, but disabling/commenting almost everything it becomes 0 mb with still ms/frame pan == ~15.

Here are screenies (note that it is from the bayimg.com site so the pics don't always work but it is very easy to upload there), click on pic to enlarge (this is without fps max by the way):

http://bayimg.com/IaPmNAAFI
http://bayimg.com/IapMOaaFi

ps: this is on a intel pentium laptop with an integrated graphics card with directx11 but also a high direct9c version.
Posted By: DLively

Re: high pan ms/frame without showing panels - 07/31/14 19:02

Until they start to drop your fps, I dont see any need to worry.

What exactly are you worried about?
Posted By: Reconnoiter

Re: high pan ms/frame without showing panels - 07/31/14 21:06

Well the fps is not that high (between 60-80) for something this simple, so I was/am worried that it will be a bit bad lateron when adding more things. Also this is fullscreen, when setting it to windowed the fps drop to ~45-50 cause of a higher f11 ms/frame ref.
Posted By: sivan

Re: high pan ms/frame without showing panels - 07/31/14 21:28

geo time in ms for level geometry and sky rendering
ent time for entity rendering
par time for particles rendering
drw time for draw_ functions
pan time for panels, texts and screen entities rendering (and for the 3D card to flush its command buffer)
ref time for screen refresh, monitor sync, and fps_max idling
srv time for entity updates and client/server communication
fnc time for script execution
phy time for physics

so my first guess is a graphics card related issue, but if it is fine with other levels you could strip down the project until you find the reason... so basically I can say nothing clever laugh for example on my old pc I got high ref and srv values (really without reason) and slow fps.
Posted By: Reconnoiter

Re: high pan ms/frame without showing panels - 08/01/14 11:17

Ok I finally found it smile . It is not who you think it is (or whatever they say in those detectives when they found the murderer):

Code:
video_set(sys_metrics(0),sys_metrics(1),0,1);



even in an otherwise totally empty script:

Code:
function main()
{	
video_set(sys_metrics(0),sys_metrics(1),0,1);
}



This give a shows a value of 15 after pan in the f11 window. Interesting enough, setting the engine to windowed mode instead of fullscreen sets the value from ~15 to ~1.

Code:
function main()
{	
video_set(sys_metrics(0),sys_metrics(1),0,2); //note the 2 at the end
}



But wait there is moar!

Setting "video_set(sys_metrics(0),sys_metrics(1),0,1);" in my project with panels give 60 fps with the pan value ~15. Setting it to "video_set(sys_metrics(0),sys_metrics(1),0,2);" gives 150 fps (!) with a pan value of ~5. Cause windowed mode is less fps consuming I quess.
But now it gets interesting:

- if I first set the engine to fullscreen with the line above, than later to windowed through an ingame button I will get an fps of 100 and pan value of ~10.
- doing this reversed gives a fps of 60 with a pan value of ~15.
- now adding the line of "video_window(0,0,4 | 16 | 32 | 64 | 128,"blablabla");" after the video_set line, AND setting the engine the windowed (one way or the other) gives a whooping 'ref' (screen refresh etc.) of ~11 (first in windowed this was ~1) and decreases the fps from ~150 to ~45 (! shocked ).

The latter is a huge fps drop, could it be related to maybe cause i have an integrated graphics cards? Anyway that is a huge difference and definitely something to remember for lateron.

-edit, it has got to do with the combination between panels and other stuff that is visible and video_window(....blablaba) that gives such a fps drop. Cause the following code (almost empty script) gives ~500 fps:

Code:
function main()
{	
video_set(sys_metrics(0),sys_metrics(1),0,2);
video_window(0,0,4 | 16 | 32 | 64 | 128,"blablbabla");
}

© 2024 lite-C Forums