bitcraft / pyscroll

make scrolling games with animated maps in pygame
GNU General Public License v3.0
177 stars 28 forks source link

not-animated tiles with custom properties #13

Closed WinterLicht closed 8 years ago

WinterLicht commented 8 years ago

Hi, I'm using pyscroll for my game and installed a newer version via pip. My current pyscroll version is now 2.16.2 for Python 2.7

The tutorial quest starts fine. But if I add (for example) in grasslands.tmx some random property to a not-animated tile and use this tile on the map, I'm getting the following error by starting quest.py:

Traceback (most recent call last):
  File "...\pyscroll\tutorial\code\quest.py", line 234, in <module>
    game = QuestGame()
  File "...\pyscroll\tutorial\code\quest.py", line 123, in __init__
    self.map_layer = pyscroll.BufferedRenderer(map_data, screen.get_size())
  File "...\pyscroll\pyscroll\orthographic.py", line 71, in __init__
    self.reload_animations()
  File "...\pyscroll\pyscroll\orthographic.py", line 360, in reload_animations
    ani = AnimationToken(gid, frames)
  File "...\pyscroll\pyscroll\animation.py", line 13, in __init__
    self.next = frames[0].duration
IndexError: tuple index out of range
bitcraft commented 8 years ago

Thanks for reporting this issue! I've updated pyscroll and it seems to be working on maps with custom properties and animated tiles. Please update pyscroll and try again. The current version should be 2.16.5....can be found on pip as well.

WinterLicht commented 8 years ago

Thank you for the fast fix! 2.16.5 works