Jump to content

Battalion Army AI concept topic


Nicolaus_von_Kues
 Share

Recommended Posts

 

[h1]Hybrid Total War + Rise and Fall Combat System[/h1]

 

I have been thinking about a possible hybrid system combining some of the large-scale control of Rise and Fall: Civilizations at War with the individual soldier behavior seen in Total War.

 

The main idea would be to separate strategic control, formation control, and individual combat.

 

[h2]1. Hierarchy[/h2]

 

A possible hierarchy could be:

 

	ARMY
	|
	+-- BATTALION
	| |
	| +-- UNIT
	| |
	| +-- SOLDIERS
	|
	+-- BATTALION
	|
	+-- UNITS
	

 

The player would primarily control battalions or units, while the individual soldiers would remain autonomous enough to handle local movement and combat.

 

[h2]2. Movement and Pathfinding[/h2]

 

Instead of every soldier independently calculating a complete path, the formation could have a main path and each soldier would try to maintain a relative position inside the formation.

 

For example:

 

	Formation path:
	A ---- B ---- C ---- D
	 
	   |
	   +-- individual soldiers maintain formation positions
	 
	

 

This could potentially reduce the amount of expensive pathfinding required when moving large armies.

 

[h2]3. Combat[/h2]

 

When two formations engage, the game could first determine the front/contact area between them.

 

For example:

 

	ROMANS
	████████████
	████████████
	████████████
	 
	  ⚔
	 
	████████████
	████████████
	████████████
	ENEMY
	

 

The unit would have a general combat target, while soldiers in the contact area would look for appropriate nearby enemies.

 

This would allow the battle to look like individual soldiers fighting individually without requiring every soldier to make high-level strategic decisions.

 

[h2]4. Individual Combat[/h2]

 

Each soldier could still have:

 

  • []Individual position

    []Health

    []Target

    []Attack behavior

    []Animation

    []Local movement

  • Collision avoidance

 

However, the UnitAI would remain responsible for the higher-level behavior:

 

  • []Attack

    []Advance

    []Hold position

    []Retreat

    []Pursue

    []Change target

  • Change formation

 

The soldiers would execute those orders locally.

 

[h2]5. Casualties and Formation Deformation[/h2]

 

When soldiers die, the formation should not instantly rebuild itself into a perfect rectangle.

 

Instead, gaps could appear naturally:

 

	████████████
	████X███████
	████████████
	

 

Nearby soldiers could gradually adjust their positions, while rear ranks could move forward when space becomes available.

 

This would preserve the visual feeling of a large group of individual soldiers while keeping the formation as the main organizational structure.

 

[h2]6. Possible 0 A.D. Architecture[/h2]

 

Conceptually, this could fit into a hierarchy such as:

 

	Army / Battalion
	|
	v
	FormationController
	|
	v
	UnitAI
	|
	v
	Individual soldier behavior
	|
	v
	Pathfinding / local movement
	

 

The important point would be to avoid making every soldier behave like a completely independent strategic agent.

 

Instead:

 

Army/Battalion: high-level orders

 

Formation: positioning and collective movement

 

UnitAI: unit-level behavior and combat state

 

Soldier: local movement and individual combat

 

[h2]7. Why this could be interesting[/h2]

 

This could potentially provide the visual and tactical feeling of Total War while retaining the faster group-level control of Rise and Fall.

 

It could also be interesting from a performance perspective.

 

Instead of:

 

	1000 soldiers
	x
	1000 independent high-level decisions
	x
	1000 independent pathfinding operations
	

 

the system could operate more like:

 

	1 army order
	|
	10 formations
	|
	100 unit-level decisions
	|
	1000 individual combat/movement behaviors
	

 

The individual soldiers would still be visible and fight individually, but the expensive high-level decisions would be concentrated at the formation and unit levels.

 

I think the interesting question for 0 A.D. is not necessarily how to create a completely new "battalion entity", but whether the existing FormationController, UnitAI and pathfinding systems could eventually support this kind of hierarchical control.

 

This could give large armies a much stronger sense of organization without removing individual soldiers from the battlefield.

 

#####

This is an alternative idea. I have other ideas for the organization; this would only work in battle formation.

####

 

Link to comment
Share on other sites

I thought of something from physics and fluid mechanics as an example.

Following that logic, I used water as an example.

With Ai, compare that phenomenon to the clash of two armies.

First contact: the units in the front ranks slow down.

Pressure: the units behind them keep advancing and exert pressure on the front ranks.

Lateral displacement: since the group is not completely rigid, some units look for space to the sides.

Flowing through: if there is a gap between the two battalions, units from one side can partially move into it.

Compression: if there is not enough space, both groups form a dense contact zone.

Redistribution: the units continue looking for valid positions around the point of collision.

Link to comment
Share on other sites

In theory, This idea will benefit from collisions "force" in the movement of the units.

Because what would be more natural than for the troops to get bogged down and fight each other.

########################

For movement AI in 0 A.D., you could approach it like this:

Formation intent: the battalion has a destination and a general orientation.

Individual steering: each unit tries to maintain its relative position, but can deviate to avoid collisions.

Contact detection: when two battalions meet, a contact zone is detected.

Front-line resistance: front-line units reduce their speed when they come into contact.

Rear pressure: units behind them continue pushing forward.

Lateral flow: units look for space to the sides when they cannot move forward.

Local avoidance: each unit avoids obstacles and other units through small adjustments.

Cohesion recovery: when the pressure disappears, units attempt to recover their position within the formation.

The difference from a system based purely on pathfinding would be fundamental:

Pathfinding determines where the battalion should go; steering determines how each individual unit moves within the battalion.

 

########

The units can currently escape anywhere as if they were water. They have no logic or movement that would prevent them from escaping or colliding with anything.

This is how one army reaches the Civic Center, ignoring another army. And they take the Rams; they're just buying time to destroy it.

My idea is that your army closes vital passages and the enemy must fight or be subjected to casualties if they refuse to fight.

In Praetorian units, combat took place upon encountering another army.

 

 

Edited by Nicolaus_von_Kues
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...