Should STL be used in game programming
Moderator: Coders of Rage
Should STL be used in game programming
An interesting question.... What are your thoughts?
- Netwatcher
- Chaos Rift Junior
- Posts: 378
- Joined: Sun Jun 07, 2009 2:49 am
- Current Project: The Awesome Game (Actual title)
- Favorite Gaming Platforms: Cabbage, Ground beef
- Programming Language of Choice: C++
- Location: Rehovot, Israel
Re: Should STL be used in game programming
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...
now really, I think sometimes you will just have to use at least a vector or a list somewhere along the way...
"Programmers are the Gods of their tiny worlds. They create something out of nothing. In their command-line universe, they say when it’s sunny and when it rains. And the tiny universe complies."
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
- Bakkon
- Chaos Rift Junior
- Posts: 384
- Joined: Wed May 20, 2009 2:38 pm
- Programming Language of Choice: C++
- Location: Indiana
Re: Should STL be used in game programming
vectors are my bff
- zodiac976
- Chaos Rift Regular
- Posts: 156
- Joined: Thu Jun 18, 2009 10:03 am
- Current Project: Booklet & Text RPG
- Favorite Gaming Platforms: PC, PS3, PSP
- Programming Language of Choice: C++
- Location: AL
- Contact:
Re: Should STL be used in game programming
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.
expert so I am not sure if it is wise to use them all the time.
- Netwatcher
- Chaos Rift Junior
- Posts: 378
- Joined: Sun Jun 07, 2009 2:49 am
- Current Project: The Awesome Game (Actual title)
- Favorite Gaming Platforms: Cabbage, Ground beef
- Programming Language of Choice: C++
- Location: Rehovot, Israel
Re: Should STL be used in game programming
vectors FTW!Bakkon wrote:vectors are my bff
"Programmers are the Gods of their tiny worlds. They create something out of nothing. In their command-line universe, they say when it’s sunny and when it rains. And the tiny universe complies."
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
Re: Should STL be used in game programming
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...
- Netwatcher
- Chaos Rift Junior
- Posts: 378
- Joined: Sun Jun 07, 2009 2:49 am
- Current Project: The Awesome Game (Actual title)
- Favorite Gaming Platforms: Cabbage, Ground beef
- Programming Language of Choice: C++
- Location: Rehovot, Israel
Re: Should STL be used in game programming
are you talking about linking in general or the actual #include<algorithm>?
why is that bad? (it IS a time saver after all)
why is that bad? (it IS a time saver after all)
"Programmers are the Gods of their tiny worlds. They create something out of nothing. In their command-line universe, they say when it’s sunny and when it rains. And the tiny universe complies."
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
-
- Chaos Rift Newbie
- Posts: 21
- Joined: Fri Jun 05, 2009 12:37 pm
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++ and C#
- Location: Great Britain, although I don't understand what's so great about it
Re: Should STL be used in game programming
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
- Netwatcher
- Chaos Rift Junior
- Posts: 378
- Joined: Sun Jun 07, 2009 2:49 am
- Current Project: The Awesome Game (Actual title)
- Favorite Gaming Platforms: Cabbage, Ground beef
- Programming Language of Choice: C++
- Location: Rehovot, Israel
Re: Should STL be used in game programming
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.
It's just like eating Pancakes with shit; you can still eat it but it'll be really messy.
Last edited by Netwatcher on Sun Jun 21, 2009 11:37 pm, edited 1 time in total.
"Programmers are the Gods of their tiny worlds. They create something out of nothing. In their command-line universe, they say when it’s sunny and when it rains. And the tiny universe complies."
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
- Joeyotrevor
- Chaos Rift Cool Newbie
- Posts: 62
- Joined: Thu Jan 22, 2009 6:24 pm
- Programming Language of Choice: C++
Re: Should STL be used in game programming
Uh... what?Netwatcher wrote: It's just like eating Pancakes with shit; you can still eat it but it's really messy.
Code: Select all
eb 0c 48 65 6c 6c 6f 20 77 6f 72 6c 64 21 31 d2 8e c2 30 ff b3 0a bd 02 7c b9 0b 00 b8 00 13 cd 10 eb fe
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: Should STL be used in game programming
I think Netwatcher just told everyone who writes their own containers to eat shit.Joeyotrevor wrote:Uh... what?Netwatcher wrote: It's just like eating Pancakes with shit; you can still eat it but it's really messy.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
- MarauderIIC
- Respected Programmer
- Posts: 3406
- Joined: Sat Jul 10, 2004 3:05 pm
- Location: Maryland, USA
Re: Should STL be used in game programming
STL increases compilation times and executable size, but on PC, it doesn't really matter. Personally, I use STL all the time.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
- Netwatcher
- Chaos Rift Junior
- Posts: 378
- Joined: Sun Jun 07, 2009 2:49 am
- Current Project: The Awesome Game (Actual title)
- Favorite Gaming Platforms: Cabbage, Ground beef
- Programming Language of Choice: C++
- Location: Rehovot, Israel
Re: Should STL be used in game programming
you got it all wrong...dandymcgee wrote:I think Netwatcher just told everyone who writes their own containers to eat shit.Joeyotrevor wrote:Uh... what?Netwatcher wrote: It's just like eating Pancakes with shit; you can still eat it but it's really messy.
It's maybe not the best example
"Programmers are the Gods of their tiny worlds. They create something out of nothing. In their command-line universe, they say when it’s sunny and when it rains. And the tiny universe complies."
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
-Derek Powazek, http://powazek.com/posts/1655
blip.fm DJ profile - http://blip.fm/Noobay
current code project http://sourceforge.net/projects/vulcanengine/
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: Should STL be used in game programming
The only time that I would ever question the use of STL would be with console development because of what Marauder said:
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.
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.MarauderIIC wrote:STL increases compilation times and executable size
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.