Planning Moves

The actual planning of moves turned out to be easier than I had anticipated. Each tank planned its moves on a simple system based on an incremental approach. It merely asked, "Would I be better off in one of the six adjacent hexes than in the one I'm in right now?" If so, it moved to that adjacent hex; otherwise, it remained in place. This required a calculation of the "tactical value" of each hex, which in turn depended on a number of factors. Each factor gave the hex a point value:

  • If the hex blocked the line of sight into itself, it earned 8 points.

  • If the hex was easy to enter, it earned 2 points.

  • If the hex was closer to the enemy, it earned 6 points.

  • If the hex was further away from the enemy, it earned 6 points.

These simple rules were not by themselves good enough; I discovered that tanks would often oscillate between two hexes. So I added another rule that specified that, if the hex had been occupied recently, then it lost 4 points. That helped dampen out oscillatory movement. But there were still problems when the computer's tanks had not caught sight of any enemy tanks. I resolved this problem by two stratagems:

  • First, I assigned each side an objective hex that required that side's tanks to move across much of the map. In moving toward their objectives, the two sides' tanks were bound to run into each other.

  • Second, I set up a system of strategic movement based on flanking movement. Every computer tank had a primary objective and a secondary objective. The secondary objective was calculated to be halfway between the starting position and the objective, but offset laterally. This allowed the tanks to approach their objectives by a flanking movement.

At the outset of the game, each tank took as its primary objective the geographic objective assigned to its team. The tanks would all move toward their secondary objectives, some of which would be to the right of the geographic objective, and some of which would be to the left of the objective. However, as soon as contact was made with the human, the computer tanks all modified their objectives. The sighted human tank became the primary objective, and each tank chose a secondary objective to flank the human tank on the right or the left, depending on the circumstances. Thus, the entire computer tank force began an encircling movement. As soon as a second human tank was sighted, the nearest computer tanks would modify their objectives to take it into account. And of course, if a tank was close enough to get a good shot at the human, he'd take it.



Chris Crawford on Game Design
Chris Crawford on Game Design
ISBN: 0131460994
EAN: 2147483647
Year: 2006
Pages: 248

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net