Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - skryex

Pages: [1]
1
Graphics / Render Overlap with TileLayer from tmxlite
« on: October 26, 2022, 04:08:14 pm »
Hello,
I am using tmxlite to parse my .tmx file using its MapLayer class from SFMLOrthogonalLayer.hpp. I am trying to implement basic overlap from the y position, i.e. the player walks in front of a tree then I draw the player first, and if they walk behind the tree, I draw the tree first.

I am having difficulties implementing this. In my case, all my trees are on a single TileLayer, Which when drawn draws chunks themselves made of sf::Vertex, but in the end the TileLayer is still rendered at once.

Is there an easy way to somehow get the layer to draw tile by tile ? This way I'd be able to do a check on the tile's y coordinate before drawing it or not. One other solution is to convert all the objects that the player interacts with in, well, objects in a ObjectGroup layer.

Pages: [1]
anything