Hi, looking for some advice. As part of a project im working on i have decided to incorporate some kind of multiplayer functionality into a game i have created. As it stands i have a checkers game, it took a while but eventually i got over a lot of the problems i was having and at the moment it allows 2 people to play one another provided they are on the same machine.

What im looking for advice on is the 'best' way to go about making this playable by people at 2 different locations. The game itself is in applet, purely out of habit so my first inclination was to have it on a webpage where the 2 players could connect to it.

I assume another method of doing it would be to have it as an application and have it running either on one of the players machines by which the opponent connects via IP or to have a kind of central server where both players can connect to it.

The solution does not have to be elegant, just something that wouldnt be too difficult to pull off. I guess there is no 'best method' to this, just looking for some advice from people who have hopefully done something similar to this before.

Since this isnt the main focus of my project i am not much concerned with performance issues or such, something simple would be great as this is my first experience of doing anything such as this.

I guess that rules out the webpage option then. At the moment my program is an applet, i believe it could be converted to a stand alone application without too much hassle

This leaves me with the option of either connecting to a central server or having one of the players host the game. I would assume that having a player host the game would be the easier option as it means i dont have to put a server up and running. So i guess my question is now, what should be my first step? Any advice as to how to begin or any books/webpages you know of that could provide me with some help?

it does rule out an applet however you have to have controll over your webserver.

anyways theres a third option in reference to your reply. players host. and a central server to kickstart a player host game. a kind of matcher. this would have the advantage that you can write the matcher later on.

I guess that rules out the webpage option then. At the moment my program is an applet, i believe it could be converted to a stand alone application without too much hassle

This leaves me with the option of either connecting to a central server or having one of the players host the game. I would assume that having a player host the game would be the easier option as it means i dont have to put a server up and running. So i guess my question is now, what should be my first step? Any advice as to how to begin or any books/webpages you know of that could provide me with some help?

Any help you can give would be most appreciated

How much do you know abotu networking? if nothign then some study and experiments with java.net.Socket and its related classes is in order.

To communciatre between two compuiters on the Inertent they open sockets based on their IP addresses. At least one needs to knwo the IP adress of the other to establish a connection. Thats where a "matchmaker" coems in-- a well known server they can connect to in order to find each other.

Firewalls complicate this by hiding IP addresses and making connecting mreo difficult.

Got a question about Java and game programming? Just new to the Java Game Development Community? Try my FAQ. Its likely you'll learn something!

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org