Advertisement Jump to content
Sign in to follow this  
load_bitmap_file

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

This topic is 4933 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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".

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Haha I thought I was the only one who checked the thesaurus for for class names ... Entity, CollisionSurface, CollisionObject, FreeBody, Terrain, any should do.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!