Sign in to follow this  

Coping with different shaped rooms in a 2d grid

Recommended Posts

I'm currently doing the designing and planning for a 2d tile base overhead game and I’d always planned to work with a standard 2d grid but I’m finding it a bit limiting when it comes to designing layouts. For instance the size of a hallway, bedroom, and living room are all very different. I’d always planned for some rooms to consist of multiple tiles but even then equal sized tiles seem to limit the design options. So I’m looking for alternatives.

Currently I have the room shapes as follows:
Hallway 2x1
Bedroom 2x1
Living room 2x2

But a bedroom should be wider than the hall so those sizes don’t work visually.
One option would be to decrease the tile sizes and increase the number of tiles that made up the rooms.
Hallway 2x1
Bedroom 3x1
Living room 3x3

But that means more tiles, and more tile art.

Another option I came up with is to use scaling of adjacent rooms. So all tiles are the same internally but during the rendering the hall is rendered at half width and the adjacent rooms tiles are scaled to fill in the missing width. In this way the size difference is only a visual trick.

The third option I came up with is an inside outside approach. Where by a polygon defines an inside space and that inside space can have different sized tiles as long as the overall layout fits with in the polygon. In this way the rooms can be all sorts of size but the overall layout of the building fits within the standard 2d grid of the rest of the map. But this requires additional complexity in the content generation to cope with filling the polygon.

I should note that all maps will be procedurally generated.

So what do people think is the best way to tackle this problem? I’m leaning to 2 or 3 at the moment.

Share this post

Link to post
Share on other sites
I've always just preferred to use different size tiles, or to use smaller tiles. Although, in a way, these ideas are really one and the same, with only slight differences on the back-end. You can easily do tilesets in different sizes, then just run a script to split the bigger tiles down into the base tile size, then in your generation code you can generate on grids of different sizes, but the final edit of the level will result in placement of base-sized tiles.

I wouldn't really recommend scaling, though. It's harder to maintain a consistent look and feel to the environment tiles if this tile here is scaled 1:1 and that tile over there is scaled 2:1, while this tile yonder is scaled 1:2. All that scaling will have a noticeable effect on the look of things. Plus it sort of plays hell with the placement of things if tiles can be arbitrarily scaled, as it breaks your grid. In procedural generation, the grid is still the king, at least if you want to keep things simple. Edited by FLeBlanc

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this