Skip to content

Insert Object Between Tiled Layers using (Leap + Flame) #3594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
woxxin20 opened this issue May 5, 2025 · 0 comments
Open
1 task done

Insert Object Between Tiled Layers using (Leap + Flame) #3594

woxxin20 opened this issue May 5, 2025 · 0 comments

Comments

@woxxin20
Copy link

woxxin20 commented May 5, 2025

What could be improved

i have map animated.tmx in my asset that i created with Tiled software,

🧭 Context and Goal
I'm building a game using Flame (v1.11.0) with the Leap platformer library, leveraging .tmx maps and object layers for level content.

My goal is to insert animated objects (custom Flame components) — such as cow_zone areas — between specific Tiled map layers during gameplay. These animated tiles are parsed from ObjectGroup layers and drawn using custom PositionComponents (e.g., UniversalAnimationLayer), each with an assigned priority.

Flutter: 3.29.3
Dart : 3.7.2
Flame: 1.19.0

Below is GIF From TIled(that view want)
https://github.com/user-attachments/assets/5558bd9e-d1ce-410e-b2f7-f5ad3daa1e1e

this is the problems (that i got)
Image

Leap: https://github.com/VeryGoodOpenSource/leap.git
flame_tiled: https://github.com/flame-engine/flame.git
flame_behaviors: ^1.0.0

tiled map details:-----
tiled Software V:--1.10.2

Tiled Map Properties:--

tileset atlas :-- 4048*4048

34440 Map size Tiled
22016
2560 Dimension Figma Size
Orthogonal
Right Down

64*64 Tile && Grid Size

Flutter Anchor camera.viewfinder.zoom = 0.31;

Player:--128128
Iteam:--75
75
enemy:--128*128

Layer Format:--

respawn -Object
spawn -Object
enemies -Object
items -Object
windMill_zone -Object
fishhouse_zone -Object
treehouse_back -Layer
Ground -Layer
water/spikes -Layer
treehouse_front -Layer
house_zone -Object
cow zone -Object
wateffall_zone -Object
tree_zone -Object
fabulous_zone -Object
decorations_terrain -Layer
decorations -Layer
coconut zone -Object

❗️The Core Problem
Leap loads and draws all Tiled map layers as a single internal structure, making it impossible to inject custom Components (like animations) between Tiled layers.

Even though I:

Gave negative or mid-range priority values (priority: -1000, priority: 250, etc.)

Used UniversalAnimationLayer as a PositionComponent

Parsed ObjectGroups from .tmx files and spawned Flame animation components correctly

…the result is:

Custom objects always render either completely behind or completely in front of all tile layers.

There’s no access to control per-layer draw order or inject content between tile layers.

⚠️⚠️Recap:-
Object render between 2 layer (priority not work) @erickzanardo @spydon @kurtome

Why should this be improved

To add animated object between layer

Risks

No response

More information

No response

Other

  • Are you interested in working on a PR for this?
@spydon spydon changed the title Design Limitation /Feature Request : Insert Object Between Tiled Layers using (Leap + Flame) Insert Object Between Tiled Layers using (Leap + Flame) May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant