Basically, I have no idea how to optimize my code without breaking it, for some reason there are random lag spikes, happened ever since i added background music. I’ve cut down on code that runs on game updates yet nothing changes. pls help any1
A to skip cutscene
hold a for gun
b for missile
a+b to flare for IR missiles (does not work mobile rn)
all the code in on game update needs to run each frame before the game is drawn to the screen. if you pause, it will freeze your game on that frame until the pause completes.
the fix here is to either put those repeat blocks into a “separately do” block from the timers extension, or use a forever block instead of an “on game update”