Apple IOS Game Development Engines

sandpaperleadΛογισμικό & κατασκευή λογ/κού

31 Οκτ 2013 (πριν από 3 χρόνια και 9 μήνες)

197 εμφανίσεις
























SWE578 2012S



1



Abstract

iOS(formerly called iPhone OS) is Apple's
mobile operating system that is used on the company's mobile
device series such as iPhone, iPod Touch and iPad which
have become quite popular since the first iPhone launched.
There are more than 100,000

of the titles in the App Store are
games. Many of the games in the store are
2D&
3D games and
it can be said that in order to develop a complicated 3D
graphical game, using games engines is inevitable.

I.

I
NTRODUCTION

With its unique features such as multito
uch screen and
accelerometer and graphics capabilities iOS devices has
become one of the most

distinctive mobile game
platforms
.
More than
10
0,000 of the titles in the App Store
are games. With the low development cost and ease of
publishing all make very
strange but new development
opportunity for developers
.
[2]
Game production is a quite
demanding task including not only development but also
level design, modeling, animation, sound and music
production.

Game development is regarded as development
of a soft
ware system called a “game engine” or “game
middleware”.

The process of game development is
frequently economized by mostly reusing the same engine
for more than one games

[3]. A Game engines anatomy
consist of components such as
a rendering engine for 2d
or
3d

graphics,

a physics engine, a collision detection system,
a sound engine
,
an animation system (interpolator and/or
sprite based)

etc.

A game engine also overcome some complicated issues
such as
artificial intelli
gence, networking, resource
management
,
memory management,

threading,
localization


A.

Research Contributions

Without a game engine it can be said developing a
complicated game is impossible, Thus,
i
n this
paper

game
engines

for iOS
platform
will be discussed
. There are also
free and commercial o
nes in order to develop games. We
will take glance most popular and talented ones.

B.

Outline

Thi
s paper is organized as follows.
In section II
general
game engines’ architecture will be discussed and i
n section
III
open
-
source
2D and
3D game engines and i
n
section IV
commercial engines will be discussed.

In the last






This work was supported in part by the Software Engineering
Department of Bogazici University.


Baran Ipek is with the Software Engineering Department, Bogazici
University, Istanbul (e
-
mail: ilker.temuzksu@boun.edu.tr).



section we make comparison and draw our
conclusion.

II.

G
AME ENGINE ANATOMY

A common misconception is that a game engine only
draws the graphics that we see on the screen. This is of
course wrong, for a game engine is a collection of
interacting software that together makes a single unit that
runs an actual gam
e. The drawing process is
one of
the
subsystems that could be labeled

as the rendering
engine[3].

Game engines provide a visual development tools in
addition to software components. These tools are provided
in an integrated development environment in orde
r to
create games rapidly. Game developers attempt to

"pre
-
invent the wheel” elements while creating games
such as
graphics, sound, physics and AI functions.

That is why
games engines are called “middleware”. In the perspective
of business sense
they prov
ide a flexible and reusable
software platform, which provides all the core functional
ity
needed and also reduce costs, risks and time to market
[13].

Figure 2

shows the structure of a game engine that
works for most games. By knowing all of the parts of a
game engine and how they work together, we can design
the whole game at the start, and build our application the
“Right Way”. The framework consists of code necessary to
get an application started, including creating an instance of
the application and init
ializing the rest of the subsystems.

Our code
manages f
ramework class w
hen our application
starts and is responsible
of creating and destroying the
state

machine, graphics engine
and

audio engine
.

The Game State Manager is a state machine that keeps
track
of the current game state. When the game starts, the
state machine creates the basic state information. It saves
all information required by each state and to destroy
temporary information when the application leaves a state.
The graphics engine is
respons
ible

for visual output and
includes drawing graphical user interface (GUI) objects for
the
user

to interact with, animating 2D or 3D models, and
rendering backgrounds and special effects.


Apple IOS Game Development Engines

P
l
a
t























SWE578 2012S



2



Figure 2.
Functional structure of a game engine





We will
use
Torque Game Engine
[2] as a reference
throughout all the paper while discussing game engine
architecture. A
t this abstract level, the idea of object
orientation is applied to a game engine. The parts that
build an engine are often referred to as subsyst
ems and
each one has its own responsibility.


