Need advice - Card game lobby server
#1 Members - Reputation: 105
Posted 27 September 2012 - 05:52 AM
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 ?
#2 Moderators - Reputation: 3281
Posted 27 September 2012 - 11:12 AM
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.
#3 Members - Reputation: 105
Posted 29 September 2012 - 01:12 AM
>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.
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.
#4 Moderators - Reputation: 3281
Posted 29 September 2012 - 06:30 PM
Does writing a server on Node.js costs a lot of time
Node.js is an "existing server." Here's the basic web server, in node.js:
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');
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.)






