Sign in to follow this  
marto1914

Need advice - Card game lobby server

Recommended Posts

marto1914    105
Want to make turn based card game with lobby server for ios and android. Game must have rooms, in that room players have to make games , be able to join that games, have raitings and etc. Something like poker. Are there any servers for that, i found theese solutions but i'm wondering are there more and which is the best for that purpose?
http://www.smartfoxserver.com/
https://www.simperium.com/overview/
http://www.exitgames.com/

I've got some more questions:
1. Where i have to write the game logic - on the server or on the phone?
2. Do i have to use an existing server or to create own ?
I will be happy to get some advices about theese type of games. Where to start, what to search, how to make zynga poker like game ?

Share this post


Link to post
Share on other sites
hplus0603    11356
If you want to avoid players cheating the rules, you have to write the game logic on the server.
If you want to provide a good user interface, the user interface also has to know about game logic.
If you want to avoid players cheating by "knowing too much," you have to be careful about what information you send from the server to a client -- just because you don't display something like the cards in the opponent's hands on the screen, doesn't meant that the client won't "know" it. Assume everything in memory in your client is visible to the player.

You can use an existing server framework, or roll your own, or use a middle ground like Node.js or WSGI or whatever. It's really up to you -- there's no "wrong" answer here. Especially for card games, trying to predict movements or minimize latency isn't really necessary, so the tricks and restrictions of action games largely don't apply.

Share this post


Link to post
Share on other sites
marto1914    105
[quote name='hplus0603' timestamp='1348765928' post='4984406']
If you want to avoid players cheating the rules, you have to write the game logic on the server.
If you want to provide a good user interface, the user interface also has to know about game logic.
If you want to avoid players cheating by "knowing too much," you have to be careful about what information you send from the server to a client -- just because you don't display something like the cards in the opponent's hands on the screen, doesn't meant that the client won't "know" it. Assume everything in memory in your client is visible to the player.

You can use an existing server framework, or roll your own, or use a middle ground like Node.js or WSGI or whatever. It's really up to you -- there's no "wrong" answer here. Especially for card games, trying to predict movements or minimize latency isn't really necessary, so the tricks and restrictions of action games largely don't apply.
[/quote]>
Thank you. I understand where game logic have to be. But i'm not sure what to choose, to write the server or to get an existing one. Does writing a server on Node.js costs a lot of time, because i hear about it for first time? You've got more experience. It will be my first online game and it's hard for me, because i don't know where to start.

Share this post


Link to post
Share on other sites
hplus0603    11356
[quote]Does writing a server on Node.js costs a lot of time[/quote]

Node.js is an "existing server." Here's the basic web server, in node.js:

[code]var http = require('http');

function myServerFunc(request, response) {
pageText = '<!doctype html><html><head><title>Hello</title></head><body>Hello, world!</body></html>';
response.writeHead(200, {'Content-Type': 'text/html'});
response.end(pageText);
}

http.createServer(myServerFunc).listen(8080);

console.log('Server running on port 8080');
[/code]

Setting up node.js (http://http://nodejs.org/) with Redis (http://redis.io/) and socket.io (http://http://socket.io/) is very simple if you know your way around the UNIX command line, and can probably get you to 10,000 simultaneous online players on a single server (plus a host standby/replica for redundancy.)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this