The main subsystems are:

• Audio

• Input

• Physics

• Renderer

• Arti
ficial

intelligence
(AI)

• Core

• Scripting

• Networking


We will dig deeper into these subsystems, how they
work, can be implemented.


A.

Ph
ysics

Regardles
s what for a developer
use a physics engine

but
they
have to handle any or both of the di
ff
erent kinds of
body physics, rigid or soft.

Rigid body physics are the
easiest to calculate because you do not have to take
deformation into account
,b
ut on the contrary advance
games use soft body physics.

Physics calculations can be very heavy and thus slowing
the game down. You can not simulate perfectly the real
world so you have to use
a simpli
fi
ed version of the real
world physics in order to lower

the computing power
needed
.[3]


B.

Artificial Intelligence

Artificial Intelligence is not the same kind of subsystem
as physics or graphics in the sense that you cannot reuse
most of the code from game to game. It is game specific
and this is why an Artifici
al Intelligence engine is often
built from many smaller units,
that

contain algorithms for
solving certain problems, like path
find
ing.
Then you can
specify be
havior for your objects by combining these units.



C.

Audio

This subsystem of game engine’s
respo
nsibility is to
abstract the sound card hardware that exist in the computer
or game console, to allow other parts of the engine to
create and play sounds without having to worry about the
sound hardware.



D.

Renderer

The graphics renderer handles everything th
at is
displayed on the screen, be it displaying text fonts, bitmap
graphics, or e
ff
ects such as transparency.

Many
graphics
renderer uses OpenGL for its hardware abstraction, along
with a Direct3D wrapper for its OpenGL calls, so that the
user can choose w
hich API the software should use, when
the user is running in Windows.
[3]



E.

Input

The input subsystem deals with how the system reacts
when the user presses keys on the keyboard, or uses the
mouse.

Like other subsystems it
encapsulates the specific
input har
dware calls in separate classes that other systems
cannot interact with directly.


F.

Scripting

The soft architecture is the design of the game, and
everything that makes the game unique.

T
his is the part
that you can be involved in
to do everything you want,
but
unlike the hard architecture, you are on your own with
your

scripts
.

It can be said that s
cripting
is

programming in the

soft
architecture, while develop
ing into your engine's source
code is programming in the hard architecture.

For instance
Torque Scr
ipt

is the scripting language of
Torque Game
Engine

that is c
ompletely untyped, which means that a
variable can hold an integer in one part of the script, and a
few lines later hold a string
.[3]

























SWE578 2012S



3





III.

OPEN SOURCE GAME ENG
INES


There are several open source game engines you may
choose and in this section we will discuss some of them are
used from many applications and these are

available in the
app store
.


A.

ISGL 3D ENGINE


iSGL3D (iOS Scene Graph Library) is a 3D framework
for the
IOS platform that is

written in Objective
-
C,
enabling the creativity of developers to flourish in a 3D
world without
dealing with the
OpenGL
’s complexities
.

It
is an open source project (you can make donation) and is
under the MIT license
.

On the
commercial
web site [5] you can find class
references, tutorials, user discussion group. Isapper and
Project MOS are also available in the app store are
developed by using this framework. This is maybe for
beginners and for not much complicated games. Becaus
e
the documentation for all features is not sufficient and
there are not much discussion entries ,information sharing
in the user discussion group. But you
can
also
drag into
your project and manipulate, or you can install the pre
-
packaged template they pr
ovide.

Regardless it has some poor documentation and user
support, it is worth to download and try to develop games.
It supports almost every function for 3D world and it has
rich of set of features allow developers to create stunning
applications.



B.

SIO2
ENGINE


SIO2 is a cross platform that uses OpenGLES 2D/3D
Game Engine for the of mobile devices such as iPhone 4G,
iPad, iPod Touch and also provide emulation of iDevice(s)
on Microsoft Windows and programming support via
XCode and Visual C++[6]. Actually

we can say that the
SIO2 is also a universal OpenGL ES mobile game
development platform designed for light commercial and
small consumer use. It is more specifically

designed to
single developers, or small teams of, developers who wish
to sell mobile ap
plications.

