Sie sind auf Seite 1von 6

International Journal of Machine Learning and Computing, Vol. 2, No.

5, October 2012

Developing 3D Game for Android OS: SNAFDROID

Nishant Panwar, Nainesh Vala, Kashyap Rajpal, and Hari Mohan Pandey, Member IACSIT

built from the ground up alongside the platform providing


AbstractWe are developing an ANDROID game developers with high productivity and deep insight into their
SNAFDROID with 3-D Graphics that will make the game applications.
playing more interesting. The SNAKE game is a well-known This first worldwide mobile network was introduced by
and a popular game, giving it a third dimension will make it
more intuitive and informative. Giving an option of various
the USA in 1946 and could only be used nationally at that
environments and train this game can become a legend and will time, mostly for military purposes. Not until the end of the
attract various users. Apart from Google Apps developers and 1950s was this technique replaced by the Analog network
vendors are predicted to be the major beneficiaries, since they (A-network). Then in 1973, Motorola presented a prototype
would make most out of the Android with its wider market of the world first cellular telephone. It was about one foot
structure backed by all the members of OHA, developing long, weight almost 2 pounds and cost $3995. This cell phone
different versions of Android, and driving the Androids apps
market to a new edge, defeating all the others. Thus, making a
which became commercially available in 1983 provided one
SNAKE game (SNAFDROID) with 3D graphics and that too for hour of talk time and could store 30 phone numbers. In only
an upcoming technology like ANDROID will definitely boost one year 300, 00 people, worldwide, were owners,
the Game playing world of ANDROID OS to a new level of considering price, this was remarkable market growth.
entertainment and fun.
TABLE I: HISTORY OF ANDROID
Index TermsAndroid, 2D graphics, blender etc. Year Description
2005 Google acquired Android, Inc., a small company that developed
software for mobile phones. Android, Inc. team started
working on a Linux-based OS for mobile devices.
I. INTRODUCTION 2006 Media and press was filled with news about Google entering the
The term Android has its origin in the Greek word andr-, mobile market
2007 November 2007, the Open Handset Alliance & mobile operators
meaning man or male and the suffix eides, used to mean started working together to develop handsets and services that
alike or of the species. This together means as much as leverage the new software.
being human. Android is a software platform and operating 2009 Sing Tel & HTC Corp. unveiled the first Android powered
mobile phone The HTC Dream.
system for mobile devices, based on the Linux operating
system and developed by Google and later the Open Handset
In the nutshell changes of the hardware related mostly to
Alliance [8] [9]. It allows developers to write managed code
improvement in weight, price and look. The operating system
in a Java-like language that utilizes Google developed Java
was improved by e.g. games, calendar applications, email
libraries, but does not support programs developed in native
and other functionalities to use the internet. This
code. Android is just an OS, it requires hardware to run on.
development underlines clearly what a cell phone needs
Android is hailed as the first complete, open, and free
today. It must be as small as possible, it has to be stylish
mobile platform. Android offers a full stack: an operating
and it has to cover a wide range of functions especially
system, middleware, and key mobile applications [8]. It also
internet connection which is used by many people in the
contains a rich set of APIs that allows third-party developers
world every day. Android has emerged as one such operating
to develop great applications. Google released most of the
system [9] which provide most of such demanded features.
Android code under the Apache License, a free software and
open source license.
Android does not differentiate between the phone's core
II. ARCHITECTURE AND FEATURES
applications and third-party applications. They can all be
built to have equal access to a phone's capabilities providing The Android platform is designed to be more fault-tolerant
users with a broad spectrum of applications and services. than many of its predecessors. The handset runs a Linux
With devices built on the Android Platform, users are able to operating system, upon which Android applications are
fully tailor the phone to their interests. Android breaks down executed in a secure fashion. Each Android application runs
the barriers to building new and innovative applications. in its own virtual machine. Android applications are managed
Android provides access to a wide range of useful libraries code; therefore, they are much less likely to cause the phone
and tools that can be used to build rich applications. In to crash, leading to fewer instances of device corruption.
addition, Android includes a full set of tools that have been Blender is a free 3D graphics application that can be used
for modeling, UV unwrapping, texturing, rigging, water and
smoke simulations, skinning, animating, rendering, particle
Manuscript received June 12, 2012; revised August 31, 2012. and other simulations, non-linear editing, compositing, and
Hari Mohan Pandey is with faculty Department of Computing of the
Middle East College, Muscat, Oman (e-mail:hari04top@yahoo.co.in) creating interactive 3D applications, including video games,
Nishant Panwar, Nainesh Vala, and Kashyap Rajpal are with Accenture animated film, or visual effects [1][2]. Blender's features
India (e-mail-nishant_panwar23@yahoo.com; naineshvala@gmail.com; include advanced simulation tools such as rigid, realistic
kashyaprajpal@yahoo.co.in)

