I am programming a turn based strategy game in Free Pascal.
The map is composed of cells grouped into provinces. But unlike other games, each land cell is inhabited and could have industries and produce resources.
For the first version I simply created a MapCell class :
TMapCell = class //terrain type fTerrainType : byte; //resources fResources : array[0..2] of TResource; //number of idle citizens fIdleCitizens : integer; //industries (buildings) fActivities : TList; //player fPlayer : TPlayer; //province identifier fProvince : TProvince //city fHasCity : boolean; //armies fArmies : TList; //visibility fVisible : boolean; end;
The map is simply a 2D array of map cells, displayed with a 2.5D isometric view.
To display the map I would loop through the array.
But I read a few articles and I am wondering if it is the right way to do.
Maybe I should separate graphics (terrain, transitions...) and gameplay data (population, industries, buildings...). The map would be composed of several arrays (on for each layer).
Thank you for your opinions and advice.