; ########################## LITTLE Z (v.1) ############################## ; ### ### ; ### WRITTEN BY GEORG SCHNABEL (GreatGeorge) ### ; ### ### ; ### GEORG.SCHNABEL@MYCITY.AT ### ; ### ### ; ######################################################################## ; ; I analysed the bots in the light class, especially botgod32 ; and wrote a bot which beats all of them, I think. ; Botgod inspired this bot, but this one is much better :-) ; ; ANECDOTE: A thing like the best light class bot doesn't exist, ; but the bot which wins the most bouts against the top 5... ; *********************************************************************** ; FEATURES ; - intelligent scanning system (for light class) ; - intelligent moving system ; - simple target prediction ; - overheating protection ; - lays a mine [ isn't it great :-) ] ; ; you see a lot for a light class bot ; *********************************************************************** ; COMMENTS ; I didn't encrypt the source to allow everyone to see it. It's a pretty ; simple bot. Like BotGod32 this bot tries to achieve a relative angle of ; 90° (64) to it's prey. So the bots in the light class which don't have ; any target prediction hardly hit LittleZ. Here are a few reasons, why ; this bot is so strong: ; ; LittleZ ... ; ... never drives directly toward or backward to it's prey ; ... has a simple heat protection, that means he never becomes a sitting duck ; ... has a long range scanner, so before the other bots scanned him, they are killed ; ... has a fast and strong weapon to ensure high precision ; ; IF YOU KNOW HOW I CAN MAKE THE BOT !!!ONE!!! LINE SHORTER THEN TELL ME PLEASE ; (messagebord, e-mail - see above) ; ************************************************************************* #msg I'm so bloody! #config scanner=4 ; This configuration does best #config engine=2 #config weapon=3 #config armor=2 #config heatsinks=1 #config mines=0 #def scanarc ; Variables #def speed !setup ; set up vars and ports mov speed, 75 opo P_TROTATE, 64 opo P_MINELAYER, 15 ; lays a mine just for fun :-) !flip mov scanarc, 64 opo P_TROTATE, 128 !scan opo P_ARC, scanarc cmp [0], 0 ; if speed = 0, change dir and accelerate... jne !noAcc neg speed opo P_THROTTLE, speed !noAcc ipo P_SCAN, ax ; Look for enemy... cmp ax, 1500 jb !shrink cmp scanarc, 64 ; not found: unless scanarc is 64 jae !flip ; widen it shl scanarc, 1 jmp !scan !shrink ; Found shr scanarc, 1 ; narrow scanarc (halve it) mov bx, scanarc mpy bx, @03 opo P_STEERING, bx ; centre enemy or scanarc, 1 ; to make sure that scanarc > 0 !Fire ; otherwise scanarc could be 0 and that's a problem... ipo P_HEAT, ax cmp ax, 200 ; check heat ja !scan ; too hot? => don't fire mov ax, 2 ; simple target prediction cmp [6], 128 ; check relative heading of enemy jb !noInv neg ax ; if facing left, negate ax (Shooting Displacement) !noInv add ax, @03 ; add accuracy param to ax opo P_FIRE, ax ; Fire! jmp !scan ; jump to Main #END