Results 1 to 2 of 2
  1. #1
    Atriamax is offline Member
    Join Date
    Sep 2009
    Rep Power

    Default Making a puzzle game, need help!

    Hey guys, Im creating a Bejeweled-like game where the player matches up 3 or more of the same color squares and it clears those squares.
    Im having trouble setting it up though.
    Right now Its gotten to the point where the main panel class has just a bunch of static variables and methods. I have a "block" class that contains info for each individual block, and I have an array of those in the main class. Its gotten messy fast.

    How would one set up a game like bejeweled as far as classes and structure?
    Nothing specific I guess, just basic structure.

    Also, i cant figure out a way to have it detect when the blocks are in a row of three or more. Any suggestions of a basic detection strategy?
    Again nothing specific, if you have any suggestions, let me know!

    Thanks for the help

  2. #2
    lovelesh is offline Senior Member
    Join Date
    Nov 2010
    Blog Entries
    Rep Power


    You are going in the right direction.

    In addition to its own information, your block class should have following information as well:
    1. List of all blocks, which touch this block (e.g Arraylist<Block> neighbours).
    2. This list should be populated as soon as a block hits/touches other blocks.
    3. Once a block hits other blocks, perform a check on the color of blocks of all neighbours.

Similar Threads

  1. Making hangman game
    By Snow_Fox in forum New To Java
    Replies: 0
    Last Post: 11-29-2010, 10:42 PM
  2. starting my game making career
    By cejay in forum New To Java
    Replies: 6
    Last Post: 11-28-2010, 10:10 AM
  3. Game making help
    By Mrkantaloupe in forum New To Java
    Replies: 2
    Last Post: 07-13-2010, 10:15 PM
  4. need help making a game board
    By Don k in forum New To Java
    Replies: 2
    Last Post: 04-30-2010, 12:09 AM
  5. need help with a simple game im making
    By frallan in forum AWT / Swing
    Replies: 2
    Last Post: 11-30-2009, 11:36 AM

Posting Permissions

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