• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Android Chess Board

Beanstalk

Lurker
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 :)
 
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.
 
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.

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
 
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. ;)
 
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:
 
Back
Top Bottom