Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-20-2004, 07:26 PM
Sensath
Fire Beetle
 
Join Date: Jan 2004
Posts: 2
Default AI

Well, I just wanted to write some ideas out. I've searched and have not seen any relevant posts on AI and behavioral patterns. So if no one is working on it, I guess I can give it a go.

Introductions first, I'm NEW!

Ok, so I *use to* develop about 4 years ago (almost to the day!) and do it in my spare time when I feel frisky. I've helped some others develop software during that time (that turned commercial), so I hope I haven't forgotten everything! If I have, feel free to abuse me.

Now, back to the subject at hand. I feel the AI needs a little sprucing up. So if no one is working on it, I think I may give it a go around. This won't be the most brilliant piece of work ever created, but I'm sure the real coders here can fix any mistakes that I may create.

I've got some starting ideas of what I want to accomplish. This is more of a design overview at the moment, until I figure out how to inject the code correctly.

Please forgive me if this seems incoherent, it's just a start.


Random Note#1
I'll have to create a database variable for each creature called Wanderlust. This would give each creature type a psuedo random variation in the amount of time they stood still. An example of this would be:

Code:
Wanderlust = 0.50
Global_Wanderlust_Time = 60 // (seconds)

Wanderlust_Time = rand(Global_Wanderlust_Time * Wanderlust)

Random Note #2:
Assume that we have obtained a bearing (from true north) of the last route the creature walked. It would be randomally initialized on Spawn and updated once a creature started taking moving.

Let's tell our NPC that we want it to start walking away from (approx) the direction that it was just heading. The below line gives the NPC their next bearing of 180
__________________
---
All good things in moderation.
---
Neocron was the most fun I've ever had punching spiders and rats in a sewer since I was a young boy growing up in Chicago.
Reply With Quote
  #2  
Old 01-20-2004, 10:16 PM
Muuss
Dragon
 
Join Date: May 2003
Posts: 539
Default

what about walls, trees that are on the npc's path ? will just pass thru them ?
the ground isn't flat either, so you ll have to take care of the z axis.
if you dont implement this in your algorythm, your npc will only be able to move on a flat rectangular surface without nothing on the floor.
__________________
Muuss - [PEQGC] Dobl, the ogre that counts for 2 !
http://www.vilvert.fr/page.php?id=10
Reply With Quote
  #3  
Old 01-21-2004, 06:07 AM
Sensath
Fire Beetle
 
Join Date: Jan 2004
Posts: 2
Default

I don't think the Z axis will be much of a problem, in that the code that processes the NPC movement will handle that. But I will have to determine if the destination coordinates are within the Zone boundaries and are accessible. I realize that this is the major part of the problem, but it'll have to be done sometime won't it?

Do you code much? I imagine that you do since you've replied to my thread. I assume that you've coded in an organization that has processes for design and development. If you have, then you surely realize that in order to achieve a goal you must have a baseline to work with. I'll have to take this in stages of course and the first stage is to actually get the AI moving.

Once they are moving, I'll have a baseline to work off of that I can upgrade to include pathing (i.e. walls, dungeons, trees, terrain features). Let's take this in stages shall we?
__________________
---
All good things in moderation.
---
Neocron was the most fun I've ever had punching spiders and rats in a sewer since I was a young boy growing up in Chicago.
Reply With Quote
  #4  
Old 01-21-2004, 07:30 AM
kathgar
Discordant
 
Join Date: May 2002
Posts: 434
Default

Yeah on the walls and trees..that would require serious changes a more CPU and memory usage. If you do do it.. make sure it's easy for use to diff in and use a #define. The server as of now, knows nothing about the zone makeup. You also /do/ need to worry about the z coord. Stairs, guk? Kedge? And it's not really AI...
__________________
++[>++++++<-]>[<++++++>-]<.>++++[>+++++<-]>[<
+++++>-]<+.+++++++..+++.>>+++++[<++++++>-]<+
+.<<+++++++++++++++.>.+++.------.--------.>+.
Reply With Quote
  #5  
Old 01-21-2004, 03:11 PM
Beers218
Fire Beetle
 
Join Date: Feb 2002
Posts: 15
Default

You would almost have to make a map for each zone, defining lines and no-wander zones. Memory and CPU intensive it would be, but it would probably be the easiest way.

-Beers
Reply With Quote
  #6  
Old 01-21-2004, 08:21 PM
Muuss
Dragon
 
Join Date: May 2003
Posts: 539
Default

Code:
Once they are moving, I'll have a baseline to work off of that I can upgrade to include pathing (i.e. walls, dungeons, trees, terrain features). Let's take this in stages shall we?
You'd better start to think how you ll implement the zone geography before thinking how to make mobs moving. Once done, you'll realize that choosing randoming a heading will lead you nowhere.
Honestly, the pathing grid available for npcs will be far more efficient that any pseudo AI code of that kind.
__________________
Muuss - [PEQGC] Dobl, the ogre that counts for 2 !
http://www.vilvert.fr/page.php?id=10
Reply With Quote
  #7  
Old 01-21-2004, 09:09 PM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default

Muss wrote :
Quote:
Honestly, the pathing grid available for npcs will be far more efficient that any pseudo AI code of that kind
It is sound. And it is a way of mapping, anyhow.

However, pathing grid could be used in some situtations where IA still fails (it fails in EQ Live too, anyway), i.e. when mobs are fleeing, or trying to get to a point where direct route is not shortest route.

Pathing grid is currently used for roaming. But just consider netting the zone, with straightforward ways between to connected points. You get a graph for travelling the whole zone. Finding the best path is then a base compsci question.

Most nodes might be already defined in the various path grids, so the main thing is to connect them, weight the links, qualify nodes ('safe', 'hunting grounds','friends there'), merge the code, test.

Sounds easy, huh ?
Reply With Quote
  #8  
Old 01-22-2004, 12:42 AM
Muuss
Dragon
 
Join Date: May 2003
Posts: 539
Default

Yah its everything but easy. Fleeing mobs gonna be a big pain to implement, the idea to have nodes the mob would try to reach then use as escape path or rescue is good. Its just something that deserves a lotsa reflection before being written
__________________
Muuss - [PEQGC] Dobl, the ogre that counts for 2 !
http://www.vilvert.fr/page.php?id=10
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:33 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3