Board game with unlike tiles in size and position

Hello!

We are working on a board-like game which will have tiles in different size and not in a array.
Example:


| | | | |
|-----| |---------------|
| |------| | | |
| | | | | |

We are doing some tests.
Does anyone have to propose a workaround or have done this successfully?

Thank you! [import]uid: 38658 topic_id: 21979 reply_id: 321979[/import]

You need to figure out how to represent the tiles on your board in a data structure that you can use in your code. It’s kind of difficult to picture what you want to do from that display of dashes and pipes.

In general, you could consider the smallest possible tile as 1 tile, and bigger tiles expressed as a combination of smaller tiles.

For instance[lua]local map = {
{nil,{tiletype = ‘A’, tileswide = 2, tileshigh = 2},nil,nil,nil},
{nil,nil,nil,{tiletype = ‘B’, tileswide = 1, tileshigh = 1},nil},
{nil,nil,nil,nil,nil},
{nil,nil,{tiletype = ‘C’, tileswide = 3, tileshigh = 2},nil,nil},
{nil,nil,nil,nil,nil}}[/lua]Where internally the map is 5x5, but you’d consider each tile to occupy the cell of the array it is in and the (tileswide-1) tiles to the right of it, and also the (tileshigh-1) tiles immediately below THOSE tiles… [import]uid: 70391 topic_id: 21979 reply_id: 87370[/import]

Thank you for the reply!

Take a look at a simple example: (in case the image does not appear http://flic.kr/p/buV5Qt)

image002 [import]uid: 38658 topic_id: 21979 reply_id: 87480[/import]

Right, so it looks like your grid would be 10x5 (and most of these tiles would be of the tileswide=2, tileshigh=1 variety) [import]uid: 70391 topic_id: 21979 reply_id: 87516[/import]