Advertisement Jump to content
Sign in to follow this  

optimising a game

This topic is 4935 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Are there good documents out there for optimizing game procedures, ie unrolling loops, more efficient ways to load stuff, etc. Also, tips from you would be appreciated. Thanks in advance, ProgrammingNerd

Share this post

Link to post
Share on other sites
Let me just say this: profile first.

Profile your engine/game before you begin to make optimizations. Find out which parts of your code are taking the longest amount of time so you know where to concentrate your optimization efforts.

The classic 80/20 rule applies to game development as well: 80% of the execution time of a game will be spent in 20% of the code. So it is to your advantage to optimize that 20% as much as possible. By the same token, it doesn't help you much to optimize code that will only be run 2% of the time or less, i.e. the performance gain you get will not be worth the time invested to achieve it; that time could be better spent elsewhere.

The DX SDK docs have a section on accurately profiling DirectX calls. As far as general code optimization techniques go, you might be able to find some references online. Using Google and searching for "C++ optimization techniques" returned a lot of good information.

I would also hardily recommend a couple of books if you're sincerely interested in writing reliable, high performance code. The books are Code Complete by Steve McConnel and Effective C++ by Scott Meyers (assuming your application is written in C++). These two books are pretty much required reading if you want to code high-performance applications in general, and specifically in C++.


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!