Title
presenters
Android game
development
Milan Dinic
@milandinic
Idea
Idea
Wreck-it Ralph movie - Fix it Felix game
● Most of the graphics can be found online
● Some of the music can be found online
● No exact game play, but I could imagine
● Copyright by Disney
● Exists for IOS
About Wreck-it Ralph
Idea
The Great Giana Sisters - Commodore 64 version
About Giana Sisters
● Most of the graphics can be found online
● Some of the music can be found online
● Game play, remember most of it, YouTube videos
● Copyright by Rainbow Arts, developed by Time Warp
Productions
● Exists with all new look on Google Play
Giana Sisters on Google Play - Paid
Giana Byte (8-bit) - Free
Set Goals - Milestones
1. Minimal presentable/playable
2. Google store
3. More features with versions
Choose your framework
Choose your framework
● Free
● Multi-platform
● Opensource
● Familiar language
No framework at all
No framework at all
Project Anarchy
● http://www.projectanarchy.com
● Recommended by many
● C++
● Free
● Multi-platform
Project Anarchy
● http://www.projectanarchy.com
● Recommended by many
● C++
● Free
● Multi-platform
● No examples
● Complex setup
● Closed source
libgdx
● http://libgdx.badlogicgames.com/
● Found by accident
● Java
● Free
● Multi-platform
libgdx
● http://libgdx.badlogicgames.com/
● Found by accident
● Java
● Free
● Multi-platform
● Working examples
● One jar setup
● Source on GitHub
Development
● Tools: Eclipse/AndroidStudio, GIMP
● Stack: Gradle, Libgdx
● Libgdx: State Machines, Behaviors
Libgdx
One framework to rule them all
● Android
● iOS
● Desktop / Jar
● HTML5
Libgdx - Projects
Gradle generates projects for us:
Libgdx - API crash course
● com.badlogic.gdx.Game
● com.badlogic.gdx.Screen
● com.badlogic.gdx.math.Vector2
● com.badlogic.gdx.math.Rectangle
● Gdx.files.internal
Libgdx - API crash course
● com.badlogic.gdx.audio.Sound
● com.badlogic.gdx.audio.Music
Libgdx - API crash course
● com.badlogic.gdx.graphics.Texture
● com.badlogic.gdx.graphics.g2d.TextureRegion
● com.badlogic.gdx.graphics.g2d.Animation
Libgdx - API crash course
public interface Screen {
public void render (float delta);
…..........
}
Libgdx – Memory management
Most of resources are not managed by the Java garbage collector, but by native drivers
public interface Disposable {
/** Releases all resources of this object. */
public void dispose ();
}
Libgdx – Camera
com.badlogic.gdx.graphics.g2d.SpriteBatch
OrthographicCamera cam = new OrthographicCamera(20, 16);
batch.setProjectionMatrix(cam.combined);
batch.begin();
batch.draw(...);
batch.end();
cam.position
Gravity and physics
Gravity and physics
Don't reinvent the wheel - a lot of them online
Debugging
● On hardware: adb install -r gianabyte.apk
● On desktop
Sounds
Sounds - Sfx generator
http://www.bfxr.net/
Sprite
Giana Sisters Sprites
Sprite tools
● ImageMagick
● GIMP
imagemagick
sudo apt-get install imagemagick
convert input.gif -coalesce -repage 0x0 -crop 24X20+138+100
+repage output.gif
montage output.gif -tile x1 -geometry '1x1+0+0<' -alpha On
-background "rgba(0,0,0,0.0)" -quality 100 output2.png
imagemagick
sudo apt-get install imagemagick
convert input.gif -coalesce -repage 0x0 -crop 24X20+138+100
+repage output.gif
montage output.gif -tile x1 -geometry '1x1+0+0<' -alpha On
-background "rgba(0,0,0,0.0)" -quality 100 output2.png
imagemagick
sudo apt-get install imagemagick
convert input.gif -coalesce -repage 0x0 -crop 24X20+138+100
+repage output.gif
montage output.gif -tile x1 -geometry '1x1+0+0<' -alpha On
-background "rgba(0,0,0,0.0)" -quality 100 output2.png
GIMP tricks
•
Replace a color with another
•
Difference on images
Intro Level
Intro Level
Launcher Icon
Courtesy of GIMP
Launcher Icon
Launcher Icon
more at http://goo.gl/4umtAK
Use the Inkscape
Daniel Egan: Creating Your First 2D Game in GameMaker http://goo.gl/3u8KIS
Use the Inkscape
Use the Inkscape
Highscores
● Online – Parse.com / Firebase.com
● Local when no Internet is available – SharedPreference
Signing the application
1. Generate key (keytool -genkey -v -keystore giana-key.keystore -alias giana -keyalg RSA -keysize 2048
-validity 10000)
2. Compile your application in release mode
3. Sign (jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore giana-key.keystore android-release-unsigned.apk giana)
4. Verify signature (jarsigner -verify -verbose -certs android-release-unsigned.apk)
5. Align (zipalign -v 4 android-release-unsigned.apk gianabyte.apk)
more at:
http://developer.android.com/tools/publishing/app-signing.html
Testing
Testing
On device is a must!
● jUnit
● Exploratory
Numbers after one month
● 15 levels + intro
● 7 monsters
● 2 static dangers (water and spikes)
Totals downloads > 1.7K
Numbers after 6 months
● 31 levels + intro
● 12 monsters plus boss
● 2 static dangers (water and spikes)
Totals downloads > 12K
Calendar
Calendar
Marketing
● social networks
● adds
● reviews
Try it on Google Play
Can be found by name: ‘Giana Byte’ or ‘Giana’
Or by QR Code
Have fun :)
Q & A

Android game development