Marshland Games has moved to http://www.marshlandgames.com/

This site will no longer be updated.

All games and text copyright © Kai Marshland 2012

Wednesday, June 6, 2012

Strategy Game

The warriors now move in arcs, and you can click them to give them orders. The buttons also look much better, and many small things are fixed. What I really need to do is AI. My plans for the AI are, at least for the melee units are:

  1. When stationary, rotate to point towards the nearest enemy within 100(?) pixels. If it's withing 50 pixels, attack, following below instructions.
  2. Move to a point behind the nearest enemy, taking care to get no closer than 30 pixels.
  3. Once in a favorable position, charge to build up momentum.
For archers and siege engines:
  1. If an enemy is within 150 tiles, retreat.
  2. Shoot at nearest enemy
What the AI should do for getting new units:
  1. If the enemy has lots of __, buy __. (If user’s highest number of melee troops is Spearmen, build Halberdiers. If Swordsman, build Horsemen. If Horsemen, build Spearmen. If Axemen, build Horsemen. If Halberdiers, build Swordsmen.)
  2. Archers will automatically be produced every 2 melee troops. A random siege engine will be built in addition to the archer if the user unit count exceeds enemy unit count by about 3. This will continue up to 4 engines.
AI will earn money in the same manner as the player, though perhaps with a slight boost.

No comments:

Post a Comment