Fun with naming - what to call Wall/Ground/Ceiling class

Started by
20 comments, last by Aidamina 18 years, 9 months ago
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".
Advertisement
probably world...

regards,
m4gnus
"There are 10 types of people in the world... those who understand binary and those who don't."
Level, Map, Room

Matt Hughson
__________________________________[ Website ] [ Résumé ] [ [email=contact[at]matthughson[dot]com]Contact[/email] ][ Have I been Helpful? Hook me up! ]
Um... surface? CollisionSurface? CollisionEntity?
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.
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.
....[size="1"]Brent Gunning
Haha I thought I was the only one who checked the thesaurus for for class names ... Entity, CollisionSurface, CollisionObject, FreeBody, Terrain, any should do.
I prefer the term "Obstacle" :)

"Game Maker For Life, probably never professional thou." =)
CObject
WorldBounds

This topic is closed to new replies.

Advertisement