Author Topic: Me and edman are making a game ! -Need a few coders experienced in java  (Read 4998 times)

Beta testers = people that want to be important.

The only time you need "beta testing" is when it's a game like Call of Duty where an exploit will be found and abused within hours of the release.

Code: (Main) [Select]
package RPG;

import java.awt.Image;
import java.awt.event.*;

import javax.swing.ImageIcon;

public class Char {
int x, dx, y, dy;
Image rollin;

public Char() {
ImageIcon i = new ImageIcon("C:\\Users\\Edward\\Desktop\\stuffs\\rollin.gif");
rollin = i.getImage();
x = 10;
y = -172;
}

public void move(){
x = x + dx;
y = y + dy;
}
public int getX(){
return x;
}
public int getY(){
return y;
}

public Image getImage(){
return rollin;
}
public void keyPressed (KeyEvent e){
int key = e.getKeyCode();

if (key == KeyEvent.VK_LEFT);
dx = -1;
if (key == KeyEvent.VK_RIGHT);
dy = 1;
}
public void keyReleased (KeyEvent e){
int key = e.getKeyCode();

if (key == KeyEvent.VK_LEFT);
dx = 0;
if (key == KeyEvent.VK_RIGHT);
dy = 0;
}
}

Beta testers = people that want to be important.

The only time you need "beta testing" is when it's a game like Call of Duty where an exploit will be found and abused within hours of the release.
or just people that want to help and dont know how to code


Are you working on a character sprite or is it just going to be a square?

okay, I need someone to tell me how to fix that ho of code

Those are some tiny icons, Will they be up-scaled?
« Last Edit: December 12, 2011, 07:53:06 PM by tails »

"dx = -1" is not a valid way to move. It just sets dx to -1.

It should be
Code: (Main) [Select]
package RPG;

import java.awt.Image;
import java.awt.event.*;

import javax.swing.ImageIcon;

public class Char {
int x, dx, y, dy;
Image rollin;

public Char() {
ImageIcon i = new ImageIcon("C:\\Users\\Edward\\Desktop\\stuffs\\rollin.gif");
rollin = i.getImage();
x = 10;
y = -172;
}

public void move(){
x = x + dx;
y = y + dy;
}
public int getX(){
return x;
}
public int getY(){
return y;
}

public Image getImage(){
return rollin;
}
public void keyPressed (KeyEvent e){
int key = e.getKeyCode();

if (key == KeyEvent.VK_LEFT);
dx = dx-1;
if (key == KeyEvent.VK_RIGHT);
dy = dy+1;
}

// public void keyReleased (KeyEvent e){
// int key = e.getKeyCode();
//
// if (key == KeyEvent.VK_LEFT);
// dx = 0;
// if (key == KeyEvent.VK_RIGHT);
// dy = 0;
// }

}

See, when you begin to make a game, you kind of have to know how to make a game first.


You buttforgeted the code pretty hard.
Code: [Select]
public void move(){
x = x + dx;
y = y + dy;
}

That may be part of the problem as well, but I can't really tell.

Are you working on a character sprite or is it just going to be a square?


Ok, you need some tutorials pretty badly. You can't use animated gif images.

To make looping animations you can update add on to a variable every update pass, and change the animated image every 20-30 updates.

mhmm, extrude, do you have a skype