Problem with collision during low computer performance

0 favourites
  • 2 posts
From the Asset Store
High Low is a casino game using luck and points accumulation.
  • 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

    then

    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!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)