Welcome to GameHourz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Warrior: Skybuck's MiniDeathStarV13 (unoptimized, dual bea..

 
   Game Forums (Home) -> Core War RSS
Next:  Odp: The Millenium Falcon is no match for the Min..  
Author Message
Skybuck Flying

External


Since: May 25, 2006
Posts: 295



(Msg. 1) Posted: Fri Dec 14, 2007 3:25 pm
Post subject: Warrior: Skybuck's MiniDeathStarV13 (unoptimized, dual beams, up and down, sublight drive, etc, etc, etc)
Archived from groups: rec>games>corewar (more info?)

;redcode
;name MiniDeathStarV13
;author Skybuck Flying
;strategy
Massive-Serial-Threaded-Dual-Beam-Single-Instruction-Plasma-Cannon,
PlasmaSelect, StunPlasma, DeadlyPlasma, RayControl, RaySpacing,
SublightDrive, PowerUp and BootUp Program.
;strategy Ask yourself: Can my warrior stop the death star before it fires ?
;strategy Ask yourself: Can my warrior stop the death star during it's
firement ?
;strategy Ask yourself: Can my warrior survive the deadly rays of the death
star ?
;strategy Ask yourself: Is my warrior fast enough to catch up with the death
star ?
;strategy Ask yourself: Is there a place to hide ?
;version 13
;date 14 december 2007
;
; Info: Unoptimized version.
; Info: No front/forward laser yet.
; Info: No read/backward laser yet.
; Info still kicks millinium falcon's ass ! Smile Wink SmileSmileSmileSmileSmile =DDDDD
;

CoreLineLength equ 128

DeathStarBegin

DeathStarConstructionLength equ (DeathStarConstructionEnd -
DeathStarConstructionBegin)

DeathStarConstructionBegin

DeathStarInitializeDriveSystemBegin
DeathStarDetermineDrivePowerType mov.f DeathStarDriveSourceDest,
DeathStarDrivePowerSource
DeathStarInitializeDriveSystemEnd

DeathStarPowerUpBegin

; systems must be powered up in reverse order

spl DeathStarPowerUpSystemBottomRayBegin
spl DeathStarPowerUpSystemTopRayBegin
spl DeathStarPowerUpSubSystemsBegin

; wait for systems to come online
djn 0, #6

; activate systems
mov.ab #1, DeathStarActivateSystems

; 0 = systems waiting for activation, 1 = activating systems
DeathStarActivateSystems nop $0, $0

dat $0, $0

DeathStarPowerUpEnd

DeathStarPowerUpSubSystemsBegin

; sub systems need 30 threads
; 38-1 is 37, in binary: 100101
spl 1
mov -1, 0
mov -1, 0
spl 1
mov -1, 0
spl 1

jmz 0, DeathStarActivateSystems
jmp >DeathStarThreadCounter
DeathStarThreadCounter dat $0, $1

DeathStarBootUpSystemDriveBegin

; number of threads must equal death star body.
; 25 threads needed for drive system
jmp DeathStarDrive ; 1
jmp DeathStarDrive ; 2
jmp DeathStarDrive ; 3
jmp DeathStarDrive ; 4
jmp DeathStarDrive ; 5
jmp DeathStarDrive ; 6
jmp DeathStarDrive ; 7
jmp DeathStarDrive ; 8
jmp DeathStarDrive ; 9
jmp DeathStarDrive ; 10
jmp DeathStarDrive ; 11
jmp DeathStarDrive ; 12
jmp DeathStarDrive ; 13
jmp DeathStarDrive ; 14
jmp DeathStarDrive ; 15
jmp DeathStarDrive ; 16
jmp DeathStarDrive ; 17
jmp DeathStarDrive ; 18
jmp DeathStarDrive ; 19
jmp DeathStarDrive ; 20
jmp DeathStarDrive ; 21
jmp DeathStarDrive ; 22
jmp DeathStarDrive ; 23
jmp DeathStarDrive ; 24
jmp DeathStarDrive ; 25
DeathStarBootUpSystemDriveEnd

DeathStarBootUpSystemDrivePowerInjectorBegin
; 1 thread for drive power injector
jmp DeathStarDriveInjectPower + 1 ; compensate for movement
DeathStarBootUpSystemDrivePowerInjectorEnd

DeathStarBootUpWeaponsControlBegin

; 12 threads for weapon control
jmp DeathStarWeaponControlBegin + 1
jmp DeathStarWeaponControlBegin + 2
jmp DeathStarWeaponControlBegin + 3
jmp DeathStarWeaponControlBegin + 4
jmp DeathStarWeaponControlBegin + 5
jmp DeathStarWeaponControlBegin + 6
jmp DeathStarWeaponControlBegin + 7
jmp DeathStarWeaponControlBegin + 8
jmp DeathStarWeaponControlBegin + 9
jmp DeathStarWeaponControlBegin + 10
jmp DeathStarWeaponControlBegin + 11
jmp DeathStarWeaponControlBegin + 12

DeathStarBootUpWeaponsControlEnd

DeathStarPowerUpSubSystemsEnd

; kill off closeby enemies.
DeathStarPowerUpSystemTopRayBegin

spl 1 ; 2
spl 1 ; 4
spl 1 ; 8
spl 1 ; 16
spl 1 ; 32

jmz 0, DeathStarActivateSystems
jmp DeathStarFireTopRay

DeathStarPowerUpSystemTopRayEnd

