Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By Norm

Thread: Brick breaker design pattern

  1. #1
    tomtaila is offline Member
    Join Date
    Jul 2011
    Rep Power

    Default Brick breaker design pattern

    Hey programmers!
    My university has assigned me the task of creating a brick breaker game for android phones (full spec below).
    What I would simply like to know is which design pattern I should be using to structure my program?
    If I should be using more than one which should I use and for which aspects (i.e. which parts of the program) should I use them in?

    game should
    • Have functionality to start and stop games on screen (i.e. a splash screen to control game play)
    • Display the score while playing
    • Have a Paddle to keep ball(s) alive.
    o Controlled by touches on the screen and/or sensors within the phone
    o The player will lose a “life” if the paddle doesn’t keep it alive. (Try different breakout games for inspiration.)
    • Have a Ball (more balls will attract a higher mark)
    o The ball bounces off walls except for the wall with the paddle
    o When the ball hits a box it is removed for a reward (score)
    • Have Boxes
    o More than one box to be removed (for a reward in score)
    o More than one game level, with different layouts and numbers of boxes.
    o Levels must be created in a dynamic manner, so that new levels can be created easily.
    • Use Multiple Threads

    To receive high marks. One must:
    • Add multi-phone / multiplayer functionality (using TCP networking) with two players playing against (or collaborate with) each other simultaneously, i.e. two paddles on-screen simultaneously, one controlled by each player (worth max. 15%).


  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: Brick breaker design pattern

    That's not how design patterns work.
    They are patterns that cover specific problems, so you would be using numerous ones.
    For the top level some sort of MVC, which I think Android facilitates in its structure anyway (not that I'm all that well versed in it).

    After that there will be numerous code-task-specific ones, too many to mention here.
    If you have the Gang Of Four (or a reference to it) then simply keep that handy as you work through your design. Some things will simply fall out from that.

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

Similar Threads

  1. Brick breaker game Code
    By Mahesh Ratan in forum AWT / Swing
    Replies: 6
    Last Post: 03-26-2014, 05:30 PM
  2. Brick Breaker
    By ivlatt in forum Java Gaming
    Replies: 5
    Last Post: 04-22-2011, 07:47 AM
  3. need help with brick breaker (breakout)
    By blackmatrix00 in forum Java Applets
    Replies: 3
    Last Post: 05-24-2010, 07:25 AM
  4. Brick breaker game Code
    By Mahesh Ratan in forum Java Gaming
    Replies: 3
    Last Post: 03-22-2010, 02:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts