Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm planning to develop a somewhat sophisticated RTS AI (eg see BWAPI). have experience programming, but none in game development, so it seems easiest to start by scripting the AI of an existing game I've played, Warhammer 40k: Dawn of War (2004). As far as I can tell, the game AI is scripted with some variant of Lua (by the file extension .ai or .scar). The online documentation is sparse and the community isn't active anymore.

I'd like to get some idea of the difficulty of this undertaking. Is it practical with a scripting language like Lua to develop a RTS AI that includes FSMs, decision trees, case-based reasoning, and transposition tables?

If someone has any experience scripting Dawn of War, that would also help.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

LUA would work fine for programming an AI.

Here is a basic article over making a FSM in LUA

http://lua-users.org/wiki/FiniteStateMachine

Here is a basic set of classes to make a desicion tree in LUA

http://gamecode4.googlecode.com/svn/trunk/Assets/Scripts/DecisionTreeBrain.lua

LUA overall is an extremely powerful language. Any scripting language would have the ability to program an AI.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.