Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → ah, a object to a point, but to what end?
ah, a object to a point, but to what end?
2003-11-08, 1:02 AM #1
hello my fellow cogers, i am attempting to make the ultermate AI, one based on the _decore template and fully controled useing cog.

the only problem is i cant make him move as i cant find the vector to a postion. how do i do this?

my current system uses setthinglook to look at the object, the getthingvec to find the normalised vector, and then set thing vel to go to that postion, and when the object gets near to it stop the movement.

but i cant seem to get it to work properly, any othere ideas?

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

rule three, "asprines good, but it hasent got the kick of morphine. and its not gonna stop the hurting in my arm, the ones thats on the otherside of the room i mean" -the alternatior
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2003-11-08, 10:19 AM #2
...why are you using _decor??

------------------
Bassoon, n. A brazen instrument into which a fool blows out his brains.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2003-11-08, 2:39 PM #3
A similar thought crossed my mind too Emon.... [http://forums.massassi.net/html/tongue.gif]

But as for a more useful answer - I'll have to have a think about this one - it's getting late now and everyone knows you can't code well late at night (unless it's a project due in the next morning - or "same" morning, if you never make it to bed... [http://forums.massassi.net/html/wink.gif])

I don't speak from experience... honestly.... I am organised [http://forums.massassi.net/html/cool.gif] ... sort of [http://forums.massassi.net/html/tongue.gif]

Just a last minute thought - have you consulted the DataMaster about Vectors and GetThingLVec()? There's also a good, detailed notes section about solutions to player's LookVector in the "Tutorials" section of the DataMaster... Maybe those could help you?

Hope this (somewhat) helped... [http://forums.massassi.net/html/biggrin.gif]

-Jackpot

------------------
Are you feeling lucky, cuz if you are, get your hands off me... ;)

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2003-11-09, 12:37 AM #4
yea i been messing about in data master for the past two days trying to find a solution, the closest i could find was the aiming stuff in the tutorials section, but i got confused and my head hurt so i disided someone else may have a answer..


as for the reson i am useing _decor....

the average AI is not synced, to sync it is a rather dificult task, allthough you can get it to be in the same place on both compuitors, it can die on one computor and not on the othere, a little bit of lag and it may become invunrable, and that SUCKS!

and so... a Decor based AI would solve the problem, the postion and direction syncing becomes allot smoother, and at the same time i can sync the damage and killing animations. makeing the perfect AI for a MP team assult on a base.

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

rule three, "asprines good, but it hasent got the kick of morphine. and its not gonna stop the hurting in my arm, the ones thats on the otherside of the room i mean" -the alternatior
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2003-11-09, 8:34 AM #5
Uh, you'd have to entirely recode the AI system, some of which you can't do in COG, or if you can, it would be really shoddy and unrealiable.

------------------
Bassoon, n. A brazen instrument into which a fool blows out his brains.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2003-11-11, 2:52 AM #6
You might wanna take a look at the Rbots cogs, as they're MP AI bots.

------------------
-Blessed Be-
I know it's the last day on earth,
We'll be together while the planet dies.

DBZ: The Destruction is Real
-Hell Raiser
2003-11-13, 5:18 AM #7
recodeing the AI is darn simple,think about it, what do they do.

if they hear you they investigate, if they see you they attack.
else they walk about or stay still....

now how am i gonna find the vector two the pos?

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

rule three, "asprines good, but it hasent got the kick of morphine. and its not gonna stop the hurting in my arm, the ones thats on the otherside of the room i mean" -the alternatior
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2003-11-13, 11:02 PM #8
Ok - let's get several thing clear, right from the off: (lol - eveybody ready - some might want to take hold of good old terra-firma here, because I'm about to go off...)

1.) Coding AI isn't simple. The amount of logic required to form a semi-intelligent "bot" that plays to even a "reasonable" level is difficult. Have you even looked at any of the processes necessary for search algorithms? Locating path nodes? Selecting the most appropriate weapon for any given scenario? Health assessment and locations of nearest power-ups? If you have, quite frankly I'd say you're being "foolishly optimistic" to say it is "simple".

And that's my phrasing it politely [http://forums.massassi.net/html/wink.gif]

Equally, whilst I'm going off on this rant [http://forums.massassi.net/html/wink.gif] :
Quote:
<font face="Verdana, Arial" size="2">
...and fully controled useing cog.

...if they hear you they investigate, if they see you they attack.
</font>

