Autotroph with grenades

Last modified

5 Jan 2004

Gunner was the first side to shoot at enemies. It's essentially Algae with grenades.

It was originally hardcoded in C++ before user-defined sides worked, and served for basic balance tweaking. (The first time it fired at a colony of Algae, the grenade destroyed a dozen algae, and their death explosions did enough damage to create a chain reaction that killed the rest. Oops.) Later it was recreated in Forth.

Despite its simplicity, Gunner scored well in tournaments for many years. It's an autotroph, so it doesn't depend on territory for growth, and if unmolested it can grow quite large. Its immobility means it doesn't pick fights, and when it does fight it always fights as a group, so its defense is modestly effective. It has often frustrated authors of more sophisticated sides that didn't score as well.

Grudge is a derivative that avoids starting fights: it doesn't shoot at sides that haven't done anything hostile yet. This doesn't work very well with long-range grenades.


#side Gunner 4
#author Warren
March 1 2002, based on an old hardcoded side.
#color c0f

(Devon 20020409) Fixed for changes (removed focus, sensor cooldown)
(Devon 20030716) Ignore shielded targets.
(Devon 20040105) More reluctant to shoot nearby shielded targets.

#type Gunner
#color d00
processor 5
constructor 0.399
energy 40 0
solar-cells 0.4
armor 200

robot-sensor 20 5
grenades 50 20 50


#const scan-interval 70

	1 constructor-type!
	energy max-energy 10 - < 0 constructor-max-rate ifev constructor-rate!
	time robot-sensor-time scan-interval + < grenades-cooldown or nif
		fire-robot-sensor sync
		robot-found if
				robot-shield-fraction 1 robot-distance grenades-range / 0.5 * - > if
					robot-position robot-velocity robot-distance grenades-speed / 0.8 *
						vs* v+ position v-
						rect-to-polar fire-grenade
					done-shooting& jump
			next-robot while-loop

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.