CARNAGE HEART OKE PROGRAM LISTING (Must be viewed in a monospaced font, or with a vanilla ASCII text editor such as edit.com or notepad.exe) Program : Cyc5 Created by : Clay Dale Email : clatterton@aol.com Date : 03/22/97 Evaluation : With off-the-shelf mech parts, this program beat maps 1-7 of the Callisto (hard) scenario! Map 8 was impossible. + Highly maneuverable, enthusiastic mech. + Quick reaction time + Can maintian continuous main weapon fire + Cheap and quick to produce. - Somewhat vulnerable to friendly fire. - Limited obstacle handling. - No provision for mine laying or avoidance. Body : Prowler I Engine : Tyron Z1 Main weapon: 100 AP Shot Sub weapon : 8 Snake Rocket CPU : CP-588FX Fuel tank : 70 liters Armor : 25mm Option : None (software slot for jammer at D6) Note : All components are available at the game's start Acknowledgment ============== I found this ASCII-based format for Carnage Heart programs on Arne Michaelsen's (arne@cco.net) Carnage Heart web page. Many thanks go to him, as I cannot devise anything better, or more compact. You must view this file with a monospaced font, such as courier, or within a vanilla ASCII text editor (such as edit.com or notepad.exe). Proportional fonts will turn this file to hash. | | These bars will line up | | | | | | | | in fixed pitch type. | | Quick and Dirty Legend ====================== Chip sides with green arrows are open because they show the normal program flow. Red arrows pass through closed chip-sides, since they represent a divergence. + /\ + +==/\==+ | | < > Chip with < > Chip with all green | | all red + \/ + arrows +==\/==+ arrows Chips are read in the same way they are in the game. Red arrow +==/\==+ Scan E| <-- Scan for enemy Green < 120m | <-- At a range of 120m arrow 90 180| <-- Bearing 90 (right), 180 degree arc +======+ Scan codes are as follows: E=Enemy F=Ally P=Projectile M=Missile N=Mine O=Obstacle PROGRAM LISTING =============== Program : Cyc5 Created by : Clay Dale Email : clatterton@aol.com Date : 03/22/97 Evaluation : With off-the-shelf mech parts, this program beat maps 1-7 of the Callisto (hard) scenario! Map 8 was impossible. + Highly maneuverable, enthusiastic mech. + Quick reaction time + Can maintian continuous main weapon fire + Cheap and quick to produce. - Somewhat vulnerable to friendly fire. - Limited obstacle handling. - No provision for mine laying or avoidance. Body : Prowler I Engine : Tyron Z1 Main weapon: 100 AP Shot Sub weapon : 8 Snake Rocket CPU : CP-588FX Fuel tank : 70 liters Armor : 25mm Option : None (software slot for jammer at D6) Note : All components are available at the game's start A B C D E F G H I J + \/ +======+======+======+======+======+======+======+======+======+ | |000000|000000|000000|000000|000000|000000|000000|000000|000000| 1| -- |000000|000000|000000|000000|000000|000000|000000|000000|000000|1 | |000000|000000|000000|000000|000000|000000|000000|000000|000000| + \/ +======+======+======+======+======+======+======+======+======+ | |000000| Fire | Rand |000000| Jump |000000|000000| 2| -- |000000| Sub < 1/3 < -- |000000| Left > -- |000000|000000|2 | |000000| 90 | |000000| |000000|000000| + \/ +======+ \/ + \/ +==/\==+======+==/\==+ \/ +======+======+ | Fire Ammo | Rand Jump |000000|000000| 3| -- > -- > -- < Main < Sub | -- > 1/2 > Right|000000|000000|3 | 90 >1 | |000000|000000| +======+======+ \/ +======+==/\==+==/\==+==/\==+ \/ +======+======+ |000000|000000|Count Move Ammo Count? Scan O|Count Scan E Turn | 4|000000|000000|A<-100< Fwd < Main < A=1 < 50m | A<-1 > 125m > Left |4 |000000|000000| >1 0 45| 90 180 | +======+======+ \/ +======+======+ /\ + /\ +==/\==+==\/==+ \/ + |000000| |Scan P Count |Count |Scan F|Scan E| Turn | | 5|000000| Duck < 20m <-100< -- | A<-1 < 50m < 125m | Right| -- |5 |000000| | 0 354 | | 0 45| 0 90| | | +======+ \/ + \/ +======+ /\ +======+======+ /\ + \/ + \/ + |000000| Scan M| | |Count? | 6|000000| -- > 50m > Jam | -- < -- < -- < A=1 < -- < -- |6 |000000| 0 354| | | | +======+======+ \/ + \/ +======+======+==/\==+==/\==+======+======+ | Jump Scan P Scan E Count? Scan E| |000000| 7| -- >Right > -- > 50m > 30m > -- > A=1 > 125m > -- |000000|7 | 0 354 0 354 0 354| |000000| + /\ +==/\==+======+==\/==+==\/==+======+ /\ +======+ \/ +======+ | Jump Rand |Scan P|Scan E| Count Move |Scan E|000000| 8| Left < 1/2 < -- < 50m | 30m > Grap > A<-1 < Fwd < 300m |000000|8 | | 0 90| 0 90| | 0 90|000000| + /\ +======+ /\ + \/ + \/ +======+ /\ +======+ \/ +======+ | Jump Rand |Count?|Scan P|Scan E| Turn Turn |Scan E|000000| 9| Ahead< 1/2 < A=1 < 50m | 30m > Right> -- < Right< 300m |000000|9 | | |180 90|90 180| |90 180|000000| + /\ +==\/==+ /\ + \/ + \/ +======+ /\ +======+ \/ +======+ | Jump | Count | Turn Turn |000000| 10| -- < Back | -- < A<-1 | Left > -- > -- < -- < Left |000000|10 | | | |000000| +======+======+======+======+======+======+======+======+======+======+ A B C D E F G H I J My guiding principles were: Hardware: -- How far can I take an off-the-shelf Prowler, with no upgrades? In other words, can strong software make up for weak hardware? -- Hordes of cheap, reasonably capable mechs are better than fewer, more powerful counterparts. -- Shotgun ammo is better than lasers or AP cannons. It's less powerful, but more likely to hit. -- Rockets rather than missles. A well-aimed rocket can't be jammed. Software: -- Minimize program cycle time (avoid wasted "ticks"). -- Keep the program flow on the chip table. Do not use the frame, it wastes time. -- Avoid use of "no instruction" chips whenever possible. -- Use fast, simple code instead of slower, more complete routines. -- Prioritize code tightness first by urgency, then by likelihood. -- Self-preservation comes first, then aggression. -- Fire at near-maximum weapon range. Make enemies walk into your shots. -- Use sub ammo early. As Capt. Hughes says: "Attack effectively first." -- High rate of fire. Make the enemy fight your ammo, not your mech. -- Friendly fire is unavoidable. Fast evasion routines may compensate for sloppy friendly-fire checks. You'll notice the program flow never escapes to the outside frame. Instead, The program circles around a small "racetrack" in the center of the chip, departing only when exterior events call for certain behaviors. 1. The program flow drops from A1 to C5. C4 (and D5) set counter A to a value of 100, which signifies the program flow has reached the beginning of the racetrack. 2. C5 is the "starting line" of the racetrack. It is a check for projectiles within a 20 meter circle. If the check returns TRUE, the mech will duck. Both paths end at C6. 3. C6 checks for missles within 50 meters. If TRUE, the flow diverts to the slot at D6 where a jammer chip can be placed, when such equipment is available. Until then, use a "no instruction" chip. 4. D7 contains a check for projectiles within 50 meters. A TRUE result causes the mech to determine where the projectile is. If it's in front or back, the mech jumps randomly left or right. If it's coming from the sides, the mech jumps randomly forward or back. Standard stuff. There is a bit of cleverness at C9, where I use counter A to tell if the scan chip at D9 detected a projectile on the right (A=100) or not (A=1). On a larger chip some additional code for obstacle checks could be inserted, but the loop-time would suffer. 5. E7 is a grapple-check for enemies within 30 meters. 6. G7 checks if counter A=1. This would mean the grapple routine was activated, or the mech has started walking toward an enemy further than 125 meters away (see the next paragraph). If TRUE, the program flow is diverted back to the starting line. 7. H7 scans for enemies within 125 meters. A TRUE result passes the program flow up to the attack half of the code. A FALSE result sends the flow down to a long-range scan and intercept routine. Notice how the flow returns from both this routine and the grapple-routine via the same conduit. Notice also how counter A is set to 1 in either case, which sends the flow back to the starting line. 8. If E7 found enemies within 125 meters, H5 looks for the one in the forward 90 degree arc. If TRUE, the flow passed to G5. If FALSE, counter A is set to 1 and the chip at G4 looks right for the enemy and turns the mech as appropriate. From there the flow travels to H6, and because A has been set to 1, it's back to the starting line for another lap. 9. G5 and G4 check for friendlies and obstacles in the mech's line of fire. If either condition is TRUE, the flow moves up to G3 where a random jump left or right is performed. (Notice the shortcut I take back to the racetrack, right through the last part of the previous routine. The mech is airborne and these instructions are ignored.) If the checks return a FALSE, the flow proceeds to the actual firing routines, beginning at E4. 10. E4 checks if the mech has any main ammo left. If FALSE, I assume there's no sub ammo either and simply move the mech forward, toward the enemy in front, in preparation for a grapple attack. Notice how soon the program flow returns to the starting line in this case -- making the mech very responsive to incoming fire. If TRUE, we proceed to E3. 11. E3 checks for remaining sub ammo. If there is none, the main weapon is fired. If some sub ammo remains, a die is rolled and the sub weapon is fired 1/3 of the time over the main weapon. That's essentially it. *************************END of DOCUMENT****************************************************