I was working on Tiled system, and i managed to convert it to 2.0, but now the only problem is
Level level;
level.LoadFromFile("Maps/spawn.tmx");
sf::FloatRect rect2(0, 0, 2048, 1536);
level.SetDrawingBounds(rect2); // THIS
The tutorial said differently:
Create an instance of Level.
Level level;
To load a map file,
level.LoadFromFile("example.tmx");
You MUST set drawing bounds before attempting to display the level.
level.SetDrawingBounds(somesfview.GetRect());
I recommend using an sf::View to "scroll" the map, rather than moving the map itself. This way you don't have to worry about objects (NPCs etc) on your map moving (or not) correctly.
You will find you need to implement some system to only move the view by whole numbers, otherwise you will see gaps between tiles.
Then to draw you simply pass your renderwindow to the Draw function.
level.Draw(window);
Can someone write me with sf::View ? I dont know how to since there isnt a GetRect() anymore.