Steve
Steve

Reputation: 2148

Drawing a gameboard like checkers in Android

I want to design a gameboard such as Checkers (but with the possibility of having different board tiles.

Now, OO logic and reason tell me I should have a 'tile' class which I can draw, and I draw x by y number of these on one canvas.

My question is what is the best performant way to draw such a board? Is it reasonable to do it the way I mentioned above and re-draw on changes? Is it better to have an image as my background and 'simulate' a board by snapping to where the tile would be?

Thanks!

Upvotes: 4

Views: 679

Answers (1)

Biff MaGriff
Biff MaGriff

Reputation: 8241

I think you might benefit from checking out the snake game code for android. It has a very straight forward way of using tiles to make a game area.

Upvotes: 3

Related Questions