Skip to content
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

An IntGrid example would be cool #51

Closed
johanhelsing opened this issue Feb 6, 2022 · 3 comments · Fixed by #269
Closed

An IntGrid example would be cool #51

johanhelsing opened this issue Feb 6, 2022 · 3 comments · Fixed by #269
Labels
documentation Improvements or additions to documentation

Comments

@johanhelsing
Copy link
Contributor

I've been using int grids for simple colored tiles because it's a lot simpler than maintaining a 1xN texture with colored pixels

image

image

Would be great with an example that showed how to load such levels.

@Trouv
Copy link
Owner

Trouv commented Feb 6, 2022

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!

@Trouv Trouv added this to the 0.2.0 milestone Feb 9, 2022
@johanhelsing
Copy link
Contributor Author

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.

@Trouv Trouv mentioned this issue Feb 25, 2022
@Trouv Trouv modified the milestones: bevy_ecs_ldtk 0.2.0, bevy_ecs_ldtk 0.3.0 Apr 2, 2022
@Trouv Trouv added the documentation Improvements or additions to documentation label Apr 2, 2022
@Trouv
Copy link
Owner

Trouv commented Apr 25, 2022

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.

@Trouv Trouv removed this from the bevy_ecs_ldtk 0.3.0 milestone Apr 25, 2022
@Trouv Trouv closed this as completed in #269 Dec 2, 2023
Trouv added a commit that referenced this issue Dec 2, 2023
…g getting-started guide (#269)

Closes #51 

The existing getting-started guide wasn't a satisfactory "tutorial"
according to the "grand unified theory of documentation". This PR adds a
more complete-minimal-project tutorial that covers the steps that the
getting-started guide did, as well as steps for setting up the LDtk
project and adding gameplay. This tutorial is associated with a new
example - `tile_based_game`. Most of the code snippets in the tutorial
try to include code sections from the example to make sure these two
match.

I will likely update the `lib.rs` to link to this tutorial instead of
copy-pasting the same getting-started guide in a future PR. I might also
remove the getting-started guide in the `README.md`, but I'm more okay
with it existing there as marketing material.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
2 participants