• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

Gollum

How to make NPC's "gossip"

67 posts in this topic

WTF?!? This thread is ancient... I remember seeing it in my earlier days here (before registering this account). Anyway I''ll write a more detailed post as soon as I reread it all...
0

Share this post


Link to post
Share on other sites
OK... I agree with Puzzler183''s approach, largely because I have already implemented that, and I am currently implemented save/load features for it. I also plan to make an inference engine with it: for example:

if x is y and y is z, then x is z
if x ix y and y (any link) z, then x (any link) z

Then when that link is put in place between the two, you calculate the new truth values as follows (psuedo code):

f1 = xtoylinktruth / 256;
f2 = ytozlinktruth / 256;
xtozlinktruth = f1 * f2;

So that is one is thought to be 90% true, and the other is 100% true, then the new link will be 90% sure that it''s true. On the other hand, if computer is only 90% sure about the second link, it will only be 81% sure about the new one. If you want falseness, you can just have very low values for sureness of truth...
0

Share this post


Link to post
Share on other sites
k... silly question... everyone seems to be using unsigned chars for the truth value... anyone thought of implementing it so that positive values are true and negative values are false?? I know its not really that big a deal, just seems to me that it would be a little more intuitive than 0 being false and 255 being absolutely true.

nother silly thought I had....(what can I say... I get alot of them ) would it make sense to implement one global network, assign each link an ID, then just store the link IDs a TTL and a truth for each link in a NPC''s "memory". then with reference counting and such you can discard links that aren''t used anymore, and you only need the one network. nother thought on this idea is to then add a flag to each link, you then have some NPC''s (Wizards, librarians, Historians...)going around collecting information(links) then they go somewhere library or what ever, and you set an archived flag, then if everyone forgets the knowledge it still exists in the library and the player could find it there. I dunno if that makes any sense. just thought that might be more realistic than having to maintain one character with a particular piece of knowledge, bit of an extension on that, the historians etc could also collect links of (player "interested in" item) then when they return to the library they also look that up then if they see the player again they can pass on what they found.. I dunno.... just ideas I had...
0

Share this post


Link to post
Share on other sites
First, you can''t do what I said above... It just makes inference more difficult... Second, the idea is a good one until you get into special cases. For example, links shooting off of links, etc. If that doens''t apply then maybe this does: is it really worth it? My link struct is 6 bytes (without age), and it would be 4 for every pointer. I habve 768MB of RAM. Somehow I don''t think an extra couple K will matter.Good idea though for folk swith bulky structs.
0

Share this post


Link to post
Share on other sites
I dunno... I think that using a signed char would make inference easier....

just for instance.. using negative values to represent false and positive for truth and your method posted above.

ball is round 127
round is square -127

infering that the "ball is square" we get

f1=1
f2=-1
multiply them... we get -1 or fully false which makes perfect sense... I dunno... maybe I''m missing something really obvious here. only problem I can see is infering from two false values when that should give a false.

cow is dog -127
dog is cat -127

cow is cat works out to 127 then, I guess... we don''t know that its not true. I''m gonna hafta think on this for a bit, the three way false might be a specail case you''d have to handle this way.

also, I''m curious, you mentioned links shooting off links, can you give me a particular instance?? I just can''t think of any off hand.
0

Share this post


Link to post
Share on other sites
You can''t really combine false conditions anyways. Knowing that A is not B and B is not C does not mean A is not C. In fact, it might actually be more likely that A is C because you''ve eliminated the same value for both of them.

Using numbers, you can easily see that. Say you are using an unsigned char A, B, C. if A = 1 and B = 2 and C = 1, A is not B, B is not C, but A is C. Without the two rules, there is a 1/256 chance that A and C are equal, but knowing that neither is equal to B makes the chance 1/255.

I think.
0

Share this post


Link to post
Share on other sites
OK, let''s see if I can remember where I thought about doing this... I just remember doing it at one point... Hmm...

Let''s see, perhaps to answer the 5 W''s a link... Well anyway, it was basically to give each link three pointers to links... Eventually I left it because it was too memory hogging.
0

Share this post


Link to post
Share on other sites
Just wanted to jump in here now. I wanted to add something to the whole decay/way info is passed between people. Everyone at one time or another is told something by someone that they really couldn''t care any less about. For example, let''s say someone steals a loaf of bread from Joe the baker. Joe goes on to tell a person traveling through the town about the incident. The traveler most likely wouldn''t care about something so insignificant, and probably wont be able to tell you what the Baker said an hour after he heard it, let alone go and repeat it to someone he meets at the local tavern. Or maybe he wasn''t really paying attention at all. Just kind of feining interest while preoccupied with finding an Inn to stay the night.
The point I''m trying to make is that not everything that is said between characters needs to be carried on any further than the initial conversation. This can help the whole knowledge equilibrium problem where everybody knows everything. Everyone wont know everything because even if they''ve been told everything they wont necessarily retain it all. Example:
Let''s say the local shop keeper tells something to the town drunk that you''d really like to know in order to finish some type of quest. But, the shopkeeper doesnt like you all that much, and refuses to tell you. But you find out that he shared the information with the town drunk. You find the drunk, and begin asking him. Because the drunk didn''t give a damn about what the shop keeper was saying in the first place, he''d have no idea as to what you were asking him about. Not because he forgot, but because the information wasn''t important enough to retain in the first place.
Now this would take a lot of extra variables for your NPCs and is obviously more work than most people are whilling to put in, but I thought I''d throw it in.
0

