Brandon J. Van Every wrote:
> A sanity check: is the C++ Standard Library (STL) used much in the
> game industry?
Some places use it extensively, some places avoid it like the plague. Of
those that use it, some use it out of the box (e.g. STL****t is widely
used on PS2), others write their own version of it with a focus on
console-specific allocation strategies.
My opinion being what it is, I use the Standard Library in tools but I
find the containers too general for use in games; the sorts of problems
I tend to want to solve usually come with specific requirements and
out-of-the-box std::whatever doesn't match them. I use templates fairly
heavily, but in ways that are fairly lightweight; instead of std::vector
I'll use an Array<SomeType, NumElements> "container" that doesn't
allocate anything extra, maybe has sup****t for iteration, has bounds
checking in debug builds, and that's it. I don't find std::map useful
in-game because I tend to avoid having to look things up by key, and in
those case where I do need to, a sorted array is much better. Linked
lists are awful, yadda yadda. Everyone has their own approaches,
obviously, and this is all in my experience and suits the way I make
games. Folks that get adequate performance from their games while using
the Standard Library aren't going to hear me telling them they should do
something different. ;)
-tom!
--


|