Tiles are shown wrong with Flutter 3.10.0
Current bug behavior
When I run my simple Flame game with a tiled map. The tiles are shown wrong when I use Flutter 3.10.0
It looks like in this screenshot:
Expected behavior
It should look like this:
And it looks right in "Tiled" and if I downgrade Flutter to 3.7.12.
Steps to reproduce
I use this code for loading the map file and creating the TiledComponent:
@override
Future<void> onLoad() async {
final tiledComponent = await TiledComponent.load("map.tmx", Vector2.all(40));
add(tiledComponent);
}
And this is the map file:
More environment information
- Flame version: 1.7.3
- flame_tiled: 1.9.1
- Platform affected: only tested on ios
Map file doesn't looks right, so here it is again:
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="4" height="3" tilewidth="40" tileheight="40" infinite="0" nextlayerid="2" nextobjectid="1">
<tileset firstgid="1" name="tileset" tilewidth="40" tileheight="40" tilecount="2" columns="2">
<image source="tileset.png" width="80" height="40"/>
</tileset>
<layer id="1" name="Tile Layer 1" width="4" height="3">
<data encoding="csv">
1,1,1,1,
1,2,2,1,
1,1,1,1
</data>
</layer>
</map>
Can you try to deactivate impeller and see if it makes a difference? https://docs.flutter.dev/perf/impeller#ios
Good guess, it works with deactivated impeller
Oh no, yet another impeller issue. :( We'll have to write up some issues for the flutter issue tracker.
I think that this PR will solve this: https://github.com/flutter/engine/pull/42293
@mrx27o have you tried if it works with Impeller now?
With Flutter version 3.10.4 it's not working. Is this a wrong version?
With Flutter version 3.10.4 it's not working. Is this a wrong version?
Maybe the fix isn't released yet then, or possibly that the fix didn't solve that problem.
@mrx27o have you tried this on the latest version of Flutter (and Flame)?
@spydon it looks better than before, but it's still glitchy. With Impeller there are horizontal and vertical lines between my tiles. Without Impeller it looks fine. Current used versions: Flutter: 3.13.1 Flame: 1.8.2 Flame_Tiled: 1.13.0
With Impeller:
Without Impeller (should look like that):
@spydon I created a simple project to reproduce the problem. You can find it here: https://github.com/mrx27o/flame_playground
This is most likely a bug on impeller's side, so it would be good to be able to reproduce this in pure flutter code and open an issue at Flutter.
Not sure if I am able to reproduce it. But if the problem occurs in all "tiled" apps with Impeller it should be quite critical.
Can you now check with the latest flutter version 3.19 @mrx27o
When I checked (your repo example) with new version on iOS - default impeller enabled.
And this is the output:
Yes thanks, it seems fixed indeed.