caves icon indicating copy to clipboard operation
caves copied to clipboard

RenderLayer Component

Open sunjay opened this issue 6 years ago • 0 comments

Right now the ghost component plays two roles: 1. collision detection, 2. rendering.

We should really have something like:

#[derive(PartialOrd, Ord)]
enum RenderLayer {
    Floor,
    Item,
    Player,
    Above,
}

(Feel free to think of better names)

These names are not restrictions on what can go on that layer. It's just a conceptual picture of the hierarchy we're trying to create.

Floor could be the default layer since it's the very bottom.

So stairs could be ghost and also have Item as their layer. Players and enemies all have Player as their layer. Decorations like torches have Item as their layer. If we add an arch over a doorway it would have Above as its layer.

sunjay avatar Apr 27 '19 14:04 sunjay