SIO2 allows you coding in C and C++ in order to
complete manipulation and scripting options for advanced
game developers. It also offers full platform support for the
features such as graphics, scene management, scripting,
animation, physics

engine
,
audio and video, lighting and
shadow.

With the combination using free, open
-
source
Blender
software [
8] and the SI02 game engine it is easier
to
create very cool 3D characters and games
.

The SIO2 APIs are built in C/C++ for maximum speed
and flexibility,

and for those who are good at low level
programming, the SIO2 API are also available via a LUA
scripting interface.

The SIO2 SDK is available on the official site for
Download after a simple
registration;

you will
gain access
to everything yo
u need to start creating 3D game for your
mobile device. Generally it can be said that it is worth to
download and use this engine in order to create games.
You have pay also
$49
for one
-
game certification.



C.

GALAXY
ENGINE


Galaxy Engine is a game development package for
Macintosh, iPhone, and iPad. It is built in Cocoa and uses
the OpenGL, OpenGL ES, and OpenAL libraries that
allow you use the iPhone SDK fe
atures such as Game
Center. Galaxy Engine is designed with


developers in
order to be as flexible as possible [9].

It has extensive documentation allows you to quickly
understand how classes are implemented and how you can
use them.
It has powerful editors

likea a level editor,
terrain editor, and shader IDE and also includes great
features such as vertex animation, advanced lighting [9].

Galaxy Engine is a all in one game development
package for
Macintosh
, iPhone, and iPad. It is
programmed in Cocoa and us
es both OpenGL and


OpenGL ES, and also OpenAL libraries to give developers
a powerful core with direct access to iPhone SDK features
such as Game Center. It


is one of the


Open Source game
engines to include critical tools for game development such
as: L
evel Editor,

Particle Editor, and Shader IDE. It also
provides features like: vertex animation, advanced lighting,
vertex and
, normal

mapping, parallax mapping, and
massive outdoor environments.

.



























SWE578 2012S



4

D.

OOLONG ENGINE


This engine is

written in c++ also
with some help from
Objective
-
C

and provides excellent

performance. It is
difficult to use this engine for the developers are not
familiar with OpenGL ES. It uses MIT license and
provides
a wide variety of
features such as
touch screen and

accelerometer support,

bullet sdk,

audio engine etc.

Regardless is ver
y little documentation for the engine,

the community is active, and you can
find

answers of your
questions there.

It is a low
-
level designed and it is
recommended for the developers are

looking to create their
own game engine looking for something to start

with

[10].
There are some games also created with Oolong in the
store such as San Angeles, Blend Parse.



E.

IRRLICHT ENGINE


As many e
ngines it is written in c++ too and uses
Zlib
license
[11]. It is
cross
-
platform, using 3D, OpenGL and its
own software ren
derer and also it supports .NET languages
besides c++.

Irrlicht is a great
open source engine that support
s for a

wide variety of file formats, and has the best support for the

“classic”

BSP

format that
it is seen

in an open source game
engine.


There are

also
many

other tools that have been
designed

for th
e engine[12].


F.

COCO2D ENGINE


This engine is the most widely
-
used in the IOS world. It
has a powerful list including OPENGL

ES
-
based graphics
scene management
such as waves, ripples
, etc
.
It has
S
ound sup
port and also supports for 3D graphics.


Coco2D is open source and easy to extend, easy to
integrate with 3rd party libraries. It is used by more than
2500

AppStore games, and also including many best seller
games

[15]
.
The
community

gives

a strong active
support
,
so if
developers

have any questions about the engine, be
sure to always find an answer.


Cocos2D is a free to use iPhone game engine with no
strings attached. You can make donation to the cause if
you

like, but you don't have to.

Cocos2D has an extensive
community on forums and on fan sites dedicated to
Cocos2D tutorials. There is definitely no shortage of help
when it comes to Cocos2D.
Many of the top apps, paid and
free, have been programmed using

Cocos2D. You can link
your app to their showcase directly from your iTunes link
once your app has been approved and ready for sale.


Cocos2D uses two different types of physics engines.
Box2D and Chipmunk. Box2D is more preferred, because
it's a little ea
sier to understand. There is widespread
documentation


