29 Aug, 2007, Zeno wrote in the 1st comment:
I want players to be able to "remember" other players. I would assume the way to do this is to store a string in their pfile that contains names of players they have remembered.

But I'm afraid this could end up taking up too much disk space later on. Am I just being paranoid?
29 Aug, 2007, Dorian wrote in the 2nd comment:
I like to look at such problems by analyzing the worst-case scenario. Assume you have n players in your total player base. At worst, each player knows all the other players in the game. Since a player cannot "know" himself, each player would have n-1 (every player but himself) entries in their player file. Now, for sake of simplicity, let's assume you've calculated an average player name size as well, Avg. For each player in this system, he would have n-1 names of Avg length. Hence, the number of bytes (assuming ASCII) used for one player would be (n-1)*Avg. For all n players, the total amount of space used in the system would be n * (n-1) * Avg. In space complexity, this would roughly fall around O(n^2*Avg). So if your player base size doubles, the amount of needed space (to allow all the players to know each other) would quadruple. Moreover, if the average name length changes, that will also affect the space size.

Personally, O(n^2*Avg) is probably not that bad in terms of hard disk bytes. However, it is up to you.
29 Aug, 2007, Kelvin wrote in the 3rd comment:
I think he might've been looking for something pretty simple :)

Unless your playerbase is comprised of thousands of players, you're not likely to have a huge problem. Disk space and RAM are cheap, and even if they weren't your game won't need a massive amount for this unless it's got a similarly massive playerbase.
30 Aug, 2007, Dorian wrote in the 4th comment:
Kelvin said:
I think he might've been looking for something pretty simple :)

Actually, it's very simple and useful. Some some space s (like 1 MB), you can easily find out the upper limit of players you can support with such space.

n^2 * Avg = s

n = floor(sqrt(s/Avg))

Excellently simple, useful, and practical.
30 Aug, 2007, Zeno wrote in the 5th comment:
Kelvin said:
I think he might've been looking for something pretty simple :)

Unless your playerbase is comprised of thousands of players, you're not likely to have a huge problem. Disk space and RAM are cheap, and even if they weren't your game won't need a massive amount for this unless it's got a similarly massive playerbase.

I welcome any kind of feedback. Advanced or not. :)

What do you mean by playerbase? Total amount of players? We have over 5000 total players. If you mean average online, then yeah. We are no where near 1000, let alone 100.
30 Aug, 2007, Conner wrote in the 6th comment:
I'd assume that if you wanted worst case scenario, you'd have to go off that grand total of over 5k, but you're only talking about the character name for each being stored, so maybe 20 bytes per name? (prolly less for average name length) …so, 5000 squared is 25,000,000 * 20 = 500,000,000 bytes or ~488,281kb or ~476.8 mb, but that's also assuming that your playerbase has names that average 20 bytes long and that every character knows every other character from your entire playerbase. I'm thinking you could probably at least halve that number from the onset based on just the length of average character name and then reduce the number very significantly further based on the fact that the odds are less than a quarter of your playerbase are probably going to actually use this feature and they'll only know a fraction of the rest of the characters as well. *shrug*
30 Aug, 2007, Zeno wrote in the 7th comment:
Hm okay. Let's see what average would be.

20 bytes per player name. I'd say an average of 100 player names stored on each pfile. Maybe around 100 people have this. So 100 squared = 10000 * 20 = 200000 bytes. That's less than a mb. Did I do that right?
30 Aug, 2007, Conner wrote in the 8th comment:
Looks like what I got from what Dorian had posted.
30 Aug, 2007, Dorian wrote in the 9th comment:
Zeno said:
What do you mean by playerbase? Total amount of players? We have over 5000 total players. If you mean average online, then yeah. We are no where near 1000, let alone 100.

No, I mean the active players that you have. By "active", I mean players who log on a regular basis (like at least once a week). You could look at all the players, active or not. However, I think it would give misleading results.

Zeno said:
Hm okay. Let's see what average would be.

20 bytes per player name. I'd say an average of 100 player names stored on each pfile. Maybe around 100 people have this. So 100 squared = 10000 * 20 = 200000 bytes. That's less than a mb. Did I do that right?

Hmm, you're confusing the analysis a bit. I gave you a formula to calculate the maximum space you'll need based on the number of active players. If you want an estimate of the average amount of space, I'd use this formula:

