Problem with collision during low computer performance

Get help using Construct 2

Post » Tue Jun 09, 2015 9:20 pm

I might have to whip up a simple capx version of this problem, partially since I might not be able to explain it clearly, and mostly because I don't need to post the entirety of the convoluted, messy event sheets I have at the moment haha.

So essentially picture an overhead, top down running, where a sprite is constantly simulated moving up. The tileset which collisions are detected for is set to solid. So, the character is supposed to die anytime it runs into a wall running perpendicular to the y axis.

So to do this, I have set a global variable as sprite_prior_y, which gets the sprites y coordinate prior to its movement.
After this, simulate control pressing up, then:

sprite y = sprite_prior_y
call function defeat

So this all works great, allows smooth movement along walls running along the y axis, destroys sprite when crashing into an impassable wall, etc.

The problem is when my computer's performance happens to be slow. When the slowdown occurs sometimes (I assume) the sprite y is equal to its prior position, and the defeat function is called. The character is just running along near no solid objects and suddenly the level fail events take place, always when the framerate is really lagging. This actually happens really rarely, only when I'm running multiple programs in the background, but still, frustrating when it does occur.

I assume I'm just not understanding how something is occuring related to dt or the way the event sheet is executed when computer performance is poor, so some input would be greatly appreciated! Thanks!

If this doesn't make sense I'll happily set up a quick, simple capx illustrating whats going on!
Posts: 32
Reputation: 493

Post » Wed Jun 10, 2015 9:04 am

if you are using physics, as movement, then you might want to enable the checkbox in the moving player that says bullet, that way the collisions will be more effective, however, when slow fps happens, its going to trigger again, happens to me all the time, its annoying but yea... better test it in Node webkit since its pc based, will perform better a bit! if you have a capx, id suggest report it into bugs or performance issues, maybe in next update it will gonna be fixed!
Posts: 1,356
Reputation: 44,150

Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 15 guests