Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with pytmx
#5
Hey! It's the Kidscancode tile based game! I just had a problem with this exact thing yesterday and almost posted here with the problem.

I did figure it out. I'm I correct in guessing that you changed name of your "map_folder" or otherwise moved or changed something when you got your first error? I did. I had a type-o in my code so instead of fixing that I changed my "map_folder" name to match it. Mistake. Before the error you posted, did you maybe get "exception error"

I changed how I imported pytmx like was suggested. Nothing.

The actual fix was to make sure the path in my code the the "map" folder is correct and resave the Tiled file.

I used:
from pytmx import *

and

tm = load_pygame(filename, pixelalpha=True) 
In the map folder you'll see a .tsx file. If you changed anything since making that file it all becomes a nightmare. If you make sure your path is right and resave your tilemap in Tiled that might be the fix. It worked for me... after 2 hours of trying everything else.

He says in the video to make sure everything is where it needs to before going on or it leads to lots of problems... I'm sure this is what he meant.
Reply


Messages In This Thread
Problems with pytmx - by Piethon - Dec-24-2019, 11:27 AM
RE: Problems with pytmx - by nilamo - Dec-27-2019, 05:01 PM
RE: Problems with pytmx - by Piethon - Dec-29-2019, 08:35 AM
RE: Problems with pytmx - by metulburr - Dec-29-2019, 01:20 PM
RE: Problems with pytmx - by michael1789 - Dec-29-2019, 06:25 PM
RE: Problems with pytmx - by Piethon - Jan-02-2020, 08:47 AM
RE: Problems with pytmx - by metulburr - Jan-02-2020, 12:20 PM
RE: Problems with pytmx - by michael1789 - Jan-02-2020, 03:14 PM
RE: Problems with pytmx - by Piethon - Jan-03-2020, 11:06 AM
RE: Problems with pytmx - by michael1789 - Jan-03-2020, 01:43 PM
RE: Problems with pytmx - by Piethon - Jan-03-2020, 05:55 PM
RE: Problems with pytmx - by michael1789 - Jan-03-2020, 07:13 PM
RE: Problems with pytmx - by Piethon - Jan-04-2020, 08:58 AM
RE: Problems with pytmx - by michael1789 - Jan-04-2020, 06:09 PM
RE: Problems with pytmx - by metulburr - Jan-04-2020, 03:37 PM
RE: Problems with pytmx - by Piethon - Jan-05-2020, 10:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to display isometric maps with pytmx? Piethon 18 10,275 Feb-19-2020, 04:33 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020