Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Breakout Game

  1. #1
    Junior Member
    Join Date
    Oct 2009
    Posts
    12
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Breakout Game

    Breakout – more details

    (NOTE: for co-ordinates in Greenfoot the position (x=0, y=0) is the top left corner)
    · The game has a grid of bricks 11 wide and 8 deep. The colour of the rows of
    bricks varies – two rows each of yellow, green, blue and red (from front to back).
    The value of the bricks is also different for each row: see
    BreakoutWorld.POINTS, which gives the points value for each row (from the
    back to the front).

    · The ball starts in the position given by
    (BALL_INITIAL_X, BALL_INITIAL_Y).

    · The ball initially moves at 45 degrees, towards the top right corner. Each time the
    ball hits something it will bounce through 90 degrees. This is achieved by simply
    reversing the appropriate (x or y) direction. For example, the initial direction will
    be x = +1, y = h–1. On striking the right hand wall the direction will change to x =
    –1, y = –1 (i.e. x direction swaps from +1 to –1).

    · When the ball hits a brick, the brick disappears and its point value is added to the
    score

    · When the ball misses the bat and drops off the screen the player loses one of their
    3 “lives” and, if the player still has 1 or more lives, the ball returns to its initial
    position and play continues

    · The bat must get its instructions from the Controller class. This has a mode
    variable that can be set to “EXPERT” or any other value. If this variable is set to
    “EXPERT”, the controller passes back the required instructions (“left” or “right”)
    to ensure the bat always hits the ball. For any other value it simply returns either
    “left” (left arrow), “right” (right arrow) or “” (nothing) depending on what key is
    currently pressed. You must include logic to prevent the bat leaving the screen.

    · Play ends when there are no bricks left (a win) or no more lives (a loss).

    here is the zip file.

    should look like the image.
    Attached Images Attached Images
    Attached Files Attached Files


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Breakout Game

    we're not going to do your assignment for you

    work until you get stuck somewhere, then bring us a code snippet of what you're stuck on, and what it's suppose to do.

Similar Threads

  1. invisible box game
    By new2java in forum Loops & Control Statements
    Replies: 1
    Last Post: September 27th, 2009, 12:46 PM
  2. Job offers to program Hobo Wars
    By MooncakeZ in forum Paid Java Projects
    Replies: 7
    Last Post: September 17th, 2009, 09:41 PM
  3. [SOLVED] How to start writing java mobile application?
    By Koâk in forum Java ME (Mobile Edition)
    Replies: 15
    Last Post: July 30th, 2009, 01:52 AM
  4. [SOLVED] Fixing of bug for Pong game
    By phoenix in forum What's Wrong With My Code?
    Replies: 11
    Last Post: July 14th, 2009, 01:19 PM
  5. Replies: 1
    Last Post: March 28th, 2009, 07:21 AM