Tilemap: del collision poly from individual tiles?

0 favourites
  • 14 posts
From the Asset Store
Each tile 64 by 64 pixels - Ultimate Tile Set for your awesome games
  • Hi all,

    I searched the forum and was unable to see a way to remove the collision polygon from individual tiles in a tileset.

    My project is a top down (zelda-ish) view:

    The first layer is a tiled-background object of "grass".

    The second layer is a tilemap containing my tiles on which the player is on top of. It contains things that would block movement (tree stumps, rivers) but also stuff I want the player to walk over (different ground types like dirt or different coloured grass).

    The third layer is a second tilemap with things the character would pass behind (like tree-tops).

    My problem is I cannot delete the collision polygon on tiles I want the player to walk over.

    You can see my work in progress at gordonlittle.ca / tinymage

    Is there plans to implement this or is there a better way to do this?

  • Hey, I've been thinking about this too and I have a different approach to it, but I still haven't made it so I'm not even sure it's doable.

    What I'm thinking about is having a "special" kind of tile in the tilemap, for instance, a "special wall" tile.

    When I load my tilemap, I was thinking of checking for said tile, erasing it, and creating an "special wall" object where it was. The same could be done for enemies, or anything else really.

    As I said, it's only an idea and I haven't gotten to the point to implement it yet, but since tiles are basically an array of tiles, I think it's doable. Also I wouldn't advise messing with tiles directly unless you're drawing on them or something, you wouldn't even be able to animate a tile if you wanted to destroy it or something, just erase.

  • I think that's the opposite of my problem. I want to turn off the collision on tile and have it still be seen. So it can be walked over, like a different shade of grass, or flowers, etc. Without creating any extra sprites, etc.

  • I think I'm going to have to make a 3rd tileset for non-solid background. Maybe turn off the tiled-background and replace it with another tileset.

  • Oh, I think I see what you mean now. Can't you just have a tile with every dot on the bounding box set to 0,0? It would still show up, but there would be no collision I think.

  • Use two tilemaps: one for the tiles that are shown, and another invisible one for collisions only.

  • Is there much of a performance penalty layering multiple tile maps? Right now I have a background, solids, foreground, and parallax each with a different tileset.

  • There shouldn't be, no.

  • Thank you very much!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello

    I'm stuck with just trying to get collision working. I don't know how to tell it to enable collision for non empty tiles.

    I have the tilemap with a "solid" behaviour but it's doing collision even on empty tiles. Help?

  • That's the expected behaviour. Every tile, regardless of what graphic is there, has a square collision box.

    I had to make 2 tilemaps one on top of the other. One was solid and contained tiles I wanted collision to occur on. The other was floor tiles to walk over.

  • I confirm. I use 2 tilemap and this is the way to go.. one for collision and one for no collision the rest should be sprites so no slowdown or nothing.. its an object like any others.

  • For my current project I have 4 tilemaps for a topish down zela-like view.

    1 - Background (Stuff player walks on)

    2 - Solids (Stuff player bumps into)

    3 - Foreground (Stuff player walk behind

    4 - Parallax Forground (Stuff like clouds, etc)

  • Silkc2, I know this post is old, but for those who are reading.

    First you need to bring up the tilemap editor pannel. Then you need to click on the tile in the tilemap, then you need to click on the poly collision button, then you can map out the individual tiles collision

    You can also flip, mirror, and rotate your tiles with this pannel.

    You can apply physics behavior too but it is very very glitchy due to the fact that tilemaps can not rotate thus avoid it.

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