[Solved] Is this a tilemap bug [r231]?

Discussion and feedback on Construct 2

Post » Tue Jul 26, 2016 4:53 pm

Today I was setting up another testing environment for our project. What I wanted to achieve to have the character (green circle) move only on the grid lines. I used the tilemap object for the grid and I split each block into 4 pieces. Then I assigned each piece a different collision box leaving some free space around the grid lines for the character to move. When I add the 4 pieces once (forming 1 block) it works just as it should (top left).

The problems starts when I add more than one block next to each other (top right). Seemingly random quarters of the block "lose" it's collision polygon. The image still can be seen, so the tile is there, but I have no idea why does that happen. The more block I place the problem comes out even more (bottom part of the image). The collision polygons do not overlap, and I also set the Tile width; Tile height properties right.

The image:
Image

Edit: If this turns out to be a bug, then I'll file a bug report.

Edit 2: I double checked and the problem seems to come from the fact that the tiles gets deleted, like I place a new one over them. The tile size is 50x29px.
Last edited by glerikud on Thu Jul 28, 2016 1:52 pm, edited 2 times in total.
B
135
S
33
G
17
Posts: 1,559
Reputation: 20,732

Post » Tue Jul 26, 2016 5:17 pm

It would help if we could see the collision poly's in the layout view.
Suggestion for C3 I guess.
Image ImageImage
B
171
S
50
G
179
Posts: 8,394
Reputation: 113,482

Post » Wed Jul 27, 2016 9:22 am

newt wrote:It would help if we could see the collision poly's in the layout view.
Suggestion for C3 I guess.

Are you talking about the View tab's "Show collision polys" option? That's how the picture above was made.
B
135
S
33
G
17
Posts: 1,559
Reputation: 20,732

Post » Wed Jul 27, 2016 1:32 pm

Ok, I thought we had that feature, just couldn't find it.
Image ImageImage
B
171
S
50
G
179
Posts: 8,394
Reputation: 113,482

Post » Wed Jul 27, 2016 2:45 pm

@glerikud

From looking at your picture above, I can see that there are no cases of a collision box on both sides of a grid line.

In the first (top left square) you have 4 grid lines and four collision boxes. In your second example (top right) you have two squares joined together - so you have 7 grid lines and 7 collision boxes. The problem is that the grid line that connects the two squares together can only have one collision box...

In the bottom part of the picture, there is only one complete square (the left most). All the other squares are missing one or more collision boxes where they are joined to another square. But every grid line does seem to have a collision box... (there are 40 grid lines, and 40 collision boxes)
B
98
S
35
G
20
Posts: 438
Reputation: 17,875

Post » Wed Jul 27, 2016 9:05 pm

@AllanR Since that I realized that it's not just the collision box what is missing. It's the tile itself. For some reason it deletes the tile randomly.
B
135
S
33
G
17
Posts: 1,559
Reputation: 20,732

Post » Wed Jul 27, 2016 9:36 pm

Well, it looks to me that you are putting a tile over top of an old one - so it isn't deleted, but replaced...
the tiles are square, but your grid lines are diagonal.
B
98
S
35
G
20
Posts: 438
Reputation: 17,875

Post » Thu Jul 28, 2016 1:51 pm

@AllanR

Each of the tiles are .... wait a second... Damn, how could I be so stupid... Yes, you are absolutely right, I got confused and didn't think with the whole tile, just the diagonal lines it displays. I change the topic name and there is no bug in the tilemap object.

Thank you for the help.
B
135
S
33
G
17
Posts: 1,559
Reputation: 20,732


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 16 guests