8

I'm looking to build real-time games built using a dedicated Java server and iphone clients as well as Java desktop clients. What available high-performance network transport libraries that could be used for real-time multiplayer game development, exist for Java and iphone (specifically reliable UDP)?

The general advice for most real-time action based games (Counter-Strike, Left4Dead, Quake III) is to use UDP/IP transport protocol sending messages as "unreliable" packets in favor of the "guaranteed" delivery of TCP (because of issues with resend and latency issues you can't easily control).

Project Darkstar is a Java MMO server with C++ bindings (a little to heavy for a light-weight real-time networking library for generic multiplayer games).

I've seen libraries written in C for reliable UDP: - Enet - reliable UDP library - Cocoa AsyncSocket

3 Answers 3

9

Have a look at Kryo and its associated communication library KryoNet.

It's designed for exactly this kind of application (high performance network transport). I'm not sure if there is an Objective-C binding yet but even if there isn't it is well worth a look just to see how well the framework is designed.

Sign up to request clarification or add additional context in comments.

Comments

7

Since you mentioned UDP. Here is a java game server library (ahem... written by me!) that provides both UDP and TCP support. Reliable UDP turns out to be TCP. You can write your own custom ack logic on top of UDP, but generally it is better to go with TCP for stuff that needs to reach server and UDP for everything else.

In jetserver, the same session uses both UDP and TCP to communicate. Network messages can be sent with delivery guaranty, Reliable = TCP and FAST = UDP.

Comments

-2

"specifically reliable UDP"

UDP is not reliable by it's design. It's like sending old (not electronic) mail. You put your letter in the envelope, write the address, place the stamp, and you drop that to the mailbox. It might be transferred, but you can't be sure. UDP is designed for situations where speed is more important than correctness (correctness as in "my app needs everything to be correctly transferred bits by bits).

For example, applications like skype videochat needs more bandwidth and less latency, some lost bits can be fixed at the application level (so it uses UDP). In the meantime, text-based chat needs less bandhwidth and survives much greater latencies, but needs more correctness (how do you know this string: fsdfdsfsd is transferred correctly? in what language? etc), so it needs TCP. And actually that's how stuff works in skype.

1 Comment

This is a poor answer. The questioner is clearly asking for a reliable ARQ on top of UDP.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.