RPG NPC AI, Scheduling and Needs...

Started by
55 comments, last by Ingenu 23 years, 3 months ago
I must agree with one of the recent posts that, when I last looked at the NPCAI project (a month or two ago, I concede), it looked like people were piling on ideas, adding complexity, without really having a clear idea of how it would be implemented. I mean, I know the idea is to design first, implement later, but I think the problem is this: the project was set up to write games with ''better'' (loose adjective, I know) AI than current games, yet on the other hand, current games don''t have AI this good because it is very difficult to do so. The project aims to succeed where many highly paid professionals have so far failed. There are a billion and one ideas, some ideas about the meta implementation, but not much detail. Sometimes you just bite off more than you can chew. And sometimes you run the risk of implementing a simple thing in an overcomplicated way. For example, you can -simulate- market fluctuations just by multiplying 3 or 4 sine waves together. The result is great and ''realistic'', even though the implementation involved ''cheating''.

I can''t help but feel this kind of problem requires more of an iterative approach: write a good general AI, then try extending it. The project (as I last saw it) was trying to be everything to everyone by starting at too low a level, and looked more like a sociology paper with UML than a serious proposition for programming better computer games. Couldn''t it be useful to try and program something similar to the Ultima 7 system detailed above, except moving it a little more towards a needs-based system?

Feel free to correct me: it''s been a while since I had the time to check up on the project.
Advertisement
I can see where you are coming from, Kylotan. I can''t say I''ve been keeping up w/ their AI project really well. It did seem like they were coming up w/ some nice solid code though, so I have faith.

It does seem that AI is something that is sometimes better to build from the simpler and then just keep making it "smarter". That may not work w/ things like graphics engines, but for AI I think it seems to work better.


"All you touch and all you see is all your life will ever be --Pink Floyd
Quidquid latine dictum sit, altum viditur.
Need help? Well, go FAQ yourself.

Click here to see my current project.
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
Thanks Nazrix

First step: Brainstorming, get all ideas, talk about them, look at how they fit into one another and discard the less good ones

Second step: Design the system. retrieve all ideas and describe by words how it works, try a few examples to see what can go wrong, where and why, and redesign until it seems to work.

Third step: Begin to code, clear up all what have been done, redefine classes and choose how it''ll work, and why.
Code it without ANY optimisation so it must be easy to understand.

Fourth step: Test a first sample/beta implementation to make sure everything is going the way you want, and to find problems.
Solve them, redesign the code if necessary.

Fifth step: finish the coding and test the final implementation.

At various steps, we are looking at what we want, how easy we want it to be, and how we can make everything as we like.

We are at the end of step two, beginning of step 3.
And you know MS is a big firm with hundreds of professionnal and billion dollars but they produce Windows, while Linux is made by amateurs/non paid professionnal and it''s... Linux :p
-* So many things to do, so little time to spend. *-
Speaking of Ultima code, here is a link to the source of an unfinished RPG by one of the guys that wrote Ultima 8. It's at http://www.geocities.com/mind_phuq/ultrpg.zip

Of special interest are the NPC.c and NPC.h files in the GAME sub-directory. It's not finished, but shows how the Ultima guys set their stuff out.


Edited by - morfe on December 11, 2000 5:30:46 AM
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
Subject       : Ultima 7 & 7.5 Schedule StructureAuthor        : Byun DongHo (cpascal@soback.kornet.nm.kr)Last Modified : Jul 13, 1996I''m sorry I''m not good at writing in English. I hope you to understand the followings.  ===[ Think as Header ]===  Offset  Length    Description  ------  --------  ---------------------------------------------------     00H        4    256 in Ultima 7 & 7.5.   NPC num.                     (Next header item size(byte) is affected by this.)     04H    NUM*2    Same as the SUM of each NPC''s schedule amount.                     (Because NUM is 256 in Ultima 7 & 7.5,                      the size is 512 bytes in Ultima 7 & 7.5. )  ===[ Think as Body ]===   Each schedule size(byte) is 4 byte.   XX XX XX XX   |  |  |  +------ SuperChunk Number   |  |  +--------- Y coordinate in the SuperChunk.   |  +------------ X coordinate in the SuperChunk.   +--------------- Schedule number & Match time.   You can see the real X, Y location in cheat mode.      SuperChunk Number = (Real-Y / 256) * 12 + (Real-X / 256)                      X = (Real-X % 256)                      Y = (Real-Y % 256)      *. ''%'' is the same keyword as in C.   You can get them(SuperChunk Number, X, Y) easily by hex.   The followings are about Schedule number & Match time byte.     7  6  5  4  3  2  1  0 Bit   +--+--+--+--+--+--+--+--+   |  |  |  |  |  |  |  |  |   +--+--+--+--+--+--+--+--+    [============] [======]     Schedule num   Match time      ( 5 bit )     ( 3 bit )     Match time: 000= 0 AM,    100= 0 PM                 001= 3 AM,    101= 3 PM                 010= 6 AM,    110= 6 PM                 011= 9 AM,    111= 9 PM     Schedule num:        0= Combat       9= Hound        18= Bake       27= Duel        1= Hor. Pace   10= Stand        19= Sew        28= Preach        2= Ver. Pace   11= Loiter       20= Shy        29= Patrol        3= Talk        12= Wander       21= Lab        30= Desk Work        4= Dance       13= Blacksmith   22= Thief      31= Follow Avt        5= Eat         14= Sleep        23= Waiter        6= Farm        15= Wait         24= Special        7= Tend Shop   16= Major Sit    25= Kid Games        8= Miner       17= Graze        26= Eat at InnAvatar has no schedule.  And each NPC must have 1 schedule at least. Surely 8 is max amount for one NPC.

"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
Any chance of posting the URL where the above information came from?
URL? Newsgroup : comp.ai.games

The message was posted by Byun DongHo (cpascal@soback.kornet.nm.kr), but in 1996


NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ...
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick

This topic is closed to new replies.

Advertisement