and that developers have no problem

figuring out perplexing coding problems.

Cocos2D itself is
free to use with a very liberal MIT license
.

Th
e

engine

has
both

pr
os
and
cons, the first one
it is
free, excellent community support and has a great track
record. Many games in the top 100 were created with
Cocos2D. Only cons is, coding is intensive in Cocos2D

[16].


IV.

COMMERCIAL

GAME ENGINES

There are many commercial game engines you may find
and in this section we will discuss some of them are used
from many applications and these are

available in the app
store
.



G. UNITY ENGINE


Even Unity was originally developed to create web
-
based
3D
games, it

has announced that their 3D game
development too
l Unity is coming to the iPhone in 2005.
Unity is a powerful game development engine that works
on Mac OS X and Windows, and can be used to make
games for those platforms as well as for the Web, the
iPhone . It combines powerful graphical capabilities,
han
dles shading and lighting, physics modeling, audio and
video effects, supports scripting, and asset management
together successfully. If price isn’t a concern, this engine
you should think about. It costs
$399 for entry point. The
Unity Pro is $1500 and to

add the Pro iOS version is
another $1500. $3000 is a bit much for a starting engine.

Over one thousand Unity games for iPhone, iPod Touch,
and iPad are published and live on the App Store and this
is acceptable payment in order to try it. It is further a

3D
game development tool than a ordinary 3D engine.

The main

language

for Unity is JavaScript. In order to
code in the Xcode native Objective C, a plug
-
in must be
used. There is one side that can be a bit complicated. Unity
does have an extensive support

system in place with plenty
of tutorials and 3rd party support as well.



The 1.5 release says that a


up to 3x faster than before. It
also provides full support for native Objective C and C++
code, which Unity claims provides full access to the iPhone
AP
Is and custom plug
-
ins [15].
Unity provides you to apply
to download the iPhone edition of it, but rather offers a
direct download to a 30 days trial for iphone users
.


There are widespread collection of Unity iPhone
resources including tutorials, sample pr
ojects .The
community people have really done a great job putting all
this together.

Those are the most helpful resources are
found for dealing with the Unity iPhone game engine, it
can be said that the documentation/examples are extensive

on the Unity 3D s
ite so it can be started with those, but it
can be great to find other perspectives.




























SWE578 2012S



5

H. CORONA SDK


Corona SDK is the number one commercial mobile
game development engine. Developers use this engine
more than any other for iOS and Android
development.

Th
e scripting language for Corona SDK is
LUA. LUA is a very easy to understand language that is
recommended for beginners of object oriented
programming to learn with. A lot of World of Warcraft
mods are created with LUA.

The game Bubble Ball™,

that knocke
d out Angry Birds
from the top free apps, was developed by a 12 year old that
used Corona by checking out a book about LUA at the local
library.

This SDK is free for using indefinitely to learn. In
order to upload your app to iTunes Connect, yearly
subscrip
tion fee must be paid. The fee is not too expensive.
It's $199 a year for iOS only. Beside this other thing about
Corona SDK is that it doesn't use the Xcode environment
to code. You have to use a text editor to code with LUA.
TextWrangler maybe an option
for it.

There are
pro
n
s

and
cons

as every engine. LUA is very
easy to deal with, the iPhone simulator will instantly
update with every save of the file, there are plenty of free
templates as well as extras when you subscribe.

For starter
user the price is


not a bad price, but it does cost money to
upload to the App Store. Also it doesn't use
Xcode

as it's
coding environment, only for finalizing and uploading to
iTunes Connect.





I
. iTORQUE2D ENGINE


This engine is created by GarageGames which is very
p
opular in games industry.

This engines is mostly for 2D
games and 3D iPhone engine is still in beta.iOS SDK,
specifically the UIKit, supports a lot of useful interface
options. Developers can create an entire game interface just
using iTorque 2D's sprite or

GUI system, but you will
always have access to UIKit framework if it is needed.

iTorque 2D


also includes the full source to integrate any
other commercial middleware and customized expansions
also provides the many features and a similar tool chain.

iTor
que2D

uses the same tools as the Torque Game
Builder in creating your game.

Developers pay $99 and no
longer need to purchase Torque2D for desktop in addition
to this.

