Closed PabloMansanet closed 3 years ago
Implemented by #17 . I looked at both bevy_tilemap
and bevy_ecs_tilemap
and I didn't love either of them, looks like the biggest benefit in going for them would be performance, not ergonomics, and that's not a priority right now so I decided to go with something custom instead.
At the moment, the tile system in the demo is very basic.
Expand ASCII map parsing
Map representation
Currently, the map is an immutable,
Arc
wrapped structure to deal with the limitations ofwasm
callbacks, and game objects such as the character and death marker don't reside in the map at all, but are simply rendered on top of it. Thiswasm
limitation will be gone, so we don't have to worry aboutArc
to share references with thewasm
instances.Some thoughts:
WorldLocation
component.Tile
enums to the character which may contain things in them, e.g.Tile::Wall
,Tile::Floor(None)
,Tile::Floor(Some(Bomb(countdown: 2)))
. So we need a bevy system/function that iterates over all things withWorldLocation
and works out the configuration of these enums to pass to the character.Helpful crates
There are crates out there designed for this sort of situation that may help us, bevy_tilemap is the original one I looked at, though I see bevy_ecs_tilemap helps representing tiles in a more ECS idiomatic way so it may be worth looking into as well.