Questions tagged [pytmx]

PyTMX is a Python library to read Tiled Map Editor's TMX maps.

40 questions
10
votes
3 answers

TMX(Translation Memory eXchange) files in python

Is there a module for handling TMX(Translation Memory eXchange) files in python, if not, what would be another way to do it? As it stands, I have a giant 2gb file with French-English subtitles. Would it be possible to even handle such a file or…
UrbKr
  • 621
  • 2
  • 11
  • 27
3
votes
1 answer

Handling tile objects using Pytmx

so I am trying to build a side-scrolling platform game and have created a map using the Tiled Map Editor. I have succesfully loaded in non-tiled objects and tiles into my game using the following class I wrote: class TiledMap: def…
MBA20
  • 73
  • 5
3
votes
0 answers

PyTMX Tiled map collision - Pygame

I am trying to create a game map in pygame with Tiled but I don't know how to setup the collision for every tile. I successfully displayed the map on the screen, but how to verify the collisions? Here is the code: import pytmx import…
user193464
  • 380
  • 1
  • 6
  • 25
2
votes
1 answer

collision issue with pygame in python3 using tiled

im working on a litle game using pygame in python3. Im using tiled for the map and pyscroll for the camera and i don't know how to solve this issue: i made detection collision that work using object layer in tiled and a litle bit of code. the…
Siiyu
  • 43
  • 4
2
votes
1 answer

How to handle tile rotation in pytmx?

I am loading a map from Tiled with pytmx, but when i draw the tiles, they aren't rotated like in the editor. The code i'm using to draw the map is this: tiled_map = pytmx.util_pygame.load_pygame(f"mymap.tmx") tile_list = [] tile_group =…
Mattlau04
  • 78
  • 1
  • 9
2
votes
1 answer

Problem with transparent tiles with Tiled and pytmx in pygame

I can't get pytmx to render transparent tiles from Tiled correctly in pygame. On this example you can see that the tile rendered from the tmx file is showing a black background, i would like to have it like the image rendered directly from the image…
lutre69
  • 139
  • 6
2
votes
0 answers

Does pytmx provide you with a way to tell if an image has been rotated, flipped horizontally/diag working with Tiled?

I am making a game using pygame and Tiled to design the map. I am able to load the tiles and blit them on to the screen. When i flip the tile horizontally/rotate inside of Tiled and run the game, the tiles are not rotated inside of the game. So i…
Ucy
  • 21
  • 2
2
votes
1 answer

How do I make the tile map scroll in pygame?

I implemented a tile map using pytmx and i'm trying to figure out how to allow it to scroll ( the entire map ) using the if Keys[pygame.K_somekey]:. I rendered some buttons so that when you press the play button, it starts rendering the map to…
HelloWorld
  • 35
  • 5
2
votes
2 answers

How to import an tmx map in pygame?

I have made a *tmx map in the Tiled Editor program. Then I tried to import it into my game. When I change the variable layers to 0 it works, but there is only 1 tile on the screen. I want to print the entire map on my screen. But I get the following…
Erik77
  • 109
  • 4
  • 12
2
votes
2 answers

Pygame Load Tilemap With PyTMX

I am trying to understand the tilemaps in pygame, and to learn how to use Tiled Map Editor, but I can't succeed to load the map in the pygame. Here is the code: import pygame import pytmx pygame.init() display =…
user193464
  • 380
  • 1
  • 6
  • 25
1
vote
0 answers

My Pygame (which work with the software tiled) has a big latency to update the map

I have start to developed my first game and I use the Pygame library for this. For the map and the object I use Tiled. When I want to go to the up part of the map (which isn't display at first) I can see that there is a lot of latency with the…
Matsune
  • 11
  • 2
1
vote
2 answers

Loading a tmx file with import pytmx in python

I have made a map in the tiled editor and intend to use it in a game using pygame. I imported pytmx to help with this process but when I use load_pygame("directory of file") it give out this error Traceback (most recent call last): File "D:\Coder…
1
vote
1 answer

why my Tiled collisions doesn´t work in my pygame project?

Im following a tutorial to make a game working with some pygame tiled and pytmx stuff, but however, we added a new object´s layer with some empty rectangles over the tiles where the player is not being able to enter, then we maked a wall´s list to…
1
vote
1 answer

how to use pytmx and make Rects

i'm trying to get this pytmx work for a few days, but i just can't seem to get how to go on about it, all i want is to load all the layers and make a few layers to be Rects here, i'm just trying to make it blit on the screen, but that isn't working…
Tomoe
  • 21
  • 4
1
vote
1 answer

Animated objects launch at a precise time with pytmx, pygame

I am in troubles, I am trying to make doors opening in my game. I am using pygame, and pytmx, I have built a Level made with Rooms, and in each Room I have a Renderer using pytmx, what I want to achieve is for exemple on level 0 the player has to…
SnK
  • 58
  • 1
  • 6
1
2 3