Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 892
  • Last Modified:

Making an multiplayer game in java (Applet)

Hi all,

I've made an applet in java. It's a single player pong game.
What is the easiest way to make an very easy multiplayer game?

To get the point you only have got to tell me how I get started.

To give u an id. I would like to play against a friend. I know his ip-address.
The applet only needs to know the coordinates of his mouse.
0
Thomasmm
Asked:
Thomasmm
1 Solution
 
TimYatesCommented:
Make a server to run where the applet is downloaded from, then use the server to communicate with all of the applets

Or, if you sign the applet, so it can connect to other IP addresses, then just use ServerSockets to send the information between the applets (you'd have to type in the IP address of your friend, and he would have to do likewise :-)

The best way is #1

Applet1 --> register -->  Server

Applet1 <-- list of current users <-- Server

Applet1 --> choose user #2 --> Server

Applet1 --> make move --> Server --> made move --> Applet2
Applet1 <-- made move <-- Server <-- make move <-- Applet2

That kind of thing :-)
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now