Page 1 of 1

Automatic Client Matching

Posted: 03 Nov 2009, 12:24
by CraigS83
Hi there,

I am looking for example code or tutorials for creating a login system where by the client is matched with another client automatically upon login, and a game is started once a match is made.

Is this possible using SFS??

kind regards,

Craig

Posted: 05 Nov 2009, 17:56
by Lapo
Yes it is definitely possible, but we don't have an example for this.
However if you take your time with the login and game examples we provide you will be able to create it pretty easily.
It takes a few steps:

1- Login the user in a Zone
2- Join a Lobby Room
3- From there create an existing game Room or choose an existing one.

Repeat the same for the second User and apply the matching logic.
I would recommend to implement such logic on the server side where you have full control over each Room in the Zone and it's more secure in general.

For detailed documentation on each example, API docs etc... start from here: http://www.smartfoxserver.com/docs/