Tutorial :Is JMS suitable for an online game?



Question:

I'd like to throw together a small game and put it online. It would be multiplayer (ideally it would be MMO, but it's a side project, so I'll settle for MO hehe), the content is rather unimportant. I'm planning on writing the game (server and client) in Java.

I'm considering options I have for getting information around reliably. Will JMS be sufficient for this? Will I need more (if so, what)? Are there better alternatives?

I've made a few games in the past, but nothing multiplayer. I work with an app that uses JMS, and there's plenty of tutorials, so that's why I figured it would work... but I'm really open to anything.

Thanks!

Edit: It appears I have a lot to learn about JMS. Perhaps my question should be rephrased to be: "What implementation of JMS will best serve my purposes for an MMO?"

Criteria thus far:

  • Free
  • Low overhead
  • Easy to configure


Solution:1

JMS would assume that your players are all on the same local network. I don't think it would work as well if your game is played over the Internet.


Solution:2

Don't forget that JMS is an API and doesn't specify an implementation. I suspect that for a game you're going to require prompt delivery, and choosing an implementation may depend on attributes including this.

You may want to check out JGroups. As well as implementing JMS, it is enormously configurable and can be used to implement many different messaging patterns. You can choose to enforce reliability, ordering etc. and tune for different applications / clients etc.


Solution:3

JMS is good if you need guaranteed transacted message delivery. Typically those kinds of constraints aren't there in a game (though it depends on the kind of game). If you want low latency communication, JMS is probably not the solution. Beyond that, without providing more information about the requirements of the game, its really impossible to say if JMS would be good for you or not.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »