Unit AI Finite State Machine

March 10th, 2012 admin No comments
Finite State Machine

Finite State Machine

This is the top level unit AI finite state machine. Square are states and diamonds are transients between states.

There initial state is IDLE. The combat unit will remain IDLE until an unexplored hex becomes detected, or an area needs to be patrolled.

The need to explore a hex could be determined by another combat unit already on another mission.

The need to patrol a hex is determined by lack of intelligence about a hex. Intel and Visible are different status for a hex.

The EXPLORE state is a higher priority than the PATROL state.

THE AI will ensure that only 1 combat unit is assigned to an EXPLORE or PATROL mission in a hex area. While in the EXPLORE state the combat unit will continue to explore unexplored hexs until either it comes into contavt with an enemy combat unit, ( <Enemy Unit Seen> transient to ATTACK UNIT) ,
or the combat unit discovers an Enemy Depot (<Enemy Depot Seen> transient to ATTACK ENEMY DEPOT>,
or the combat unit discovers a new Strategic Point (<Vacant Strategic Point Seen> transient to DEFEND STRATEGIC Point),
or unit is notified of a support request from another combat unit. <<Respond to Support Request> transient to SUPPORT ATTACK

 

 

 

 

Categories: AI Tags:

AI collision testing

February 24th, 2012 lplayer No comments

AI collision testing

Now using influence maps to determine path for exploration agent and patrol agent.
Game speed is x100.

Categories: Demo Video Tags:

XNA 4.0 Game Development by Example – Visual Basic Edition Review

February 18th, 2012 lplayer No comments

XNA originally required the novice programmer to learn a few new concepts all at the same time- the XNA Framework, .Net, C# together with many programming and maths concepts normally required when creating 2D and 3D games. Jumping directly into C# itself for the first time may be a tall order, especially when already learning  other languages at school, such as Visual Basic(VB). This is possibly why the most requested feature for XNA was to enable the support for Visual Basic.

This book does not dwell on the pros or cons of C# v VB for development, and assumes that the reader has already made this choice, otherwise why would he be reading this book. It is for each novice programmer to decide which programming language is more suited to him/her and if undecided it may make sense to use this book orientated to VB and compare it with its sister book XNA 4.0 Game Development by Example, which is orientated to C#. They use the same sample programs and are so a good way to determine which is easier to understand for each individual.

I am currently reviewing this book and a complete review will be posted here when complete.

Categories: Review Tags:

Supply AI Agent

February 17th, 2012 lplayer No comments

First AI agent implemented

The following is an explanation of how the Supply AI, Comat AI and Unit Move AI are working. Only the Supply AI is complete the other agents are really basic.

Im using a Finite State Machine based AI system for this. Running on both XBox and Windows 7

0:00 Green starts with 6 Infantry units in Explore mode. These AI controlled units go out looking for unexplored territory, strategic points (yellow dots and enemies)
0:12 The first 2 strategic points have been found and connected to the capital.

0:17 The first enemy units found. No tactical code written for this encounter yet!

0:25 Depot just right of screen centre is being attacked by enemy and is captured and connected to enemy supply network

1:05  Green loses SP close to capital, but is vacated by enemy and reconnected by Green

1:46  Green concentrates on capturing Blues capital in north.

1:51 Movement markers switched on to indicate how many turns to get to a hex. (Orange is movement cost)

2:00 Due to extra SP from north Green is able to build new Cavalry units in capital to try and take Grey in centre

2:28 Blue is trying to take back lost SP in centre but should really be trying to take its own capital back (code needed!).

2:46 Large battle forming in centre but without combat agent AI these will just stand and look at each other.

3:02 Zoom shows deadly embrace situations which AI needs to resolve (more code)

3:26 For some strange reason Green is attacking coast line, but then realises istake and starts to move north again.

3:45 Deadly embrace between friendly units continues

3:54 Why has Green AI ignored to load Blue Depot?

4:01 There are unseen Blue units there! because they are moving in on Green capital

5:07 Minimap confirms that Green AI has beat the other 3 AI players.

Categories: AI, Demo Video Tags:

Order and Combat System Updated

January 31st, 2012 admin No comments


Minimap now shows limited detail. 3D clouds now implemented.

Shows order system.
Movement discs can be toggled to show movement cost to enter each hex or how many turns to reach hex.

Shows combat System
French Infantry unit has cut English supply.
English Cavalry is attacking French Infantry in rear (+1), and receives additional support from adjacent Infantry and ranged support from Artillery (indicated by yellow support discs)

Categories: Development Screenshots Tags:

End of Interlude

December 20th, 2011 lplayer No comments

After a longer than expected break (Visual Building became more demanding than expected!), I managed to return to this development. I returned to the strategic level component to create the minimap and improve the unit ordering mechanism. During order placement, the movement points required are displayed, alternative to the number of turns required to move to target hex.

Support introduced, showing adjacent units support for attack and defence.

Must give models own shader, so can change unform colours and let them see light. Shadows might be too much cost.

Interlude

May 13th, 2011 admin No comments

My apologies for those that follow this blog, but I am currently busy with another aspect of 3D Visualisation at www.visualbuilding.co.uk. Hope to continue here in a month or 2.

Categories: Thinking aloud Tags:

XNA UK Usergroup

April 20th, 2011 admin No comments

A quick plug or the people at XNA UK Usergroup:  http://xna-uk.net/ . Great people, great information and examples.

Categories: Uncategorized, XNA 4 Tags:

D’Erlon’s Attack Climax

February 16th, 2011 admin No comments

Categories: Development Screenshots Tags:

D’Erlon’s Attack

February 7th, 2011 admin No comments

With a little optimisation I managed to improve the man / model ratio from 1:25 to 1/10, ie each model represents 1o men. Smoke and sound  from musket volleys added.