Implementation: identical PC names?
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    mudlab.org Forum Index -> Coding
View previous topic :: View next topic  
Author Message
Traithe



Joined: 13 May 2005
Posts: 50

PostPosted: Sun May 29, 2005 1:07 am    Post subject: Implementation: identical PC names? Reply with quote

Due to the way that the database backend of my new project is set up, I'm in a very good position to allow arbitrary numbers of PCs to share the same name with only a few minor adjustments, since all the data storage is referenced by a numeric ID rather than the name of the given character.

I was curious if anyone had ever used such a system before, and if so, what their experiences were. On the one hand it would be pretty nice to not end up with player names like Aasd;lfkjwef;lkjasdf after the first five years because most of the cool-sounding names are taken; on the other, I imagine there might be subtle but problematic issues that something like this could raise, such as PC impersonation or other such things.

Granted, that probably isn't that big a deal, and adding things like coded family surnames could fix that particular issue pretty easily, but you get the picture. Smile

Anyway, thanks in advance.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Spazmatic



Joined: 18 May 2005
Posts: 76
Location: Pittsburgh, PA

PostPosted: Sun May 29, 2005 6:03 am    Post subject: Reply with quote

So... I would type, look #41344232 instead of look Bob? Hmm. Could that be a problem?
Back to top
View user's profile Send private message
Author Message
KaVir



Joined: 11 May 2005
Posts: 565
Location: Munich

PostPosted: Sun May 29, 2005 7:56 am    Post subject: Reply with quote

You're using an introduction system, right? So is there actually any need to store names at all?
Back to top
View user's profile Send private message Visit poster's website
Author Message
Traithe



Joined: 13 May 2005
Posts: 50

PostPosted: Sun May 29, 2005 8:03 am    Post subject: Reply with quote

Spazmatic wrote:
So... I would type, look #41344232 instead of look Bob?


Well, no; I didn't explain it that well, sorry.

You'd still type look bob. From the user's perspective this is an irrelevant topic as far as that goes; the only difference is that there can be as many bobs as players want to create, instead of the typical MUD scenario where the first player to create a PC named bob is the only one able to use the name.

KaVir: that's a very interesting point that I hadn't even considered. I suspect that names should be used, primarily as a convenience to the user (so s/he can see that they have characters Joe, Bob and Billy on their account)... but the introduction system would provide a nice level of abstraction to everyone else, so that any given player can appear with any given name based on how they introduce themselves.

Could probably even pair the introduction data (probably two IDs, that of the introducer and the target) with the original short description of the introducer, so that if it changes the target will no longer recognize them by the introduction string.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Sandi



Joined: 13 May 2005
Posts: 94
Location: Boston

PostPosted: Sun May 29, 2005 10:38 am    Post subject: Reply with quote

An obvious point perhaps, but I think you would want the staff to be able to 'goto #5433'.

The idea of multiple names I think would be unique and realistic feature. It would naturally create the need for surnames and nicknames, just as it has in the real world.
Back to top
View user's profile Send private message Visit poster's website
Author Message
raz



Joined: 13 May 2005
Posts: 11

PostPosted: Sun May 29, 2005 1:43 pm    Post subject: Re: Implementation: identical PC names? Reply with quote

Traithe wrote:
Due to the way that the database backend of my new project is set up, I'm in a very good position to allow arbitrary numbers of PCs to share the same name with only a few minor adjustments, since all the data storage is referenced by a numeric ID rather than the name of the given character.


Unless you have a good ID number recycling system, that will never work. It would go much farther if you could build some type of directory tree system in order to accomplish what you are trying to do.
Back to top
View user's profile Send private message MSN Messenger
Author Message
Traithe



Joined: 13 May 2005
Posts: 50

PostPosted: Sun May 29, 2005 8:17 pm    Post subject: Reply with quote

Well raz, as I'm not really a math person I asked eiz that very question, more or less. Apparently we've got enough room for IDs to last for a few billion years, give or take, assuming the creation of one ID per second.

So I suspect we should be okay. Cool

Also, all our data is stored on a postgres database; we don't use flatfiles on the filesystem.


Last edited by Traithe on Sun May 29, 2005 8:17 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Author Message
Spazmatic



Joined: 18 May 2005
Posts: 76
Location: Pittsburgh, PA

PostPosted: Sun May 29, 2005 8:17 pm    Post subject: Reply with quote

Quote:
You'd still type look bob. From the user's perspective this is an irrelevant topic as far as that goes; the only difference is that there can be as many bobs as players want to create, instead of the typical MUD scenario where the first player to create a PC named bob is the only one able to use the name.


I suspected as much. There was actually a point to my post, I swear!

What happens if there are two Bobs in the room? Look 2.Bob? And if "Bob leaves."? Which one was it?

*boggles*
Back to top
View user's profile Send private message
Author Message
Traithe



Joined: 13 May 2005
Posts: 50

PostPosted: Sun May 29, 2005 8:18 pm    Post subject: Reply with quote

<g> Exactly, yeah. One of the implementation issues I'm trying to get my head around.

That's why I was curious if anyone had ever actually done this before in practice, so I might get a head start on figuring out how to resolve problems like that.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Burr



Joined: 27 May 2005
Posts: 11

