Background utilities disturb to work of my Direct 3D application

Started by
11 comments, last by Malder1 17 years, 11 months ago
Maybe somebody know how to solve this problem. During beta-testing we noticed that some (not all!) antiviruses, firewalls, utilities disturb to work of our Direct 3D application with own activity. As result I see short jerks in 3D scenes. Earlier I thought that they should see that CPU is loaded at this moment and at least fact that we initialized fullscreen D3D mode should say that we need all CPU resources at this moment. Please advise, what we can do to improve this situation. Maybe some flags, or Windows API calls. Or at least, explain me how usually such utilities detect unactivity of user to start work in background? [Edited by - Malder1 on May 8, 2006 3:26:13 PM]
Advertisement
Quote:Original post by Malder1
Earlier I thought that they should see that CPU is loaded at this moment and at least fact that we initialized fullscreen D3D mode should say that we need all CPU resources at this moment.

No, that is not the case. Just because that you are a big, bad graphics application doesn't mean that everything else should shut down [wink]. Yea, you do have exclusive access to the GPU, and can force the OS to give you most of the CPU, but at some point, it's going to schedule other processes.

Quote:Please advise, what we can do to improve this situation.
Maybe some flags, or Windows API calls.

Instead of figuring out how to shut everything off, you should instead be playing nice with everyone else. There is nothing worse than a game that makes the rest of the system unusable. The user should be able to alt-tab out, do normal stuff, and come back into the game again.

With that said, I have indeed had my own antivirus software interfere with certain games, and it is pretty annoying. You can advise your users to turn of the scanning functionality of the software while the app is running, or some other alternative.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
Thanks for the response!
We have multimedia application and I explain again and again every day that user need to disable antivirus if it disturbs to our program. But it seems to be a bad solution,unfortunately.
Quote:Original post by Malder1
Thanks for the response!
We have multimedia application and I explain again and again every day that user need to disable antivirus if it disturbs to our program. But it seems to be a bad solution,unfortunately.

If it is really that troublesome, maybe your message loop structure could be improved a bit. Generally, something like this works well:

// Message Loop	MSG msg; 	ZeroMemory( &msg, sizeof(msg) );		while( msg.message != WM_QUIT )	{		if( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) )		{                  // We have a message on the queue, so let Windows deal with it                  // This keeps our app responsive to window events			TranslateMessage( &msg );			DispatchMessage( &msg );		}		else		{			// Update your application - draw a frame, ect                  app->Update();		}	}
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
Thank you, I'll try it tomorrow!
Not entirely sure its a good idea to get users to switch off their AV/Firewall's etc... just for a game, but I suppose its upto them [smile]

Anyway, its not gonna be easy - but if you have a list of known "bad" programs then you could try and scan the active threads at application start-up. If you spot one that might be a known problem, pop-up a message saying that the game will still function, but maybe not as well - and recommend that they temporarily disable it.

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

One our customer wrote me Task Managers shows that "System" process has about 14% of CPU load all time. What it could be? Driver, Windows service? Is there any way to learn it? Any ideas are highly appreciated!
I found that we can solve problem if set highest priority to our application:
SetPriorityClass(GetCurrentProcess,HIGH_PRIORITY_CLASS);

Is it good solution?
Quote:Original post by Malder1
I found that we can solve problem if set highest priority to our application:
SetPriorityClass(GetCurrentProcess,HIGH_PRIORITY_CLASS);

Is it good solution?


No because it will make the rest of the system unusable. If the user windows your app or alt-tabs out, then their other applications will be almost completely unusable.

-me
Yes, just it was unreal hope :)

This topic is closed to new replies.

Advertisement