What makes iTorque unique is that developers get
full source code so they have the potent
ial to extend and
update at will.

It's Game Builder is one of the


easiest for using 2d
game creator. Garage Games has


created a branch of the
Torque 2D game builder which is called iTorque2D. It has
a WYSIWYG interface which allows users to drag and
dro
p elements onto the interface and add functionality to
each object through a simple for using interface.




J
. BORK3D ENGINE


The Bork3D


is a C++ game engine developed by Bork
3D LLC for using on mobile device platforms, primarily
targeting iPhone and i
Pad. The engine has a modest user
interface, and several iOS games have announced their use
of it, most especially from Bioroid Studios, Simiula, and
Bork 3D itself. SDK of the engine runs on iOS, Mac OS X
and Windows. Developers pay $49 per year [18].
So
me
features of engine is listed below;




Component
-
oriented game object system



High
-
performance static and boned mesh
rendering system w/ tool pipeline for 3dsmax and
Maya



Decorator system for rendering billboa
rds



Texture manager w/ tool pipeline



Runtime "tweaker" for changing game variables
via a web browser



User interface widgets w/ abstractions for
handling iPhone user input



Font renderer w/ tool pipeline for generating fonts
(supports unicode)



In
-
game profil
er



Audio system for sound effects and background
music



Integration with the Bullet Physics SDK



Unit test framework





V.

CONCLUSION


Although each game engine has pros and cons,we can
draw conclusion as a result of our research. The Sparrow
Framework makes
an excellent choice for


developing a 2D
iPhone game.

Cocos2D is the most popular engine, and
has the most support but is less intuitive. Developers will
learn Objective
-
C while using the engine, and the engine
has been proven in a wide variety of games.


In 3D categories,Unity 3D is the most popular
commercial iPhone game engine, and has been used in
many games.First of


iPhone version had some
performance complaints, but it appears as though those
issues were resolved. Unity allows developers to use a g
reat
3D editor with many scripts available and there is
significant

community support available. Another
great

feature recently added to unity is that it allows them to use
their Objective
-
C code, and it is the only one of these
engines that appears to do,
it means


developers

can utilize
libraries of your choosing within the iPhone
SDK
. Unity 3d
for iPhone costs a minimum of $399 if a developers already























SWE578 2012S



6

own a copy of Unity Basic otherwise they will need to
spend $199 to $399 for Unity Basic and the iPhone license
.



R
EFERENCES


1:Apple Inc.,Apple ReportsThird Quarter Results,http://

www.apple.c
om/pr/library/2010/07/20results.html, 2010,


[2
] GarageGames,

Torque

Game

Engine,

version

1.5.
http://www.garagegames.com/products/torque/tge/, 2007




3:
Game Engine Architecture

Björn Nilson

Martin Söderberg


2007
-
05
-
26


[4
]
Available from Internet

http://maniacdev.com/2009/08/the
-
open
-
source
-
iphone
-
game
-
engine
-
comparison/


[5
]
Available from Internet

http://isgl3d.com/



[6
]
A
vailable from Internet

http://sio2interactive.com/


[7
]
Available from Internet

http://www.thetechlabs.com/tech
-
news/sio2
-
engine/


[8
]
Avail
able from Internet

http://www.blender.org/


[9
]
Available from Internet

http://code.google.com/p/galaxyengine/



[10
]
Available from Internet


http://code.google.com/p/oolongengine/

[11
]
Available from Internet


http://www.zlib.net/

[12
]
Available from Internet


http://ir
rlicht.sourceforge.net/


[13
]
Available from Internet


http://en.wikipedia.org/wiki/Game_engine


[14
]
iPhone Game Development



Paul Zirkle and Joe Hogue



[15
]
Available from Internet


http://ww
w.cocos2d
-
iphone.org/about


[15]

Available from Internet

http://www.macworld.com/article/1142431/unity.html


[16]

Available from Internet

http://www.infobarrel.com/My_Top_3_iPhone_Game_Dev
elopment_Engines


[17]
Available from Internet


http://www.iphone4developers.com/bork3d
-
development.html



[18]
Available from Internet


http://en.wikipedia.org/wiki/Bork3D_Game_Engine