PyTMX is a Python library to read Tiled Map Editor's TMX maps.
Questions tagged [pytmx]
40 questions
0
votes
0 answers
How do i make the player look like in the back of the tree?
i have this python with pygame please don't mind the comment with ignore. every things work fine but i need to know how to make the player lower than the tree. I already tried to display character first and then the tree but the problem is when i…

Karl Erol Pasion
- 23
- 4
0
votes
1 answer
Need help on performing Frustum Culling on my platform game
What I m trying to do in order to implement the Frustum Culling algorithm is to start the nested for loop in the render() function from a position that will depend on the player x and y position, such that the code will only loop through a small…

Mine
- 3
- 2
0
votes
2 answers
How to correctly display rotation object with pytmx?
After many research I didn't find the answer, when I'm trying to display object in pygame with pytmx, the result is fully broken, because x, y change with rotation. I've tried to use matrix rotation but for this, I need to know the original center.…

laochun
- 1
- 4
0
votes
1 answer
Why did I get the error 'cannot load external tileset'
I just want to know how to fix the error that I mention in the title.
I really don't know what to try, there are only 3 lines of code and they are exactly how it's shown in the doc of pytmx...
import pygame
import pytmx
tmxdata =…

Nigram clavem
- 1
- 2
0
votes
1 answer
How to speed up or optimize for loop used for collision detection using pygame/pytmx?
I am using a for loop combined with .colliderect() for collision detection while attempting to make a game using pygame, the loop gets too slow with ~340 wall Rectangles, I was wondering if it could be faster somehow because it severely effects the…
user7864142
0
votes
1 answer
AttributeError when trying to getTileImageByGid in pyTMX
I am trying to load a TMX map for a project in pyGame. The map loads fine when I don't add objects. I use Tiled to create the maps. When I do, I get an attributeError.
I have tried to reinstall pytmx and tried with other maps but nothing seems to…

M3ME5
- 57
- 5
0
votes
0 answers
Why does my tiled map not have transparency?
I have 6 png files, 4 of them have transparent edges. When i try to display them in my pygame window, the images display fine, however they just show black edges instead of transparent edges.
What the images look like in GIMP:…

CustomerSupport
- 93
- 1
- 9
0
votes
1 answer
TypeError 'module' object is not callable
I was having problems with transparency using pytmx in a project i was working on but it is quite long and not written very well. So i tried to make a smaller version that just made the tiledmap(this post) but i'm getting this error.
EDIT:…

CustomerSupport
- 93
- 1
- 9
0
votes
0 answers
Transparent tiles in tiled but not in game
In the tiled map editor the outer tiles appear as transparent. However when i display the map ingame the parts of the tiles that should be transparent appear black.
In tiled: https://gyazo.com/81ad813f35f9f0f2907b4c26f7ab4619
In Python:…

CustomerSupport
- 93
- 1
- 9
0
votes
1 answer
Why do these jpegs work with tiled map editor but not the pngs?
I am trying to display a tiled map in pygame and i want to use pngs because they're transparent however, when i blit the tiles onto the window 4/6 different tiles display fine but 2 tiles don't display(grass on top and dirt in the center). When i…

CustomerSupport
- 93
- 1
- 9