(# of active players) * (avg. # of names per pfile) * (avg player name length) = estimated space you need

So, say you have 500 players with an average name length of 20 and an average of 100 names per pfile:

500*100*20 = 1000000 bytes ~ 1 Mb

The first formula I gave you estimates the maximum space you need. Personally, I think that's a better analysis, but that's just me.
30 Aug, 2007, Conner wrote in the 10th comment:
Um, I don't see a difference between the two formulas, just where you're gettng the numbers to plug into your variables… So, basically, the worst case scenario of everyone having everyone else with a pbase of ~5k characters yields roughly half a gigabyte like I'd estimated then?
30 Aug, 2007, Dorian wrote in the 11th comment:
Conner said:
Um, I don't see a difference between the two formulas, just where you're gettng the numbers to plug into your variables… So, basically, the worst case scenario of everyone having everyone else with a pbase of ~5k characters yields roughly half a gigabyte like I'd estimated then?

The analysis of the problem isn't too hard (although someone could check my math). It uses a bit of graph theory. Since I cannot upload images, I'll try to write it out:

Assume we have n active players. These are our n verticies in our graph. In our worst case scenario, each player knows every other player (n-1 players) in the game. Hopefully, this is obvious. Therefore, we connect all the verticies so there is a direct path from any vertex to another vertex. Since there are no loops in the graph, each vertex should have n-1 edges connected to it. For each player, we would need to store these (n-1) edges in the pfile. Since we have n players and each player has (n-1) items to write in their pfiles, the total amount of player names we would need to write to pfiles in n * (n-1).

So now we have n * (n-1) entries in pfiles. Let's assume we've calculated an average length in bytes for each entry, Avg. Since each entry is Avg, we can multiply these two together giving us n * (n-1) * Avg. Somewhat factored out, we get Avg * (n^2 - n).

Now let's put this in O notation. Right off the bat we have O(Avg * (n^2 -n)). Since O(Avg * (n^2 - n)) = O(Avg * n^2), we'll use O(Avg * n^2) since it's easier to use but still practical. This is the worst-case scenario; yes, your half a gig.

However, Zeno clearly isn't hitting the worst-case, so I gave a different formula. He wanted to know the estimated space if each of his players only knew an average of 100 people. If you borrow some of the analysis from above, hopefully the second formula is obvious. This formula is NOT a worse-case scenario. It is closer to average case scenario.

Make sense?
30 Aug, 2007, Scandum wrote in the 12th comment:
Instead of player names you could save player vnums. When saving the vnums as binary and as unsigned shorts you'd only need 2 bytes per player.
30 Aug, 2007, Zeno wrote in the 13th comment:
Players don't have vnums. And it would seem like a bit much to code player vnums in just for this.
30 Aug, 2007, kiasyn wrote in the 14th comment:
'just for this'. Think of other uses. :<
30 Aug, 2007, KaVir wrote in the 15th comment:
I would also recommend using some sort of unique integer for each player. It's not just about the storage space, but also the searching speed every time you want to check whether to display a name or a short description.

Will players always remember each other by their real names, or can you simply label another player with a name of your choice?

Are you planning to store any other information? For example, a system I implemented in the past stored how much you liked or disliked the person, what favours you owed them, what crimes you'd witnessed them commit, how many times you'd drunk their blood (it was based on Vampire the Masquerade, where drinking a vampire's blood three times creates a bloodbond), and various other things.
30 Aug, 2007, Omega wrote in the 16th comment:
players don't have vnums, thats correct, but pending what mudbase your using, players do however have an ID associated with them, much like mob-id's. Its the timestamp of when they were originaly created(in some cases, timestamp+1) you could easily modify that (i know rom has it) get_pc_id for example ;)

In anycase, its how I keep track of player greets (players just see race/hight/weight/hair-eye colour) until introduced, then it marks them down in your players pfile based on their id. no two players can have the same id. so it works quite well. i'd recommend changing up the timestamp alittle though.

Mine looks like this H4070815 (letter, day, year, second, minute) the letter is randomly chosen at creation (and its case sensetive)
but anywho, thats how i do it. anyways, just my two cents.
30 Aug, 2007, Hades_Kane wrote in the 17th comment:
Overall, do people seem impressed with a greet system, or does it just tend to cut down on random social interaction?

I've considered doing the same, but I am concerned about some possible negative affects as a result. Especially considering that starting out, the playerbase will be rather small.
30 Aug, 2007, Zeno wrote in the 18th comment:
Yeah, I know a player vnum system would help a lot of things. It'd be something I would like put in, but I already have so much on my todo list.

This isn't actually a greet system. It's used to let a player memorize another players spiritual trail.

Darien: That wouldn't be actually unique though. It'd probably be extremely rare to have a duplicate ID (you'd need 26 creations at the exact same second for a good chance), but it's still possible.
30 Aug, 2007, Keberus wrote in the 19th comment:
I have never noticed the introduction system in FotE to be taxing on player files. Basically the way stock FotE works is when you see a character and don't have them remembered as something or they haven't introduced themselves, then it will display a description of the character and thats how you interact with them ic'ly. So if you are in a room with two human males and don't know thier names you might have to be like "sayto 2.human hello friend, what is your name". On a side note, we have only ever had (at best) around 300 pfiles, maybe 1/2 of which were active, if that.

Just my 2 cents,
KeB
30 Aug, 2007, Conner wrote in the 20th comment: