Mock tests, Interview questions, Tutorials and Tech news
 
 

Archive

Posts Tagged ‘game’

How to develop games on Android

February 14th, 2011 androidGuru 2 comments

One of the biggest markets in smart phones is games.  I am sure most of us would have played around with “Angry Birds” .  In this games tutorial you will learn different methods of developing  “Android Games”

At the end of the post is the video on how the code below works and the zip of all the source files used in this example.

Android Games can be developed in 3 ways

1)   Developing games using Android/Java libraries

2)   Developing games using External Libraries like OpenGL

3)   Developing games by porting existing c-game (pc game) to android.

Before getting started I assume that the reader is familiar with the basics of android programming like using activity, creating views, handling motion/touch events etc.

Also, apart from android sdk and eclipse some other tools are required for the game development. Details of the tools required, how to configure and use them will be explained as and when required. I will recommend to check out our last posts

Before starting with the game development lets understand the term “Main Loop”.

Main Loop:

Not just android any game written on any language consists of a set of custom views which are constantly refreshed/re-painted/re-drawn.  In some games we need to update the screen or re-draw the view elements at regular intervals.

E.g. consider two games (i) Android Snake Game (ii) Android Number Game for kids as shown.

In android snake game the snake has to move irrespective of the user input. Here the screen has to regularly re-drawn/re-painted to create the motion effect of the snake. Where as in the Number  game we need not redraw the screen now and then. The screen must be updated/re-drawn only when the user clicks/touches the screen.

So in the snake game we must re-draw the screen at regular intervals say 1sec in order to do that we make use of threads, while loops etc. and create a refresh/re-draw handler that updates screen regularly. This refresh/re-draw loop created is called “Main Loop”. Read more…

Categories: Programming / tutorials Tags: ,

A Game Design/Game Creation Short

January 18th, 2010 smitha 2 comments

Have you ever played a game that you have been so immersed with ? You probably were too addicted that you skipped meals trying to finish a goal or a mission.Have you ever wondered how games as simple as Bejeweled, or as huge as World of Warcraft captivated the hearts and mind of both the young and the old? Well, blame it to game design.These 2 games are very well-designed that once you start playing it, it’s hard to let go.

So how can you say that a game is well-designed. There is at least 3 prerequisites(properties) to well-designed games ,namely:

a) Planned- well-thought-of; plans are usually drafted a number of times before finalization

b) Functional- it works the way it should be ; it should achieve its purpose

c) Tested -ensure everything is going according to plans before implementation Read more…

Get Adobe Flash playerPlugin by wpburn.com wordpress themes