Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Client-server stuffs



Philip Brown writes:
> This portal stuff requires that we EITHER
> have unique initial-server keys in player names
> OR
> require that a character be already created, with the same password, on
> "server2".
> Hmmm... perhaps the second method would be the best way to go..
> Although if we are nice, we would allow "creating" the character right
> then, if it did not already exist.. Trouble is, what if you just happened
> to choose a name on your home server that is used everywhere else?

We would need unique names and ids for every server in this method
anyway (to find the server passwd etc), so we could create the name in
the form of "Conan the Bararian from Deniria", where Deniria is the
name of home world where the character Conan come from.

When player starts to play he connects to his home world and asks to
load character and server finds that character isn't in his home world
it would send a query to all servers asking who got the most resent
version of character (each transation from one server to another would
increase the version counter by one, so we could detect situations
where server1 have lost the ack from server2 and the character was
duplicated). If no character is found then the server holding
character information must be down. If character dies in the another
world that server tries to inform the home server about death, but
until it can do that it keeps info about the died character, so it can
respond if home server tries to load that character.

In other words loading character would be like this:

	1) client connects to home server
	2) home server finds the basic information about character (does
	it exists, verifies the password etc).
	3) If character is in home world, load it and start playing.
	4) Send query to net about character and ask where it can be
	found (this query would be like directed broadcast, every
	server sending query to all its neigbours which aren't
	mentioned in the queries path (like path in news articles)).
	[This phase can be optimized by sending direct request to
	the server where the character have been seen most resently]
	5) Collect responses from other servers for some time (say 60 
	seconds or something).
	6) Take the most resent version of character from responses
	and inform client to connect there, or if the most resent
	version is died then inform the player about it. If there were
	other versions of character tell those servers to destroy
	them. 

Saving would save the player to the server where it currenlty is and
send a notice to home server that player have been saved here.
-- 
Tero_Kivinen@hut.FI              	     Work : +358-0-451 4032
Magnus Enckellin kuja 9 K 19, 02610, Espoo   Home : +358-0-502 1573