flame-engine / flame-engine/flame
Unsupported effects on `TileComponent` with `flame_tiled`
- Dominant language
- Dart
- Stars
- 10.8k
- Forks
- 1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 21
Description
# Problem to solve
I'm currently working on a mobile game, where there are an isometric staggered Tiled map (loaded with a **_TiledComponent_**) and one sprite character. This character follows a preset path on this map, and the game camera follows him.
However, the map is obviously larger than the phone screen, and thus I would like to crop/prune the map dynamically at runtime, i.e. makes all the tiles that are out of screen disappearing, with a cool animation (and conversely, since the camera moves, makes tiles newly inside the screen appearing).
In this way, the problem I encounter is that the majority of effects, except all position based effects, are unsupported. So it's actually impossible to handle a change of color, opacity, glow, scaling, and a lot of effects with **_TiledComponent_** and **_TileStack_**. And that's the same with _**IsometricTileMapComponent**_.
The code part below doesn't work so.
```dart
await stack.add(
SequenceEffect(
[
OpacityEffect.to(0.2, EffectController(duration: 0.75)), //unsupported
MoveEffect.by(Vector2(12, 0), NoiseEffectController(duration: 5, frequency: 100)), //supported
],
infinite: true,
)..onComplete = stack.removeFromParent,
);
```
# Proposal
I think it could be pretty interesting to make available unsupported effects and working with Tiled map. I don't know the scope and the difficuly implementing that, so that's rather a suggestion.
Contributor guide
Assessment
This issue has not been assessed yet.