Re: Should STL be used in game programming
Posted: Mon Jun 22, 2009 1:40 pm
Rolling your own, by the way, decreases that overhead. Even if you use templates, too.
I think.
I think.
The Next Generation of 2D Roleplaying Games
http://elysianshadows.com/phpBB3/
He's not sure, but he's pretty certain from his experience, so he's saying "I think" because he's trying not to be a know-it-all who might have his facts wrong, so cut the man some slackNetwatcher wrote:Interesting, if ur going to "roll your own" I really want to see this.
To Marauder:
Stop saying "I think", it makes your claim uncertain.
.
I agree,it's going to increase deving time by a hell lot .programmerinprogress wrote:He's not sure, but he's pretty certain from his experience, so he's saying "I think" because he's trying not to be a know-it-all who might have his facts wrong, so cut the man some slackNetwatcher wrote:Interesting, if ur going to "roll your own" I really want to see this.
To Marauder:
Stop saying "I think", it makes your claim uncertain.
.
As for "rolling your own", logically you could make your own templates with a much lower overhead, as you would only implement the methods which you know you're going to use, therefore the size of the template, and it's footprint would decrease (but this of course depends on the number of methods, and how they're implemented of course, you could end up adding MORE, if you could think of any!)
also, making your own container templates isn't exactly "out there", it can be done, you just need to get your head around dynamic memory and data structures, i'm not saying I could implement one right now, but it's plausible with a little bit of research...
I think
You should be writing you're own templates though, it's a lot better than writing multiple classes that use the same implementation or including STL. So I wouldn't consider it a bad thing.I agree,it's going to increase deving time by a hell lot .
I actually (and I bet everyone does) like writing my own stuff.Innerscope wrote:You should be writing you're own templates though, it's a lot better than writing multiple classes that use the same implementation or including STL. So I wouldn't consider it a bad thing.I agree,it's going to increase deving time by a hell lot .
Netwatcher wrote:I also have no idea how to write templates.
Code: Select all
template <typename T>
class myTemplate {
T myTemplateVar;
public:
template<typename T2>
T2 myTemplateFunctionInsideTemplateClass(T param); // lol long function name
T myNormalFunctionInsideTemplateClass(); // lol another long function name
};
T2 myTemplateFunctionInsideTemplateClass(T param)
{
return (T2)param;
}
T myNormalFunctionInsideTemplateClass()
{
return myTemplateVar;
}
Correct.programmerinprogress wrote:He's not sure, but he's pretty certain from his experience, so he's saying "I think" because he's trying not to be a know-it-all who might have his facts wrong, so cut the man some slack ;)Netwatcher wrote:To Marauder:
Stop saying "I think", it makes your claim uncertain.
Saying "I think" changes the tone of the response, and also invites others to correct me or back me up. It also keeps me from looking like an idiot. Further, not saying "I think" or equivalent when I am unsure opens the possibility of presenting incorrect facts that inexperienced users -- who don't know that what I've stated is wrong -- will take at face value without verification, producing bad habits and decreasing their value to later employers.Netwatcher wrote:nobody will kill u if ur wrong
Thanks for the vote of confidence :)Netwatcher wrote:I also think that Marauder is just experienced enough, and even when u say something ur not sure about you need to say it at the tops of your lungs, :roll:...
I am still learning templates and I have yet to use them but I doNetwatcher wrote:I actually (and I bet everyone does) like writing my own stuff.Innerscope wrote:You should be writing you're own templates though, it's a lot better than writing multiple classes that use the same implementation or including STL. So I wouldn't consider it a bad thing.I agree,it's going to increase deving time by a hell lot .
I also have no idea how to write templates(that and AI).
So I write one huge class instead of a little template.
there's much for me to learn, grasshopper.
What about creating a struct in an existing class instead of writing a new class(when possible).zodiac976 wrote:I am still learning templates and I have yet to use them but I doNetwatcher wrote:I actually (and I bet everyone does) like writing my own stuff.Innerscope wrote:You should be writing you're own templates though, it's a lot better than writing multiple classes that use the same implementation or including STL. So I wouldn't consider it a bad thing.I agree,it's going to increase deving time by a hell lot .
I also have no idea how to write templates(that and AI).
So I write one huge class instead of a little template.
there's much for me to learn, grasshopper.
hope I start finding a use for them soon. I usually split my stuff
into multiple classes and use inheritance and friends if needed.
Ever since I learned classes I don't see a use for structures butNetwatcher wrote:What about creating a struct in an existing class instead of writing a new class(when possible).zodiac976 wrote:I am still learning templates and I have yet to use them but I doNetwatcher wrote:I actually (and I bet everyone does) like writing my own stuff.Innerscope wrote:You should be writing you're own templates though, it's a lot better than writing multiple classes that use the same implementation or including STL. So I wouldn't consider it a bad thing.I agree,it's going to increase deving time by a hell lot .
I also have no idea how to write templates(that and AI).
So I write one huge class instead of a little template.
there's much for me to learn, grasshopper.
hope I start finding a use for them soon. I usually split my stuff
into multiple classes and use inheritance and friends if needed.
I don't think you're ever experienced enough to say something (that you don't know for sure) as fact. That's called being an arrogant douche bag.Netwatcher wrote:I also think that Marauder is just experienced enough, and even when u say something ur not sure about you need to say it at the tops of your lungs, nobody will kill u if ur wrong ...
Elegantly put.GyroVorbis wrote:That's called being an arrogant douche bag.
So what is consistent with the two? Opinion. Neither is confirmed fact, and neither should be advertised or treated as such.Netwatcher wrote:You are partially right.
There's a difference between a personal opinion (i.e. "We're making the best indie game ever") and a professional opinion.