The first two lines already look like trouble:
It looks likes this function will be called many times for different values of x,y.
But oldimage is being reloaded with every function call. That would explain most of the slowness.
And the previously loaded copy is simply forgotten, which is a memory leak.
Function ColorImage(x%,y%,scolor) Local oldimage = LoadImage ("gfx/player.png")
It looks likes this function will be called many times for different values of x,y.
But oldimage is being reloaded with every function call. That would explain most of the slowness.
And the previously loaded copy is simply forgotten, which is a memory leak.