Level Editor in C++ / OOP Design
Alright-- so I am designing a level editor. Let me first say this is the first game programming I have ever done. Better yet it's the first large C++ thing I have done. I have done a basic tiler/editor already and it is over a thousand lines of code. It's pretty messy. I am thinking of re-doing most of it.
I was wondering if this sounds like something that would work, or better yet-- is it something a seasoned OO programmer would do.
I am thinking of making a 'base class' called Object. This base class would contain a protected variable which contains the x and y coordinates for the object. This base class would contain a method called show() to display the object, and a method called get_x() and get_y() to get the cords.
This is simple, from here I was thinking of deriving my "Tile" class from the Object class. Since every tile needs cords and also uses show() etc. The tile 'is an' object.
I would derive another class called Sprite. This would be my class for 'moveable' objects. Since the sprites contain cords as well you could say a Sprite 'is an' Object as well.
I think Object would be a good base class and Tile and Sprite would make good derived classes.
Does this sound about right? Currently I have these classes but they are all separate and it gets a bit messy.