(note - I don't have the reputation to create new tags, so mod action may be needed to re-tag)
I'm in the midst of developing a 2D sprite-based game for Windows 7 Phone using XNA. The training and tutorials available for it are pretty darn good IMO, but the problem I face is that each of them approaches their class design differently, and the code is not particularly well-factored. As a result, it has been difficult for me to gain a good understanding of which responsibilities I should give to a particular class.
I could have a base sprite class
BaseSprite, that knows how to draw itself, check for collisions, etc. I could then have an
AnimatedSprite class that would know how to navigate its sprite sheet, an
ExplodingSprite class, and so on. This technique is demonstrated in the Space Invaders example in the Windows 7 Phone Jumpstart Session 2 materials.
Alternatively, I could instead place the bulk of rendering and running the game responsibility on a
GameScreen class; that class and its derived classes behave more like forms or web pages in terms of their responsibilities. Sprite classes are more simple containers with much less logic.
This is the technique used in the Windows 7 Phone Training Kit's Alien Sprite game and other game state manager examples.
So, how do you approach the class design for your games?