PostPosted: Sun May 29, 2005 8:41 pm    Post subject: Well, I suppose if I were writing it as a narrative... Reply with quote

I would use all names and even descriptions necessary to uniquely identify which Bob is doing what. If there are multiple ways of achieving this uniqueness, have it alternate between them somehow. Then, once the current actor is identified, use shorter non-unique identifiers (such as pronouns or first names) to show what they are doing, until such time as someone else acts to whom the identifier could equally apply.

That could make for a complicated implementation; but in the end, I think the improvement in the narrative flow would be worthwhile, even when the actors in a room don't share names.
Back to top
View user's profile Send private message
Author Message
eiz



Joined: 11 May 2005
Posts: 152
Location: Florida

PostPosted: Sun May 29, 2005 8:48 pm    Post subject: Re: Implementation: identical PC names? Reply with quote

raz wrote:

Unless you have a good ID number recycling system, that will never work. It would go much farther if you could build some type of directory tree system in order to accomplish what you are trying to do.


Let's see... 64 bits... 18446744073709551616 object IDs. By the time the apocalypse rolls around I'm sure he'll be able to afford some scheduled downtime to renumber his objects.

As for having multiple PCs with the same name, I don't see how it's any different from objects or NPCs with the same name. I'm with KaVir here. A name should be a convenience for the player who owns the character, not something intrinsic and tied to the game world. I should be able to introduce myself to others as whatever name I want, and I should be able to assign names to other players (that would only show for me) for my own convenience.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Lindahl



Joined: 29 May 2005
Posts: 56

PostPosted: Mon May 30, 2005 10:53 pm    Post subject: Reply with quote

I'm with the latter responses on this. In TCP, it's planned that the character's name is only a convenient mneumonic for referencing which character you wish to play with from the account menu. After that, the name's gone. Its up to the player to introduce himself as whoever he wants and up to other players to remember him as such. Note that a player can remember anything as any symbolic name - for instance landmarks. However, each character only has a few slots for names (I haven't decided on how many yet, but at least 15, probably 20).
Back to top
View user's profile Send private message
Author Message
Tyche



Joined: 13 May 2005
Posts: 176
Location: Ohio, USA

PostPosted: Wed Jun 01, 2005 7:24 am    Post subject: Reply with quote

I suppose you could handle it like the "get 2.sword" example and/or by explicit expansion "get second sword on floor". I'd implement both with Bobs as well as swords. I like the latter but also like the use of nicknames. There's also environment context to consider, which leads to a more general design question and solution.

Many muds have a fixed environmental context search. For instance...

> get sword might search...
1) inventory
2) wear locations
3) room
4) global name space

Some muds have more complex and even user configrable contexts

> get sword might search...
1) user nicknames
2) held items
3) inventory
4) wear locations
5) containers
6) objects in room
7) global name space

The player can configure the order of the search and can nickname any particular object (objects include rooms, critters and characters).

> get sword
You hold a sword.
> @nickname sword sting.
Ok.
> put sting in pouch
You put sting in a pouch.
> drop pouch
You drop a pouch on the floor.
>get sting
You open a pouch on the floor and get sting from the pouch.

There's no reason why one couldn't nickname Bobs.
> @nickname Bob Butthead
Ok.
> tell Butthead Hey what's up?
Butthead tells you, "Not much. You?"
Bob enters from the south.
> @nickname Bob moron
Ok.
> @list nicknames
Butthead ---> Bob ($928273)
Moron ---> Bob ($82726)
sting ----> sword ($535262)

Nicknames, flexible environment context, and multiple linguistic interfaces (2.bob, second bob, first bob on the right, etc.)
Back to top
View user's profile Send private message Visit poster's website
Author Message
Traithe



Joined: 13 May 2005
Posts: 50

PostPosted: Wed Jun 01, 2005 9:44 am    Post subject: Reply with quote

I hadn't even thought about the possibility of nicknaming/remembering non-PC objects like items - that has a LOT of potential.

Could even abstract it further and apply it to room names.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Lindahl



Joined: 29 May 2005
Posts: 56

PostPosted: Wed Jun 01, 2005 5:36 pm    Post subject: Reply with quote

The problem with nicknames (like I had mentioned in my post and Tyche expounded on) is the problem of space and time complexity. Every time an object is displayed in text, a lookup must be performed in the context of each user to determine whether to display the short description or a nickname. If a player has many nicknames, this gets expensive in both space and time (which is why I suggested the limits). Limits give you a good preallocation strategy to improve locality as well as giving you an upper bound on time and space. I suggest that an LRU be implemented for this sort of system. It allows a player to easily see what names he hasn't used in a while and can be dropped off the list to make room for new names, as well as making the search faster (if you have a large limit).

From a coder's perspective, a good implementation would be an array of packed structs in a linked list:

Code:
struct {
  unsigned char next;
  unsigned char prev;
  char name[10];
  unsigned int ID; (or a 64-bit ID)
};


This gives you a good compact data representation and allowing you to have limits up to 255.

Also, take into consideration a variable number of limits. For example, some players may only be able to remember 32 names, some may be able to remember as many as 64. Perhaps as an incentive offer larger limits to players who roleplay well (and may need to remember more names). A few possibilities here.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    mudlab.org Forum Index -> Coding All times are GMT
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group
BBTech Template by © 2003-04 MDesign