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

Having trouble importing a very primitive map without tileset #199

Open
mydumpfire opened this issue Jul 5, 2023 · 6 comments
Open

Having trouble importing a very primitive map without tileset #199

mydumpfire opened this issue Jul 5, 2023 · 6 comments

Comments

@mydumpfire
Copy link

I'm trying to import an extremely simple LDtk map. There's just one integer grid layer with one grid value and an entity layer with two entities. No tilesets or anything, just plain colors. But it's just not importing correctly:

image

Here's the repo: https://github.com/mydumpfire/ldtk_topdown

It's just a ~50-line main.rs. The map is in assets/topdown.ldtk. Any help will be appreciated.

@Trouv
Copy link
Owner

Trouv commented Jul 7, 2023

Thanks for sharing the source code, I ran it and got expected results.

What happens if you run the examples in this repo? What about the examples in bevy_ecs_tilemap?

@mydumpfire
Copy link
Author

I've managed to fixed it by using a proper tileset/atlas, instead of IntGrid colors.
I'll also try running the examples, but since they all use atlases, I expect them to fully work.
Btw, by "expected results", did you mean that you got something working or did you get a result similar to my screenshot?

@Trouv
Copy link
Owner

Trouv commented Jul 8, 2023

By expected results, I mean that it looked correct on my machine. IntGrid color rendering is implemented very differently to normal tile layers so it's not too surprising that there'd be some issues on some machines. A single white image is generated and treated as a single-tile tileset, and the colors are adjusted from there using bevy_ecs_tilemap components.

I wonder what part of that solution is breaking for you here. Maybe a plain tilemap rendered with bevy_ecs_tilemap using a single-tile tileset would have similar issues..

@Trouv
Copy link
Owner

Trouv commented Jul 8, 2023

What are your specs, OS, and have you updated your graphics drivers recently?

@mydumpfire
Copy link
Author

I'm on Linux, with:

{ 
    name: "NVIDIA GeForce GT 635", 
    vendor: 4318,
    device: 4736, 
    device_type: DiscreteGpu,
    driver: "NVIDIA",
    driver_info: "470.199.02",
    backend: Vulkan
 }

It's an old card with a legacy driver. It's still weird that this happens though. I've played a few games in this machine and I have yet to see any problems with it.

I'm also having problem with my character sprite sometimes looking weirdly corrupted, but it's usually gone the next time I launch the binary (without rebuilding). I still have yet to test the release build though, I wonder if it would yield different results.

@mydumpfire
Copy link
Author

mydumpfire commented Jul 13, 2023

EDIT: I think this is an upstream issue: bevyengine/bevy#4053

Getting the corruption again, this time it's not going away:
image

Zoomed in:
image

The original asset:
player

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants