views:

20

answers:

1

I am building a game engine, and I am actually having a very difficult time placing what kind of namespace to put Character under. This may be the single dumbest question I've ever posted on StackOverflow, but it's driving me nuts.

What would you guys do?

I don't really have any other namespaces yet defined. Characters have Sheets (Layout), which reference Traits (Statistics), etc. Everything is just kind of dumped into the root namespace right now.

+1  A: 

Go with Characters.

It's simple and to the point. You'll end up including lots of classes in it that describe player and non player characters, attributes, abilities, and so on, but they all refer to characters. Your base class for characters will likely be something like Character, so the naming collision is avoided.

And the guideline to avoid plurality in namespaces is just a guideline. There are cases where deviation is warranted (I'm looking at you, System.Windows.Forms).

Mike Hofer
So ...Characters.Character?
Stacey
Pretty much, yeah. :)
Mike Hofer
Eh. Works for me. You know, one of the hardest parts of programming is just ...naming things.
Stacey