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)?


closed as off-topic by Kromster, Anko, wolfdawn, Trevor Powell, Josh Jan 6 '15 at 18:30

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about "how to get started," "what to learn next," or "which technology to use" are discussion-oriented questions which involve answers that are either based on opinion, or which are all equally valid. Those kinds of questions are outside the scope of this site. Visit our help center for more information." – Kromster, Anko, wolfdawn, Trevor Powell, Josh
If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ Maybe I'm missing something, but a "card game" is so simple you could write it from scratch in a trivial amount of time, and performance should never be a problem. \$\endgroup\$ – o0'. Mar 7 '12 at 14:38

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 :)


Regarding your points in support of a custom solution:

Smartfox has many unneeded functions, bad for performance

Since this is for a "simple, turn based" game, performance is unlikely to be a problem.

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

Again, for simple turn based games ease of development can easily take priority over format efficiency, so unless you want to develop an efficient binary format - don't.

Multiple rooms and chat are easy to reimplement

This is not a good reason for choosing to implement this functionality on your own. It's just something that's comforting to know, if you decide to follow this path.

Tomcat or a lightweight container is easier to deploy than Smartfox. Better IDE support for developing on Tomcat (automatic deploy, etc)

You have to weigh how much time you save by developing a custom solution and deploying it fast, versus using an existing solution and possibly doing a longer deployment. Odds are that the development time will offset what little benefits faster/easier deployment gives.

To sum up - I recommend using an existing solution, if possible. It is likely to save you a lot of time. As for which pre-existing solution, that's up to you.

  • \$\begingroup\$ Regarding your performance point: Yes, the game is simple, but it will need to support half a million players on as few servers as possible (if the client has his wish) \$\endgroup\$ – Bart van Heukelom Jul 30 '10 at 21:13
  • \$\begingroup\$ Half a million simultaneous players? Sounds like the Google App Engine comment is worth some additional thought. That will be able to scale from prototype to full-on deployment with nothing but a larger bill. \$\endgroup\$ – drxzcl Aug 13 '10 at 10:31
  • \$\begingroup\$ @drxzcl Is right. Google App engine is great for turn based games for scalability reasons. \$\endgroup\$ – wolfdawn Jan 3 '15 at 14:18

Having used both SmartFox and ElectroServer quite extensively, I always recommend ElectroServer. It does all the same stuff as SmartFox, but is just a bit more solid, and includes binary support.

  • 1
    \$\begingroup\$ what do you mean by binary support ? \$\endgroup\$ – user3689 Dec 1 '10 at 14:00

I would strongly recommend looking at the Google App Engine project.

Both for hosting and technical reasons. If your game is not fast paced then that should be a good place to get started and up and running, and have the scope to scale.

Code can be in Python or Java.

Neptune's Pride is on Google App Engine. See an interview with the Developer here.

  • 3
    \$\begingroup\$ Doesn't look like it supports sockets though, only HTTP \$\endgroup\$ – Bart van Heukelom Aug 13 '10 at 22:27

Take a look at the following netty game server. It supports a binary protocol. Note: Written by me! Has TCP and UDP support, uses jetlang for extremly fast in vm messaging.


You should really look into Firebase, an open source Java multiplayer game server.

Compared to Smartfox, Firebase uses a binary protocol, is not bloated with features and is high performing.

If you roll your own system, you will have to take care of everything from handling sockets to handling concurrency. With Firebase, you are guaranteed one action at a time, per room.

Note: Firebase acquired by Google and it's no longer has open source option.

Check it out: http://www.cubeia.org/


Not the answer you're looking for? Browse other questions tagged or ask your own question.