10.7763/IJMLC.2012.V2.216 689
International Journal of Machine Learning and Computing, Vol. 2, No. 5, October 2012

body, fluid, cloth and soft body dynamics, modifier-based OBJ, FBX, DXF, COLLADA, task automation and
modeling tools, powerful character animation tools, a custom tools.
node-based material and compositing system and Python for f) Basic non-linear video/audio editing and compositing
embedded scripting [3]. Released as free software under the capabilities.
GNU General Public License, Blender is available for a
number of operating systems, including GNU/Linux [9], Mac
OS X, and Microsoft Windows [3] [4]. III. PROBLEM DEFINITION
In this paper authors have given the idea of develop a 3D
game for Android OS. The game which is being developed
covers the following things:
Provide an interactive and intuitive environment for
ANDROID users who are passionate about playing
games.
We are here to develop a 3D game for Android OS.
3D Game proposed is SNAKE GAME: SNAFDROID
The mobile screen will be 2D but the graphics used are
3D providing a more informative and interesting
environment

IV. PEREVIOUS WORKS


In 1982 the Finnish handset maker Nokia introduced its
first Mobile phone, Mobira Senator. This device looked
Fig. 1. Major components of the Android operating system
very much like a portable radio and weight 21 pounds. The
Through its open architecture, Blender provides first cell phone with PDA features was introduced in 1993 by
cross-platform interoperability, extensibility, an incredibly Bell South/IBM. It included phone and pager functionalities,
small footprint, and a tightly integrated workflow [10]. calculator and calendar applications as well as fax and e-mail
Blender is one of the most popular Open Source 3D graphics capability. The weight was about 18 pounds and it sold for
applications in the world. Aimed world-wide at media $900. Motorolas StarTac, in 1996, merged fashion and
professionals and artists, Blender can be used to create 3D functionality. Its weight was about 3.1 pounds which is
visualizations, stills as well as broadcast and cinema quality lighter than some of todays cell phones. Kyocera introduces
videos, while the incorporation of a real-time 3D engine its QCP6035 mobile phone in year 2000. It was the first
allows for the creation of 3D interactive content for widely available Palm OS based phone.
stand-alone playback. Originally developed by the company In 2002 the Danger Hip top, later known as the T-Mobile
Not a Number (NaN), Blender continues to be developed Sidekick, was introduced. It was one of the first mobile
as Free Software, with the source code available under the devices to include a Web browser, reliable e-mail access and
GNU GPL license. Development is now conducted under the instant messaging. With the RAZRv3 Motorola again came
leadership of the Blender Foundation in the Netherlands. back and started a trend towards ultra-thin, stylish phones. It
Blender has a relatively small installation size and runs on was the first mobile device which many people from high
several popular computing platforms, including LINUX, scholars to businessmen wanted to have, primarily, because
Mac OS X, and Microsoft Windows, along with FreeBSD, of its style and because it was fashionably. It is still one of the
IRIX, NetBSD, OpenBSD and Solaris [1][2][3]. Among its most popular mobile phones today. The last very impressing
capabilities are: innovation was presented by Apple with the release of the
iPhone in 2007, a beautifully designed cell phone that
a) Support for a variety of geometric primitives, including includes an innovative touch screen navigation interface.
polygon meshes, fast subdivision surface modeling,
Bezier curves, NURBS surfaces, metaballs, digital
sculpting, and outline fonts. V. APPROACH USED
b) Versatile internal rendering capabilities and integration
In this section we are presenting the track of implementing
with YafaRay, a Free Software ray tracer.
the system for the 3D game for Android.
c) Key framed animation tools including inverse kinematics,
armature (skeletal), hook, curve and lattice-based A. Algorithm Used and Implemented
deformations, shape keys (morphing), non-linear Algorithm 1: Implementation of SNAFDROID
animation, constraints, vertex weighting, soft body S1 Loading of game and checking of availability of
dynamics including mesh collision detection, LBM fluid resources.
dynamics, Bullet rigid body dynamics, particle-based hair, S2 Loading of game engine.
and a particle system with collision detection. S3 Display the menu.
d) Modifiers to apply non-destructive effects. S4 If selected option equals START GAME
e) Python scripts for tool creation and prototyping, game S5 Then display Menu for selection of environment
logic, importing and exporting from other formats such as S6 If selected option is OPTIONS

