lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


The AI of an RTS game can be divided into two parts:
- the low level part with lots of basic algorithms like A*. These algorithms
are very performance critical, since they will be called often and consists
of scanning large parts of the map and other data. A* is the best example,
but finding a foe or other stuff could fit also.
- the high level part, which evaluates the targets of the operations.
"Destroy this building" or "Extend the base" are common examples. It is all
about strategic decisions about the game. Also triggers (attack, when enemy
touches this point) come into play here. This part uses the low level part
and triggers behaviours, but does also select and parameterize them, but not
implement them.

Following such a division: low level is c and high level can be scripted
(where lua just fits perfectly), if a high level part is too expensive in
lua, then recode it in c.

Dirk

-----Original Message-----
From: owner-lua-l@tecgraf.puc-rio.br
[mailto:owner-lua-l@tecgraf.puc-rio.br]On Behalf Of Nahuel Greco
Sent: Thursday, April 19, 2001 12:55 AM
To: Multiple recipients of list
Subject: Re: lua in high performance apps


On Wed, 18 Apr 2001 18:08:40 -0300
"Mauricio Carneiro" <carneiro@scientist.com> wrote:

> > I would suspect that lua has been used in real time strategy games, but
> > never as a way of controlling AI.  That's really not what lua is for.
Lua
> > is for programming level scripts, win scenarios, dialog, popups,
descision
> > branch points, game interface panels, win/lose screens, etc.  It is also
> for
> > plugging non-realtime parameters into your C AI routines to tweak them,
> > loading AI tables and values as LUA table files, and debugging.
>
>     I can say that we tried to use LUA in the AI of the game Tainá. But it
> really didn't work. It's not for that. We used LUA in level scripts (later
> we changed it, but initially it was in lua) game interface, win/lose
> screens. Even in animations bitmaps sequence. That's what lua is for.
>

Uhhrm.. then.. what faster scripting language do you suggest?, i have see
in various benchmarks page that lua is one of the fastest.

And.. there is a URL for Taina?


_------------------------------------------------------------.
| Nahuel Greco                 Web Development - Open Source |
| http://www.codelarvs.com.ar  Game Programming - Research   |
| Freelance coding / sysadmin  Networking. The answer is 42. |
'------------------------------------------------------------'