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

0 favourites
  • 8 posts
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • 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:

    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.

  • It would help if we could see the collision poly's in the layout view.

    Suggestion for C3 I guess.

  • 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.

  • Ok, I thought we had that feature, just couldn't find it.

  • 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)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)