Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Assuming I were to develop a graphics engine for a modern PC game that used only DirectX or OpenGL, which techniques could I use to make sure it ran quickly?

Edit:

I'm looking for any approaches that I could take that would result in a speed increase.

By graphics engine I mean general purpose graphics engine - such as the one used in Unity or Ogre3D.

share|improve this question
2  
-1, The question is way too vague to be useful. If you had a specific system with some background information on how it worked there might be an answer there on how to speed things up. But as it stands it's about as useful and insightful as "how can I make my fps go up". –  Tetrad Nov 5 '10 at 19:51
    
"how can I make my fps go up" is exactly what I'm looking for. I think the answers would be very useful. –  CiscoIPPhone Nov 5 '10 at 19:54
    
-1: 'Quickly' on what? PC, Mobile, WebBrowser, or Console? 'Modern' is waaay to vague. –  Stephen Furlani Nov 5 '10 at 19:55
    
I've specified modern PC game, although I think many of the approaches may be platform independent. –  CiscoIPPhone Nov 5 '10 at 19:56
add comment

closed as not a real question by Tetrad Nov 6 '10 at 2:22

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

That question is quite the rabbit hole, as stated in another answer don't just make an engine. That's your first mistake you're generalizing something that is inherently specific, performance is all about specifics you have to write code tailored to a specific platform to run a specific type of game.

These optimizing tend to go as low level as possible, writing custom memory allocators, optimizing cache use, making good use of parallelism, having good algorithms, etc. and like I said a lot of these topics are a big rabbit hole full of "black magic", that will take months to learn much less master.

Unless you have a concrete game idea and a platform you will dedicate yourself to for a while, just don't bother you'll be better of with good enough performance and more time on the actual important thing, a good game. Besides hardware is always getting faster so speed won't be an issue for long anyway.

share|improve this answer
    
I'm well aware of 'make games, not engines'. Are you saying it's not possible to describe any of 'optimizing cache/making good use of paralleism/having good algorithms' without me making the purpose of the graphics engine more specific? –  CiscoIPPhone Nov 5 '10 at 20:06
    
Yep, you can't optimize without a specific target in mind, optimizing code for an X86 machine will be horrible in PS3's Cell, hell if you go deep enough optimized code for Intel chips will be slower in AMD ones. It's the same for algorithms, some might be "faster" on theory but very inefficient in cache use while another "slower" one end up faster because it has better cache use, and they both can be slower on another hardware architecture with different kinks. –  Daemoniorum Nov 5 '10 at 20:18
add comment

Use an existing engine.

There is no "general purpose" in gaming.

share|improve this answer
    
Let's say for a generalised graphics engine, for example one that fulfils the same needs as Ogre or Unity. –  CiscoIPPhone Nov 5 '10 at 19:45
    
I'm going to attempt a reword to make it clear what I'm looking for. –  CiscoIPPhone Nov 5 '10 at 19:49
add comment

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