; stun far away enemies
DeathStarPowerUpSystemBottomRayBegin

spl 1 ; 2
spl 1 ; 4
spl 1 ; 8
spl 1 ; 16
spl 1 ; 32

jmz 0, DeathStarActivateSystems
jmp DeathStarFireBottomRay

DeathStarPowerUpSystemBottomRayEnd

DeathStarConstructionEnd

DeathStarBodyBegin

DeathStarBodyLength equ (DeathStarBodyEnd - DeathStarBodyBegin)

; could protection for rear too, from top and bottom
TopRayStartPosition equ -128 - 16
BottomRayStartPosition equ +128 - 17; (to compensate for variable being
one lower)

; old doesn't cover it's ass:
; TopRayStartPosition equ -128;
; BottomRayStartPosition equ +128 ; (to compensate for variable being one
lower)

RayNextLine equ 1
RayLines equ 32
RaySpacing equ 128

DeathStarDriveBegin

DeathStarDriveSourceDest dat #DeathStarEnd, #DeathStarEnd + 1
DeathStarDrive mov {DeathStarDriveSourceDest, <DeathStarDriveSourceDest

DeathStarDriveEnd


DeathStarWeaponsBegin

DeathStarWeaponControlBegin

; reset ray positions
mov #TopRayStartPosition, TopRayPosition
mov #BottomRayStartPosition, BottomRayPosition

; calculate ray counter
add.ab #RayNextLine, RayCounter
mod #RayLines, RayCounter

; copy ray counter to ray offset
mov.b RayCounter, RayOffset

; multiple ray counter/offset with spacing to get good ray offset
without disturbing the ray counter Smile
mul #RaySpacing, RayOffset

; sub ray offset from top ray position
sub RayOffset, TopRayPosition

; add ray offset to bottom ray position
add RayOffset, BottomRayPosition

; plasma counter
add #1, PlasmaCounter

; plasma counter is allowed to increment to twice the line size
mod #256, PlasmaCounter

; copy it to plasma select to keep plasma counter intact, could reuse
offset or so as plasma select but ok.
mov.b PlasmaCounter, PlasmaSelect

; divide it by line size, 0 will be stun plasma, 1 will be deadly plasma
Smile
div #128, PlasmaSelect

; plasma switcher.
; DeathStarSelectPlasma mov.x #DeathStarStunningPlasma,
#DeathStarDeadlyPlasma

DeathStarWeaponControlEnd

DeathStarFireWeaponsBegin
; DeathStarFireTopRay mov DeathStarStunningPlasma, >TopRayPosition
; DeathStarFireBottomRay mov DeathStarStunningPlasma, >BottomRayPosition

DeathStarFireTopRay mov @PlasmaSelect, >TopRayPosition
DeathStarFireBottomRay mov @PlasmaSelect, >BottomRayPosition

DeathStarFireWeaponsEnd

DeathStarWeaponsDataBegin
TopRayPosition dat $0, #TopRayStartPosition
BottomRayPosition dat $0, #BottomRayStartPosition
RayCounter dat $0, $0
RayOffset dat $0, $0
PlasmaCounter dat $0, $128 ; must start at 128 to start with stun
plasma Smile
DeathStarWeaponsDataEnd

DeathStarWeaponsEnd

DeathStarPlasmasBegin
; plasma select also functions as deadly plasma.
DeathStarDeadlyPlasma
PlasmaSelect dat $0, $1 ; set it to one to start with stun plasma on
first bombing run first line.
DeathStarStunningPlasma spl.a $0, $1
DeathStarPlasmasEnd

DeathStarDrivePowerSourceBegin
DeathStarDriveInjectPower mov.f DeathStarDrivePowerSource,
DeathStarDriveSourceDest

DeathStarDrivePowerSource dat #0, #0
DeathStarDrivePowerSourceEnd

DeathStarBodyEnd

DeathStarEnd
dat $0, $0 ; included to make pmars compilers happy.

 >> Stay informed about: Warrior: Skybuck's MiniDeathStarV13 (unoptimized, dual bea.. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
My first warrior. - Watch him run in pMARS with the default window size for full effect. ;redcode-94 ;name HeathTest01 ;author Heath Caldwell ;assert 1 linelen equ (157) blocklen equ (5) org start x dat #0, #0 y dat ...

AI warrior. - Hi everybody. I'm totally new to this field, so I'm sorry if the question sounds silly...... Does anybody have designed a warrior using AI techniques (like fuzzy logic or Neural Network)? Do you think that such a technology could be too much "heavy...

tiny warrior: desTiny - R.I.P. Destiny After pushing off i would like to publish desTiny. desTiny was based on "Soft as Silk" which get an nice age on tiny. I have changed the decoymaker in front to an 2c-quickbomber which gave him nice extra points. After boot i ju...

Score Surface for 94nop - Hi, some anonymous person (still called "bvowk" for simplicity ;-) is so kind to provide access to a pile of computers. I have suggested to calculate one score surface for standard settings. It takes roughly 1000 times the time of one "no...

Bug in pMARS - Hi, either I don't know how EQUs work or I have found a bug in the parser of pMARS. So far I cound pin it down to: ;redcode-tiny ;name test ;assert CORESIZE == 800 v3 EQU 3 * (3 / 2 + 1) + 3 v4 EQU (CORESIZE - v3) dat.f v3, v4 With the..
   Game Forums (Home) -> Core War All times are: Ekaterinburg, Islamabad, Karachi, Tashkent (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]