1. Check out our app, Forums for Android! Download and leave feedback here!

Android Chess Board

Discussion in 'Android Apps & Games' started by Beanstalk, Jun 24, 2010.

  1. Beanstalk

    Beanstalk Member
    Thread Starter
    5

    Jun 24, 2010
    9
    0
    5
    Student
    Hey all,

    So I was planning on writing a Chess-based minigame as part of a project. I was working on my pitch when I realized that I had to represent 64 clickable squares on a screen of that size...

    I found a couple of ways around it. Like letting them choose a row number from 1-8 and a column number from A-H OR providing them with four arrow keys to navigate across the screen. But it just takes the fun and intensity out of the game.

    Does anyone have any suggestions on how to overcome this obstacle?

    Thanks in advance :)
     

    Advertisement

  2. hood420

    hood420 Well-Known Member
    38

    Jan 13, 2010
    371
    21
    38
    Lansing, MI
    Make the squares unclickable when zoomed out. Do a tap or double tap to zoom in to reasonably sized view, from there you can make your move. EA's Scrabble works similar to this if you need an example.
     
    Beanstalk likes this.
  3. Beanstalk

    Beanstalk Member
    Thread Starter
    5

    Jun 24, 2010
    9
    0
    5
    Student
    Thanks mate, that was concise and helpful.

    I was actually thinking about implementing the zoom like the iPhone's double finger zoom and completely lost hope because I'm just starting out as a developer and didn't know where to begin=D
     
  4. KlaymenDK

    KlaymenDK Well-Known Member
    143

    May 29, 2009
    1,217
    130
    143
    Denmark
    64 clickable squares are not that hard to hit, it's only 8 squares across. Sudoku is 9 squares across, and still manage to present a square of about 4-5mm on a side.

    Check out the interface for OpenSudoku: it registers a press and highlights the targeted column and row; you can then drag your finger around until you reach your desired target cell; releasing the finger performs an action on the cell. For a chess game, you'd want to drag pieces around so this click-to-select might be a bit cumbersome (seeing as how you'd need an additional click-to-select to specify the destination).

    Still, it might be a lot less work than implementing zoom ... I don't know how that works.

    Edit: By the way, OpenSudoku is open source (GPLv3), so you can have a look at their implementation. The source for the GUI input method is right here. ;)
     
  5. Beanstalk

    Beanstalk Member
    Thread Starter
    5

    Jun 24, 2010
    9
    0
    5
    Student
    About the Zoom feature, I figured I would reload a different interface using an extra XML file which features only quarter of the whole board.

    Thanks for the OpenSudoku link =)
     
  6. KlaymenDK

    KlaymenDK Well-Known Member
    143

    May 29, 2009
    1,217
    130
    143
    Denmark
    You're quite welcome. :) I'm still "keen" on the OpenSudoku-style input, been thinking that if you do opt for a click-to-select approach, your app could highlight all the valid destination squares that the piece might move to (which you'd have to calculate/validate anyway, so it's not much of a stretch).

    Just a thought. Oh, and you now owe me patent royalties! :D:rolleyes:
     
  7. matthew1471

    matthew1471 Member
    15

    May 17, 2010
    19
    0
    15
    lol, i read the title four times as "android CHEESE board" and tried to decide what cheese an android would like to eat :)
     
  8. KlaymenDK

    KlaymenDK Well-Known Member
    143

    May 29, 2009
    1,217
    130
    143
    Denmark
    So what's the progress? Did you make it work?

    Curious! :D
     
  9. Psychokitty

    Psychokitty Well-Known Member
    78

    Dec 14, 2009
    613
    64
    78
    In the forum dog house.
    -So this would be so two people can play? I hate playing against the "computer".
     

Share This Page

Loading...