You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The validations module is kind of a code smell. Instead of validating at runtime, we should be forcing the type system to take care of things for us. If Walls can't have objects, then we should change Tile so that they can't have objects. We can do this using an enum that only has tile properties that make sense for each tile.
The TileType representation is also pretty horrendous. Like Room and Door are both technically room tiles. But then so is Wall. Passageway and PassagewayWall are both passage tiles but we don't group them that way. This whole type should not be a flat enum. We should have separate ones for PassageTile and RoomTile.
Related: game map should not store tile size. Should use the tile size of the current level.
Some considerations:
When deciding on tile sprites, we will need to consider a wholistic representation of "rooms" so that we can scatter things like torches and generate appropriate floor tiling patterns.
There may be walls within rooms, not just around them or around passages
Need to know which tiles are part of a given room so we can place objects
Objects can never block a doorway or go on a wall
The text was updated successfully, but these errors were encountered:
The validations module is kind of a code smell. Instead of validating at runtime, we should be forcing the type system to take care of things for us. If Walls can't have objects, then we should change Tile so that they can't have objects. We can do this using an enum that only has tile properties that make sense for each tile.
The TileType representation is also pretty horrendous. Like Room and Door are both technically room tiles. But then so is Wall. Passageway and PassagewayWall are both passage tiles but we don't group them that way. This whole type should not be a flat enum. We should have separate ones for PassageTile and RoomTile.
Related: game map should not store tile size. Should use the tile size of the current level.
Some considerations:
The text was updated successfully, but these errors were encountered: