# Free / Open source multiplayer servers

## Recommended Posts

SillyCow    1461

I'd like to add multiplayer to one of my android strategy games.

Are there any free MP frameworks you can recommend? The server can be implemented in any language/environment. But the client needs to be Java, as I'm not using NDK. Since this is all hobby work, it needs to be free (or extremely cheap).

My main requirement is real-time messaging (~ 1-2 second delays). I haven't even decided if I want to support WAN. If you have something which is LAN only (one of the clients is the server), that might be enough.

Is there a staple opensource multi-player engine?

Also, while I was pondering the problem, google released this:

Would you recommend using it?

Do you know what the pricing model is?

Have you used it before?

Edited by SillyCow

##### Share on other sites
hplus0603    11348

There are some recommended opensource network packages, including ENet and RakNet.

Unfortunately, Java is not the native language for those; they're C or C++ based.

Sun tried to make a Java system for multiplayer networked games called Project Darkstar, but they tried to solve too much at once and ended up not being able to deliver despite years of effort.

If all you need is local multiplayer, then you could build something super simple on top of the aio Java sockets support and UDP broadcasts!

##### Share on other sites
SillyCow    1461
It's even simpler than that.
Since my sync only requires (latency < ~2 seconds) I can even use tcp.
It's just that from a multiplayer perspective, I'm only interested in coding a sync for my data layer.
The rest seems like pointless busy-work which probably many others have done before me.
Also, If I go for WAN there is all of the security & DDOS prevention stuff to put into the server, which seems a bit more complicated. I don't want to implement that myself unless I have no other choice.

##### Share on other sites
Hiwas    5807

You could look at Thrift as a simple starting point.  It is not a MP server exactly but supplies a service oriented messaging system and it supports Java.  Basically you can write a little server for communications using this and generate the client/server bindings in appropriate languages.  The downside of course is that only the communications are handled for you, all the logic would need to be written by you.

##### Share on other sites
Kylotan    9881

I get the impression you are looking for something higher-level than the solutions being offered to you. Something like Smartfox Server or Photon would serve, but unfortunately they aren't free.

##### Share on other sites
SillyCow    1461

I get the impression you are looking for something higher-level than the solutions being offered to you. Something like Smartfox Server or Photon would serve, but unfortunately they aren't free.

Yeah,

I could use any message queue for messaging, but I was hoping to get some added value besides packeting over TCP/IP. Message queus also tend to lack a security layer, which is a big deal over WAN.

Thanks for the links, I'm a complete newbee in multiplayer, so I was unaware of these.

Regarding Smartfox, 100 concurrent users should be enough at first. I see that smart-fox community edition supports it, but I can't find the license on their site. Do you know if I can use the community edition in a commercial game? Also Photon's 100 users for 10$might also be fine, since if I use my own I'll probably pay ~10$ for hosting.

Also, what do you guys think of the Google offer I mentioned above? I cringe at the thought of forcing people to use Google+, but it looks very easy, and very robust. Also, I couldn't figure out the pricing.

Edited by SillyCow

##### Share on other sites
hplus0603    11348

I wouldn't go with a third-party hosting unless you actually know that you'll make money on the product.

Apache Thrift actually sounds like a reasonable solution for the level you're interested in.

##### Share on other sites
SillyCow    1461

Went with implementing my own server.

If it ever gets robust enough, I might make it open source.

Edited by SillyCow

##### Share on other sites
Jastiv    146

Wograld, my multi-player online game uses a C server and a Java client.  The sever is admittedly a difficult install with multiple steps, but Wograld (both client and server) is open source under gpl v2 or later.

www.wograld.org

I'm not sure how robust it is, I haven't gotten many people to test it partly due to the difficulty of install.

##### Share on other sites
SillyCow    1461

Wograld, my multi-player online game uses a C server and a Java client.  The sever is admittedly a difficult install with multiple steps, but Wograld (both client and server) is open source under gpl v2 or later.

www.wograld.org

I'm not sure how robust it is, I haven't gotten many people to test it partly due to the difficulty of install.

Cool,

##### Share on other sites
multidroids    105

hello,

i developed a pure android/java library/components for peer-to-peer communication among a group of devices (>2). It supports wif, wifi direct, mobile hotspot and diff means for peer discovery and connection initiation (multicast, NFC tap, scanning QR code). You can find the source code here:

https://github.com/yigongliu/PeerDeviceNet_Src

More detailed API info:

http://www.peerdevicenet.net/api.html

There are a few samples: chat, draw-with-peer, rotate-cube-with-peer.

Have fun.

Yigong

##### Share on other sites
snacktime    452

It's not quite ready for prime time in the sense that documentation is not there, and most of my time has been spent on core features.  But it's the only open source multiplayer engine that I'm aware of that isn't extremely dated.  It based on Akka and jruby, which means you can code it in java, scala, or ruby all equally well, just depends on your preference.