I am trying to make multiplayer an online Battleship game with java applets and i have some questions.

  1. I searched and read a lot and decide that the best way to make an online multiplayer battleship game is by using p2p. Client applets communicate with each other over datagram sockets. And there should be a server which the clients connect. This will show all clients that are connected and players can send invitation to other clients from list and start the game. When the game starts, the server transfers the messages between clients (the shots and where the battleships are placed) over datagramsockets. When user A sends a message to user B, server receives the message of user A and sends it to user B.

    Is it a good choice to make the design of the game like this? (Sending the messages over datagramsockets (UDP) and a server between all clients. Can you suggest any other way? (I should use java and the game should be played on browser)
  2. How can i start the server side of this application? I saw some application which client side is coded as applets and server as application. On my computer, i can start the server by doubleclicking the jar file or running from Eclipse, then run the client applets from web browser(by using WAMP) or from Eclipse and it works perfect.
    But when i try the same thing in a web server, there isn't any problem about running the client applets but i can't find out how can i start the server before running the clients and the server shouldn't be closed if i don't want? How can i run the server from browser on a web server? (if it is written as application, not applet) Can the server be written as applets? Do you have any other suggestions?