Jump to content
  • Advertisement
Sign in to follow this  

doom3 sdk container library !?!

This topic is 4959 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Just downloaded doom3 sdk and had a quick glance and noticed how nicely things where laid out until i was a little bit shocked to see that they had written there own containers & no use of functors and stuff instead of using STL but there is use of templates, thought it would be something to talk about, i would love to know the rationale behind it (before someone says for efficency you can be just as if not more efficent when done properly).

Share this post


Link to post
Share on other sites
Advertisement
I can only make wild guesses here.

1) Control. Maybe the developers (it's not just John) love to know exactly what's going on. Everyone who ever tried debugging and acceidently steps into STL functions knows what I mean [wink].

2) Memory fragmentation (mh. well this is not a valid point at all since you can always provide a custom pool-allocator).

3) Lack of experience with using the STL? I mean, no one knows when these components where created and it might have been years ago. Maybe even shortly after id soft made the transition to C++...

*puts flamesuit on*

These are guesses from the top of my head and I might be totally wrong here.

--
Pat.

Share this post


Link to post
Share on other sites
Quote:
Original post by Pipo DeClown
Is the STL available on the XBox?

But of course. Every piece of hardware that has a C++ compiler available, can access the STL. It's part of the standard (hence the name[wink]). You can even use the STL on the GBA (though this is not advisible for various reasons[smile]).

Share this post


Link to post
Share on other sites
The probably did run into some issues with the STL containers. I ran into the fact that std::vector passes some argument by value somewhere which totally screwed up my SSE classes so I ended up rolling my own. Solid containers with iterators and standard algorithms aren't exactly hard to write.

Share this post


Link to post
Share on other sites
Quote:
Original post by darookie
3) Lack of experience with using the STL? I mean, no one knows when these components where created and it might have been years ago. Maybe even shortly after id soft made the transition to C++...


I think they where created in 1993, introduced into c++ 1994 & became part of the standard library when c++ was standardized in 1998.

Maybe it has something to do with compiler compliance, its only been recently that c++ compilers are more standard compliant & better supported for templates but they use templates anyways (very minimally thou).

Share this post


Link to post
Share on other sites
Quote:
Original post by snk_kid
I think they where created in 1993


I think Darookie meant we didn't know when id's containers were made.

I think it probably makes things easier if all licencees are using the same containers and not relying upon having the same version of the STL installed as id has.

Share this post


Link to post
Share on other sites
One guess would be portabilty, not all STL's are equal and by "rolling their own" i guess they wouldnt run into problem with a particular port having a non-standard or buggy STL

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I guess it is possible that it is partly due to optimization (but the other reasons mentioned sound more plausible). If it is for optimization, I won't argue* with id software, those guys are professional optimizers and know what they're doing :P

*By argue I mean "premature optimization is the root of all evil" kind of remarks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!