HUGE Performance issues when colliding with tiled solids

Discussion and feedback on Construct 2

Post » Tue Feb 24, 2015 9:30 am

Hi, I've been having this issue for a while,


I have a sprite with the 8 direction behaviour remapped to wasd. at random times when I'm riding along a tiled wall 32x32. It brings the game right down to a crawl, even on high end PC's.

There aren't very many options for tiles so I'm guessing its to do with the 8 behaviour or perhaps the rather large layout size.8000x3050

Any ideas ?
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Tue Feb 24, 2015 11:42 am

That shouldn't be slow. Can you share a .capx demonstrating the problem?
Scirra Founder
B
367
S
217
G
82
Posts: 23,262
Reputation: 183,679

Post » Tue Feb 24, 2015 12:55 pm

Thanks for the response, C2 has been life changing to me :),

I cant promise its pretty I'm afraid that I may be the C2 target audeince : P of no experience.

There is only one tiled wall and also the (static scenery) cars seem to be doing this (solid behaviours)

I tried messing with the bounding boxes but...




I wasn't at the stage of documenting things well when I made this but the main offenders seem to be the wall , zx spectrum colored cars and the player sprite.

Another issue I can think of is my habit of making everything on one huge layer .. I hope not
Last edited by railslave on Tue Feb 24, 2015 6:05 pm, edited 1 time in total.
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Tue Feb 24, 2015 4:16 pm

It looks like it's caused by the Pathfinding behavior. It's hard to offer any more advice unless you reproduce the problem in a new empty project - you have a huge project with a lot going on and it would be very hard to prove it's not something in your own events causing it. Have a read of Performance Tips.
Scirra Founder
B
367
S
217
G
82
Posts: 23,262
Reputation: 183,679

Post » Tue Feb 24, 2015 6:05 pm

Thanks, ill mess about with path finding see if that helps (deleting capx)
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Tue Feb 24, 2015 6:15 pm

I checked your game out in debug, and the profile is showing that the group "turrets" is spiking up to 50% CPU while you are colliding with the tiledbackground. So I disabled that group and got a huge performance boost, but the slowdown was still happening. The next highest group "zombie" was still using up to 40% CPU and so I disabled the 'every .25 seconds ->pathfinding' and the game ran quite smoothly.

So obviously you just have a few issues to work out with your enemy pathfinding, and the "turret"(not even sure what this group is meant to do). I suggest trying not to call the pathfinding.findpath so often.
B
12
S
2
G
1
Posts: 26
Reputation: 835

Post » Tue Feb 24, 2015 7:28 pm

Ok thanks so much :) that's amazing information and a lesson learned, The turret is the enemy with the blue tracking laser.

Sorry I couldn't keep the capx up., Other reasons
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Post » Tue Feb 24, 2015 7:46 pm

you dont need to pathfind every tick or 0.25 its enough to place it at start of layout it automatically create the path to be followed or at creation of the charachter...
Image
B
57
S
16
G
64
Posts: 1,260
Reputation: 39,825


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 1 guest