What to use to network a simple Battleship game?

Discussion in 'Java' started by C-man, Apr 5, 2004.

  1. C-man

    C-man Guest

    Basically I want to create a battleship game that can be played by having
    two clients connect to it. I was wonder what the best networking principal
    would be. Basically I suppose I would have to pass an int value or something
    representing the x,y coordinates of each shot. Should I use some type of
    Socket programming or RMI or what else should be used|?

    Thanks
    C-man, Apr 5, 2004
    #1
    1. Advertising

  2. C-man

    Kevin Henry Guest

    "C-man" <> wrote in message
    news:KM2cc.10978$J56.2132@edtnps89...
    > Basically I want to create a battleship game that can be played by having
    > two clients connect to it.


    sounds good to me

    > I was wonder what the best networking principal
    > would be. Basically I suppose I would have to pass an int value or

    something
    > representing the x,y coordinates of each shot. Should I use some type of
    > Socket programming


    socket programming is pretty straight forward.

    > or RMI


    RMI would work, yet it is somewhat of overkill for such a simple program
    (unless you are actually doing more than just a Battle ship game)

    > or what else should be used|?


    JMX or Jini (both more complicated than Sockets, yet more robust too.) are
    both nice front ends to RMI (although you don't need to use RMI with Jini)
    That's all I've really ever used

    >
    > Thanks


    You're Welcome

    Kevin
    Kevin Henry, Apr 5, 2004
    #2
    1. Advertising

  3. C-man

    Martin Guest

    "C-man" <> wrote in message news:<KM2cc.10978$J56.2132@edtnps89>...
    > Basically I want to create a battleship game that can be played by having
    > two clients connect to it. I was wonder what the best networking principal
    > would be. Basically I suppose I would have to pass an int value or something
    > representing the x,y coordinates of each shot. Should I use some type of
    > Socket programming or RMI or what else should be used|?
    >
    > Thanks


    Unless this is some kind of homework, you could use a toolkit like
    SecurePlay --> www.secureplay.com, which has an open source license. I
    haven't tried SecurePlay myself, but it sounds promising.

    But if you want to (or have to) develop from scratch, I would suggest
    using TCP-communication with sockets. IMO things like RMI bring too
    much overhead for your needs.

    Martin
    Martin, Apr 5, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Goettsche

    Writing a small battleship game server in Python

    Michael Goettsche, Aug 11, 2005, in forum: Python
    Replies:
    0
    Views:
    1,423
    Michael Goettsche
    Aug 11, 2005
  2. Dan
    Replies:
    3
    Views:
    879
    Michael Goettsche
    Aug 12, 2005
  3. Michael Goettsche
    Replies:
    2
    Views:
    905
    Paul Rubin
    Aug 13, 2005
  4. KDawg44
    Replies:
    1
    Views:
    739
    Andrew Thompson
    May 24, 2007
  5. Shawn Milochik

    "Battleship" style game

    Shawn Milochik, Feb 25, 2009, in forum: Python
    Replies:
    13
    Views:
    638
    Falstaff
    Mar 26, 2009
Loading...

Share This Page