Closed johanhelsing closed 11 months ago
Hmm do you mean visually representing the intgrid layer using its colors? The behavior now is to make the intgrid layers invisible by default, unless they have auto-layer rules on them. However, using the intgrid colors by default instead of making them invisible makes a lot of sense too.
In other words, this is probably possible now with the current plugin, but it's a bit difficult since it's not designed for it. I think making this the default behavior would be a pretty sensible change, assuming bevy_ecs_tilemap
will play along nicely. Could even make it an option in LdtkSettings
.
At that point, making an example out of it would be really easy!
Hmm do you mean visually representing the intgrid layer using its colors?
Yes. I used to do this with bevy_spicy_ldtk on bevy 0.5. There I simply made a texture using the intgrid colors with filtering set to nearest so it's very cheap to render.
I've been trying to come up with clean solutions for this using the existing bevy_ecs_ldtk, but I keep getting hit by bundle_int_cell not providing enough access to the world/resources and layer metadata. Guess it should be a lot better after #47 and #49 are fixed.
Planning to make a sokoban example/tutorial after 0.3 releases. This way we can have two fleshed-out-game examples, one tile based (sokoban) and one not tile based (platformer).
This sokoban example could use a lot of intgrid logic, and intgrid colors, to satisfy this issue.
But, for now, I'm removing the 0.3 milestone.
I've been using int grids for simple colored tiles because it's a lot simpler than maintaining a 1xN texture with colored pixels
Would be great with an example that showed how to load such levels.