Ashwin
Ashwin

Reputation: 13517

What type of layout and the user interface would be best for a n*n puzzle game android?

1) I am developing an android application for a puzzle that will involve n*n matrix displayed to the user. There will be objects(images) in each of these cells. Whenever the user clicks on the any cell the object of that cell should exchange position with one of the valid nearby cells.
2) When the object exchanges position, the movement should be shown to the user - the image slowly moving from its original place to another place.

If the animation above is very difficult to implement, please leave it. But I would like to know the answer for the question 1). Which layout would be the best for such a puzzle, which will involve constant re positioning of the child elements(cells).

Upvotes: 0

Views: 357

Answers (3)

Ilya Demidov
Ilya Demidov

Reputation: 3305

If it's game - SurfaceView is your way. It's good idea, because you can draw from different threads and it's comfortable. If you want to create not simple game, use engine as example AndEngine. So you can use GLSurfaceView - openGL is very fast but it's not simple. And last way use simple view, but my opinion - it can be game like XO, barley-break and other not fast simple game.

upd:

If I create this game as in your case, I will use SurfaceView w/o any layouts. But I think you can do it with help standart view w/o surface. If your question about layout, I think its not matter. For example GridLayout. As minimum it sounds logical.

Good luck!

Upvotes: 2

Ruben Pierich
Ruben Pierich

Reputation: 9

I am working on a similar n*n matrix game and I am using the AndEngine game engine. It allows me to load images and then place them in an n*n grid.

Upvotes: 0

Ragunath Jawahar
Ragunath Jawahar

Reputation: 19723

You would have a greater control if you create a custom view using the View or the SurfaceView.

Upvotes: 1

Related Questions