3 March 2013

How to make simple game in Android part 4 - Design

Few honest informations.  
I have a few years experience in software developer BUT  I am NOT a game developer! I am NOT an expert. 
This guide was written by person who want write game as part of hobby and make dreams come to true (As i want to write simple RPG game in future).   
 I put best efforts to write  accuracy informations, but I cannot guarantee the perfect accuracy of all content in this  articles  on this blog.
I do not take any responsibility or liability for any error, omission , inaccuracy
or destructions!

How to make simple application and/or game in Android



Part 4

It is a time to design a game. It will be quite easy.

Main menu will have four options New Game, High Scores, About, Tutorial
1.     Tutorial will display plain text in pop-up and explain how to play all types of game. In general, best way to do tutorial is 'in game tutorial', where you teach user step by step how to do it all basic things. For simplicity, .I used a Pop up with Plain text in this game, which is ok'ish but you need remember that not too many people bother to boring tutorial, these days.
2.     About will display info about me (explain, who I am), game (quick info about game), Eula and thanks.
3.     High Scores will display pop up with info about best scores for each game type.
4.     New Game will display pop up with selection game type (Country of the world, Capital of the world, flags of the world)


A different person has a different way to design.
Some people do not do design at all. It is no problem, if you are experienced developer and you write a quick simple application, but for any other cases, you should design your application. It makes your implementation easier, quicker and reduce chance to re-write program from starch due major error or on requirement change. Requirements almost are always changed during development. Remember this Heraclitus quote: "Nothing is permanent except change".
There are many design styles depends on various factors like project's size, scale etc. However, some of you will think: “Wow, that's awesome Mr. Smart ass, but still I have No idea how to start. Help me, Mr. clever.”
If you have problem with design stage, then here are some tips:
1.     Understand requirements and split them into pieces that can be represent a task (For example: write/edit/read a file in format .LOL)
2.     Think about usability. About what? Usability is about, how to use Ur app from brainless user point of view. If you do not know anything about it, follow official android guidelines. Why? User will be familiar with patterns learnt during using OS.
3.     Design program flow as simple as possible and keep in mind that Ur app should be design for future update.
4.     Think spilt feature from your application into task (save file, convert from one format to other, save/load data to/from database etc.)
If you do simple app, then u don't need do all design but it's good habit to follow this as it saves you from ,mistakes tat cause total rewrite of code.  Believe me, it is worth to do it. One more time. Remember this Heraclitus quote: "Nothing is permanent except change".

How looks my design for this project:

My design was split into task. Each task represent piece of work (like feature) and it has own design. How I look my design process for this game? As you know from planning stage, I have done list of features. I want implement. I tried to establish how much I must do to achieve my aim for this challenge.
:-) (for example country list, trivia, settings, custom game)
this is a short list of task:
  •  game flow as mind map
  • GUI for menu,
  • GUI for menu items,
  • GUI for classic game flow level*n times->result,
  • about,
  • high scores,
  • tutorial,
  • level,
  • result,
  • country list file,
  • file loader and validation,
  • country of the world,
  • capitals of the world,
  • flags of the world,
  • saper mode.

My list was stored on Kanban board.
This is how example of task looks:

 I draw game flow (unfortunately i deleted)but I have not done class diagram.

For bigger and proper project is a good habit to do class diagram and user cases, but for small protects like this is not essential. Well. If u do project for somebody then is good to have user cases as it helps understand your client requirement.

I usually starts from UI for task as I like to see and test usability of my app.
then I do a core of app, so I can then do rest in any order (like test).

My design is split into two types:
General, where I planning and design fundaments of application
Task specific, where for each task, I follow iteration for:
 Research<->design<->implementation<->refactor and testing <-> done

that's give me flexibility to adapt to changes that ALWAYS happen during development.

That is all my design for this project.
I hope this part explains a little bit about design stage
Remember about kiss principle .depends on your project’s size and complexity.
I believe most important is to make sure that u happy with usability and direction in your design and it meets your requirements.
Be open to changes during development as they WILL OCCURED during development

in next parts (5 and 6) I will show most interesting snippet of my code. There are not an example a superb coding, but it will give you idea for one of possible solution...
Part 5: {writing in progress}.
Part 6: {writing in progress}.

(Part 5 and 6 are still work in progress ,however part 7  Testing  ,part 8. Add project to Google Play ,part  9. How to be rich from application.  and part 10. Summary   are  done and  there are in this blog.(Just click on links.

Feel free to left suggestions and comment. I am happy to answer and improve my tutorial