prgmPerson (at this moment) is only called when a key is pressed. (It is an image of the sprite facing towards the user. I hope to animate it, but I have not yet gotten there, so maybe I will put it in the program for now. Thanks
I am not sure about the factoring, but I will try it, thanks.
I was told that when one uses If:Then End instead of If:Then that the execution is faster. Well, someone actually tested it, and for my program (where that if evaluates to false most of the time) it is faster.
I am guessing that that might slow it down. I just tested the getkey thing I was wondering about...The first method (getkey->A) is 1.36 times faster, so going by that I think the new thing would slow the program down a little. I will remember that though, because I might optimize it for size later on, thanks.
That is what I did with the getkey, but for the others I tired to time the speed of the sprite moving across the screen...heh...bad move. I think I will go back and test everything again...
...Wait a second. I just inputed
:If 0<X<86:Then
Blah Blah Blah
Does that actually work?
*edit* Oh yeah, I just tested
If X>86 or X<0:X+7(X<=1)-7(X>=87->X
Vs
X+7(X<=1)-7(X>=87->X
The latter wins. Then I did this
If X>86 or X<0:Then
X+7(X<=1)-7(X>=87->X
End
Vs
X+7(X<=1)-7(X>=87->X
Again the latter one wins But it was closer this time.