Questions tagged [optimization]

The process of modifying software to make some part of it work more efficiently or use fewer resources. Generally, this means it executes more rapidly, or will require fewer resources.

The process of modifying software to make some part of it work more efficiently or use fewer resources. Generally, this means it executes more rapidly, or will require fewer resources.

447 questions
13
votes
11 answers

In general how often and when should I optimize my code?

In 'normal' business programming optimization step is often left until really needed. Meaning you should not optmize until it is really needed. Remember what Donald Knuth said "We should forget about small efficiencies, say about 97% of the time:…
David Basarab
  • 471
  • 5
  • 10
7
votes
1 answer

How are NP-Hard problems managed in game development contexts?

When NP-Hard problems arise in game development, how are such problems dealt with? Through heuristics or solvers or a combination of both?
watchdogs132
  • 191
  • 4
3
votes
2 answers

What does D3DXOptimizeFaces function do?

I know that this function generates an optimized face remapping for a triangle list, but what actually this optimized remapping is? The triangle faces are remapped, but based on what?
Pekov
  • 157
  • 6
2
votes
3 answers

How do game engines mitigate CPU cost for many trigger zones & entities?

It's a rather simple question, but a somewhat fundamental in computing in general. Let's say we have a player controlled character in an open world. The world is large. In this game-world we have a vast amount of trigger zones that basically…
1
vote
1 answer

Avoid useless copies of buffers

The other day I was looking at a opensource engine, basically it was uploading the image from a file to a RAM buffer adding some decoding while streaming (I assume this is done "in-cache" so I can't count the decoding as an extra copy), then the…
CoffeDeveloper
  • 521
  • 1
  • 4
  • 19
0
votes
1 answer

Cover system design considerations

I'm trying to plan out a cover system for a 3D game. The mechanic When the player approaches a surface they can take cover behind... A prompt appears indicating they can enter cover, and what to press to do so. If the player presses the prompted…
jzx
  • 3,805
  • 2
  • 23
  • 38
0
votes
1 answer

Tetris rotation without using arrays

I am making a Tetris clone. Is there any way that I can avoid using a 2D array for storing a Tetris block? EDIT: Suppose I have an array to store an L-shaped piece: 1 0 1 0 1 1 But for the sake of rotation, I do that shape as this: 0 1 0 0 0 1 0…
userx01
  • 346
  • 2
  • 12