Optimizing Tilemap Collisions

Get help using Construct 2

Post » Sat Jan 18, 2014 5:28 am

So my game has about 40K-80K collisions per second, according to the debugger. Almost all of that comes directly from the tilemaps used to build my levels: if I remove the tilemaps, that number goes down to 300 or so. My tiles are 32x32, and my level is 5120x3072, with lots of terrain.

Since I'd like to be able to make larger levels in the future, are there any ways to optimize tilemaps? Disabling collisions for tilemaps that are a certain distance from the player seems like the most basic approach, but the Tilemap object doesn't actually seem to include any way to disable collisions.
B
7
S
1
Posts: 45
Reputation: 1,315

Post » Sat Jan 18, 2014 4:36 pm

Can you send me your project to [email protected]? It sounds like a useful example for us to make optimisations to the engine.
Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,694

Post » Thu Jan 23, 2014 9:08 am

Just a note, I have a grid of 32x32 sized tiles and if I edit the collision polys to 1 pixel smaller than the actual tiles themselves them seem to register collisions with each other and cause a massive spike collision checking.

Hope it helps :)LazyBassTurd2014-01-23 09:09:18
B
3
Posts: 6
Reputation: 187

Post » Thu Jan 23, 2014 9:53 pm

[QUOTE=LazyBassTurd] Just a note, I have a grid of 32x32 sized tiles and if I edit the collision polys to 1 pixel smaller than the actual tiles themselves them seem to register collisions with each other and cause a massive spike collision checking.

Hope it helps :)[/QUOTE]

I haven't had a chance to send the fixed CapX, but my tiles are set up exactly the same way. Their collision boxes are all rectangles, but smaller than the tile size itself.
B
7
S
1
Posts: 45
Reputation: 1,315


Return to How do I....?

Who is online

Users browsing this forum: nahima, Yahoo [Bot] and 7 guests