[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: LUA and AI
- From: Christophe Gimenez <chris@...>
- Date: Mon, 27 Mar 2000 14:42:37 +0200
My question was unclear...
Of course the A* algorythme will be only implement in C++...
The problem is :
1) we have (will have) 100 functions available for the scripts (ex:
2) we have 10 or 20 incoming type of message (ex: on_hitBy(who),
Some NPC must be able to be pre-programmed to execute a succesion of
commands : that's the problem, I have no idea of doing a such thing and I
don't know of to avoid TONS and TONS of "if then else"... I think (but I'm
perhaps wrong), that having some simple knowledge in AI would help, but I
can't find any thing on the web to help me (I've red many many articles but
Any idea or am I always unclear ?
De: Sean Thomas Middleditch [SMTP:firstname.lastname@example.org]
Date: samedi 25 mars 2000 01:22
A: Multiple recipients of list
Objet: Re: LUA and AI
Nicholas Hesketh wrote:
> That would depend on the sort of AI you're trying to do, and the number
of entities you need to do
> it for.
> For the mid to high level portion of rpg character AI it should be ideal
as the scripting
> flexibility outweighs computational overhead, and you can always migrate
the expensive stuff to
> C/C++ as the game develops.
> Using it for adaptive pathfinding of several hundred units in a strategy
game is probably not a good
> idea though ;-)
> It's a case of flexibility verses performance, but you'll probably find
scripting useful for at
> least a portion of your game logic.
> Nick Hesketh.
> -----Original Message-----
> From: Christophe Gimenez <email@example.com>
> To: Multiple recipients of list <firstname.lastname@example.org>
> Date: 24 March 2000 19:51
> Subject: LUA and AI
> >Okay that seems a strange question...
> >But here is my problem : as I would (and will) use LUA as the scripting
> >langage for a game project I've started to find information about AI in
> >games (and of course I don't know a word about AI).
> >Thus, do you think that implementing basic AI principles could be done
> >LUA ?
> >If yes, we to start from ?
> >I've spent many many many hours and collected many many many links, pdf,
> >doc, html files but for the moment I could'nt learn some basic that I
> >use in a game.
> >[ if there is an AI-GOD in the mailing list, please send me a mail ;-) ]
AI is fun. The best AI model I've seen was implemented in Java for a
roguelike game... The
object-oriented nature rocked.
For an AI, write the unmutable stuff (like pathfinding, logic, etc.) in
your C/C++ code. Then write
the control in script.
Something like (in PSEUDO code)
if (see_enemy) then
if (is_dying) then
That's a damn poor example, but I'm tired, so I have an excuse. ;-)
I think for controlling actions (like go north 3, west 4, get item, east 6,
say "My, it is raining
frogs.", attack duck, south 3, west 2, say "Oh no! I lost my magic Blunt
Stick of Sharpness!!!") a
specialized language would do best... something simple like
MOVE east 3
SAY "I'm lost"