Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Swarm AI: A Theory.

Author
Message
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 15th Dec 2007 13:28
I just want to ask a question to all the FPI scripting gurus around here.......

Swarm AI, would it be poossible?

What I mean is 5 characters, all using 5 independent scripts to co-operate with each other......

E.G. using the QUANTITY condition, could you have characters, that when in large numbers shall fight fearlessly, but when you kill most of them, so that they are in low numbers, they run away......

I understand it may be buggy and the scripts may be huge, I don't care about that.....

I just want to know, do you think it would work?

Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 15th Dec 2007 18:11
...not within FPSC, no.


Own It, Or Get Owned...
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 15th Dec 2007 19:08
Quote: "...not within FPSC, no."


So what does the QUANTITY condition do?
How about subscripts, e.g.

:state=1,Quantity=5:runfpi=5enemyswarm.fpi,state=2
:state=2,quantity=4:runfpi=4enemyswarm.fpi,state=3
:state=3,quantity=3:runfpi=3enemyswarm.fpi,state=4
:state=4,quantity=2:runfpi=2enemyswarm.fpi,state=5
:state=5,quantity=1:runfpi=coward.fpi


have subscriipts that program different levels of strength and bravery...

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 15th Dec 2007 21:03 Edited at: 15th Dec 2007 21:11
True enough, QUANTITY shows up on the list of conditions. What it refers to, or if it's a variable at all, I don't know. I think it was supposed to have something to do with the number of items in inventory, but I'm not sure.

Anyway, since we don't have access to the variable, we can't use it. I'm not even sure we can call it and get a return. I'm going to try a little test.

Best.

No, it didn't work. I don't know what it does.

uman
Retired Moderator
20
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 15th Dec 2007 21:18
Advanced AI would have an enemy or group of enemies attack the player when the players health is low and stand off when the players health is high.

Similarly and vice versa enemies would attack or group attack the player when their own health condition is high and move away from attack mode and the player to seek and to collect more health for themselves when their own health falls dangerously low.

Not likely to be seen in FPSC unless there is recourse to the source and that would have to have provision for such in its command set anyway or an allowance for some one to write the commands to get even close.

Its quite complex stuff. Had it working partly in some scripts I had created in another engine some time back but I have never come across many indie engines which would support such AI procedures for the end user to be able to work with.

"There are those who said this day would never come - What have they to say Now?"
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 15th Dec 2007 21:28
uman, that's an interesting thought. We do have access to the characters and the players health value, so we could adjust the characters ferocity based on those values.

If the players health is below a certain value, then the AI becomes more aggressive in an attempt to finish him off, but if his own health is in danger, he would move away to save himself.

Best.

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 16th Dec 2007 01:05
So it's possible to have enemies that react to their individual helth amounts, but not to the number of enemies in the group.

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 16th Dec 2007 02:05 Edited at: 16th Dec 2007 02:18
Correct. To the best of my knowlege, enemies are oblivious of each other.

Best.

Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 16th Dec 2007 09:33
You should ask Plystire what it means, he probably knows from his source code modding.

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 16th Dec 2007 13:20
Quote: "You should ask Plystire what it means, he probably knows from his source code modding. "



As soon as I see him....

Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 17th Dec 2007 16:11
Yo.

Like a few of the other commands in FPSC, QUANTITY is obsolete.

You can do branching AI, running lots of FPI scripts depending on the character's health and distance from the player. This was how I was originally creating Sensei.

The theory of it is sound enough and it should all work with no probelms, but often when it should be changing scripts, it just gets a bit lost and you entity just wanders on the spot doing nothing!

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 20th Dec 2007 20:18
thanks butters, i think i can put this one to bed now......

shame, i would've liked to have Rolfy's spiders acting like a ravenous, web-spinning swarm......

Back to the drawing board,

Login to post a reply

Server time is: 2024-11-27 18:58:05
Your offset time is: 2024-11-27 18:58:05