AI

Everything related to the code /
Tout ce qui touche au code
Post Reply
User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

AI

Post by zuzuf » Wed Jul 30, 2008 2:42 pm

What about a LUA interface for AI ?
we could just provide a high level interface and use LUA to put all those pieces together ?
=>;-D Penguin Powered

milipili
Posts: 545
Joined: Thu Nov 02, 2006 8:52 am
Location: Paris (France)
Contact:

Post by milipili » Fri Aug 01, 2008 8:18 am

It is a good idea. For example Homeworld 2 uses Lua for its units.
Damien Gerard
Ta3d & Yuni Developer

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Fri Aug 01, 2008 8:25 am

Yay!! Homeworld is my favourite game :) If it will bring more flexibility to AI - then yes of course :)

milipili
Posts: 545
Joined: Thu Nov 02, 2006 8:52 am
Location: Paris (France)
Contact:

Post by milipili » Fri Aug 01, 2008 7:08 pm

However, do not forget : Too much scripting is really a bad thing.
Damien Gerard
Ta3d & Yuni Developer

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Fri Aug 01, 2008 7:33 pm

yes, it can slow down the game :(
=>;-D Penguin Powered

Vampiloup
Posts: 56
Joined: Thu Mar 20, 2008 9:13 am

Post by Vampiloup » Sat Aug 02, 2008 3:28 pm

What is LUA ?

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sat Aug 02, 2008 5:07 pm

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
=>;-D Penguin Powered

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests