Here are some of the simplifications I would make. It is up to you if you want to use them. Of course without the full code I cant help a lot, but I hope this helps a little. If you want me to explain any of the code, just ask and I would be happy to explain it.
max({1,2,3,4}{G=24,G=25,G=26,G=34}not(D)->D
--Instead of--
If G=24 and D=0
1→D
If G=26 and D=0
2→D
If G=25 and D=0
3→D
If G=34 and D=0
4→D
Erase your arrows
If A
Then
For(E,⁻2,2
For(F,⁻2,2
Pxl-Off(Y+E,X+F
End
End
End
--Instead of --
If A≠0
: Pxl-off(Y-2,X-2)
: If A≠0
: Pxl-off(Y-2,X-1)
: If A≠0
: Pxl-off(Y-2,X)
: If A≠0
: Pxl-off(Y-2,X+1)
: If A≠0
: Pxl-off(Y-2,X+2)
: If A≠0
: Pxl-off(Y-1,X-2)
: If A≠0
: Pxl-off(Y-1,X-1)
: If A≠0
: Pxl-off(Y-1,X)
: If A≠0
: Pxl-off(Y-1,X+1)
: If A≠0
: Pxl-off(Y-1,X+2)
: If A≠0
: Pxl-off(Y,X-2)
: If A≠0
: Pxl-off(Y,X-1)
: If A≠0
: Pxl-off(Y,X)
: If A≠0
: Pxl-off(Y,X+1)
: If A≠0
: Pxl-off(Y,X+2)
: If A≠0
: Pxl-off(Y+1,X-2)
: If A≠0
: Pxl-off(Y+1,X-1)
: If A≠0
: Pxl-off(Y+1,X)
: If A≠0
: Pxl-off(Y+1,X+1)
: If A≠0
: Pxl-off(Y+1,X+2)
: If A≠0
: Pxl-off(Y+2,X-2)
: If A≠0
: Pxl-off(Y+2,X-1)
: If A≠0
: Pxl-off(Y+2,X)
: If A≠0
: Pxl-off(Y+2,X+1)
: If A≠0
: Pxl-off(Y+2,X+2)
Faster generation of arrows:
Pointing up:
Pxl-On(Y-2,X
For(E,⁻1,2
For(F,⁻1,1
Pxl-On(Y+E,X+F
End
End
Pointing down:
Pxl-On(Y+2,X
For(E,⁻2,1
For(F,⁻1,1
Pxl-On(Y+E,X+F
End
End
Pointing Left:
Pxl-On(Y,X-2
For(E,⁻1,1
For(F,⁻1,2
Pxl-On(Y+E,X+F
End
End
Pointing Right:
Pxl-On(Y,X+2
For(E,⁻1,1
For(F,⁻2,1
Pxl-On(Y+E,X+F
End
End
Using the code above for storing D, similar expressions for A, X,and Y
max({1,2,3,4}{G=24,G=25,G=26,G=34}not(D)→D
max({1,2,3,4}{D=1,D=2,D=3,D=4}→A
X+max({⁻1,1}{A=1,A=2}→X
Y+max({1,⁻1}{A=3,A=4}→Y
--Instead of--
: If G=24 and D=0
: 1→D
: If G=26 and D=0
: 2→D
: If G=25 and D=0
: 3→D
: If G=34 and D=0
: 4→D
:
: If D=1
: 1→A
: If D=2
: 2→A
: If D=3
: 3→A
: If D=4
: 4→A
:
: If A=1
: X-1→X
: If A=2
: X+1→X
: If A=3
: Y+1→Y
: If A=4
: Y-1→Y