Share this post


Link to post
Share on other sites
I''m on the side of the skeptics.
I believe the idea of NPC''s gossipping is great and probably essential for the development of RPG''s and MMORPG''s. However I disagree with the idea that an NPC has to wander about witnessing and exchanging information for it to work out smoothly. I''ll give my thoughts on the subject:

1- One of the major reasons gossip works in real life is because there are so MANY of us. even the most ambitious RPG wouldn''t (and probably shouldn''t) dream of activating so many bots all at once.

2- Consider how other problems of this sort were tackled. Economy for example: Games can create living economical systems by using networks and not by sending single NPC''s buying and selling stuff to activate the economy because it''s easier and cheaper and because bots would be too stupid to act in a way that will create this kind of dynamism. Your world will probably very slowly starve to death if you attempted that.

3- We''re talking RPG here. it''s all based on unrealistic approximations that work. I mean how many hit points do YOU have? What''s your AC with and without your baseball cap. Yet all these concepts are very useful and they tend to work out much better than some systems which try to become more realistic by actually imitating reality.

4- When Garod the Terrible falls upon a band of goblins, none is left to tell the tale. Does this mean he''s Garod the Meek? Simply because no one saw him massacring all these goblins. Or should we wait for a 1/1000000 chance that some NPC passes by and witnesses one of these incidents and live to tell about?

I believe you should allow this kind of information to take a life of its own. You cannot keep track of everything going on in your world but you can probably make a good estimation of how to work it.

Peace Out!
0

Share this post


Link to post
Share on other sites
quote:
Original post by SecondBest
4- When Garod the Terrible falls upon a band of goblins, none is left to tell the tale. Does this mean he''s Garod the Meek? Simply because no one saw him massacring all these goblins. Or should we wait for a 1/1000000 chance that some NPC passes by and witnesses one of these incidents and live to tell about?



I think that would make it all the more interesting ... if no one noticed Garod doing terrible things, no one would know when he came into town that he was about to kill everyone. However, once he does do that, chances are someone will escape and tales of his ... terribleness will spread.

Not that I have anything else to add to this, just wanted to voice that small opinion :-)

Joel Martinez
http://www.codecube.net/
0

Share this post


Link to post
Share on other sites
This is the most interesting thread I''ve read on Gamedev and I thought of a few things to add. One was the truth value being stored as an int allowing any positive values to be true and negative to be false. 0 could be not entirely sure also anything say from 1 to 128 has a smaller chance of being true than 255. Sorry if I explained this wrong.

Another one is I thought of NPCs lieing to others to make them selves look better. For example some random guy could come into town and say that he killed 20 Orcs by himself blah. Some daft guy might beleive him and spread the tale and so people actually think this guy is hard as. Then u go and kill him and either people think your the hardest guy ever or that the guy was lyeing all this time.

0

Share this post


Link to post
Share on other sites
My question is how the heck did you dig the thread up? The search feature has been offline for ages and I''d really like to know of a way of search through past threads as I''m going to be needing this pretty soon!
Thanks