how do you determine what the AI hears - surely that defeats the point of having AI (it being able to have it own "consciousness" in order to "reason" through various events, and choose the best/most appropriate course of action. Afterall, the JK AI files (have you studied those?) are rather limited in terms of actual events that the standard single-player actors have to rely on, to form responsive action(s). I hope you're not suggesting using that AI over a net game [http://forums.massassi.net/html/eek.gif]. As Emon points out, you'd need to "entirely recode the AI system, some of which you can't do in COG" [http://forums.massassi.net/html/redface.gif]

2.) _decor . I'm not going to say it again, but just ... "WHY?". True, it "sucks" when a thing seemingly becomes invulnerable because of lag, but you're always going to have that no matter what sort of Internet game you play. The question is though, how would the syncing of damage and killing animations be improved *significantly*, by using _decor as a template, given the aforementioned point? I guess on this point I believe we'll mutually have to agree to disagree [http://forums.massassi.net/html/wink.gif] lol

3.) If it is so easy, then why didn't the original JK and MotS teams incorporate it into the game? Heck, even Raynar and the Rbots team have gotten the AI so good...

* /me ends whirlwind flourish now... *

Don't get me wrong - I know this post comes across as being "pretty agitated", but I'm just trying to point out that recoding an AI system is no-where as easy as you seem to think it is, given the almost infinite number of variables that the bot will have to deal with [http://forums.massassi.net/html/frown.gif]

And add to that JK's net-code - ARGHH - not good news... but if you intend to go ahead then I'll wish you the best of luck and help out where I can [http://forums.massassi.net/html/biggrin.gif]

-Jackpot

PS: w00t - 200th post!!! [http://forums.massassi.net/html/biggrin.gif]

------------------
Are you feeling lucky, cuz if you are, get your hands off me... ;)

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2003-11-17, 11:41 AM #9
Quote:
<font face="Verdana, Arial" size="2">Originally posted by lucky_jackpot:

1.) Coding AI isn't simple. The amount of logic required to form a semi-intelligent "bot" that plays to even a "reasonable" level is difficult. Have you even looked at any of the processes necessary for search algorithms? Locating path nodes? Selecting the most appropriate weapon for any given scenario? Health assessment and locations of nearest power-ups? If you have, quite frankly I'd say you're being "foolishly optimistic" to say it is "simple".
</font>


hey hey hey, i never said this was a BOT, this is just a rather basic AI.. ad finding pathnodes aint that harrd if i was useig them, but unfortunaly i aint. allthough wepon handeling is definatly the hardest part. if it was nessersary its more over a case of fiding the distacne ad speed of the target (and plausebly their wepon) and haveing a preset wepon for every posobility.
Quote:
<font face="Verdana, Arial" size="2">
And that's my phrasing it politely [http://forums.massassi.net/html/wink.gif]

Equally, whilst I'm going off on this rant [http://forums.massassi.net/html/wink.gif] :
Quote:
...and fully controled useing cog.

...if they hear you they investigate, if they see you they attack.
</font>

how do you determine what the AI hears - surely that defeats the point of having AI (it being able to have it own "consciousness" in order to "reason" through various events, and choose the
best/most appropriate course of action.

the "if it hears you" part is quite simple, if the enermy actor decore actor or player is in a set range of the decore actor (from now on called DAI) then based on the distance as a muliplayer (the further away the less lightly) go and investigate. (A.K.A trun around and move towards the ostion of the said sound maker. also if within a 360 degreee LOS double the lightly hood of "hearing" the sound. also run towards the target insted of walking.
Quote:
<font face="Verdana, Arial" size="2">
Afterall, the JK AI files (have you studied those?) are rather limited in terms of actual events that the standard single-player actors have to rely on, to form responsive action(s). I hope you're not suggesting using that AI over a net game [http://forums.massassi.net/html/eek.gif].
</font>

thats the exact point, this is a AI so basic its a step lower on the evoluaary line than the AI of JK, and the fact is as i mentioned, this iseent some super fabulous BOT, its a MP enermy for CO-OP misstions. it dosent need to run about picking up wepons, it just wants to shoot at the good guy. another advantage is that the new AI system would make it possible to have a very MOTS style AI that can shoot at a AI with a different side. so you and your team can fall in to a battle and find AI on your side shooting at the bad guys as well as you.

also in some levels ai could "follow" you up stares amd ramps (although not jumps or elivators, and it cant open doors) and then shoot at bad guys with you (weather player s or other AI.
Quote:
<font face="Verdana, Arial" size="2"> As Emon points out, you'd need to "entirely recode the AI system, some of which you can't do in COG" [http://forums.massassi.net/html/redface.gif]
</font>

actualy. thats quite true, you would, but not all of it has to be done for a AI this darn simple. it dosent need to jump. or open doors, it only needs to make random turns if "patroling" (or evan walk one way untill a timer has elapsed or is outside of a set distance then return) it also nees to investigate "sounds" (as i said before) and shoot at you if it sees you with a set margin of error. (RAND*int we love you)
Quote:
<font face="Verdana, Arial" size="2">

2.) _decor . I'm not going to say it again, but just ... "WHY?". True, it "sucks" when a thing seemingly becomes invulnerable because of lag, but you're always going to have that no matter what sort of Internet game you play. The question is though, how would the syncing of damage and killing animations be improved *significantly*, by using _decor as a template, given the aforementioned point? I guess on this point I believe we'll mutually have to agree to disagree [http://forums.massassi.net/html/wink.gif] lol
</font>

well the fact is the syving wont improve that mutch (tests showed a 100 MS improvement) but the fact is my (very very very basic) DAI dosent cause as mutch lag as a normal AI.. dont you wonder why AI arnet evan crated in MP games and you have to gerneraite them? obviously coz LEC saw that they lag like HELL, and they do. in my lag test i proved that in a MP game. normal AI caused a 300MS lag, while my basic _decore AI caused a far better 150MS lag
(note all times are avrages rounded up to the nerest fifty or hundred)

antoher improve ment is that the object is synced BY JK's engine. dont you think that the running a pulse ever 0.01 secods asking JK to "syncthing" in cog may cause SLightly more lag than JK doing in natrualy?
Quote:
<font face="Verdana, Arial" size="2">
3.) If it is so easy, then why didn't the original JK and MotS teams incorporate it into the game? Heck, even Raynar and the Rbots team have gotten the AI so good...
</font>

well LEC never thought of makeing Co-Op misshtions. (obvioulsy, coz they would have done it otherwise)

and kudos (did i say that right?) to rynar for the Rbots. that own, but he was useing defult JK AI, and he wated Bots.. now i hardly want aything near a bot. all i want is something that when you open a door can be behind it shooting your *** off. also it might frankly suck in open combat, but if you played JK SP when did the AI actualy fight in open combat? JK's dark jedi? they sucked. the tuscan raiders. the walk towards you shooting! so they suck too. if you look at it LEC where very carfull NOT to have the AI in open combat simply coz it would look dumb. in JO AI are far far better and levels like yavin's swamps seem actualy realistic, try that with JK's AI and it would be dumb.
Quote:
<font face="Verdana, Arial" size="2">
* /me ends whirlwind flourish now... *

Don't get me wrong - I know this post comes across as being "pretty agitated", but I'm just trying to point out that recoding an AI system is no-where as easy as you seem to think it is, given the almost infinite number of variables that the bot will have to deal with [http://forums.massassi.net/html/frown.gif]
</font>

you obvioulsy mis understand me in teh fact that this aint a bot. and it might ot be easy for you lucky. but in the last few mouth i have found that i can now write cogs that are in almost equal to people like sabermaster GBK the hole of the famious EAH clan AND the people who made Rbots. yea in some respects i fail (liek trying to work out how to send my DAI to a POS with a vector force) and i tend to use more long winded meathods like hundreds of commands insted of those neat tidey variable[x] loop thingys that own, and i tend to use to meany varables when i could use a array or heap. and sometimes i evan have the nerve to add half a ton of rubbish code to do something that i know i could do if i worked out why it wasent working but cant be bothered..
but still, i can cog practicaly anything.
/me also makeing fantabulistic drivable vehicle to rival my last (not half bad) attempts.
but when it comes down to it. sometimes i need help and all i want is a strait answer when i do, now i dont mind your comments, and i have to admit that we will have to agree to differ on this one..

BUT i am going ahead with it and unless someone can tell me how to find the vector to move a object to a point, i will simply have to spend a few weeks when i could have been working on the DAI working it out.
Quote:
<font face="Verdana, Arial" size="2">

And add to that JK's net-code - ARGHH - not good news... but if you intend to go ahead then I'll wish you the best of luck and help out where I can [http://forums.massassi.net/html/biggrin.gif]

-Jackpot

PS: w00t - 200th post!!! [http://forums.massassi.net/html/biggrin.gif]

[/B]</font>


good. how do i find the vector to go to a pos?

P.S. sorry about sucky spellingg but i suck at that, and my n key seems to work sometimes but the not otheres, its kida liek i need o press it real hard.

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

rule three, "asprines good, but it hasent got the kick of morphine. and its not gonna stop the hurting in my arm, the one thats on the otherside of the room i mean" -the alternatior

[This message has been edited by [SF]pjb (edited November 17, 2003).]
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2003-11-17, 12:41 PM #10
If you aren't using waypoints, your AI won't do anything other than bump around the level randomly until it finds something to shoot. Every AI system needs some kind of waypoint, whether it's automatically generated or put in by the mapper, the AI has to have a destination.

------------------
Bassoon, n. A brazen instrument into which a fool blows out his brains.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2003-11-17, 2:14 PM #11
First off, I didn't realise that when you meant AI, you didn't mean BOTS... [http://forums.massassi.net/html/redface.gif]. It was more an assumption on my behalf that because you wanted a new form of AI (in a player-like fashion), that BOTS would have been a plausible option. If you're after a MP enemy for CO-OP missions though, surely you'd want some iterative thought process as to how they move though, to get that realistic "patrol" style? Oh, by the way - which engine are you designing the AI to be used with (JK or MotS)? Probably should have asked that first actually [http://forums.massassi.net/html/wink.gif]

I'm interested about the findings of your testing though - those results do make for interesting reading, especially the _decor template usage. I'll be the first to admit that I wouldn't have thought you would have obtained results like that. Impressive and most interesting. Lag cut by half - well I'm in favour of that!

On a completely different tack (and this is not a "get at"), but there is an art to coding. Don't get me wrong, with a little bit of knowledge, anyone can code; the real talent lies in coding efficiently, both of which SaberMaster and GBK do. To rank yourself alongside them, when it appears you don't have the fundamental programming basics of arrays and loops, described by yourself as "neat tidey variable[x] loop thingys", instead writing "long winded meathods like hundreds of commands" would seem to be a bit of a bold statement... but if you're confident in your ability, then fair play - "Carpe Diem" [http://forums.massassi.net/html/smile.gif]

Quote:
<font face="Verdana, Arial" size="2">
you obvioulsy mis understand me in teh fact that this aint a bot. and it might ot be easy for you lucky. but in the last few mouth i have found that i can now write cogs
</font>

I'm assuming that when you wrote this paragraph, you intended the "might not be easy for you lucky" part to be related to my misunderstanding that you were not aiming for a bot. If that paragraph was intended on belittling my cogging knowledge (which I openly admit is not to the standard of SaberMaster, GBK, Descent_Pilot and Hell Raiser, to name but a few), then I find your attitude incredibly patronizing. Believe it or not, other people do their homework to [http://forums.massassi.net/html/wink.gif] lol However, I choose to believe it is the former of those options [http://forums.massassi.net/html/smile.gif]

Sorry to bother you with a reply but no answer, but I was just making sure I'd understood you properly. Again, I apologise that I misunderstood the slant you were taking on the AI approach - no hard feelings? [http://forums.massassi.net/html/smile.gif] I'll say one thing (as if I haven't already), but it's one heck of an interesting slant you're going for - I look forward to seeing how this AI works out when you release it [http://forums.massassi.net/html/biggrin.gif]

-Jackpot

PS: I'm still thinking about the answer to your problem. What about using something along the lines of:
Code:
position = VectorDist (GetThingPos (thing));

Or have I interpreted your question the wrong way round? I'd just like to state for the record that I'm still in the process of learning vectors, so don't condemn me if I'm a little off the beaten track... [http://forums.massassi.net/html/smile.gif]

------------------
Are you feeling lucky, cuz if you are, get your hands off me... ;)

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2003-11-20, 10:08 AM #12
i was gonna quote everything you said then.. but it all went kaput just bfore i was gonna post so ill sum up..

i never rankd myself along side sabermaster GBK or any of them, i said that i was almost at the same level as them

also i wasent bliteling you.. i was saying that it might be hard for you to understand me.. (coz me talkio suckkieo)

i havent got any of my cog stuff here at the momnt so ill look at that when i gt back..


oh and the rson i did tests is it has allways been thought that they made less lag.. (pjb points to spiral for his tip off)
BUT i knew no one would beliv me if i dident prove it..
------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

rule three, "asprines good, but it hasent got the kick of morphine. and its not gonna stop the hurting in my arm, the ones thats on the otherside of the room i mean" -the alternatior

[This message has been edited by [SF]pjb (edited November 20, 2003).]
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?

↑ Up to the top!