Jump to content
  • Advertisement
Sign in to follow this  
ProgrammingNerd

optimising a game

This topic is 4864 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
Advertisement
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++.

neneboricua

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!