I'm trying to learn SFML on my own, but I'm a bit stumped right now and in need of some help. I've followed the official tile map tutorial (
https://www.sfml-dev.org/tutorials/2.4/graphics-vertex-array.php) and have it running with a basic tileset I made and a moveable player which for now is just a circle.
The problem I've run into is how to make the player and tilemap interact with eachother. I believe I know the basics on how to find the player's location on the tilemap, get their position and divide it by the tile width and height to find it's the closest x and y on the map (please correct me if I have that wrong).
What I'm trying to figure out now is what to do once I found the coordinates of the point the player is touching. The idea I have is to implement a fog of war style map. The tilemap will be completely black. When the player touches a corner in a quad, that corner will become transparent and use the built in gradient system to create a sort of fog that connects to the other corner.
Basically my question is how do I use the coordinates of a point in a vertex array to interact with the point and change its color.
Sorry if I tend to ramble a bit. I hope the question isn't too broad. I would post what code I have so far but I'm not at home.