The rendering system should be as independent as possible from game code. This way, we can easily adapt the game to use different tilesets and make an ASCII version too, encouraging people to make their own tilesets or modify the existing ones.
A good first implementation would be for Entities that are drawable to possess a Graphics component that points to an id which maps to a tile/sprite, ASCII/unicode character, or whatever other type of graphical display that represents the given entity. The rendering system would then look up this id in the database/registry and fetch the correct type of graphic to display depending on the rendering options.
The actual tile/sprite and/or character are of course defined in the JSON file that defines entities.
The rendering system should be as independent as possible from game code. This way, we can easily adapt the game to use different tilesets and make an ASCII version too, encouraging people to make their own tilesets or modify the existing ones.
A good first implementation would be for Entities that are drawable to possess a
Graphics
component that points to an id which maps to a tile/sprite, ASCII/unicode character, or whatever other type of graphical display that represents the given entity. The rendering system would then look up this id in the database/registry and fetch the correct type of graphic to display depending on the rendering options.The actual tile/sprite and/or character are of course defined in the JSON file that defines entities.