Fun with naming - what to call Wall/Ground/Ceiling class
Hello, in the project I'm working on (2d sidescroller) I used to have separate Ground/Wall/Ceiling classes, but I rewrote the collision detection code so that it didn't need to have separate classes for all three.
So, any ideas on what to call this Ground/Wall/Ceiling class? Best I could come up with so far is "Terrain".
Yeh, "CollisionSurface" sounds fine.
The dirty little secret (well, one of them) of OOP, though: Trying to figure out "the perfect class name" is a quixotic goal. Give it the first (or second) name that comes to mind, and DOCUMENT IT INTELLIGENTLY. The name shouldn't be misleading, of course, but documentation is much more important than perfect naming.
The dirty little secret (well, one of them) of OOP, though: Trying to figure out "the perfect class name" is a quixotic goal. Give it the first (or second) name that comes to mind, and DOCUMENT IT INTELLIGENTLY. The name shouldn't be misleading, of course, but documentation is much more important than perfect naming.
Funny. I had the same problem last week. The name I ended up using was barrier. Thesaurus.com is your best friend when it comes to these types of problems.
Haha I thought I was the only one who checked the thesaurus for for class names ... Entity, CollisionSurface, CollisionObject, FreeBody, Terrain, any should do.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement