Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

So I'm a beginner in developing android gaame. I already developed a game, it's intended for kids. Basically, the game has 4 stages. In each stage, it has 15 questions. If the user chooses the correct answer, he will proceed to the next question, otherwise, will be given 3 trials to choose the correct answer/object.

Below is the structure of my game:

Home
Menu
    >>> Stage 1 | Stage 2 | Stage 3 | Stage 4

Stage 1_1.class 
Stage 1_2.class 
....

Stage 2_1.class 
Stage 2_2.class 
....

Stage 3_1.class 
Stage 3_2.class 
....

Stage 4_1.class 
Stage 4_1.class 

I know it's very noob, that's why I ask for your help to translate this to a more consistent, and efficient game or just give me an idea. I want to put each stage's main loop only in ONE ACTIVITY. Help is truly appreciated. Thanks.

share|improve this question
1  
Is there some problem in particular you're having trouble with using the existing design? It's hard to suggest improvements if we don't know what's wrong and how you want things to work. Right now your question is pretty broad. –  Byte56 Jul 10 '13 at 16:37
    
@Byte56 basically, I want to put all the game loop in just one activity in each stage. –  neknek Jul 10 '13 at 16:42
    
From my limited experience with Android, I believe what you're looking for is using an Activity for each level? Something like: gamedev.stackexchange.com/questions/26822/… –  Byte56 Jul 10 '13 at 16:49
    
Thanks for the link but the answers there suggest to switch between activities, what I want to do is just use on Activity for each stage but changing the views for each questions. –  neknek Jul 10 '13 at 17:00
add comment

1 Answer

I don't know if this is what you need, but you should write just one general class Stage and all of your questions are defined in some XML. When your game starts, it will create for example array of stages, which it will go through. And in each stage you can have loop which will just increment question number.

share|improve this answer
    
Exactly! This is what I want, can you give me a snippet of codes to get me started? I badly need to get it working :( –  neknek Jul 10 '13 at 17:02
    
Sorry. But I'm not java/android developer :( –  zacharmarz Jul 10 '13 at 19:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.