Show Posts
|
|
Pages: [1]
|
|
3
|
Game Development / Game Play & Game Design / Re: Damn you Swing!
|
on: 2006-01-25 00:30:16
|
|
Ok, thanks for the advice. It is only commented out because i was working on it without the image at the time i copied and pasted it. Not an error, i assure you. How do i make an image semi-transparent?
|
|
|
|
|
5
|
Game Development / Game Play & Game Design / Re: Damn you Swing!
|
on: 2006-01-22 00:59:54
|
|
class OpeningScreen extends JFrame implements ActionListener{ Image BackGround = Toolkit.getDefaultToolkit().getImage("BackGroundOpen.gif"); JPanel TeamPanel = new JPanel(); Border b1 = BorderFactory.createTitledBorder("Choose Your Team"); JPanel HostPanel = new JPanel(); Border b2 = BorderFactory.createTitledBorder("Are you Host?"); JPanel PlayPanel = new JPanel(); Border b3 = BorderFactory.createTitledBorder("Play!"); Box LabelPanel = Box.createVerticalBox(); boolean bool = false; JButton RED = new JButton("Red Team"); JButton BLUE = new JButton("Blue Team"); JButton Host = new JButton("Host"); JButton Leech = new JButton("Leech"); JButton Play = new JButton("Play!"); JLabel QHost = new JLabel(); JLabel QTeam = new JLabel(); char OpeningTeam = ' '; char OpeningHost = ' '; Test t;
OpeningScreen(){ Play.addActionListener(this); RED.addActionListener(this); BLUE.addActionListener(this); Host.addActionListener(this); Leech.addActionListener(this); Font f = new Font("Comic Sans MS", Font.PLAIN, 30); Color c = Color.BLUE; PlayPanel.setLayout(new BorderLayout()); HostPanel.setBorder(b2); TeamPanel.setBorder(b1); PlayPanel.setBorder(b3); PlayPanel.add(Play, BorderLayout.CENTER); HostPanel.add(Host); HostPanel.add(Leech); TeamPanel.add(RED); TeamPanel.add(BLUE); QHost.setFont(f); QTeam.setFont(f); QHost.setForeground(c); QTeam.setForeground(c); //LabelPanel.add(Box.createHorizontalStrut(1)); LabelPanel.add(Box.createRigidArea(new Dimension(30,60))); LabelPanel.add(QHost); LabelPanel.add(Box.createVerticalStrut(20)); LabelPanel.add(QTeam); this.setSize(400,400); this.setLayout(new BorderLayout()); this.add(HostPanel, BorderLayout.NORTH); this.add(TeamPanel, BorderLayout.SOUTH); this.add(PlayPanel, BorderLayout.EAST); this.add(LabelPanel, BorderLayout.CENTER); this.setVisible(true); }
//public void paintComponent(Graphics g) { /// g.drawImage(BackGround,10,10,this); //}
public void actionPerformed(ActionEvent e){ if(e.getSource() == Play){bool = true;t = new Test();} if(e.getSource() == RED){QTeam.setText("Red ");OpeningTeam = 'R';} if(e.getSource() == BLUE){QTeam.setText("Blue ");OpeningTeam = 'B';} if(e.getSource() == Host){QHost.setText("Host ");OpeningHost = 'H';} if(e.getSource() == Leech){QHost.setText("Leech");OpeningHost = 'L';} }
here is the code. i know it probaly sucks, but its for a final project, and i need to get that damn image there!Thanks
|
|
|
|
|
6
|
Game Development / Game Play & Game Design / Damn you Swing!
|
on: 2006-01-21 22:55:56
|
Ok, i've made a variety of panels which ive put onto my frame. The problem is everything is gray! I used paintcomponent to put a nice background in and the damn thing doesnt show up! Help please? 
|
|
|
|
|
7
|
Discussions / Miscellaneous Topics / Codecs
|
on: 2006-01-21 21:58:23
|
|
I've been using my brothers computer recently, and i noticed a problem with his vid codecs. Every movie is zoomed in! Its messed up! What codec should i download to fix this?
|
|
|
|
|
8
|
Game Development / Game Play & Game Design / Re: Graphics Editing Programs
|
on: 2006-01-21 04:37:59
|
hmm, GIMP eh? I've never cared much for SMS, although i hear its good money. I had a look into this GIMP thing. Seems quite complicated. What the hell is going on?  I got this other program in the meantime, this "pixelator" crap, that blows up your image so you can change the individual pixels in a grid, as well as making them transparent. but not what happens is a small portion is transparent while the rest floats in some f*ckin black box that travels around my landscape. Java is quite frustrating, no?
|
|
|
|
|
13
|
Java Game APIs & Engines / Java 2D / Animation Images, Anyone?
|
on: 2006-01-19 23:06:36
|
|
Hi, im making a game in a programming class at my school. I have a character and i want him to walk around. the thing is, I cant draw for sh*t, so my current character is (literally) a stick man. Then when it came to animating, he now looks like a stickman who is swimming. Anyone know where i can get images, along with animations? I dont want to steal anything, I would just like to use something good.
(if the animation could be around 45 x45 pixels, that would be perfect, thanks)
|
|
|
|
|
14
|
Game Development / Newbie & Debugging Questions / Slope Help!
|
on: 2006-01-19 01:46:39
|
|
Hi, im making a game and i need some help in calculating some slope stuff.
i basically have two points, and i want to draw a ball travelling between the two. I used Y = mX + b...But when the X points start becoming similar this method goes to pot. It also has differnet speeds depending on where you shoot. Any help is appreciated, thanks.
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|