karai17 / Simple-Tiled-Implementation

Tiled library for LÖVE
Other
840 stars 121 forks source link

tile layer offfset value doesn't work in infinite map #247

Open NO-MEANINGS opened 3 years ago

NO-MEANINGS commented 3 years ago

in tiled: image in love: image

how to reproduce the bug: create a new map with property infinity checked. image create a new tile layer and set some offset value. don't forget to put some tiles on layer. image draw the map in love, and you'll find the offset value doesn't work.

possible cause of the problem: line 504 in init.lua: local offsetX = chunk and chunk.x or 0 line 505 in init.lua: local offsetY = chunk and chunk.y or 0 It seems that the method of calculating the offset value is wrong. I’m not sure since I’m new to programming. XD