Results 1 to 8 of 8
  1. #1
    makanti is offline Member
    Join Date
    Mar 2009
    Posts
    4
    Rep Power
    0

    Default Programming a Board Game

    Hellooo everyone!I am from Greece studying applied informatics and i am glad to enter this group! I am new in the forum and although still a beginner programmer, i started seriously java programming last months due to the fact that my final task in order to complete my studies in University of Macedonia has to do with the programming of the renowned game "Scrabble" in Java Anyway briefly i would like if possible to get some help.:confused:Working with java swing I have designed the basic gui of my application and entered the board of the game as a picture (15*15 boxes designed in photoshop) and finally achieved the drag & drop of the 7 letters on the board(letters are also images). My problem now is that i don't know how i could divide the board picture in 15*15 boxes in order to make them work differently. For example i want the small square images of the letters to be aligned correctly in every square of the board when the user will drop them. I hope i was not too complex in my description. I look forward for any help. Thx a lot!

    PS an attachment of the gui (board + tiles) that maybe helpful included.
    Attached Thumbnails Attached Thumbnails Programming a Board Game-scr.jpg  

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    This is not a code bank to get work done. So you have to show your effort first. And ask your question more clearly. Good luck!

  3. #3
    makanti is offline Member
    Join Date
    Mar 2009
    Posts
    4
    Rep Power
    0

    Default

    That was not an inquiry for code. Just needed some general help. For example if someone finds it possible to define 225 cells of an image(by using the pixels) and give them different attributes,or it would be better to use JComponent subclass to represent one cell, and use a container+GridLayout to manage the whole grid. My code is incomplete and can't be helpful here once my question is not that specific. Any proposal can be great help. thx!

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Fine. How did you work on with cell. Did you use labels for cells?

    Using labels you can achieve this more easily. Simple you can change the background color on them. Put all of them on a grid layout.

  5. #5
    makanti is offline Member
    Join Date
    Mar 2009
    Posts
    4
    Rep Power
    0

    Default

    no i only used an image in order to achieve a better result for my board(better graphics). I thought of labels or panels but I prefered to use a ready image. Of course later some problems occured and that's why i had second thoughts.

  6. #6
    makanti is offline Member
    Join Date
    Mar 2009
    Posts
    4
    Rep Power
    0

    Default

    Perhaps I ll have to return to the most popular solution but I will fight it a bit more. Thx for you comments

  7. #7
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,242
    Rep Power
    19

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. how to create board in java...
    By zenith in forum New To Java
    Replies: 5
    Last Post: 01-20-2010, 04:42 AM
  2. The words *game* in java programming :confused:
    By ibmzz in forum Advanced Java
    Replies: 1
    Last Post: 01-23-2008, 09:23 AM
  3. Programming a Game?
    By gt123 in forum New To Java
    Replies: 4
    Last Post: 01-01-2008, 12:41 PM
  4. java game programming
    By gammaman in forum New To Java
    Replies: 1
    Last Post: 12-25-2007, 01:01 AM
  5. Replies: 1
    Last Post: 08-07-2007, 05:19 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
  •