As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
If this question can be reworded to fit the rules in the help center, please edit the question.

6

That's not really a question - at the very least, you might declare this a community wiki page...
–
Rachel BlumJul 22 '10 at 1:21

The biggest one from me was reading about Scott Bilas's GameObject system. Even though I don't use a database system like he does, it stopped me making 6 level inheritance trees and got me creating a component system which is much more manageable and reusable.

An interesting variation is when you only care about the relative distances. Then you can skip the potentially expensive sqrt call and simply compute distance2 = x^2 + y^2.
–
mmyersJul 22 '10 at 14:34

@mmyers - Another wonderful thing: if you're working in x^2 space, the distance isn't just relative.
–
SnOrfusJul 22 '10 at 15:44

Thank you for mentioning the relative distance bit. I have seen way too many unnecessary square root operations, just as people using A* when they should be using something less exact.
–
RicketJul 28 '10 at 17:31

On my first game (this) I needed to access more than 1Mb of RAM, and, this being before the internet took off, I had no documentation for XMS and EMS that DOS apps used to access the extra RAM.

So, I ended up using a small 'backdoor' that featured in the 386 with regard to the segment registers. Normally, in real mode, the address was calculated as seg*16+off which limited you to 1Mb.

However, you could switch to protected mode, set up a segment to address 4Mb, switch back, and provided you didn't write to the segment register (which was OK since DOS only used the 8086 segment registers), you could access the whole 4Mb as a flat address space. Flipping back to real mode was necessary if you wanted to use the DOS services.

Mersenne Twister is nice in the sense it is a good random number generator, but it's not particularly elegant or cool (or fast or easy to implement). For that, you might want to look at en.wikipedia.org/wiki/Rule_30.
–
user744Jul 28 '10 at 17:09

One of the things I like about games programming is getting away from the standard GoF way of "correctness" and just focussing on pure lovely speed! That said, I've seen a lot of bad implementations of MVC in games which do more harm than good.
–
IainJul 22 '10 at 17:34

I think design patterns have their place. Not so much in games, though.
–
blissfreakNov 14 '14 at 4:37

@blissfreak: There's nothing special about game programming that makes it some kind of wild west where patterns aren't common. They are ridiculously common and here are some examples.
–
SnOrfusNov 15 '14 at 5:42

re:soscastoa I think most people know that as sohcahtoa (replacing 'sloped side' with the more specific, if admittedly more obscure, 'hypotenuse'). Flows off the tongue easier, and I think thus easier to remember.
–
AsmorNov 23 '10 at 19:11

1

I'll always prefer 'The Old Arab Sat On His Camel And Howled', since secondary school (high school age) it's been imprinted on my brain.
–
George DuckettOct 12 '11 at 7:04

There's also "Some Old Hippy Came And Had Tripped On Acid"
–
blissfreakNov 14 '14 at 4:40