-
Couldn't load subscription status.
- Fork 360
Closed
Description
Bug Report
Actual behavior:
When I create a map with Tiled and draw it on the screen without any offsets/scrolling/scaling, the map is offset one column to the left, meaning the left-most column of tiles (stack of boxes in this case) is off screen:
Expected behavior:
When drawing a map in Arcade (without any offset/scrolling/scaling), I expect the origin of the map to be the bottom-left corner of the Arcade window. The origin of the map should match the origin of the window.
Steps to reproduce/example code:
Here is the example code I used to generate the "Actual behavior" screenshot. Uncomment the loop to see the expected results.
import arcade
class MyGame(arcade.Window):
def __init__(self):
super().__init__(600, 600, "Tiled Map Off-by-one Repro")
arcade.set_background_color(arcade.csscolor.CORNFLOWER_BLUE)
def setup(self):
map = arcade.read_tiled_map('map.tmx', 1.0)
self.wall_list = arcade.generate_sprites(map, 'Platforms', 1.0)
# for s in self.wall_list.sprite_list:
# s.center_x += 128
def on_draw(self):
arcade.start_render()
self.wall_list.draw()
def update(self, delta_time):
self.wall_list.update()
def main():
window = MyGame()
window.setup()
arcade.run()
if __name__ == "__main__":
main()
Metadata
Metadata
Assignees
Labels
No labels

