PHP city-sim castle layout
- by Gert
I am currently contemplating the layout system for my php based game but i've run into a couple of worries. So my idea is a 9X9 grid where the center 3X3 are inner castle. The inner castle will be 6X6 if you enter it(click on it). and with the option to expand the inner castle converting one of the 9X9 tiles to a 4X4 inner castle tile.
So here is my question: What is the best way to tackle this type of layout?
my original idea was a 18X18 grid and saving it in the db as (idCastle, Y, X) where X is a string of 18 numbers long telling me if the tile is an inner/outer tile or a inner/outer building.
but i am not really fond of this idea and would like to hear some other ideas on how to tackle this.
Thanks in Advance,
Gert