Making an multiplayer game in java (Applet)

Posted on 2003-03-17
Medium Priority
Last Modified: 2008-03-06
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.
Question by:Thomasmm
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 35

Accepted Solution

TimYates earned 300 total points
ID: 8151048
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 :-)

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question