Chunky by FelipeFS
It is currently Thu Feb 11, 2016 3:00 pm

All times are UTC

Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Match making
PostPosted: Thu Aug 15, 2013 4:02 am 

Joined: Sun Mar 10, 2013 3:32 pm
Posts: 45
We see this on a ton of games. You click play game, it starts searching for other players.. I would like to add something like this to my game but very unsure how this works?

What i am think...

1. you click start searching for a match
2. game connects to server (website/db)
3. game edits the players db file to say "looking for game"
4. site/db updates every so offten till it finds two users looking for game
5. Site sends details back to app

Does this sound right?
are there better ways?
what have you done in past?
best way to communicate this data?

thanks for any help

 Post subject: Re: Match making
PostPosted: Thu Aug 15, 2013 6:02 am 
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 7145
Location: Wilts, Englandshire
I've thought about this in the past. The obvious choice is a service running on a remote server that allows players to register their IP and game type preferences, then be matched up with other players who have done the same. Advertised games will age out and be removed from the list and connecting players will see a list of open games to connect to.

However, running a server with a dedicated app to manage this would require at least a VPS type hosting package. After thinking it over, I think you might be able to achieve the same result with a PHP/Perl/Python/whatever script and MySQL on a much cheaper shared hosting setup.

The script will only run when someone connects, so it will need to perform upkeep and purge old data from the database at startup, but I don't see any reasons why a small matchmaking service couldn't be delivered in this much simpler manner.

10 PRINT "Bad Monkey ";
20 GOTO 10

 Post subject: Re: Match making
PostPosted: Sat Aug 17, 2013 2:40 pm 
Harmlessness does no harm

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3954
Location: Ferriday, LA, US
You wouldn't have to use a VPS necessarily. Node services (e.g. Nodejitsu)are a good alternative, if your requirements are simple. You will still need a server to host user accounts and such information, but the Node services (or cloud processes in general) are asynchronous, and reduce a lot of the strain on your server (essential, if you plan to use shared or limited hosting).

I don't believe in luck. What I do believe in is that s*** happens.

Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 2 guests

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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited