Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Recently I've been writing a bot for a game which renders using DirectX. When I run multiple instances of the game, it takes a toll on my computer's CPU/RAM usage. Can I stop DirectX from rendering to increase performance? If so, how?

share|improve this question
1  
Regarding cross posting, see this meta thread. – Josh Petrie Aug 1 '11 at 23:35
2  
I do hope that this is a single-player game you're talking about, as there are a lot of people who tend to get rather upset about modifying multi-player games, especially for personal gains. – Lars Viklund Aug 2 '11 at 6:47
    
So you guys downvoted the question because of moral reasons? Not good imo. – TravisG Aug 2 '11 at 22:40
    
It's a jump-to-conclusions-mat! Correlating commenters with downvotes is a bit far-reaching, particularly when some are physically incapable of downvoting. – Lars Viklund Aug 3 '11 at 19:19
up vote 1 down vote accepted

If you stop D3D from rendering -- typically by detouring the D3D calls directly -- you may see an increase in performance. It will depend primarily on whether the application's performance is actually bound by limitations on the GPUs resources.

You may also destabilize the game, which may be making some decisions based on responses it gets from the GPU (for example by using queries) which it will of course no longer get, since you suppressed transmission of any commands to the device. Ideally of course, rendering and game logic are wholly separate, but sometimes this isn't the case.

You'll probably have to do a fair bit of juggling and balancing what you detour. You could, for example, allow all resource creation to succeed so that you don't have to deal with the game not coping with your proxy resources (which may not match its internal validation), but if the problem you're seeing with performance is that you're overloading the resources stored on the GPU, you will not see any benefit from this approach.

If at possible, profile before you commit to a lot of work. Use Resource Monitor to watch system performance counters and be aware of the complexities of profiling the GPU.

share|improve this answer
    
When targeting a desktop machine, there's very few reasons why you wouldn't use as much processing power as you can lay your paws on, especially if your game is intended to completely capture your players focus when running. There are of course optimizations that any decent game should do when unfocused/minimized - like handling the messages associated with those events to know when to not render anything or auto-pause the simulation. As for major companies writing better code? Heh. – Lars Viklund Aug 2 '11 at 6:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.