You are on page 1of 16

Mobile Game

Development
Omar Rana
University of South Asia
Course Overview

Gaming platforms
Game Architecture
Android structure
Android application development
Android SQL development
Game Development
Graphics
Andengine
Memory Optimization
Case Study Game
Artificial Intelligence (time Constraint)


Gaming Platforms
Desktop Gaming
Mobile Gaming
Console Gaming

Game Concepts
Game loop
Game Engine (update and draw)
Sprites
Collision detection
Game resources :
Images sound and graphics



Game Loop
The game loop itself is a controlled infinite loop that makes your game keep
running
it's the place where all your little pieces will be updated and drawn on the
screen.
The game loop is the central code of your game, split into different parts.
Generally, these are:
initialize,
update
draw.
initialize phase
used to do any necessary game setup and prepare the environment for the
update and draw phases

Here you should create your main entities, prepare the menu, detect default
hardware capabilities, and so on.
Update phase
The main purpose of the update phase is to prepare all objects to be drawn,
so this is where all the
physics code,
coordinate updates,
health points changes,
char upgrades,
damage dealt e.t.c.
This is also where the input will be captured and processed.

draw phase
where all this information is put on the screen.
This function should contain all the code to manage and draw the following:
levels
layers
background
HUD and so on.
OverView
Entities Within the Game


Basic Game Architecture
Sprites
Sprites are 2D bitmaps that are drawn directly to a render target without
using the pipeline for transformations, lighting or effects.

Sprites are commonly used to display information such as health bars, number
of lives, or text such as scores.


Some games, especially older games, are composed entirely of sprites.
The User Input

The input is the touch-screen in our case
It can also be a physical keyboard if the phone has one, the microphone, the
camera, the accelerometers or even the GPS receiver if equipped.

your game engine monitors the onTouch event and at every touch we record
the coordinates.

If the coordinates are inside our defined control areas on the screen we will
instruct the game engine to take action
Game Logic

It is responsible for changing the states of the objects


Our hero, droids, terrain, bullets, laser beams , bombs e.t.c

For example we touch the upper half of the hero control area like in the
drawing and this translates to: calculate the movement speed of our guy
according to the position of our movement controller (our finger).
Audio

This module will produce sounds considering the current state

it has to decide which sounds to play.

Example
sound of our weapon
Sound of enemies appearing
E.t.c
Graphics

This is the module responsible for rendering the game state onto the display.

We measure the rendering in FPS which stands for frames per second. If we
have 30FPS that means that we display 30 images every second. For a mobile
device 30 FPS is great so we will aim for that.

higher the FPS the smoother the animation

You might also like