Introduction to android (and mobile) game development

Post on 15-May-2015

763 views 7 download

Tags:

description

1-st lecture in my new course about mobile game development

transcript

Introduction to

novikov.ruslan@gmail.com

07: first PC 14: first Pascal game 25: developed 2D game engine 26: J2ME developer

28: Android developer

MediaPlayer Good only for background music

SoundPool OK for sound effects, no sound processing provided though

AudioTrack / AudioRecord Sound processing can be made, works on PCM data OpenMAX|AL API accessible from NDK

OpenSL Enable low level audio tweaking, accessible only from NDK

Challenge You really need to know your way around all these API to

provide great sound in your game

Framework already gives you: Rich widget toolkit Simple () event processing Powerful animation framework Reuse familiar technology

SurfaceView + Canvas: Fast drawing Rich API:

▪ Geometric Primitives ▪ Transformations ▪ Xfer Modes + Shaders

3D pipeline Allows 2D graphics too

Fastest possible solution Usually HW accelerated

The most rich visual effects Having fully programmable shaders is limited only by your

imagination Cross platform

When writing in C++ the code can be ported On Android

Every device supports OpenGL|ES 2 Full OpenGL|ES 2 JNI bindings since 2.3

Much more complex API and development that Canvas

Faster prototyping / development

No need to re-compile

Easier for non-programmers to use

Designers can script AI, conversation flows e.t.c

Separate game logic from the engine Lua is widely popular in the field Scripting Layer for Android (SL4A)

Python, Perl, Ruby, Lua

BeanShell, JavaScript, Tcl

Basic physics is simple Everyone can do classical mechanics

Collision Detection is hard Due to rounding errors of decimal numbers

Box2D – standard for 2D physics Cross-platform (C++) Rigid-body simulation Convex polygons, circles, edges Joints, forces Friction, restitution Has JNI bindings

Input devices Touch screen + sensor controls perfect for certain new genres,

but not for classic arcade experience Battery

Can be as low as 3hrs of playing Memory

Xbox One (8 GB of RAM) vs. Nexus 5 (2 GB of RAM) Much lower throughput

GPU No dedicated texture memory, usually much slower

performance due to lower memory throughput Limited Storage capacity and APK sizes

Just couple of GB of storage and 50MB APK limit (4GB with expansion files)

Graphics Physics Engine Particle Systems Sound Scripting Animation Artificial Intelligence Networking Platform Abstraction

Cross-Platform Windows, Linux, Mac, Android, BlackBerry, iOS, Java Applet,

Javascript/WebGL OpenGL ES 2.0 powered graphics High-level 2D APIs

Orthographic camera, sprite batching, texture atlases, bitmap fonts 2D Particle system 2D UI library High-Level 3D APIs

Input Handling Abstractions for mouse and touch-screen, keyboard,

accelerometer and compass Physics

JNI wrapper for Box2D, JNI Wrapper for bullet physics Lots of helper libraries

File & I/O handling Open source, and totally free!!!

Corona client and simulator is available for Mac OSX or Windows

Corona SDK Starter is completely free Corona client requires an Internet connection to build

because part of the build process happens on Corona Labs servers

Due to Apple restrictions you can only build an iOS app on a Mac

OpenGL powered 2D graphics Wrapped OpenAL audio API Box2D powered physics Particle effects Lua scripting Lots of plug-ins for monetization, ads e.t.c Not entirely free!

Crossplatform 3D and 2D engine You can choose 3D vs 2D development mode

Rendering Direct3D on windows OpenGL on all the rest

Scripting C#, JavaScript or Boo (?) Shipped with MonoDevelop

Physics Proprietary 3D physic engine Box2D for… 2D games

Powerful animation framework Mecanim IK animation

… tons of other features go to: http://unity3d.com/

Imports all the major 3D formats Automatic sprite splicing Fast asset search and management

Did not find any good on mobile game development, but there are lots of them…

Thank You