As promised, today I will devote to the technical development of the soldiers used in the alpha version.

The rider puts a group of game objects. They can be divided:

  • Rider
  • Horse
  • Weapons
  • Traces of dust from running
  • Hidden object with a Collider.

The rider is a model for being poorly detailed. Material connection to the rider changes the color depending on the belonging to a clan. The player is blue and the enemy red.

The horse is also a simple model which has the animation of running and the rest.

The weapon, now it's a spear. In gameplay she is not involved for its intended purpose. It performs a decorative function. In the next update spear will change other weapons. I wrote about this in a previous article. Ssylka

To create a trace of the movement of the cavalry. I used the "Particle System". I can add that this property is included not all riders. The more riders you run, the less he included. This is due to performance. When the number reaches more than 40 riders, the difference is quite noticeable.

The main object of a warrior is a hidden object with a Collider and Nav Mesh Agent. All the functionality tied to it. It is attached to the script Warrior Controller.

There is the recorded code:

  1. The motion of the objects. The movement of the player or the enemy General.
  2. Life of the rider. These settings got me a few. Life in unarmed combat and life during the attack arrows. If one of these parameters is set to 0. Rider dies
  3. Behavior at the entrance to the city and exit from it
  4. Action when fighting with enemy horsemen
  5. Actions at the point of death. I have harvested 4 version of dead riders. Three of them work when the men are fighting the same enemy, and one attack of arrows. The code is designed so that models killed riders you can add as much as necessary.
  6. Follow the riders implemented a very simple, attached to them Nav Mesh Agent, and they follow the player or enemy General.

Here is MeshNav in the game.

At this point I will finish the story about the soldiers. Was very concise. After I finish their development for the final version of the game, most likely I will write a more detailed review. Because of the functionality they have added much more.

Stay tuned. The next part I will enlighten technologies and cities.

Previous Post

Blog Comments powered by HyperComments.