That, I have yet to figure out the answer too as well.
I'm thinking you need to start with a stable base. If you can remove every single bug while the code is fresh in your mind, then you can just continue working on to it, adding new features and you'll continue developing it till you're happy with the result.
That code was HORRIBLY made
It would be easy to remake that which would run at roughly 50fps
I'm guessing the programmer chose to generate the world the same time it draws it, which is why it's so slow
?"Five random numbers from one to 100:"
FOR MYCOUNTER=1 TO 5
?"Number ";MYCOUNTER;" is ";OneTo100()
NEXT
DEF OneTo100()
RETURN 1+RND(100)
END
The output is
Five random numbers from one to 100:
Number 1 is 54
Number 2 is 89
Number 3 is 7
Number 4 is 11
Number 5 is 93