I recently brought my idea of how to define Sprites into question when I considered whether sprite frames should be allowed to have different sizes. As a result of this I came up with a few questions to help me decide what the correct design should be. I am hoping to have some light shed on the answers to these questions.
1) My games generally separate the idea of tilesets from all other sprites, so should I design a semantic difference between the two ideas? ie. Is it worth designing a TileSet class to handle tiles which have the benefit of being statically sized, and then a separate Sprite class for that which may have frames of different sizes?
2.a) Should a sprite be allowed to contain frames of differing sizes?
2.b) Should each frame be a different object (eg. class Sprite; class SpriteFrame)? Thus allowing dimensions to be owned by a frame instead of by a sprite.
3) Should sprites draw anchored from the center or a corner?
The problem is I intend on re-using this code for multiple projects and thus cannot afford to simply fit my current needs as I must also consider my future needs. Seeing as I don't want to refactor code that is currently being refactored after redesigning this code later on to fit the needs of a new project.
Hearing about common design practices for this sort of thing is great, but I would also appreciate if I knew them with regards to the ~3 questions first. This is mainly because I never feel the need to stick to common practices for the sake of being common or understood. I always feel the design should feel right for the intended usage. The benefit of redesigning the wheel allows one to view problems otherwise lost in time, and thus understand why common designs are common. Sometimes, I'm sure, you can improve the common design after fully knowing why it is the common design, at least for your own purposes. I am sure nobody here is a blind follower; I just happen to be a hands-on/visual learner.