Mina

I would like to build multiplayer game over internet (using applet as client side and java as server side)…I would like to use mina as a networking layer…

I am just getting started with MINA, Has anyone worked with this framework to build online game and is able to share his/her experiences? my email rana7007@hotmail.com

I was wondering if anyone has the code for a simple client/server that can send and receive text.

Thanks in Advance
(I need Help) :frowning:

Mina is a fairly complex java nio implementation. I would recommend either starting with a simple java.net.Socket/SocketServer implementation (but abstract away the actual implementation so you can easily swap it with Mina or another java.nio at a later time), or use a simpler library - I would recommend XSocket (http://xsocket.sourceforge.net/), it has a stable and simple API.

I originally used MINA but had some problems with it. The problems might be fixed by now?

I currently use http://www.simpleframework.org but it hasn’t been updated for a while. Simpleframework works great, I am just not so sure about the future of it?

I used Mina in my game here:

http://www.java-gaming.org/index.php/topic,18019.0.html, source is provided.

There’s lots of options when it comes to network libs, but Mina works well and is stable.

Ooi, how are you using http://www.simpleframework.org - it looks like a servlet container - is your game a web based affair?

Actually, which game is this :slight_smile:

Kev

I use it in Aevum Obscurum for message passing. No, it’s not web based. I use Simpleframework to be able to do HTTP tunneling. I had some problems with direct socket connection. They simply don’t make it through all the firewalls. I then implemented the HTTP protocol on MINA but switched to Simpleframework later on.

I mostly use an octetstream via HTTP. I do everything:

  • Game login, management etc; all via HTTP requests. The server sends back games, images, and so forth in binary format.
  • Chat Server (via HTTP polling)
  • Signature (see my signature below)
    [li]Game API (to connect to the server via PHP…)

Aevum Obscurum is a turn-based game, so it works pretty well for that. Not sure how far you would get with real-time? You would have to use server polling to request data packets from the server. I already do that for the chat server once a second, which works smooth. But for a real-time game?