Automatic Client Matching

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
CraigS83
Posts: 5
Joined: 29 Apr 2009, 14:56

Automatic Client Matching

Post 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
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post 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/
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply