Making Games in Java!!!
hey i want to make a game in java but i want to get a lot more ideas about what the game should be like and what it should do. I want to actually work with someone else to make the game and then we can sell it or something like that. So if anyone is interested just make a reply OR e-mail me at [email protected] thanks.
hey i want to make a game in java but i want to get a
lot more ideas about what the game should be like and
what it should do. I want to actually work with
someone else to make the game and then we can sell it
or something like that. So if anyone is interested
just make a reply OR e-mail me at [email protected]
thanks.This post is an email harvester's dream.
Similar Messages
-
pleas tell me adout good Courses for making games on j2se
Stop cross-posting,
http://forum.java.sun.com/thread.jspa?threadID=580051&messageID=2932756#2932756 -
Want help in developing my first game in java!!
I want to develop a tetris game in java..can any one help me on this..basically i m new to java programming, i want to know abt the graphical part ..how to make that.. i will code the rest..I want to make an application rather than an applet..
look at the Java2D demo that comes with the JDK
it has lots of source code and just about everything you'll need to do in Tetris (technology wise) is in there, except the game logic.
when you're ready to move into 3D and heavier apps, try this book:
Practical Java Game Programming
http://www.amazon.com/exec/obidos/tg/detail/-/1584503262/102-3570681-1096110?v=glance -
Can I Write a * Game in Java?
I have noticed loads of topics lately along the lines of "Can I write a quake style shooter in java" or "could I write a mmporg in Java" and similar for almost every style of game. I'd just like to make a quick point on this:
Java is a programming language. At the stage it has reached now it can do anything any other programming language can do. It's strengths and weaknesses may be different from those of C, C++, Visual Basic, Lisp or whatever other languages people use regularly, but when it gets right down to it Java isn't the problem. If you can design it effectively then you can implement it in any complete language. It may not be easy but it is possible. The answer to this question is invariably yes.
These forums are far more useful for asking practical questions rather than asking conceptual ones. A better question might be "how would I best start to design a * to be implemented in Java?"Yeah thats a good point. I think that Java has been so popular for so long that it can pretty well do anything as long as the designer designs it properly.
I've made a http web server, and just yesterday I made a pong style game. Java works for almost anything. Take a cruse through the Java Programming forum. People there are using Java to sort money things and everything. -
ı cant still play at yahoo games after java upgrade, why someone doesn't hall me
ı have mac book air , mac os mountain lion x 8 2 and java 7 9 is loaded...ı cant play at yahoo games after java upgradede to 7 9 , ı have been writing here to expect someone hear me and help me? is this just for trade or help customers to solve problems they meet...ı want apple professionals hear and help me !!! what can ı do? all were done properly but when ı enter yahoo lounge and attemp to join a table , it quits and ı cant join then it says error lodging....can someone help me , pls urgent !!!!
ı have mac book air , mac os mountain lion x 8 2 and java 7 9 is loaded...ı cant play at yahoo games after java upgradede to 7 9 , ı have been writing here to expect someone hear me and help me? is this just for trade or help customers to solve problems they meet...ı want apple professionals hear and help me !!! what can ı do? all were done properly but when ı enter yahoo lounge and attemp to join a table , it quits and ı cant join then it says error lodging....can someone help me , pls urgent !!!!
-
Hi Java Game Developers
Me and a friend from work developed a game in Java. Its at www.spacemercenaries.com
If you want to play click on play sm, this will load the client applet.
It will also ask you to confirm a certificate, this is because the applet uses sockets to connect to the server and if you view battles it saves a copy of the battle to your machine (the files will be stored in your home directory for the use logged on - to see the directory open the java console and you sould find it there)
If you have any questions or comments please feel free to ask and comment :-)You should write a JFrame version of the game so it runs faster. Also that means that if your web browser's java plugin doesn't work but you have java installed (like me) then you can still play the game. If you need help porting, I'll do it.
Just a thought.
For free Java Games/Apps and a free tech support, go to my website at
www.freewebs.com/masternerdguy -
Can anyone help on how to make some basic java games for my website if you could that would be helpful
thanks,
LouieWell, first of all you program the Framework, add Graphics / sounds / Data , then you put it in your HP - There you are!
-
Help Making a SIMPLE JAVA GAME *TINY GLITCH*
got a tinnnny glitch and ive tried everything to get it to work, but so far no luck.
Heres what my program does:
1. Aliens spawn at top left (top 4 rows) and move to the right and dissapear (DONE)
2. Shooting rectangle at bottom middle (moves left and right) and shoots bullets (DONE)
3. When bullets make contact with alien the alien dissapears (DONE)
4. When you shoot 20 bullets game over (DONE)
5. When all the aliens fly by the screen game over (DONE)
GLITCH
1. When an alien is killed any bullet that goes over the exact same spot of collision the bullet dissapears! +so does an alien going over same collision spot
MISSING
1. Score, every alien kill + 10 CANNOT get a working score funtion to +10 fo every alien successfully hit :(
My SRC jus copy and paste and compile, any help appreciated
http://www.geocities.com/porche_masi/Assignment3.txt
//ignore spelling mistakes in comments and outputs lol
ive spent way to many hours over these 2 stupid problems, hope new eyes can spot the problemI'm not going to look at your code, but it sounds like when you're killing things you're not removing them from your future calculations. So if an alien is killed, it should either be removed from the list of aliens, or a "dead" flag should be set on it which causes it to be ignored in future calculations.
edit I did look at your code actually, and that is a really, really bad use of multithreading. You shouldn't just create a new thread every time a bullet is fired. You should maintain a list of bullets, have the main thread drive the UI, and have a secondary thread to update the game logic (recalculate collisions, etc).
Edited by: endasil on Nov 21, 2007 3:16 PM -
Need help creating text based game in Java
Alright, I'm taking a big leap and I'm jumping a little out of league here. Anyways here are my two classes...I'm sure I've got plenty of errors :-/ One other thing. I have only programmed the battle section of the program so don't worry about the other 5 sections when fixing the code.
import cs1.Keyboard;
public class Knights
public static void main (String[] args)
// Object Declaration
KnightsAccount player1 = new Account (1, 100, 200);
// variable declarations
boolean run = true;
int choice;
// Game Start
System.out.println ("Welcome to Knights.");
System.out.println ("--------------------------------------");
System.out.println ("You are a level 1 character. With 100 HP and 200 gold...good luck.");
System.out.println ();
while (run == true)
System.out.println ();
System.out.println ("Enter the number of the option you would like to do");
System.out.println ();
System.out.println ("1. Battle");
System.out.println ("2. Train");
System.out.println ("3. Work");
System.out.println ("4. Rest");
System.out.println ("5. Stats");
System.out.println ("6. Quit");
choice = Keyboard.readInt();
if (choice == 1)
player1.battle();
else if (choice == 2)
player1.train();
else if (choice == 3)
player1.work();
else if (choice == 4)
player1.rest();
else if (choice == 5)
player1.stats();
else
run = false;
}And here is the second class...
import java.util.Random;
public class KnightsAccount
public String winner;
public int exp = 0;
public void Account (int level, int hitPoints, int gold) {}
public battle ()
Random generator = new Random();
int pumpkinHP = 80;
int playerAttack, pumpkinAttack;
System.out.println ("Engaged in combat with an Evil Pumpkin!");
while (hitPoints > 0 && pumpkinHP > 0)
if (pumpkinHP > 0)
playerAttack = generator.nextInt(15);
hitPoints -= playerAttack;
System.out.println ("Player 1 attacked Evil Pumpkin for " + playerAttack + ".");
System.out.println ("Evil Pumpkin has " + hitPoints + " HP left.");
if (pumpkinHP <= 0)
pumpkinDead();
if (hitPoints > 0 && !(pumpkinHP <= 0))
pumpkinAttack = generator.nextInt(12);
hitPoints -= pumpkinAttack;
System.out.println ("Evil Pumpkin attacked Player1 for " + pumpkinAttack + ".");
System.out.println ("Player 1 has " + pumpkinHP + " HP left.");
if (hitPoints <= 0)
playerDead();
return winner;
private pumpkinDead ()
System.out.println ("Success! You have defeated the Evil Pumpkin with " + hitPoints + "HP left!");
System.out.println ("For you good deed you earned 20 exp.");
exp += 20;
return exp;
private void playersDead ()
System.out.println ("You have been defeated. Go home before we pelt melty cheeze at you.");
}Whoever can help me I'd be grateful. I know there are probably a lot of things wrong here. Also if some of you could post your AIM or MSN so that I can get some one on one help on any of the smaller problems I run acrost that would help a lot too.
Duke dollars to whoever helps me ;)
AIM: Trebor DoD
MSN: [email protected]You should really create a GameCharacter object that contains the
statistics for a character (player or non-player) in the game.
public class GameCharacter {
private double attackStrength;
private double defenseStrength;
private String name;
private String[] bodyParts;
private Random = new Random();
public GameCharacter(String name, String[] bodyParts, double attackSt, double defenseSt){
this.attackStrength = attackSt;
this.defenseStrength = defenseSt;
this.bodyParts = bodyParts;
this.name = name;
// put lots of methods in here to get and set the information
public String getName(){
return this.name;
public String getRandomBodyPart(){
return this.bodyParts[random.nextInt(this.bodyParts.length)];
}You then create your "knight" character and your "rabid pumpkin"
character.
Your fight method then just takes two GameCharacter objects and uses
the information they contain to fight the battle.
public void fight(GameCharacter a, GameCharacter b) {
boolean fightOver = false;
Random rn = new Random();
double attackValue;
while(!fightOver) {
attackValue = a.getAttackStrength()*rn.nextDouble();
System.out.println(a.getName()+" attacks "+b.getName()+"'s "+b.getRandomBodyPart()+" for "+attackValue+" points");
}The above is not the fighting loop of course. I just put it in to
demostrate how the fight method can be made generic. It takes any
two characters and uses their defensive and attack information to
calculate the fight outcome. It also uses the descriptions that the characters have
to make the fight more interesting. (the getRandomBodyPart method in
particular)
matfud -
Ello,
Im Trying to write a simple ping pong game in a java netbeans.
the problem is that i got the ball to move but it doesnt seem to move around the screen just in the same direction. heres the code:
* PingPong.java
* Created on 23 November 2006, 15:33
* @author rshabbir
import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
public class PingPongGame extends javax.swing.JFrame {
/** Creates new form PingPong */
public PingPongGame() {
initComponents();
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton5 = new javax.swing.JButton();
jButton6 = new javax.swing.JButton();
jPanel3 = new DrawingPanel();
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("PING PONG");
jPanel1.setBackground(new java.awt.Color(0, 0, 0));
jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 255, 255)));
jLabel1.setFont(new java.awt.Font("Brush Script MT", 1, 14));
jLabel1.setForeground(new java.awt.Color(255, 255, 255));
jLabel1.setText("CONTROL PANEL");
jButton1.setFont(new java.awt.Font("Brush Script MT", 1, 12));
jButton1.setText("BAT");
jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton1MouseClicked(evt);
jButton2.setFont(new java.awt.Font("Brush Script MT", 1, 12));
jButton2.setText("SPEED");
jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton2MouseClicked(evt);
jButton5.setFont(new java.awt.Font("Brush Script MT", 1, 12));
jButton5.setText("BALL");
jButton5.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton5MouseClicked(evt);
jButton6.setFont(new java.awt.Font("Brush Script MT", 1, 12));
jButton6.setText("EXIT");
jButton6.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton6MouseClicked(evt);
org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jLabel1)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
.add(jButton2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))
.add(org.jdesktop.layout.GroupLayout.TRAILING, jButton1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
.add(jButton6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(jButton5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap(60, Short.MAX_VALUE))
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.add(jLabel1)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 15, Short.MAX_VALUE)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jButton1)
.add(jButton5))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jButton6)
.add(jButton2))
.addContainerGap(38, Short.MAX_VALUE))
getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 290, 140));
jPanel3.setBackground(new java.awt.Color(0, 0, 0));
org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 290, Short.MAX_VALUE)
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 370, Short.MAX_VALUE)
getContentPane().add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 140, 290, 370));
pack();
}// </editor-fold>
private void jButton6MouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
private void jButton5MouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {
private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {
* @param args the command line arguments
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new PingPongGame().setVisible(true);
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton5;
private javax.swing.JButton jButton6;
private javax.swing.JLabel jLabel1;
private javax.swing.JPanel jPanel1;
private DrawingPanel jPanel3;
// End of variables declaration
class DrawingPanel extends JPanel
int x,y,xdir=1,ydir=2 ;
int interval = 30;
int x_pos = 10;
int y_pos = 10;
int radius = 5;
int x_speed = 10;
int y_speed = 10;
int jframesize_x = 280;
int jframesize_y = 280;
//int x = 150, y = 100, r=50; // Position and radius of the circle
//int dx = 8, dy = 5; // Trajectory of circle
public void paintComponent(Graphics g)
Rectangle2D rect;
Ellipse2D e;
GradientPaint gp;
Graphics2D gg;
super.paintComponent(g);
setBackground(new java.awt.Color(0, 0, 0));
gg = (Graphics2D)g;
gg.setColor(Color.red);
rect = new Rectangle2D.Float(40, 30, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.red);
rect = new Rectangle2D.Float(110, 30, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.red);
rect = new Rectangle2D.Float(180, 30, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.green);
rect = new Rectangle2D.Float(40, 60, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.green);
rect = new Rectangle2D.Float(110, 60, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.green);
rect = new Rectangle2D.Float(180, 60, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.blue);
rect = new Rectangle2D.Float(40, 90, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.blue);
rect = new Rectangle2D.Float(110, 90, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.blue);
rect = new Rectangle2D.Float(180, 90, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.yellow);
rect = new Rectangle2D.Float(40, 120, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.yellow);
rect = new Rectangle2D.Float(110, 120, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.yellow);
rect = new Rectangle2D.Float(180, 120, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.magenta);
rect = new Rectangle2D.Float(110, 150, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.magenta);
rect = new Rectangle2D.Float(110, 180, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.magenta);
rect = new Rectangle2D.Float(110, 210, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.pink);
rect = new Rectangle2D.Float(180, 150, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.pink);
rect = new Rectangle2D.Float(180, 180, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.pink);
rect = new Rectangle2D.Float(180, 210, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.cyan);
rect = new Rectangle2D.Float(40, 150, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.cyan);
rect = new Rectangle2D.Float(40, 180, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.cyan);
rect = new Rectangle2D.Float(40, 210, 60, 20);
gg.draw(rect);
gg.fill(rect);
gg = (Graphics2D)g;
gg.setColor(Color.white);
rect = new Rectangle2D.Float(110, 350, 60, 10);
gg.draw(rect);
gg.fill(rect);
//g.fillOval (x_pos - radius, y_pos - radius, 2 * radius, 2 * radius);
try{
Thread.sleep(15);
} catch(InterruptedException E){}
repaint();
x_pos++;
y_pos++;
repaint();
e = new Ellipse2D.Float(x,y,10,10);
gp = new GradientPaint(150,50, Color.white, 200,100, Color.white, true);
gg.setPaint(gp);
gg.fill(e);
try{
Thread.sleep(15);
} catch(InterruptedException E){}
repaint();
x=x+1;
y=y+1;
repaint();
if(x > jframesize_x - radius)
x_speed = -1;
else if(x < radius)
x_speed = +1;
x += x_speed;
y += x_speed;
x--;
y--;
//if ((x - r + x_pos < 0) || (x + r + x_pos > jframesize_x)) x_pos = x_pos;
//if ((y - r + y_pos < 0) || (y + r + y_pos > jframesize_y)) y_pos = y_pos;
//x += x_pos; y += y_pos;
//repaint(x-r-x_pos, y-r-x_pos, 2*r, 2*r); // repaint old position of circle
//repaint(x-r, y-r, 2*r, 2*r);
// try { Thread.sleep(50); } catch (InterruptedException e) { ; }
go away. u just dont want to helpFuck off jackfuck.
You whined the same thing in the other thread when people asked for code tags. You have also got lots of actual advice and suggestions in your other thread and ignore them all.
Crossposting is rude but I suppose we should not expect any better from you because so far all you have demonstrated on this site is that you are rude, incredibly stupid and lazy. -
How do i play yahoo games without java
installing java to run games on my galaxy tab
It is not possible to run Java based browser plugins in Android. Oracle, the people who make Java and Google, the people who make Android are currently in a legal battle. I would not expect Oracle to be releasing a Java plugin for Android due to this legal fight.
As a workaround I would suggest searching the Android market (Play Store) for the type of game you want to play. There are hundreds of free and paid game apps in the store. -
How to make a TicTacToe game in Java?
My assignment requires me to make a java applet tic tac toe game. I have come as far as creating panels and adding 9 buttons to the center panel. The logic defeats me. I have looked around at the web for source code but everything looks fairly complicated. Here's what I have so far:
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class Homework5 extends Applet {
Panel northPanel = new Panel();
Panel southPanel = new Panel();
Panel eastPanel = new Panel();
Panel westPanel = new Panel();
Panel mainPanel = new Panel();
Button resetButton = new Button ("Tic Tac Toe");
Button squares[];
public void init() {
setLayout(new BorderLayout());
northPanel.setBackground(Color.orange);
southPanel.setBackground(Color.orange);
eastPanel.setBackground(Color.orange);
westPanel.setBackground(Color.orange);
mainPanel.setBackground(Color.orange);
add("North", northPanel);
add("South", southPanel);
add("East", eastPanel);
add("West", westPanel);
add("Center", mainPanel);
resetButton.setFont(new Font("Arial", Font.PLAIN, 12));
northPanel.add(resetButton);
mainPanel.setLayout(new GridLayout(3,3));
squares = new Button[9];
for ( int i = 0; i < 9; i++ ) {
squares[i] = new Button();
//squares.addActionListener(this);
squares[i].setFont(new Font("Serif", Font.BOLD, 20));
mainPanel.add(squares[i]);
Can someone explain to me where I should go from here?
Thanks.I figured it out. :-)
I had to use 2 arrays (one to create the button and another to hold the X's and O's in memory). I also had to call on the getSource method for the values in my array. This is where I was getting stuck initially. 3 hours and 2 mountain dews later, I was all warm and fuzzy when it compiled without an error. :-)
You can see it in action here:
http://www.vnoel.com/pcc/cs162/applets/knarayan/homework5.html -
Basic Football Manager Game in Java
[http://bygfoot.sourceforge.net/new/about/]
Hi,
I would like to create a basic Football Manager Game for the desktop using Netbeans.
Is this the only package I will need to create this Game for the Desktop?
What Java skills will I need to learn to create this game?
Thanks in Advance
Edited by: wakesta on Jul 5, 2010 11:10 AMYou will need to know some of this Java. You should also become familiar with basic programming concepts, for that I would suggest a study of contemporary texts on programming--not on learning Java or a language specifically, but on programming itself.
-
I am not sure if this is the right place to post this topic if it is not please tell me were to post it thanks. sorry in adv.
hi i have been programing apps in java for a little wile and was wondering how to make games for cell phone that are java enabled and how it would differ from normal desktop apps as there arent as many keys on a cell phone and the methods and classes i would need to extend and interfaces i would need to implement any help would be a greatful
thanks
niburHere's a pretty good thread: http://forum.java.sun.com/thread.jsp?forum=406&thread=429254
You can also try searching all forums, use the little search box in the lower right corner of this page: http://forum.java.sun.com/ -
Hi. I'm running a 2Ghz Macbook with OSX 10.5.2 and I can't seem to play any games online and the sites always say that java isn't compatible.
The site's I'm trying to play games on are www.playandwin.co.uk and also yahoo games. I've tried with both safari and firebox and same error everytime.
When checking java in the application part of finder, it says i've got J2SE 5.0 and 1.4.2 and i've tried both but still nothing. Any ideas or suggestions ? I've tempted to install windows but really don't want to go to that extreme if possible but really want to play the games.Interesting fix. Being new to Macs I am not sure how that happened to you. I checked my Safari's info and Open with Rosetta was already unchecked. It's not that I cannot completely play Java games on Pogo, but if the game window does not crash, the game table will be blank and the chat text area will be shown, or the chat text area will be blank while the game table shows up.
It is frustrating. Still, I think it is more to do with the developers and web designers than with our out of the box settings. In comparison, the majority of Windows PC's can play games on Pogo, Yahoo, MSN, etc., without much more than downloading and install ActiveX.
If a Windows PC and a Mac both have the same version of Java installed, and all required platform updates are installed, respectively, what common sense reasoning would be behind the conflict that either platform would have with interacting with a Java based online gaming site?
The coders do not write for the lesser number of site traffic. Hard to swallow, but it is my honest opinion. Still, I gave up frustrations I could count on when I shut down my PC for the last time and I do not intend to allow a lack of gaming to get me down as a new Mac user.
Maybe you are looking for
-
Applications folder missing from Macintosh HD in Finder
The "Applications" folder disappeared from my "Macintosh HD" finder window a few days ago and I have found no way to restore it. I can access "Applications" from the Finder sidebar and it the "Applications" folder displays in the Path Bar but not in
-
PDF printing incorrectly (unintentional cropping and scaling)
An 11x17 PDF prints correctly from 3 different computers in our office. It prints incorrectly from MY computer, as well as our client's computer in a different office. Although the PDF looks perfectly fine on the screen in Adobe Reader, the print sca
-
The back up volume is read only?
Can anyone help me with this? When time machine tries to run a back-up I get two errors and it fails. The first says: Time Machine Error The back up volume is read only. The second one says: Disk Repair The disk was not repairable by this computer. I
-
Itunes deleted all photos.
So here is some more genius on behalf Apple... itunes out of the blue decided to delete all the photos on iPhone, it's not the initial sync.. I mean most other companies that give a little credit to the customers intellect, will ask, Hey there are so
-
Developer 10g ClassNotFoundException
After installing Developer 10g onto Windows XP I have attempted to run the test form from the Forms Developer option "Run a Form on the Web" web page. The browser starts and displays - Loading Java Applet - then get the message - java.lang.ClassNotFo