Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

flame_tiled: tileset image in a subfolder of an external .tsx resolves to the wrong path

Abierto
#4,117 1 comentario 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@ufrshubham ya está trabajando en esto.

Desde el 16/10/2026.

  • #4118 de @ufrshubham — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
dart, flutter
Área
game-dev

Línea de trabajo

Start with TiledAtlas.fromTiledMap in lib/src/tile_atlas.dart and trace how the map path, external .tsx path, and image source are combined. Compare the failing sets/edge.tsx and img/edge.png case with the ../tilesets/a.tsx case that already works. Done means external tileset images resolve relative to the .tsx folder and the resulting path is normalized; an open linked pull request #4118 is already addressing this issue.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

What happens

TiledComponent.load loads a tileset's image from the wrong folder when the external tileset and
its image paths have the same number of segments.

Map assets/tiles/edge.tmx:

<tileset firstgid="1" source="sets/edge.tsx"/>

Tileset assets/tiles/sets/edge.tsx:

<image source="img/edge.png" width="32" height="16"/>

Tiled resolves the image relative to the .tsx: assets/tiles/sets/img/edge.png.
flame_tiled 3.1.2 loads img/edge.png relative to the map folder instead
(assets/tiles/img/edge.png), so loading fails with Unable to load asset.

Why

TiledAtlas.fromTiledMap (lib/src/tile_atlas.dart) only prepends the tileset's folder when the
paths' segment counts differ:

if (tilesetParts.length != imageParts.length) {
  tileImageSource = [...tilesetParts.sublist(0, tilesetParts.length - 1), ...imageParts].join('/');
}

sets/edge.tsx and img/edge.png both have 2 segments, so no join happens. ../tilesets/a.tsx +
a.png (3 vs 1) works, which is probably why this hasn't come up.

Expected

The image path is always resolved against the folder of the file that declares it (the .tsx
for external tilesets, the map for embedded ones), then normalized, the way Tiled does it.

Versions

flame 1.38.2, flame_tiled 3.1.2, tiled 0.11.1, Flutter 3.44.2, macOS. Possibly relevant to
#4015 (new imagesDirectory resolution) and #4073 (tiled 0.12 loader).

A minimal reproduction (generated assets + app) is available if useful.

Lenguaje dominante
Dart
Estrellas
10.8k
Forks
1.1k
Merge medio
1 d 15 h
PR fusionados (30 d)
50

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de flame-engine/flame

Todos los issues de flame-engine/flame

Issues similares

Más issues de Dart

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.