Pwnious Posted November 30, 2005 Report Share Posted November 30, 2005 (edited) Hi, has anyone made an extreme pong on C++, Java, or Basic? I have started on it with Java but then lost my mind over it. Here's the code so far: import java.awt.*; import java.applet.*; public class MainPong extends Applet { static int ballx = 100; int bally = 100; int radii = 20; static int velball = 10; boolean var = true; int bufferWidth; int bufferHeight; Image offscreen; static Graphics bufferGraphics; Dimension dim; int dix,diY; public static void Main() { paint(); ballmove(); } public void paint(Graphics g) { //color of ball// g.setColor(Color.yellow); //ball stat// g.fillOval (ballx - radii, bally - radii, 2 * radii, 2 * radii); } public static void ballmove() { ballx = ballx-velball; if (ballx <= 10) { ballx = 10; velball = 20; } if (ballx >= 200) { ballx = 200; velball = -20; } } } Post yours, but if you interested in making it and never have made one we should have a contest. And should we do this in C++ or java? Edited November 30, 2005 by Pwnious Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.