[crossfire] account login thoughts/ideas

Mark Wedel mwedel at sonic.net
Tue Jan 26 01:23:56 CST 2010


Nicolas Weeger wrote:

>>   In that list of characters, what would useful information be?  My
>> thoughts right now:
>>
>> -name (obviously)
>> -class & race
>> -level
>> -face (not as much useful, but gives something nice for the client to show)
>>
>>   Anyone have other thoughts?
> 
> That seems fine too, that's the bare minimum.
> Other things to think about: currently equipped weapons/armors/rings ; money 
> on character ; party the player was in.
> 

  There is certainly a balance here between providing useful enough information 
for the player to basically know what character they are choosing, and so much 
information that it maybe doesn't help or maybe you just log in as that 
character.  At some point there is also conveying all this information to the 
player is a useful manner - at some point, you could start getting to the point 
that everything about the character could be conveyed (stats, sp, grace, etc), 
but at that point, might as well just have the user select that character and 
see if it is the right one.

  Switching between characters once you've logged in the account should be 
pretty lightweight - basically it just returns to that screen, so cycling 
between characters to find the right one shouldn't be as time consuming.

  I guess the question is what information becomes useful is finding the right 
character.  I'm thinking map might be another one, but this requires maps all 
have good names and not things like /world/world_140_180 (there is a property in 
the map file itself which one can give a real name to it, like Great Forest, etc)

> 
> 
>>   My thought also is that to gather that information by reading in the
>> player files may be a bit time consuming (on one hand, we can stop reading
>> once we get the desired data.  But the other is that if a player has 10
>> characters on an account, that is 10 files to open, look for that data,
>> etc).  So my thought would be to store this someplace else - perhaps a flat
>> file for each account that lists those attributes, and update that file
>> whenever the player logs out with that character.  That way it is fairly
>> fast.
> 
> Yes, having a flat file would be ok.
> Related option is to have player files as subdirectories of the account 
> directory. But then you have issues checking character names are globally 
> unique :)

  Sub directories doesn't really help out too much in reading in the player 
files and extracting that data.

  At some point, all characters would be associated with accounts - at that 
point one could just look through all that information and see if a character by 
that name exists (the current data structures don't make it a very efficient 
method, but given number of characters, probably not much an issue - and even if 
it was, during load, character names could be stored in a simple array that is 
sorted or something, and use that).

  Put the player files under an account directory makes more sense if some 
number of resources become account wide properties, and not character wide. 
Things like apartments, and maybe all unique maps (unique to the player, not 
character).

> 
> 
> 
>>   One other concern (unrelated to above) is account management/spamming. 
>> Since one can easily create new accounts without human interaction, I could
>> see some malicious person writing code that creates hundreds/thousands of
>> accounts.
>>
>>   My thought here is that an account with no characters associated just
>> gets removed (or more precisely, just not saved out) - in this way, an
>> account needs characters associated, and that takes more time (a new
>> character would have to get created) - at that point, I think any malicious
>> attack would take sufficiently long to not be worthwhile.  Especially if we
>> don't consider a character valid until it gets some exp total (that is sort
>> of done, but sort of not done right now.  If you try to use a savebed, it
>> puts a minimum check there, but if you just disconnect, it will save you
>> regardless of exp I believe)
> 
> Seems as a good way, yes - no character, no account saved.
> In this case, better warn players enough - so they don't create an account, 
> play a few minutes, disconnect without saving, and lose everything!

  The biggest danger would be more the case of a player with an establish 
account, and for some reason they delete their last character, but have plans to 
make a new one - another case to warn them.

  One problem, I think, is that the client has a quit type thing, and on that, 
the client just does it, so if players use that, there isn't much the server can 
do to warn them about it.




More information about the crossfire mailing list