Checkers Board Game

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Checkers Board Game

Postby viju85 » Wed Jan 13, 2010 8:26 am

Hi all,
I am new to Android development. I created Tic Tac Toe using Buttons as my first Application.
Now i am planning to develop Checkers on Android.

But i am having basic problems as to how to create the board itself?
It would be great if someone could help me or point me in the direction as i am very eager to get started with developing board games.

Thanks
Vj
viju85
Junior Developer
Junior Developer
 
Posts: 20
Joined: Mon Feb 23, 2009 10:17 pm

Top

Postby samaldis » Wed Jan 13, 2010 1:32 pm

Take a look at canvas, you can load an image for the board and draw in on the canvas.
probably best to look at threading too.
samaldis
Freshman
Freshman
 
Posts: 6
Joined: Wed Jan 28, 2009 1:23 am
Location: Worcester, UK

Re: Checkers Board Game

Postby jagtap.jj1 » Wed Jan 13, 2010 3:41 pm


To develop board GridView widget is the best solution, http://developer.android.com/reference/ ... dView.html

U can create Board of 8*8 tiles using this widget.

java-android developer
User avatar
jagtap.jj1
Senior Developer
Senior Developer
 
Posts: 124
Joined: Fri Aug 22, 2008 11:52 am
Location: India(Mumbai)

Postby viju85 » Wed Jan 13, 2010 5:31 pm

Hey Jagtap,
Thanks for ur reply.
But if i use GridView, Then how do i draw the checkers black and red pieces? What about the board color? Will i be able to move them from one spot to another?

@samaldis: It sounds to be simple. Loading of an image from canvas and drawing on top of a canvas.
I have not worked on canvas. Even in J2ME development i have worked only with High-level- APIs.
Do u by any chance have any sample example with code or just the sample code so that i can get started on this without delay!

Thanks,
Vj.
viju85
Junior Developer
Junior Developer
 
Posts: 20
Joined: Mon Feb 23, 2009 10:17 pm

Postby jagtap.jj1 » Wed Jan 13, 2010 6:59 pm

Hi viju85

This open source project will help you much
http://sourceforge.net/projects/honzovysachy/
java-android developer
User avatar
jagtap.jj1
Senior Developer
Senior Developer
 
Posts: 124
Joined: Fri Aug 22, 2008 11:52 am
Location: India(Mumbai)

Postby viju85 » Thu Jan 14, 2010 7:20 am

I looked at the link u posted.
I thought i could compile the source code directly. But was unable to do so?
Could you please provide some more help regarding this?
It would be of great help to me.

Thanks,
Vj.
viju85
Junior Developer
Junior Developer
 
Posts: 20
Joined: Mon Feb 23, 2009 10:17 pm

Top

Postby jagtap.jj1 » Thu Jan 14, 2010 7:31 am

You need to add "MysleniAPravidla" project in workspace where of chess board project "HonzovySachy2009".
Both project are present in same tar ball.
java-android developer
User avatar
jagtap.jj1
Senior Developer
Senior Developer
 
Posts: 124
Joined: Fri Aug 22, 2008 11:52 am
Location: India(Mumbai)

Postby vunguyen » Thu Jan 14, 2010 7:45 am

Hi viju85

Another source Tictactoe 4 Android:

http://tictactoe4android.googlecode.com ... rce.tar.gz
KL&KL
vunguyen
Freshman
Freshman
 
Posts: 6
Joined: Sat Oct 10, 2009 10:42 am

Postby viju85 » Thu Jan 14, 2010 8:22 am

THanks for that tictactoe link. I have seen that before.
Regarding the checkers game, is there an alternative source other than the one posted by jagtap?
I am finding it difficult to understand that source as i guess it is not english. Even the method names. So it is kind of hard to map them to understanding.

Thanks,
Vj.
viju85
Junior Developer
Junior Developer
 
Posts: 20
Joined: Mon Feb 23, 2009 10:17 pm

Move bitmap within the board

Postby viju85 » Mon Jan 18, 2010 2:11 am

Hi,
I have managed to draw the checkers board and the pieces succesfully.
How do i move the bitmap using onTouch() ?
Anyone any suggestions?

Kindly help.
Thanks,
Vj
viju85
Junior Developer
Junior Developer
 
Posts: 20
Joined: Mon Feb 23, 2009 10:17 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Google [Bot] and 5 guests