Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


miicchhii

Member Since 19 Apr 2012
Offline Last Active Mar 31 2015 05:34 AM

Posts I've Made

In Topic: Pack images into .jar file?

23 December 2012 - 06:19 AM

Looks good! Maybe you could make an AI single player version, because it doesn't look like you have a very large server community! Very cool!

Thanks!
I guess i will do that, since jPong isn't a game one would play on a LAN-Party.

I thought about creating a game-lobby,
where one can download the games and directly connect to other players,
but that will take a while.

In Topic: Some Feedback on my Multiplayer Pong Game please!

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.

In Topic: Some Feedback on my Multiplayer Pong Game please!

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.add(launcherPanel);
  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,...)

In Topic: Some Feedback on my Multiplayer Pong Game please!

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 {
   //load Ball
   String Pathl1 = "img/ball2.png";
   InputStream streaml1 =  JPong.class.getResourceAsStream(Pathl1);
   JPong.img_ball = ImageIO.read(streaml1);
   JPong.ballR=JPong.img_ball.getWidth();
   //load Cursor1
   String Pathl2 = "img/cursor.png";
   InputStream streaml2 =  JPong.class.getResourceAsStream(Pathl2);
   JPong.img_cursor = ImageIO.read(streaml2);
   //load Cursor2
   String Pathl3 = "img/cursor2.png";
   InputStream streaml3 =  JPong.class.getResourceAsStream(Pathl3);
   JPong.img_cursor2 = ImageIO.read(streaml3);
  } 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");
  adressLine.setPreferredSize(new Dimension(100,20));
  //attach elements
  launcherPanel.add(launcherLabel);
  launcherPanel.add(adressLine);
  launcherPanel.add(startButtonClient);
  launcherPanel.add(startButtonServer);
  this.add(launcherPanel);
  /**
   * Connect as Client
   */
  startButtonClient.addActionListener(new ActionListener(){
   @Override
   public void actionPerformed(ActionEvent e) {
    String adresse = adressLine.getText();
    new JPong(adresse);
    setVisible(false);
   }
  });
  /**
   * Connect as Client
   */
  adressLine.addActionListener(new ActionListener(){
   @Override
   public void actionPerformed(ActionEvent e) {
    String adresse = adressLine.getText();
    new JPong(adresse);
    setVisible(false);
   }
  });
  /**
   * start Server and connect as Client
   */
  startButtonServer.addActionListener(new ActionListener(){
   @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 :)

Thanks already!

In Topic: Some Feedback on my Multiplayer Pong Game please!

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

PARTNERS