Page 1 of 1

Need help for tile map system

Posted: Sat Sep 07, 2024 4:38 pm
by VXDev
i need help with my tile system i attached my file and the outline of the tiles whenever i move looks like green or black when i move around
pls help

Re: Need help for tile map system

Posted: Sat Sep 07, 2024 8:16 pm
by knorke
It seems to be some subpixel/rounding problem.
I added rounding here and that fixed it:

Code: Select all

function love.update(dt)
    camera:lookAt(math.floor(player.x+0.5), math.floor(player.y+5))
--was:    camera:lookAt(player.x,player.y)
Also those 31.9999999999999 can just be 32.

Re: Need help for tile map system

Posted: Sat Sep 07, 2024 9:47 pm
by VXDev
thank you sm