How do I destroy multiple tiles from a tilemap on overlap?

Get help using Construct 2

Post » Sat Jan 31, 2015 3:13 am

Sorry if this has been answered before as there seems to be a lot of variation in the forums on using tilemaps and collision and destroying tiles.

Right now in my game I can destroy a tile in a tilemap by checking the X, Y of the collision (tilemap.PositionToTileX(collidingSprite.X) against the X, Y of the tile and destroying that tile no problem.

But checking X/Y is one point, thus one tile at a time even if you're overlapping more than one tile. It's checking just the X/Y position of the overlapping collision rather than EVERYTHING that the collision is touching.

Originally I've been using just tiles instead of a tilemap and it works perfectly and I get a solid 60fps on desktop and 60+ fps on Android. It's my iOS builds that suffer because of too many collision checks (forced to use iOS 8 builds atm as it's the only way to get a decent framerate). Using a tilemap reduces the checks by a huge margin, but I just can't get it to work the way I need it to.

Any thoughts? :)

Thanks!
B
12
S
1
Posts: 16
Reputation: 1,332

Post » Sat Jan 31, 2015 3:28 am

That should have read 'Originally I've been using just *sprites* instead of a tilemap' :|

To get an idea of what I'm doing you can check out the trailer here:

https://www.youtube.com/watch?v=_6i177alrHc

Nothing in that trailer I'm able to do with a tilemap (for the dirt) because I need to be able to destroy more than one at a time... but I mentioned that already ;)
B
12
S
1
Posts: 16
Reputation: 1,332


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests