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!