<Fish>{
0

Share this post


Link to post
Share on other sites
quote:
Original post by TonyFish
My question is how the heck did you dig the thread up? The search feature has been offline for ages and I''d really like to know of a way of search through past threads as I''m going to be needing this pretty soon!
Thanks
{


I am the ultimate necromancer! Muhahahaha!

No but seroiusly, I knew part of the name who started it, did a wildcarded search for the peices of their name I knew, and found the thread in their profile.

0

Share this post


Link to post
Share on other sites
Hi guys this is my first post, and i have to say i work with a 3d engine called 3dgamestudio. i am currently trying to make the same kind of game with these features, and if any of you can give me a hand with modeling, or textures, or c-script programming (The engines language) i would much apreciate it. its amazing how you guys do this stuff, and i am soon expecting to learn C++, and will start making some more advanced things like you guys.
cya
0

Share this post


Link to post
Share on other sites
A little idea: if you keep your world in form of nav-points graph, and when NPCs are far enough that player cannot see them, they moving only by nav-points, without using collision detection (memory-conuming physical representation not required to be stored in the memory for all world locations, only for location in which player is)...
But it is a great optimization too, because NPC "jumps" between nav-points, then frreezes (goes to the list of passive objects), according his speed and traveling distance between nav-points...

Let''s calculate: if average distance between nav-points is about 5 meters, and NPC speed is about one meter per second, and game makes 50 physical ticks per second... then NPC will be in active state (i.e. when he decides where to walk further, communicates with others, etc...) just one tick out of 250!.. Now imagine, how many NPCs could be in your game... I want to make RPG with about 100000 of them, if minimum system requirements (128Mb RAM) will allow. And only about 100 NPCs will think in each game tick (because smith or peasant most of the time resides at his workplace, and in such case his state is passive - I need only to calculate amount of goods produced, resources spent, and time of work - and then freeze the worker until time passes or player comes near enough to see him...

What do you think, people?..
0

Share this post


Link to post
Share on other sites
This is cool. I was just kind of randomly wandering through Gamedev, which I hadn''t done in forever, when I see one of MY old threads resurrected!

I still hafta say, even with the recent opinions, that I think a system like I described earlier would be great for a game. I''m in grad. school now, and wish I had the time to learn enough C++ to write it. Interestingly, I''m taking a class on data mining, so I''m learning about Bayesian networks, which is how real-world inference engines are built. Which gives me lots of other ideas. What I really need is some expert coders to implement my ideas as I have them (but that''s what we all need, right?).

I should say that I think there is a certain amount of "cheating" in all RPG games. In fact, it''s silly to call it "cheating," because a game simply cannot, nor should it, reproduce the real world. Where one stands on the issue is more based upon what you think is important. In other words, given a computer with X power (and the amount doesn''t matter that much, because computers are always getting faster), what percentage of your processing power (per frame, say) would you spend on graphics? On AI? On simulating world economics? Etc. etc.

Now, my beef with most games is that they:
1. Are too linear.
2. Are so unrealistic as to be irritating and absurd.
3. Don''t give me a sense that _I_ have an effect on the world, or at least any different from every other player who plays the game.

I''ve already described my ideal game, but let me give you an example. Pretty much every single game out there these days has tremendous graphics. I don''t need much more from a graphics engine than what exists now. But even with all of that power to spend on graphics, they don''t check for simple things. In most every RPG, I can walk into a person''s home, rob them blind, then go talk to them like we are old friends. I can walk around (toward the end of the game) as a world-famous all-powerful bada$$ hero, armed to the hilt, and nobody treats me any differently than when I started out as a little unknown wimpy guy. Everywhere I go, the monsters are perfectly tuned, so that they always match my power, no matter what "level" I am, and so on. I know, there are some games that are better at stuff like this (Fallout, Gothic, and Morrowind come to mind), but by and large, these games have gaping holes in their believability, and I play RPG''s as an extension of my ego into a believable world. I don''t want to believe that I am following some predetermined loop of kill->level->equip->kill->level->equip, until I finish the game and start another that does the same thing.

The gossip thing is not the main point, just a means to an end. I like the idea because I imagine it could be done pretty faithfully with not that much processing involved. And of course, with a "living world," much of the work would be in fine tuning it so there is a balance. In some places, yes, you would "cheat". Maybe in the example of a great battle where no one survives, you propagate the knowledge of the battle without worrying about someone to report it. Those things would be worked out as testing goes on. But I am pretty sure that anything that starts out as random is going to look random, no matter how many ways you try to bandage it. And if much of the RPG genre is based on FOLLOWING quests and rumors around, doesn''t it make sense for those very same pieces of knowledge to be travelling? Otherwise, what are you following?

Anyway, I''m rambling. But it''s good to see people talking about this. Maybe one day a great coder will pick it up and I can play my dream game, eh?

- Gollum
0

Share this post


Link to post
Share on other sites
Yeah, this was a great thread, pity I couldn''t contribute more to it. I''m actually looking at postgrad research projects at the moment, and I''m thinking about putting together a proposal based on the type of system being discussed here. Not my usual area, but could be very interesting. The head honcho around here is big into cognitive modelling, neuro computation, that kind of thing, so I might be able to pitch something along those lines.

With that in mind, anyone have any suggestions for research based off the concepts tossed round in this thread? As in, how to actually turn this into a reasonably substantial research project? I have a few ideas myself, but I''d be very interested in hearing any suggestions.
0

Share this post


Link to post
Share on other sites
quote:
Original post by JinJo
This is the most interesting thread I''ve read on Gamedev and I thought of a few things to add. One was the truth value being stored as an int allowing any positive values to be true and negative to be false. 0 could be not entirely sure also anything say from 1 to 128 has a smaller chance of being true than 255. Sorry if I explained this wrong.

Think of it in terms of probability or approximations of the truth. It makes sense to go from 0 for zero probability/absolutely untrue to 1 for certain/absolutely true, and it makes determination of inference a fairly straightforward normalized product. With negative numbers then you have all sorts of artifacts springing up when attempting to infer "facts."

Say NPC A trusts NPC about 30%, while NPC B trust NPC C about 80%. If NPC B communicates a report received from C to A with appropriate stress, A assigns that "fact" 30% of 80% = 24%. If NPC A is unaware that the fact comes from C, who is largely but not completely trusted by B (ie, A believes the fact comes from B directly, the fact gets a rating of 30%). Try that with negative numbers (0 = 50%).

quote:
Another one is I thought of NPCs lieing to others to make them selves look better. For example some random guy could come into town and say that he killed 20 Orcs by himself blah. Some daft guy might beleive him and spread the tale and so people actually think this guy is hard as. Then u go and kill him and either people think your the hardest guy ever or that the guy was lyeing all this time.

Good idea. Check this out, ignoring the (mini-)flamewar *blush*. You might find it useful.
0

Share this post


Link to post
Share on other sites