Brushes
I decided to make some different brush sizes when editing the tile map.
Probably the easiest way to do it is just using two for loops.
Checking a certain radius around the mouse position.
That’s exactly what I implemented and it sort of works as well. I mean, no surprise there. However getting the right tiles back isn’t working great. Some rounding issues seem to be the problem. As well as the Y coordinates of the mouse not being correct with what I see on screen.
When placing the mouse in the top corner of a tile, I can see the X value being correct. The X value always stays within the 0 to 1 range of that tile. The Y value, on the other hand, can roll over to the next tile value. So I expect to see 0.97 and 0.96 for example for X and Y respectively. But then I see 0.97 and 1.04 instead, selecting the wrong tile as a result.
Setting the brush radius back to 1.0 also gives some weird behaviour. So there is definitely some work there before it’s usable. I may work on loading GPS data first though.