690
International Journal of Machine Learning and Computing, Vol. 2, No. 5, October 2012

S7 Then display Menu for changing controls/sounds shows relationship between actor and use cases.
etc.
C. Sequence Diagram
S8 If selected option is Exit
S9 Exit the game and free resources. Figure 3 shows the sequence diagram for the present work.
Sequence diagram is a kind of interaction diagram. It shows
After the initial loading of game and resources the game an interaction, consisting of a set of object or roles, including
engine is loaded. The game engine starts with a startup screen the messages that may be dispatched among them. It
which displays the logo and a moving snake. A menu is addresses the dynamic view of a system. It emphasizes the
displayed afterwards. The menu has various options like time ordering of messages.
START Game etc. If start game option is selected then a D. Class Diagram
menu is displayed which consists of option regarding
A class diagram shows a set of classes, interfaces and
selection of terrain in which the user wants to play. The
collaboration and their relationships. Figure 3 represents
commencement of game takes place henceforth. Selecting
class diagram. It consists of 5 packages, 8 classes and 3
EXIT button free all resources and exit the game.
interfaces. Here ScakeGameActivity is the main class that
B. Use-Case Diagram simulates and triggers various operations.
Figure 2 shows the use case diagram of our game. This
diagram consists of actor, use cases and interface. There is
one actor i.e. user. The ellipses represent use cases and lines

Fig. 2. Use-case diagram

691
International Journal of Machine Learning and Computing, Vol. 2, No. 5, October 2012

Fig.3. Sequence diagram

Fig. 4. Class diagram for SNAFDROID

of system requirements: minimum and recommended. With


VI. EXPERIMENTAL SETUP increasing demand for higher processing power and
To be used efficiently, all computer software needs certain resources in newer version of software, system requirements
hardware components or other software resources to be tend to increase over time. Industry analysts suggest that this
present on a computer. These pre-requisites are known as trend plays a bigger part in driving upgrades to existing
system requirements and are often used as a guideline as computer systems than technological advancements. The
opposed to an absolute rule. Most software defines two sets chief hardware and software requirement for the present

692
International Journal of Machine Learning and Computing, Vol. 2, No. 5, October 2012

work is shown in the Table II.

TABLE II: HARDWARE AND SOFTWARE REQUIREMENTS


Category Tools
1. Hardware requirements of the system on which
application is developed
a) Min 4 GB RAM
b) Min 1 GB space on HDD
c) Graphics Card
d) Min 512 MB
Hardware
e) NVIDIA/ATI
f) Processor Core 2 Duo with 2.2 GHz
2. Hardware Requirements of the system on which
application is intended to run
a) Mobile phone compatible with Android OS

1. Software required on which application is developed.


a) Android SDK (Ver. 2.2 and above, API Level 8 and above)
b) Java 1.5 and above
c) OS: Windows (XP/Vista/7) Fig. 6. Snake Head Rendered
Software d) Eclipse IDE
e) BLENDER-graphic design tool
2. Software on which application is intended to run

a) Android OS

A. Results
In this paper authors have given an Android game
SNAFDROID, consists of two modules: Graphics
Development module and Coding.
As far as this project is concerned we have completed the
software requirement and specification and we are
developing graphics for our 3D game. These graphics require
high system specifications. We are using blender, a graphics
development tool using which we have developed various
graphics that will be used in our game. The graphics require Fig. 7. Maze environment
exhaustive rendering power of the rendering engine being
used by the graphics development tool. Some of the
screenshots of the graphics developed for the present project
are shown in the figures 5, 6, 7, 8 below:

Fig. 8. Snow desert environment

