Friday, February 17, 2017

networking - Which server platform to choose



I'm going to write a server for an online multiplayer with these requirements:




  • Pretty simple turn based game (think a card game) that is played entirely on the server (security reasons)

  • Must be able to run multiple games (tables) with 4 players per table, but no lobby system required (another server takes care of that)

  • Can support as many players at once as possible; Might need multiple servers

  • Chat between players

  • Socket connection to a Flash/AIR client

  • Must be able to communicate with other servers (for player accounts and such)


Now, I'm considering two options:




  • Smartfox (or equivalent)

  • A custom Java solution in something like Tomcat


Why Smartfox?



  • It handles multiple rooms and chat natively

  • It presumably has solutions for well-known multiplayer gaming issues


Why custom?




  • Smartfox has many unneeded functions, bad for performance

  • Smartfox communicates with an XML-based format, I could use a more efficient binary one.

  • Don't know if running the entire game model on the server is convenient with Smartfox' extension mechanism

  • Multiple rooms and chat are easy to reimplement

  • Tomcat or a lightweight container is easier to deploy than Smartfox

  • Better IDE support for developing on Tomcat (automatic deploy, etc)


What do you think? Are my assumptions correct? Do you have anything to add? What option should I choose (or maybe a different one entirely)?



Answer



I'd definetely go with a custom solution : even though you might lose some time in the short term, it'll definetely scale better if you need it to, plus the experience you gain will be massively reusable for your next games. BlazeDs sounds like an excellent tool for your needs, but rewriting a Java game server from scratch is not that big of an endeavour, using for instance Netty and Protobuf :)



No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...