1. Introducing Channels - a new way to chat with other Android users!
    Dismiss Notice

Android Chess Board


Last Updated:

  1. Beanstalk

    Beanstalk Member This Topic's Starter

    Joined:
    Jun 24, 2010
    Messages:
    9
    Likes Received:
    0
    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

    Joined:
    Jan 13, 2010
    Messages:
    371
    Likes Received:
    21
    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 This Topic's Starter

    Joined:
    Jun 24, 2010
    Messages:
    9
    Likes Received:
    0
    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

    Joined:
    May 29, 2009
    Messages:
    1,217
    Likes Received:
    130
    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 This Topic's Starter

    Joined:
    Jun 24, 2010
    Messages:
    9
    Likes Received:
    0
    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

    Joined:
    May 29, 2009
    Messages:
    1,217
    Likes Received:
    130
    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

    Joined:
    May 17, 2010
    Messages:
    19
    Likes Received:
    0
    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

    Joined:
    May 29, 2009
    Messages:
    1,217
    Likes Received:
    130
    So what's the progress? Did you make it work?

    Curious! :D
     
  9. Psychokitty

    Psychokitty Well-Known Member

    Joined:
    Dec 14, 2009
    Messages:
    613
    Likes Received:
    64
    -So this would be so two people can play? I hate playing against the "computer".
     

Share This Page

Loading...