Page 1 of 2

Should STL be used in game programming

Posted: Sat Jun 20, 2009 3:22 am
by dejai
An interesting question.... What are your thoughts?

Re: Should STL be used in game programming

Posted: Sat Jun 20, 2009 3:57 am
by K-Bal
Why not? :shock: :lol:

Re: Should STL be used in game programming

Posted: Sat Jun 20, 2009 4:20 am
by Netwatcher
well STL is in STD, and STD's are bad... I guess... no?

now really, I think sometimes you will just have to use at least a vector or a list somewhere along the way...

Re: Should STL be used in game programming

Posted: Sat Jun 20, 2009 6:59 am
by Bakkon
vectors are my bff

Re: Should STL be used in game programming

Posted: Sat Jun 20, 2009 8:23 am
by zodiac976
I use STL for just about everything. I find them extremely useful but I am no
expert so I am not sure if it is wise to use them all the time.

Re: Should STL be used in game programming

Posted: Sat Jun 20, 2009 10:50 pm
by Netwatcher
Bakkon wrote:vectors are my bff
vectors FTW!

Re: Should STL be used in game programming

Posted: Sun Jun 21, 2009 1:19 am
by dejai
I think its kinda lazy to use STL a lot. #include <algorithm> really? Thats just a slap in the face. Then again the whole C++ language is a bit...

Re: Should STL be used in game programming

Posted: Sun Jun 21, 2009 2:19 am
by Netwatcher
are you talking about linking in general or the actual #include<algorithm>?
why is that bad? (it IS a time saver after all)

Re: Should STL be used in game programming

Posted: Sun Jun 21, 2009 3:29 am
by Panama
Absolutely, just about all my projects have need for STL (vectors baby!) and I don't think a single one of my projects is without it. It's just so damn useful for games :)

Re: Should STL be used in game programming

Posted: Sun Jun 21, 2009 3:49 pm
by Netwatcher
If you don't use STL, you'll have to make your own stuff, and that's not a bad thing.
It's just like eating Pancakes with shit; you can still eat it but it'll be really messy.

Re: Should STL be used in game programming

Posted: Sun Jun 21, 2009 4:51 pm
by Joeyotrevor
Netwatcher wrote: It's just like eating Pancakes with shit; you can still eat it but it's really messy.
Uh... what?

Re: Should STL be used in game programming

Posted: Sun Jun 21, 2009 6:06 pm
by dandymcgee
Joeyotrevor wrote:
Netwatcher wrote: It's just like eating Pancakes with shit; you can still eat it but it's really messy.
Uh... what?
I think Netwatcher just told everyone who writes their own containers to eat shit.

Re: Should STL be used in game programming

Posted: Sun Jun 21, 2009 8:49 pm
by MarauderIIC
STL increases compilation times and executable size, but on PC, it doesn't really matter. Personally, I use STL all the time.

Re: Should STL be used in game programming

Posted: Sun Jun 21, 2009 11:36 pm
by Netwatcher
dandymcgee wrote:
Joeyotrevor wrote:
Netwatcher wrote: It's just like eating Pancakes with shit; you can still eat it but it's really messy.
Uh... what?
I think Netwatcher just told everyone who writes their own containers to eat shit.
you got it all wrong... :lol:
It's maybe not the best example :nono:

Re: Should STL be used in game programming

Posted: Mon Jun 22, 2009 7:28 am
by Falco Girgis
The only time that I would ever question the use of STL would be with console development because of what Marauder said:
MarauderIIC wrote:STL increases compilation times and executable size
That's very true. On Dreamcast, where you only have 16 megs of RAM, you are making your executable approximately a MEGABYTE larger just by linking to STL.

It's also pretty substantial on PSP.

While Elysian Shadows is using STL on both the PSP an DC builds currently, that will be one of the first things to go when we start running into bottlenecks.