permaculture playing cards*
The moose likes Game Development and the fly likes Need help with making a game Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "Need help with making a game" Watch "Need help with making a game" New topic
Author

Need help with making a game

Krupa Patel
Greenhorn

Joined: Apr 18, 2012
Posts: 10
I am making a game where I have to divide the frame into two parts the game board and the control panel.
I don't know where to start.



Your help is greatly appreciated.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
if you want the divider moveable, you
could use a JSplitPane.

if fixed divider, use a JPanel set as BorderLayout,
board goes in CENTER, controlPanel goes to
EAST WEST NORTH or SOUTH, depending
on where you want it.
Krupa Patel
Greenhorn

Joined: Apr 18, 2012
Posts: 10
I am kind of confused. I do not know if i am doing it correctly.
I am creating a breakout game where I have to divide the frame into two, the game board and the control panel.
The control panel will display the score, restart button, and etc. This is my code.

Please help me. Thank you.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
you don't need the indicated lines - in fact they're dangerous
because they are added to (the default position) CENTER, then
removed to add at a specific location EAST/WEST



you need to work out what you want to do with the height of everything
you have 250 for one panel, 550 for another, then set the frame to 800,
this works for the width, but if you want those specific height dimensions
you'll need to use holding panels to take up the extra space.
Krupa Patel
Greenhorn

Joined: Apr 18, 2012
Posts: 10
Thank you so much.
Krupa Patel
Greenhorn

Joined: Apr 18, 2012
Posts: 10
I have two paddles in my breakout game where I have to click on the paddle and move the paddle by moving the mouse.
Please help me.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
This appears to be a homework assignment (Breakout?), so you have to ask specific questions,
not just a general fix it for me.

Your Paddle class is all wrong - try it again, repost with specific problem, if any.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Need help with making a game
 
Similar Threads
making a game
adding images to JPanel ***************URGENT
calling random number generator
calling random number generator
Building Requirements for Games