December 30, 2015

How to create your own Android 2D games from scratch

I had 2 years to research Android 2D Game Development by myself. My research may not follow any standard of Game Development in game industry but for me, it is good enough to create my own games. If you are beginner, this post will be helpful for you as I will let you know the direction to create games. Otherwise, I hope this will be a reference for you to create something new in your games.

In my research, individual game development has 4 phases:
  • Game play planning.
  • Sketch backgrounds, characters.
  • Animate your characters.
  • Coding.
Game play planing: For me, this is the most import part of Game Development. If your games have a good game play and addictive, you will have a million of gamer download and play. What I usually did is downloading vary of games on GooglePlay or AppStore and play them. Keep in mind that you need to both play and think of your games at the same time to create ideas. Note down all of your ideas to paper. Then create scripts for your games. In this part, no tools are required to note your ideas, you can use Excel or any management tools to keep track your ideas,

Sketch: After preparing the game play and scripts, you need to think of the images which will be displayed on screen, the images is also very importance. No one wants to play a game with bad images. I found a straightforward tool to sketch the images, it is Adobe Illustrator. It has many useful tools to help you create images easily.

Adobe Photoshop is another tool to help you paint the images. As Illustrator file is able to import to Photoshop, it will maintain all layers so that you can paint easily.

Animate: When you sketch your images, all images are static so they can not move or animate. If you want your games is more attractive, all characters and backgrounds should be animated. To do that, there are several tools support to do that. TexturePacker, ShoeBox help to pack images to a single images. In game, each frame will display a difference area and all them will be a sequence of images and create animation, Example:

Example for car burning animation sprite.
Fig 1: Example for car burning animation sprite.

But create a sequences of images take a lot of time to create the images. More movements the character has, more time you will take to create the images. Fortunately, there are some ways to improve this. In advance level, you can try to create the animation from bones of images. Example: I have a character, in this image I have 3 sub-images: head, body, leg. Each part will be attached with a bone. When you move the bones, the character will also move following the bone's direction. "Spine Animation" can do that. I will have a Runtime SDK to help you call the created animation.
Bones in Spine 2D Animation.
Fig 2: Bones in Spine 2D Animation.

Coding: This is the core of the game to control everything. Gamer can not see code so you can use any tool to develop but need to consider the package size, performance. You may also need to consider the architecture of game so that you can maintain or use the resource to other games. The common tools as I know so far is Cocos2d-x and Unity. Both of them have pros and cons. Cocos2d-x will create a game with smaller size and performance is good as it will work directly with OpenGL but it requires you to have C++ knowledge, code everything and set up environment is not easy. Unity will create games with larger size and in my opinion, the performance is not as good as Cocos2d-x. It has a little lag when the image moves. That is just my opinion when I tested the images moving between them. But Unity is very easy to set-up and major in 3D games.

That is all my experiences from my 2 years research. Of course, there are many other things need to mention but it is better if you can research and explorer by yourself. I will have a series of post to walk you through the tools I mentioned above shortly.

Yumiki.

No comments :

Post a Comment