Why does my program have problems with framerate

https://snap.berkeley.edu/snap/snap.html#present:Username=d4s_over_dt4&ProjectName=os%202
The key pressed stuff in the os code sometimes seem to not work,and other times seem to sense a ton of stuff Fixed.Warping stuff and forgetting to wait for key release is recipe for disaster.

My program drops framerate very badly and I don't see anywhere this could happen. Fixed.Run block put script with "DO NOT WARP" on its package into a warp

you're posting a lot, are you even trying to figure out the issue yourself? i don't see how you would have the time to if you're posting that fast.

your issue is that you're using warps around the CODE THREAD and in the END THREAD block. this means it's trying to warp the forever loop in OS CODE. don't use warps unless you actually have a reason to, warps don't do anything except to loops and waits, and they shouldn't be used around waits.

Yeah I just found that problem and tried to edit my post and you found it too :slight_smile:

A bit, but not thouroughly(yeah i should actually think about them thouroughly)

Yeah I thought that my blocks were laggy but actually they weren't at all

I actually had some safety rules around in my mind:

  • No warping with forever loop inside
  • No warping with wait secs block inside
  • No calling JS functions without a return value(this is a bug on the call block,instead of saying reporter didn't report,running the jsf is still ok)

But none of them said about RUN or any macro that could bring bad behaving code to the next line in no time.
I have to be careful about that too :slight_smile: