Thanks .
Yeah , with progressive efforts , we gonna achieve good results .
I don't have spent many times to make a realistic anim , because i wanted
to work with the follow path feature of Blender .
So a basic walk cycle was enough to give me an idea of the amount of work .
Yeah , it's better to be a team than work alone , there is too much factors to consider
for a single person . Anyway ...
I've found an other great example of the use of the 2Danimation system with AI in vegastrike . It is the "quest_dispute.py " (
) , that is also educative :
http://sourceforge.net/p/vegastrike/cod ... dispute.py
I think we should follow that workflow , that begins with a storyboard :
# the flow of the quest
# (0) check if player is in system
# (1) launch the actor units
# (2) start docking dispute conversation
# (3) play dispute comm animation
# (4) start armed conflict
# (5) socialist call for help
# (6) play comm animation
# (7) wait for player interaction - check who's still alive
# (11) socialist reward
# (21) merchant reward
# (12/22) play the comm animation
# (30) let the winner dock at the station
# (99) finish quest
# there could be more variety:
# (a) confed militia flying in to get the trouble makers
# (b) destoyed ships spawning escape pods
# (c) some provoking conversation during the conflict
# (d) breaking off the battle after some time (and off to dock)
# (e) station calling for the guys to stop hitting her
An example of AI action + com animation
# get the socialist to attack
if (self.stage==5 and VS.GetGameTime()>self.timer):
# the privateer gets involved... or does he?
VS.IOmessage (0,"[Lenin's Mercy]","privateer",self.socColor+"Mayday! We are under attack! Privateer, please help us... we are no match for them. We have wounded on board!")
VS.IOmessage (6,"[VulCorp Transport A-5]","privateer",self.merColor+"Privateer, if you look the other way... you will be duly compensated.")
self.animations = [["com_dispute_socialist.ani",2],["com_dispute_merchant.ani",2]]
self.sequence = [[0,6,0],[6,4,1]]
self.talktime = VS.GetGameTime()
VS.AdjustRelation(self.socialist.getFactionName(),self.merchant.getFactionName(),-5,1)
self.socialist.SetTarget(self.merchant)
self.socialist.LoadAIScript("default")
self.socialist.setFgDirective("A.")
self.timer = VS.GetGameTime()+10
self.stage = 6
For me , there is enough in this file to elaborate cool missions .
But i'm still searching a way to have the AI com display functional for every Docking sequence , in the Aera sector for beginning .
Perhaps in the files that deal with docking , or in bases ...
Write a class that make a .ani file ( it's just a text file ! ) based in a text and a sound duration could be a future work for me also .
We could have (4*numberOfAiStates) .images files in a folder , the class could choose the 4 keyframes needed for a lipsync , and create a list ( the .ani file ) for each FSM AI state ( cool , hungry etc ... ).
In fact , we could use more frames , that depends of the
phonems in use in the speech .
That would be dynamic , with no overload of cpu as the textures should be already in the memory . But it's better to keep the things at their simpler level now , as it is not so simple to use them while in learning curve .
Edit :
My previous idea of a anim builder class should be for an external tool , dedicated for artists like Darkvixen . They would have a window with a text box , they would have to
load a text file that contains the speech ( say a .speech file ) , then assign their PNG to
phonems . Press start , the program will look for phonems in words , space for silence ( or special char ) , and build a .ani sequence .
A play button could then be pressed to check the result .
This tool should also be written in Python , with a portable graphics interface , for
portability's reasons . Where are the python coders now ?