VII. CONCLUSION AND FUTURE ENHANCEMENT


Android has come a long way since its inception three
years ago. It will surely impact the mobile market when the
Fig. 5. Snake head development in blender Android phones are released, but also provides an excellent
opportunity for developers to enter the mobile market. A

693
International Journal of Machine Learning and Computing, Vol. 2, No. 5, October 2012

great deal can be learned by both creating applications using Nainesh Vala was born in Bhavnagar, Gujarat, India on
December 19, 1989. He completed his schooling from
Android's unique Java API as well as attempting to port Mumbai in 2007. In 2011 he received his B. Tech. degree
Android to real hardware [10]. The classroom cans befit from in computer science from Mukesh Patel School of
Android, given the amount of resources available for Technology Management and Engineering (Shirpur
reference. Campus), NMIMS University, Mumbai, Maharashtra,
India.
The market trends toward the mobile market and future
developments can be greatly benefited by using Android to Kashyap Rajpal born in city of lakes, Udaipur (Raj.),
improve their algorithms and resource management. Since it India on April 1, 1990 completed his higher education
from Central Academy School, Udaipur. In 2011 he
is open source, there is no cost to learn. Android is a win-win received his B.Tech. degree in computer science from
situation for both the community and developers. Android Mukesh Patel School of Technology Management and
will be bigger in terms of pure numbers (reach) than the Engineering (Shirpur Campus), NMIMS University,
Mumbai, Maharashtra, India. Kashyaps major field of
iPhone OS. study is development of various JAVA applications and
new trends in mobile industry.
REFERENCES He is currently working as an Associate Software Engineer (ASE) at
Accenture Services Pvt. Ltd., Bangalore, India. He presented various papers
[1] D. Roland Hess, Animating with Blender: Creating Short Animations
and articles on topics like Aspect Oriented Programming (AOP) and Image
from Start to Finish 1st Ed. Focal Press, September 30, 2008.
processing. His previous researches include Aspect Oriented Programming,
[2] Jason Van Gumster, Blender for Dummies, 2nd ed. Wiley Publishing,
Image Processing, Robotics and his current researches include agile
Inc. 2009
methodology and payments in banking industry.
[3] James Chronister, Blender Basics 2nd Ed. January 24, 2008
[4] Aaron W. Powell, Blender 2.5 Lighting and Rendering, Packet
Prof. Hari Mohan Pandey B.Tech. (Computer
Publishing, Ingles, 252 paginas, Nov. 2010, ISBN: 1847199887.
Science & Engineering), M.Tech (Computer
[5] Tony Mullen, Introducing Character Animation with Blender, Sybex,
Engineering) was educated at U.P. Technical
Ingls, 512 pginas, Feb. 2007, ISBN: 0470102608
University, Lucknow and Narsee Monjee Institute of
[6] Open Handset Alliance, [Online]. Available:
Management Studies, Mumbai, India. Presently he is
http://www.openhandsetalliance.com/
working as a faculty in department of Computing at
[7] ANDEV, [Online]. Available: http://www.andev.org
Middle East College of Information Technology.
[8] Android, [Online]. Available: http://www.android.com
He is life time member of International Journal
[9] ELINUX, [Online]. Available: http://elinux.org/Android_on_OMAP
IJERIA (India), International Association of Computer Science Information
[10] Open Embedded, [Online]. Available:
Technology (Singapore), International Association of Engineers
http://wiki.openembedded.net/index.php
(IAENG, Hong Cong), and reviewer for Elsevier.
Prof. Pandey has written many books in the areas of Computer Science &
Engineering for McGrawHill, Pearson Education, and University Science
Press. Apart from writing books he has presented and published Research
Nishant Panwar was born in Dehradun, Uttarakhand,
Papers at National and International conferences and journals. He is
India on December 23, 1988. He completed his
associated with various International Journals as Reviewer/Editorial board
schooling from Dehradun in 2007. In 2011 he received
member. His research interests are in Artificial Intelligence, Machine
his B.Tech. degree in computer science from Mukesh
Learning, Evolutionary Computing, Natural Language Processing, Principle
Patel School of Technology Management and
of Programming Languages and others.
Engineering (Shirpur Campus), NMIMS University,
Mumbai, Maharashtra, India.

694

Das könnte Ihnen auch gefallen