954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Java game

hello guys,

Can any of you help me create a game in java??

There has to be two paddles, one at the top and the other at the bottom. The paddles have to stop the ball from getting out of the screen. The ball cannot leave the screen from the left or the right.

Can you please help me??


Thanks.

aakaashjois
Newbie Poster
21 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

hello guys,

Can any of you help me create a game in java??

There has to be two paddles, one at the top and the other at the bottom. The paddles have to stop the ball from getting out of the screen. The ball cannot leave the screen from the left or the right.

Can you please help me??

Thanks.


Yeah, we can help you, but you're going to have to get way more specific. To start, to use animation, you're going to have to learn Java Swing. For animation, you need to learn about timers. You have to decide whether there are any human players in this game. If so, you're going to need some way for the person or persons to control the paddles, which means you need to learn about either Key Listeners or Mouse Listeners or Action Listeners or more than one of them. Since you're using timers, you may need to learn about the Runnable class and/or Threading. Here's your main page for Java tutorials. http://java.sun.com/docs/books/tutorial/

We have no idea what you know already. You may know all this stuff, in which case, again, you need to ask a far more detailed question.

VernonDozier
Posting Expert
5,527 posts since Jan 2008
Reputation Points: 2,633
Solved Threads: 711
 

Yeah, we can help you, but you're going to have to get way more specific. To start, to use animation, you're going to have to learn Java Swing. For animation, you need to learn about timers. You have to decide whether there are any human players in this game. If so, you're going to need some way for the person or persons to control the paddles, which means you need to learn about either Key Listeners or Mouse Listeners or Action Listeners or more than one of them. Since you're using timers, you may need to learn about the Runnable class and/or Threading. Here's your main page for Java tutorials.

http://java.sun.com/docs/books/tutorial/

We have no idea what you know already. You may know all this stuff, in which case, again, you need to ask a far more detailed question.


I only know basic java. I don't know how to use Java Swing.

aakaashjois
Newbie Poster
21 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

me too.. we need to do a paddle game .. but i can't do it.. :(
can you help me?

mizuki08
Newbie Poster
1 post since Aug 2010
Reputation Points: 10
Solved Threads: 0
 

i am working on the same i have created the ball coding , the paddles but game coding is left i posted the ball coding it needs to be modified a little bit for moving in x direction as well but hope it will be helpful http://www.daniweb.com/forums/thread299409.html

gauravk_bhanot
Newbie Poster
24 posts since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: