question about game design
i have a question on game design. do you keep the graphics part of the game seperate from the other part of the game? for example, would i make 2 seperate classes callled
class Images
{
int x;
int y;
int w;
int h;
};
then
class Data
{
int health;
int stamina;
int mana;
};
or would combine both of them? and do
class Entitiy
{
int x;
int y;
int health;
int mana;
};
so do you keep graphical data and actual game data seperate? or do you combine them? im not sure on which is more logical. if you kept things togeather, it would be more organized. but if you kept it seperate, well, i dunno. maybe it would be too much to handle for just one class/set of classes? i guess thats why im asking
What I mean is, either way will work, and which you choose depends entirely on your game''s architecture and your own aesthetic preferences. Properly implemented, neither will ruin your design.
Personally, I keep location information along with general data, but I separate out things that are specifically graphics-related.
Personally, I keep location information along with general data, but I separate out things that are specifically graphics-related.
If you have a class like the Data class, you don''t have to worry about how the object is going to be displayed.
Say I make an object: Data soldier.
I can display the soldier as a sprite in a typical 2D game, a 3D model, or an ansci text character. I can even choose to represent the soldier in some unusual way, like as a playing card or something. The data is independent of the method of display.
If you had the information about how to display the object included in the class, like with the Entitiy class, you would be forcing yourself to display it in one specific way. This would make it more difficult to reuse the object later on.
Say I make an object: Data soldier.
I can display the soldier as a sprite in a typical 2D game, a 3D model, or an ansci text character. I can even choose to represent the soldier in some unusual way, like as a playing card or something. The data is independent of the method of display.
If you had the information about how to display the object included in the class, like with the Entitiy class, you would be forcing yourself to display it in one specific way. This would make it more difficult to reuse the object later on.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement