UFO:Alien Invasion
Development => Newbie Coding => Topic started by: caelum on November 25, 2009, 11:59:54 pm
-
Are civilian.lua and alien.lua the full extent of the AI? or is the c code still doing some of it?
Now that I have compiled the dev version I was going to play around with the AI, I managed to get one of my soldiers stuck between two civilians last time I played it.
-
Afaik LUAai is NOT activated by default. Not sure though.
-
You are need to enable cvar to activate LUA. Not sure about name of cvar though.
-
the cvar is g_ailua - but be warned, it's not very performant right now (at least if you don't also activate sv_threads - which is still not 100% working)
if you want to work on the lua scripts, help is more than welcome on this side.
-
I am happy to work on the LUA scripts. It won't be until after I have finished struggling with the Blender import/export scripts though :).
Is the idea to implement something like what the ai diagram that is in SVN currently outlines?
-
yes - something like that - if you have improvements or other ideas. feel free to discuss them in the wiki
-
So is there any ability for civilians to carry weapons yet? I am assuming no at the moment, but thought I would ask :).
I think I can live with the slowness as I test out the scripts, it will no doubt be easier if bugs from the sv_threads are not thrown into the mix.
Do you know why it performs so badly?
-
civilians with weapons are not yet implemented in the c ai code nor in the lua scripts
it performs so bad because it looks like it does way to much traces (see gi.trace calls - maybe caching some of them for one frame would increase the speed already to an acceptable level) - the traces are mainly used to get to the next possible walkable position and to search for potential victims or hide spots.
-
... - the traces are mainly used to get to the next possible walkable position ...
I hope the LUAai does NOT do it's own pathfinding, but uses the routing table instead !?
-
it uses the game lib callbacks like the c ai, too - yes
-
Sounds like I should look through it and see if I can increase the performance a bit before worrying about improving the AI. LUA looks easy enough to learn that if the speed of using it is acceptable then there will probably be a few people willing to play with them.
-
i think we all would welcome help on this front.
-
Can't say how fast I will be able to look at it, otherwise I would be volunteering more :), but I will see what I can do as I get spare time.
I will just keep posting on this thread as I need help or want to discuss something about it?
-
yes, please post your question and suggestions here or join our irc channel.