Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > What to use to network a simple Battleship game?

Reply
Thread Tools

What to use to network a simple Battleship game?

 
 
C-man
Guest
Posts: n/a
 
      04-05-2004
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


 
Reply With Quote
 
 
 
 
Kevin Henry
Guest
Posts: n/a
 
      04-05-2004

"C-man" <(E-Mail Removed)> 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




 
Reply With Quote
 
 
 
 
Martin
Guest
Posts: n/a
 
      04-05-2004
"C-man" <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Battleship gonzo86 C++ 24 05-02-2006 09:41 PM
Re: Writing a small battleship game server in Python Michael Goettsche Python 2 08-13-2005 01:00 AM
Re: Writing a small battleship game server in Python Dan Python 3 08-12-2005 01:37 PM
Writing a small battleship game server in Python Michael Goettsche Python 0 08-11-2005 03:46 PM
No, it's not just Battleship: Earth.... JMKAUFFMAN DVD Video 0 08-02-2004 01:49 AM



Advertisments