• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# Some Feedback on my Multiplayer Pong Game please!

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

11 replies to this topic

### #1miicchhii  Members

Posted 19 December 2012 - 07:25 AM

Hey folks,

I am working on a little game called jPong,
and i would really like to get some feedback from you!

http://www.langeder.org/wordpress/games/jpong/

It is not finished yet, but already playable in multiplayer.

Please note that there is a bug when starting the launcher, which will just open a blank window.
This can be fixed by restarting the launcher a few times.

So far it took me around 20 hours to make it.

Thanks!

Edited by miicchhii, 19 December 2012 - 11:16 AM.

### #2ultramailman  Prime Members

Posted 19 December 2012 - 11:13 AM

When I try it, it shows a small blank window, and nothing else happens.

### #3miicchhii  Members

Posted 19 December 2012 - 11:14 AM

This is a bug, that i am already aware of.

It helps to restart the launcher a few times or use a different JRE version

### #4stitchs  Members

Posted 19 December 2012 - 12:53 PM

I have the same issue. I tried restarting it 20+ times and nothing. It would be best to get this bug resolved before asking people to test again. Also, could you attach a code sample?

Regards,

Stitchs.

### #5miicchhii  Members

Posted 19 December 2012 - 01:22 PM

Ok, thanks for the feedback

i am sorry for that, it worked most of the time for me...

Here is the Code for the launcher:

package jPong_multi;

import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.io.InputStream;
import javax.imageio.ImageIO;
import javax.swing.*;
/**
*
* @author Michael Langeder
*
*/
public class Launcher extends JFrame implements ActionListener{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* Launcher für JPong
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
new Launcher();
try {
String Pathl1 = "img/ball2.png";
InputStream streaml1 =  JPong.class.getResourceAsStream(Pathl1);
JPong.ballR=JPong.img_ball.getWidth();
String Pathl2 = "img/cursor.png";
InputStream streaml2 =  JPong.class.getResourceAsStream(Pathl2);
String Pathl3 = "img/cursor2.png";
InputStream streaml3 =  JPong.class.getResourceAsStream(Pathl3);
} catch (IOException e) {
System.out.println("At least 1 Picture could not be opened!");
JPong.run=false;
} catch (IllegalArgumentException e){
System.out.println("A Picture has not been loaded!");
JPong.run=false;
} catch (NullPointerException e){
System.out.println("Could not get size of ball!");
JPong.run=false;
}

}
public Launcher(){
//initialize window properties
this.setTitle("jPong Launcher");
this.setSize(200,150);
this.setVisible(true);

//create elements
JPanel launcherPanel = new JPanel();
JLabel launcherLabel = new JLabel();
JButton startButtonClient = new JButton("Connect to Host");
JButton startButtonServer = new JButton("Host Game");
final JTextField adressLine = new JTextField("Type Server IP");
//attach elements
/**
* Connect as Client
*/
@Override
public void actionPerformed(ActionEvent e) {
setVisible(false);
}
});
/**
* Connect as Client
*/
@Override
public void actionPerformed(ActionEvent e) {
setVisible(false);
}
});
/**
* start Server and connect as Client
*/
@Override
public void actionPerformed(ActionEvent e) {
new Server();
new JPong("localhost");
setVisible(false);
}
});

}
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub

}
}


I hope someone can tell me where the problem is

### #6black_darkness  Members

Posted 19 December 2012 - 10:28 PM

I had the same issue as the other two in this thread. I resolved it by dragging the lower bottom right corner and expanding window size.

I started the game but I do not know how to play. I tried pressing a bunch of random buttons but nothing happens. I do see two paddles and a ball.

Edited by black_darkness, 19 December 2012 - 10:30 PM.

### #7ultramailman  Prime Members

Posted 19 December 2012 - 10:48 PM

hurrah got it to work.
here are the instructions:
1. open two launcher, both using java -jar.
2. resize the little blank windows that comes up(thanks black_darkness)
3. on one launcher, click "host game"
4. on the other launcher, type in the ip adress of the server. (127.0.0.1 if both launchers are on the same computer)
5. click "connect to host"

controls:
w - move paddle up
s - move paddle down

feedback:
Nice game, although I think it wouldn't hurt if the ball was a little bit faster. Or make the speed adjustable.
It would also be good if you can fix the need to resize the launcher just to reveal the buttons.

### #8black_darkness  Members

Posted 19 December 2012 - 11:13 PM

I got a game up and running thanks to Ultramailman. How many more hours are you going to put into this? I think it will be fun if you make the ball increase in speed depending on the angle. ( I think that is how the original pong worked.) .

### #9miicchhii  Members

Posted 20 December 2012 - 04:44 AM

Thank you guys so much!

feedback:
Nice game, although I think it wouldn't hurt if the ball was a little bit faster. Or make the speed adjustable.
It would also be good if you can fix the need to resize the launcher just to reveal the buttons.

I just moved the "setSize();" after the swing stuff, its now working 100% for me.

launcherPanel.add(startButtonServer);
this.setSize(200,151);
/**
* Connect as Client


I think it will be fun if you make the ball increase in speed depending on the angle. ( I think that is how the original pong worked.

The speed is currently increasing on every contact with a paddle,
but i want to manipulate the direction of the ball depending on the position on the paddel where it collides.

How many more hours are you going to put into this?

I think i am going to put 20 hours or more into it, to make it a real nice game (better graphics, higher performance, better networking, and of course fixing every little bug)

To extend it, i am thinking of adding a list of recent servers for quick-connect, Bonus Items (in- or decrease paddle Size, gravitation,...)

### #10black_darkness  Members

Posted 20 December 2012 - 05:09 AM

I recommend making the paddle easier to see. It was kind of hard to see on my 1080p monitor.

### #11miicchhii  Members

Posted 20 December 2012 - 06:14 AM

I recommend making the paddle easier to see. It was kind of hard to see on my 1080p monitor.

I already replaced the line with a bar,
its in the new release with the bugfix.

### #12stitchs  Members

Posted 20 December 2012 - 02:03 PM

I played the first version, I have not done any network programming myself. Is it normal for the host to be the mirror of the clients' screen (showing the opposite?).

Also, the paddles are hard to see, but it appears you have rectified this. I think my 2 biggest issues are:
• Not accounting for when a key is held down; i.e. the paddle only moves one unit on a key-press before having to be pressed again to move more.
• The ball going slightly off-screen before 'bouncing' back. This could be fixed with a simple intersection between screen dimensions and ball dimensions.

Otherwise, good job on the networking, it's something I want to look into (eventually....)

Regards,

Stitchs.

Edited by stitchs, 20 December 2012 - 02:12 PM.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.