I am making a tile-based battle engine for my tile-based RPG. I am hoping to make skill effects have a range cloud (circular) and when the player selects a skill which has a range cloud associated with it (range of 5 for example), an array (two-dimensional) will be created with the filled in values resembling the circle.
Eg.
Range = 5;
Therefore array will go from x - 5 to x + 5 and y - 5 to y + 5, where x,y resemble the coordinates of the center of the circle. Now this would give me a 10x10 box, however in the indexes that land within the circle, I would place a value that refers to being within the circle.
My question is, does anyone have experience creating this type of algorithm? I know how to create the array, etc. But I am not sure how to make it so I can create a circle from the square tiles.
Thanks