Page 1 of 1

AI

Posted: Wed Jul 30, 2008 2:42 pm
by zuzuf
What about a LUA interface for AI ?
we could just provide a high level interface and use LUA to put all those pieces together ?

Posted: Fri Aug 01, 2008 8:18 am
by milipili
It is a good idea. For example Homeworld 2 uses Lua for its units.

Posted: Fri Aug 01, 2008 8:25 am
by Balthazar
Yay!! Homeworld is my favourite game :) If it will bring more flexibility to AI - then yes of course :)

Posted: Fri Aug 01, 2008 7:08 pm
by milipili
However, do not forget : Too much scripting is really a bad thing.

Posted: Fri Aug 01, 2008 7:33 pm
by zuzuf
yes, it can slow down the game :(

Posted: Sat Aug 02, 2008 3:28 pm
by Vampiloup
What is LUA ?

Posted: Sat Aug 02, 2008 5:07 pm
by zuzuf
Lua is a programming language designed to extend applications capabilities.

We use Lua to script game behavior, when you start a game you chose a Lua script that'll define game rules, when you start a mission campaign TA3D generates a Lua script from the mission orders that'll behave like in TA campaign mode.

Currently it's used to script the engine, but we can also use it to script units. For now units uses only COB/BOS scripts (TA way of doing things) but using Lua would allow us to add easily lots of functions. For example we could script unit animation in Lua (and ship Lua scripts within 3DM file ?).

Lua can greatly increase the possibilities of unit scripting since you can have access to almost everything in Lua.

I've made a "sample game" for university which uses Lua for scripting. The renderer is coded in C++, the rest is done in Lua :D