0 Members and 4 Guests are viewing this topic.
.HELIDiagnosticOff29->YRepeat getkey(15)If getKey(1)Y-2->YEndY-1->Y.I always decrease Y by 1 because a helicopter has to fallPt-On(X,Y,[sprite])DispgraphPt-Change(X,Y,[80C0E0F0E0C08000.LOSING CODEIf pxl-Test(X,Y+7)ReturnEndIf pxl-Test(X,Y-1)ReturnEnd.END OF LOSING CODEHorizontal -End
....LOSING CODEIf Pxl-Test(X,Y+7)+Pxl-Test(X,Y-1)ReturnEnd.END OF LOSING CODE...
More optimized :Code: [Select]....LOSING CODEIf Pxl-Test(X,Y+7)+Pxl-Test(X,Y-1)ReturnEnd.END OF LOSING CODE...
Quote from: Fast Crash on April 24, 2011, 09:11:35 amMore optimized :Code: [Select]....LOSING CODEIf Pxl-Test(X,Y+7)+Pxl-Test(X,Y-1)ReturnEnd.END OF LOSING CODE...is + smaller than OR? I never even thought about that comparison...If so, then I may have some optimizing to do (I needed a LOT of conditions)
Quote from: ZippyDee on April 24, 2011, 09:36:29 amQuote from: Fast Crash on April 24, 2011, 09:11:35 amMore optimized :Code: [Select]....LOSING CODEIf Pxl-Test(X,Y+7)+Pxl-Test(X,Y-1)ReturnEnd.END OF LOSING CODE...is + smaller than OR? I never even thought about that comparison...If so, then I may have some optimizing to do (I needed a LOT of conditions)+ doesn't mean or remember.However, here's my study:Size of program with +: 723bytesSize of program with or: 725 bytesSize of program with two if blocks: 726 byes