;Zipper v1.00 ;May 2nd 1999 ;David Labbe, rodney999@hotmail.com ;V1.00 - Robot complete and turning around ;V1.01 - Changed some values so it's faster ;V1.02 - Added turn if ennemy in front(4/12/99) ;V1.03 - Made it better(5/2/99) ;Here is a different robot... ;Not the one you always see ;He's not a big guy and he don't mind ;He's Zipper ;This robot turn around the arena, firing at everything that moves ;in the center. He fire a lot of small bursts and nobody can ;escape from it. He's so fast he can dodge incoming lasers ;and still have a hit at his target. He don't lose his target ;from sight, and if he's getting too close, he shoot everything ;he have at disposal, no matter his heat. It's his oppenent ;or him. Since he can move fast, he need no armor. This kill ;him often, but he can kill Coroner 75% of the time. His weapon is ;low, allowing him to shoot more without overburning. ;With a good radar, top speed and heatsink, he can kill much ;slower oppenents with ease. He wins in the long run. ;What to learn from this robot: ;1. It's not the strongest who wins. ;2. A lot of small lasers is stronger that 1 missing laser ;3. Being slow kills you ;4. Do no take time to load a table and shoot ;5. Having a different strategy helps sometime ;6. Do not cheat, it's useless ;7. Smoking can kill you ;8. You better stop reading thin NOW :-) #config scanner= 5 #config weapon= 0 #config armor= 0 #config engine= 5 #config heatsinks= 2 #config mines= 0 #config shield= 0 #def X_Left #def X_Right #def Y_Up #def Y_Down #def Dir #def Dist #msg Catch me if you can opo 17 64 mov ax 1 int 3 ;Turn Keepshift on !Pre_Main ;Locate the ennemy and save a couple of cycles.... ipo 7 ax ;Scan 180 deg front cmp ax 1500 ;Is he there? jls !Pre_Found ;Yeah opo 13 128 ;Turret on back jgr !Pre_Main !Pre_Found ;Ok we know where he is, now move turret ;First find accuracy mov ax @3 add ax ax add ax ax add ax ax mov bx ax add ax ax add ax bx ; mpy ax 24 ;Then turn turret opo 12 ax ;Reduce arc opo 17 24 ipo 7 ax ;Still in sight? cmp ax 1500 jgr !Pre_End ;We lost him, no problem ;Still in sight mov ax @3 add ax ax add ax ax add ax ax ; mpy ax 8 opo 12 ax ;First shot ; opo 18 1 opo 15 0 opo 15 4 opo 15 -4 opo 15 0 opo 15 3 opo 15 -3 opo 15 0 opo 15 2 opo 15 -2 opo 15 0 opo 15 1 opo 15 -1 !Pre_End opo 17 8 ;Set arc to 8 mov X_Left 115 ;Set limits for robot to go mov X_Right 885 mov Y_Up 115 mov Y_Down 885 mov Dir 1 mov ax @1 ;Head left sub ax 192 ; opo 12 ax neg ax opo 14 ax del 15 !Main gsb !Check_Pos ;Check position opo 11 100 ;Full speed cmp @0 0 ;Check if stopped jne !Check_Ennemy ;If no, then check for an ennemy gsb !Stopped ;Turn(robot in front of us) !Check_Ennemy ipo 7 Dist ;Ennemy? cmp Dist 1500 ;Hmmm jls !Found_Ennemy ;Yeah opo 12 14 ;No, turn the turret jmp !Main ;Back to main loop !Found_Ennemy cmp Dist 200 ;Is he close? jls !Ennemy_Close ;Yeah, shoot shoot shoot mov ax @3 add ax ax add ax ax add ax 2 ; shl ax 2 opo 12 ax ;Turn the turret ipo 2 ax ;Get heat cmp ax 150 ;Too hot? jgr !Check_Turret ;Yeah, don'T shoot opo 15 0 ;Shoot 3 times opo 15 1 ;So it looks like a wall opo 15 -1 ;and increase hit % !Check_Turret cmp @2 20 jgr !C_T_0 gsb !Stopped jmp !Main !C_T_0 cmp @2 116 jls !Main cmp @2 140 jgr !C_T_1 gsb !Stopped jmp !Main !C_T_1 cmp @2 236 jls !Main gsb !Stopped jmp !Main ;Back to main loop !Ennemy_Close opo 18 1 ;He's close, overburn mov ax @3 add ax ax add ax @3 opo 12 ax ;Turn the turret 3 times ; opo 12 @3 ; opo 12 @3 opo 15 1 ;Fire opo 15 0 ;Fire opo 15 -1 ;Fire opo 18 0 ;Turn overburn off jmp !Check_Turret ;Back to main loop !Check_Pos cmp Dir 1 ;Check current heading je !Dir_1 cmp Dir 2 je !Dir_2 cmp Dir 3 je !Dir_3 cmp Dir 4 je !Dir_4 !Dir_1 int 2 ;Get position cmp ex X_Left ;Are we close from the left wall? jgr !Return ;Nope, move on opo 14 64 ;Yeah, turn 90 degrees mov Dir 2 return !Dir_2 int 2 ;Get position cmp fx Y_Up ;Close from top? jgr !Return ;Nope opo 14 64 ;Yeah, turn mov Dir 3 return !Dir_3 int 2 ;Get position cmp ex X_Right ;Too right? jls !Return ;Nope opo 14 64 ;Yup mov Dir 4 return !Dir_4 int 2 ;Get position cmp fx Y_Down ;Too low? jls !Return ;Nah opo 14 64 ;Aye mov Dir 1 return !Stopped cmp Dir 1 ;Chose the heading je !S_Dir_1 cmp Dir 2 je !S_Dir_2 cmp Dir 3 je !S_Dir_3 cmp Dir 4 je !S_Dir_4 !S_Dir_1 opo 14 64 ;Turn mov Dir 2 return !S_Dir_2 opo 14 64 ;Turn mov Dir 3 return !S_Dir_3 opo 14 64 ;Turn mov Dir 4 return !S_Dir_4 opo 14 64 ;Turn mov Dir 1 return !Return return ;Return procedure