C++ - do you use STL in your game?

Started by
32 comments, last by jbadams 11 years, 10 months ago
The biggest rule of thumb is this: If you have to ask, you should use STL. There are many legitimate reasons to avoid using the standard libraries, but it is almost guaranteed that if you are encountering those reasons, you already understand why and what the correct solution is. Instead, spend your time on understanding how the STL works and why it works the way it does.

One caveat that I do feel is worth mentioning: STL containers like std::vector are extremely efficient in optimized builds. The design of these classes relies heavily on several categories of C++ optimizations. There are good reasons for this, but at the end of the day it means that heavy container usage will show an unexpectedly high impact in "debug" builds. What's more, mixing debug and release compilations (selective optimization) of these containers can be extremely dangerous. So a lot of the home-rolled crowd like the fact that the jump in performance from debug to release is not so extreme.

That said, all halfway decent games become unplayable in debug mode about halfway through development anyway sad.png
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Advertisement

The biggest rule of thumb is this: If you have to ask, you should use STL.

Quoted for emphasis; that is an excellent guideline.

- Jason Astle-Adams

I don't ever use the STL, period. Not even when time is tight and I just "need to get it done". But then again I am a die-hard Lisper, so... take it for a grain of salt.
@Conoktra: that's not really helpful in a discussion that specified C++ up-front. Obviously users of other languages won't be using the C++ Standard Library; if one is available they might however be well advised to use the standard library of their language of choice, for the same reasons given in favour of the C++SL in this topic.

- Jason Astle-Adams

This topic is closed to new replies.

Advertisement