Tilemap tile collisions broken in r152?

Discussion and feedback on Construct 2

Post » Fri Nov 29, 2013 10:25 pm

I've been trying different methods for drawing the ground surface in a lander type game I'm working on. When I saw the release notes for r152 and the tilemap implementation here https://www.scirra.com/blog/ashley/3/tech-blog-tilemap-tidbits
I thought it would be ideal.

In this blog @ashley says that spaces/non-tiles are not used for collisions, but for me, I can only get the collision box to be the entire tilemap object.
I've tried changing every setting I can find but I cannot get the collision boxes to be "tiles only". Is this broken in r152?
B
14
S
3
G
2
Posts: 59
Reputation: 2,180

Post » Fri Nov 29, 2013 11:58 pm

Is trying to create an event that is used all over the map?. Is it?.
B
12
S
2
Posts: 11
Reputation: 913

Post » Sat Nov 30, 2013 1:10 am

I'm sorry, I don't understand what you mean.
B
14
S
3
G
2
Posts: 59
Reputation: 2,180

Post » Sat Nov 30, 2013 1:01 pm

Post a .capx, it was working fine last I tried.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Sat Nov 30, 2013 2:41 pm

works perfectly for me.

I use collision with TileMap for my little project, and work very good.

https://dl.dropboxusercontent.com/u/164459914/Akuji%20The%20Demon/index.html
anata2013-11-30 14:41:56
B
38
S
13
G
4
Posts: 152
Reputation: 5,147

Post » Sun Dec 01, 2013 12:10 pm

Rather than stripping everything out of my existing project I've started a new project, put a tilemap object in, drawn a few tiles in it and set the interface to show collision boxes.

https://www.dropbox.com/s/3wgoub1c7he21uh/Tilemap_whole_object_collision.jpg
Edit: The forum image code doesn't work so I can't show the inline image.

Note there is only one collision box and it's the whole object.
In my game where I was going to use tilemaps for the terrain, this manifests itself as not being able to fly into the tilemapped area, or if I spawn the ship in the middle of it, I can't move and it just flickers and spins on the spot.

Capx here;
https://www.dropbox.com/s/qbb7u5yw4s5zk7g/Tilemap_whole_object_collision.capx

What am I missing? I assumed there was something I needed to toggle or tick somewhere with the object to make it pick the tiles themselves as collision areas but after several hours going round in circles, I can't find anything. Zantium2013-12-01 12:12:46
B
14
S
3
G
2
Posts: 59
Reputation: 2,180

Post » Sun Dec 01, 2013 12:37 pm

Collision works only if you put the Behavior "Solid" to your TileMap.

After that, all tiles have collision.

I use 2 TileMap for my project.

One for Background with no collision, and one for Tile for collision.

You cant enable or not a collision box of a tile , so tiles with collision into a single TileMap.
B
38
S
13
G
4
Posts: 152
Reputation: 5,147

Post » Sun Dec 01, 2013 1:49 pm

Oh - you are referring to the editor's 'show collision polys' option. You're right, it outlines the whole rectangle in red, which is wrong. At runtime it should work fine though. Post to the bugs forum with the issue and I'll take a look for the next beta.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Post » Sun Dec 01, 2013 8:19 pm

@Ashley - OK, so the 'show collision polys' not working is a bug/feature, it helps to know it's not going to show what I expect.

That's not actually what I'm referring to though, I mean it wasn't working during runtime which I noted here 'this manifests itself as not being able to fly into the tilemapped area, or if I spawn the ship in the middle of it, I can't move and it just flickers and spins on the spot."

@anata I've tried using the solid behavior but when it's turned on, the above happens.
Is the tilemap not compatible with all other movement plugins? I have a mixture of custom (rotate) and physics (for impacts/thrust/lifting) in my project as it's a lander type game.

Edit: Now I know that the 'show collision polys' bit wasn't working as expected I went back into my project and tried again. I have found that the incompatibility is with tilemaps and the physics behavior. With physics turned on, the whole tilemap becomes an impenetrable object.

@Ashley is this fixable or are those just not going to work together? I keep finding limits that stop me making my ideas work and sending me back to the drawing board. :)Zantium2013-12-01 20:49:54
B
14
S
3
G
2
Posts: 59
Reputation: 2,180

Post » Sun Dec 01, 2013 11:42 pm

@Zantium - the .capx you provided does not actually test any collisions. You should provide a .capx which actually demonstrates the problems you're seeing.
Scirra Founder
B
398
S
236
G
88
Posts: 24,433
Reputation: 194,635

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 24 guests