Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to create a simple java networking game and search a networking engine that eases use of sockets etc. I have already read some questions on here and the internet about java networking for games, but many of them were over 10 years old or not really answered.

I have no idea whatsoever about what exactly I need to send in terms of messages, but I figured simple strings or integers will be enough for my purposes.

It's basically a peer to peer game, so I don't need a centralized server structure. Messaging doesn't have to have an extremely low ping, yet of course all players need to have a synchronized view.

What are the possibilities I have here?

share|improve this question

closed as off-topic by bummzack, Jari Komppa, Anko, Josh Petrie Jun 12 '14 at 15:38

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." – bummzack, Jari Komppa, Anko, Josh Petrie
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 4 down vote accepted

You will probably want to build something that is based on the Netty IO library. Netty is a very good IO library suitable for high performance / low latency communications of the type you need in games.

You could use Netty directly, but it might also make sense to use a higher level library that has been specifically designed for games. I found this on Github, might be just what you need:

Alternatively, if you are using a Java game engine like jMonkeyEngine then this may already contain the networking features that you need:

share|improve this answer
I checked into both and I think Netty is very good for my needs. I don't use a Game Engine yet, because I really want to learn things and not use too high level engines. Will look into game server also. Thanks! – Florian Peschka May 26 '12 at 9:15

I was reviewing this article today:

For another endeavour (not a game). Fast messaging libraries offer another alternative, especially those for high volume small messages (e.g. twitter, ForEx, Airlines, etc).

share|improve this answer

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