SFML community forums

Help => Graphics => Topic started by: lori3 on June 18, 2018, 10:39:55 pm

Title: Tilemap behaving WEIRD...
Post by: lori3 on June 18, 2018, 10:39:55 pm
Well... I don't really know how to describe this problem other than attaching 2 screenshots and my full code from github.. I mostly use the code from the tilemap tutorial ( if this helps) https://www.sfml-dev.org/tutorials/2.5/graphics-vertex-array.php#example-tile-map

The tilemap should look like the second screenshot. but somewhy it looks like the first one. The pattern only appears when going from left to right or from right to left and seems to appear on specific locations and changing the resolution doesn't seem to fix it.

Here is my full code: https://github.com/lori2001/Warcraft-II---clone
Title: Re: Tilemap behaving WEIRD...
Post by: Arcade on June 18, 2018, 11:18:40 pm
Are you drawing your tilemap to non-integer coordinates? Or are you using a sf::View that can be at a non-integer position? Just based on your images this looks like an issue that many people run into. For example, see this post (https://en.sfml-dev.org/forums/index.php?topic=22833.msg159497#msg159497). Specifically check out eXpl0it3r's responses and see if this sounds like what you're running into.
Title: Re: Tilemap behaving WEIRD...
Post by: NGM88 on June 19, 2018, 07:43:53 am
Well... I don't really know how to describe this problem other than attaching 2 screenshots and my full code from github..

Posting the relevant parts of the code would be more helpful.