OpenKeeper
OpenKeeper copied to clipboard
Rooms сonstruction
I propose to review the mechanism construction of rooms.
MapLoader construct tile in independence the room it or not. But if tile is room RoomConstructor tells MapLoader what asset it must load for this tile (including walls). An exception may be only not buildable rooms (e.g. dungeon heart).
Why? we have many problems with room walls and their update
Sounds good. Also with the current scene graph design (and logically in any future one as well it'll work) it'll go nicely to a page. As the design breaks there currently if the player makes 166x166 room, it gets batched as whole. It should be treated the same way in visual representation.
And... In DK2 room builds and sells from diagonal (1 diagonal per time). This should be taken into account
I started refactoring MapLoader, because I made a mistake, when move map on 0.5 * TILE_WIDTH. When I finish with DoubleQuad, I do PR. I think I finished at next week
https://github.com/ArchDemons/Keeper/tree/newmaploader. Question about terrain height position. We have move down on TILE_HEIGHT. I think this is wrong. Why? Map have 3 levels: top, floor and under floor (combat pit, dungeon heart, temple, water bed. All this 3 levels >= 0 by y coordinate (top - 2, floor - 1, under floor - 0). In current version we have top - 1, floor - 0, under floor - -1.
Should I move our map before PR?
@tonihele, I answer on you email when will be ready
If we can just leave that -TILE_HEIGHT off by changing to 2, 1, 0 it makes much sense to change it. Less code. But other than than that, both make sense to me.
No sweat about the answering, I haven't really done anything except designing in my head. And looking the design options. And since it means moving all logic away from the graphics, I won't even really code anything before that monster is merged :) So much changes, that I would die on the merge... That and me destroying the whole World package (I'm actually going to destroy it...)
That and me destroying the whole World package (I'm actually going to destroy it...)
You MONSTER!!! 😁
It is a draw, we are all monsters :) I'm just thinking that all logic (room building too) and entity data (tile, map, creature, etc.) under game -package. All that is left, is graphics, and that will be under view package then. It clearly separates the stuff. Right? But further discussion about that really should be under the #263