lua-users home
lua-l archive

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


> > > Has anyone here used lua in what might be a considered a long-running
> > > high performance app?
> > > For example, has anyone used lua for the AI of a real time strategy
game
> > > with lua programs controlling each of a hundred or more units, 30
times
> > > a second?

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 would recommend having various AI behaviors written in C for which lua can
initialize and change, and also disable or enable at different points in the
game (non-real time).  I think that's where you'll find the greatest utility
for lua.   The behaviors can be more generic, and you can leave out all of
the 'tuning' values (i.e. speed, sighting distance, attack frequencies,
etc.) and just put them in a lua table file and read it in as your rules
file.

Ben Cooley