The_Sloth_Sleeps
Arcane
- Joined
- Oct 26, 2016
- Messages
- 2,484
Draw order is encoded with a draw order map, in an image. Its quite simple as in, I know the height of my character, and position. Objects like buildings, trees, anything, is encoded as "tall" therefore any colliding pixels we can just determine based off Y, which should get drawn on top. Things like overhangs or windows where you can get on,off,on type situations have further encoding to describe how to resolve.Awesome work The_Sloth_Sleeps , really cool to read this thread from page 1 till now.
How was it to deal with pathing and draw order when making a true 2D isometric?
I hear that's pretty tough in comparison to 3D isometric where both these things can be tackled pretty intuitively without any "hacks".
I saw you also got some verticality going on which is again impressive since many 90's cRPGs don't even bother lol.
Likewise geometry has its own map, encoded in an image.
So, say you use Krita, you would paint in walkable areas, as well as draw order information on top of the visuals.
Then there is a flood fill to generate a coarse nav mesh based off geometry, a connected graph of vertices.
The multiple levels is currently is just spatial trigger that listens to entry, exit events.
Then a corresponding truth table e.g. If entered switch on level 2, turn off level 2, etc.
I think in theory that could support any size building. But its cumbersome to setup at the moment.
I am rewriting the engine at some point this year, to handle everything more gracefully.