I'm just starting out as a game dev, and I'm finding some difficulties at the time of naming classes. I usually call the one that handles everything World or Map, or Grid. Then there's the stuff inside... For example, I'm doing a frogger clone and I have a class for everything that moves on screen (I try to use MVC and I'm talking about the model here - I have Sprite classes in the view), I named it Object for lack of a better idea. Then there's a subclass from that which I named Frog (though I could name it Player) and another one for the things controlled by the computer... I don't know what to call that, it could be Enemy or Obstacle (appropriate for cars & trucks) but it also includes the turtles which are more like helpful objects yet not powerups? I also just learned what a hitbox is... is there a good resource out there specifically for learning all these things?
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
|
If you're having trouble naming things it's probably because your class design itself is messy. Just hearing you talk about your code it seems like you're overusing inheritance. Also, there are a ton of questions on here about MVC and generally speaking it isn't a good pattern to try to force into things. Gaming is more like Model view viewmodel than mvc anyway. I don't think there's a specific reference for what you're looking for. Also, in general SE sites are better if you ask specifically what you're looking for instead of a reference for what you're looking for. For example, draw out your specific class hierarchy and ask what might be the best way to name your obstacles-that-also-can-be-useful, or whatever. |
|||
|
|