Jump to content
  • Advertisement
Sign in to follow this  

what server-side language to use for multiplayer card game

This topic is 1252 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to develop a web-based multiplayer card game similar to poker, but with some changes to its rules. The game needs to be secure, so it needs a game-client for UI and actions, and a server-side for calculations and logic. The client will be developed either in FLASH or HTML5.
I've worked with PHP/MYSQL/JS/JQUERY for a few years, but I know that making multiplayer games with PHP is not efficient because it doesn't allow native long-polling and sending many requests every 1second to the server from the game-client, to update the data, would eventually kill the server. 
I estimate to have at least 10000 active players at the same time once the game will be completed, or even more, because I already have an active community that will definitely like the game.
As an option for my current skills, there is this, but I wouldn't rely on it, as the developer says it himself: https://github.com/panique/php-long-polling
I really want to make this game happen, but I also want to use a strong and efficient language for server-side that could be maybe similar to PHP or JS.
I was thinking to try nodejs or lightstreamer.com, but they represent something new to me and it would take a good amount of time to master something new and if I need to do that, at least I want to make it worth it.
Do you think that there's something better for developing multiplayer web-based games?
Can nodejs or lightstreamer run on the same server where I run my website with APACHE/PHP/MYSQL, or should I go with a separate server just for the game?
What I would like is a server-side language for my game with the following features:
    > -be well documented;
    > -be secure;
    > -permit long-polling and be compatible with FLASH/HTML5;
    > -allow me to protect my code;
    > -have a stable version and a few years of history as well as some big sites using it;
    > -work with MYSQL;
    > -be able to handle at least 10000 concurrent connections;
    > -(optional)be able to run on the same server as my PHP/APACHE website;
    > -(optional) - have the possibility to install it on my Windows PC, same way that I install XAMPP for local testing purposes
    > -(optional) - be similar to PHP
Or should I just forget everything I know and go with JAVA for server-side coding?

Share this post

Link to post
Share on other sites

[Full disclosure: I am the co-founder of Lightstreamer]

With Lightstreamer, you can stick to PHP for your server-side development. To develop your Lightstreamer Adapters (the custom server-side code needed by Lightstreamer) APIs are provided for: Java, .NET, Node.js, and plain TCP sockets. The TCP socket option means that your Adapter can talk to the Lightstreamer Server by implementing a simple protocol based on TCP (fully documented). This way, your can develop your Lightstreamer Adapters in PHP, which talk to the Lightstreamer Server via TCP. The Lightstreamer Server will take care of delivering the real-time messages to the actual clients, with scalable fan-out, low latency, and passing though any possible type of proxy and firewall.

Share this post

Link to post
Share on other sites

Both Lightstreamer or Node.js are more than capable of what you are looking for.


I use lightstreamer day in and day out for spread betting, CFDs and stock trading.  [Full disclosure.  The company I work for is probably alessandroalinones  biggest client ;)]  These traders require millisecond latency and high security and lightstreamer does the job.


Share this post

Link to post
Share on other sites

We are researching now between using Lightstreamer with PHP adapter and between using Ratchet PHP. Ratchet seems to be more documented and easier to use, while Lightstreamer seems to be capable of more things, however it doesn't have any official PHP adapter built yet.


The popularity, the documentation and the live examples are some of the most important things that we are considering in making our decision.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!