3
\$\begingroup\$

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?

\$\endgroup\$
4
\$\begingroup\$

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:

\$\endgroup\$
1
  • \$\begingroup\$ 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! \$\endgroup\$ – F.P May 26 '12 at 9:15
1
\$\begingroup\$

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

\$\endgroup\$

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