Hello,
I'm just starting with SFML (I have 4 years experience with SDL and 20 years with C++) with plans to create a simple tile based 2D game.
So I took the C++ version of MapRenderer:
https://github.com/SFML/SFML/wiki/Source%3A-TileMap-Render to have a starting point.
I have a tileset of 64x64 tiles called tileset.png. So I figured if I replaced the following things:
default tileSize --> tileSize=64,
texture.create(1,1); --> texture.loadFromFile("tileset.png");
src = IntRect(0,0,1,1); --> src = IntRect(0,0,64,64);
In the provider function I've put in comment the part where the color is set.
I would see my first tile to be drawn over the creen, but I just get a blank/black screen. I must be missing something obvious, but I'm probably looking over it everytime...
The texture loads fine...