-
So i want to render a tilemap. not like the crates bevy-ecs-tilemap etc. i have my own system i really wanna use. so my qwestion is what the smartest way of rendering tiles is. i have a tilemap with like lets just say 20 tiles down. should i make lets say 10_000_000 entites corresponding to tiles and then make then visible and invisible by if there is a solid tile above them? or should i make a chunk entity that holds tiles as structs (thats what i did in my cpp version) and then somehow render them manually (idk how to do that in bevy)? or is there a other way u would recommend to me? thanks :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
I think chunking is useful, but mostly from a rendering standpoint, to avoid excessive draw calls. You don't necessarily need to put your tiles in a chunk entity because, similar to But it might be simpler to code if you just did an entity per chunk. Anyway, you can absolutely do custom rendering in Bevy. I don't know of any good tutorials specific to Bevy, but Bevy uses As for the Bevy specific stuff, I'd look at the source code for other Bevy plugins that do custom rendering. Maybe |
Beta Was this translation helpful? Give feedback.
I think chunking is useful, but mostly from a rendering standpoint, to avoid excessive draw calls.
You don't necessarily need to put your tiles in a chunk entity because, similar to
bevy-ecs-tilemap
you can have an individual entity per tile, and then convert it to chunks before rendering.But it might be simpler to code if you just did an entity per chunk.
Anyway, you can absolutely do custom rendering in Bevy. I don't know of any good tutorials specific to Bevy, but Bevy uses
wgpu
which you can find a few tutorials on. WGPU is a sane, safe rendering API, so if you have done a little bit of OpenGL rendering, you should be able to understand what the functions mean, and it shouldn't be t…