How do I remove all collisions from a tileMap object?

Get help using Construct 2

Post » Fri Oct 07, 2016 12:02 am

How can i disable completely the collisions from a tilemap object? I mean completely, ignoring all collision and overlapping events. There's an option in the properties tab for sprite objects, but can't find it for tilemaps. Is there any way to achieve that? Using events or anything? Cheers!
B
23
S
11
G
6
Posts: 181
Reputation: 5,010

Post » Fri Oct 07, 2016 1:02 am

Other than changing a tile, or using a variable comparison, no.
Image ImageImage
B
172
S
50
G
184
Posts: 8,444
Reputation: 116,107

Post » Fri Oct 07, 2016 8:31 am

...wot? ·_·

thanks for the answer @newt , but i don't really think Im getting it... What you mean, a variable comparison?

I'm not saying individual tiles, but the whole object thing -- make the whole tilemap into a merely decorative thing (as platforms an jumpthrus and stuff are implemented separatedly).

Yeah Im having performance issues. Getting around 10-15k collision checks per second. Im not savvy on the art of debuggin, but i think thats a lot. Not even 100% sure it's the tilemap -- but me tilemap is 360,000 tiles big (25600 x 14400 px), tiles at 32px, and uses currently 68982 collision rects, which i also think is quite a lot. On the bright side, I'm using png-8... and, again, only need the tilemap itself for decorative purposes.

I'm beginning to fear i should have used many small tilemaps instead of this monster. Well i could split mine into smaller ones, but this would be rather shitty work (and just the kind of thing you spend hours doing and tweaking and fixing just to realize on testing that performance blues is still there), so i'm checking other possibilities first.

There's always the possibility, or even probability, that I'm doing other things wrong too. I'm doing a big sandbox, which is always tricky on performance, but (i think) I'm properly disabling behaviours and stuff of faraway objects so they don't mess with frameflow... anyway, this should be stuff for another topic -- if this one finally doesn't ease my worried mind ;P
B
23
S
11
G
6
Posts: 181
Reputation: 5,010

Post » Fri Oct 07, 2016 8:50 am

If you put your collision check in a sub event of a variable comparison, you can make it so that the collision events only happen when the value of the variable is what you want.
But, that only works if you have events that check for collisions on the tilemap, which Im guessing that you don't.
If that is the case, then that can't be your issue, since there would be no collisions happening.
Image ImageImage
B
172
S
50
G
184
Posts: 8,444
Reputation: 116,107

Post » Fri Oct 07, 2016 8:55 am

you use tilebg on all your asset? just asking
B
79
S
31
G
7
Posts: 148
Reputation: 9,179

Post » Fri Oct 07, 2016 9:54 am

@newt thanks mate, i think i see now. Guess is something similar to what i am doing with enemies and other stuff: they only became "active" when they overlap a certain "proximity box".
So, with no collision or overlappin event or behaviours on the tilemap there should be no performance impact? Still im getting collision rects (rectangles, guess its each tile?) on the debugger.
I think you are right, the problem may be elsewhere. I'm not sure I'm readig the debbuger correctly too.

@clarkkentnicdao not tiledBG but a tileMap. But yeah, it makes the bulk of the scenery and covers the whole layout, with separated sprites here and there to represent animated or interactive bits.
B
23
S
11
G
6
Posts: 181
Reputation: 5,010

Post » Sat Oct 08, 2016 2:09 am

instead of tilemap why not use sprite?
B
79
S
31
G
7
Posts: 148
Reputation: 9,179

Post » Sat Oct 08, 2016 5:52 am

One thing to consider: regarding the conditions you use to filter before a collision check, make sure that they do not filter any of the objects that you subsequently check for collision.

For example, if you have an object you may wish to check for collision and you give it a boolean canBeChecked, then checking the boolean is true before checking collision will prevent collision cells from working, which may have a performance hit for the collision check. See Caveat 2 in Ashley's blog.
A big fan of JavaScript.
B
76
S
20
G
76
Posts: 2,296
Reputation: 47,576

Post » Sat Oct 08, 2016 12:14 pm

Thanks guys. To be honest Im not that sure anymore that my problem is in the tileMap itself (as @newt pointed, if there's no collision at all it shouldnt give me collision trouble). The draw calls could be, but it dosnt really looks like that, although Im no even sure I'm reading the debugger properly...
My new fav suspect is the "solid" invisible platforms (nearly 2000 at the moment, but there will be many more). PassThrus too, tough there's not as many as solids. Monsters and items are created on proximity and destroyed at a certain distance, there shouldnt be problems with that. The thing is, when i try to check the solid platforms for collisions their bare numbers seem to slow everything down, so I think I'm havin a read on that blog entry that @Colludium mentioned and see if it fix me.
@clarkkentnicdao well it would be a 25600 x 14400 px sprite! Many sprites, could be... I was pretty sure my tilemap option was better and more efficient, but honestly Im no that sure any more -_-

thank again for yr help brothers
B
23
S
11
G
6
Posts: 181
Reputation: 5,010


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests