how to build “fluffy sheep” android game
DESCRIPTION
The mobile gaming industry is going to be one of the biggest industries and is planned to reach more than $100 billion by 2017 and this is a good reason to get into the gaming industry… ”Flappy Bird” showed us that even a simple game can make it big. In my lecture i will walk-though and show you how simple it is to build the “Fluffy Sheep” Android game from scratch, using only trivial native Android elements. Besides going over the code and explaining about building games in Android i will give interesting facts on Android gaming, gaming market and what it takes to make money out of it.TRANSCRIPT
“Fluffy Sheep” By Lior Bruder - 11Sheep CEO
About me
Speaker at event and lecturer in technical courses
11Sheep CEO
Advise to high-tech companies and startups
Android developer since the first version
Technology geek & love sheep
First computer
Objectives
1. Create Android game only with native basic Android features
2. Get quick tips about building graphic elements in Android
3. Get quick tips about gaming in mobile and in general
AGENDA
1 2 3 4 5 6 Choosing the right platform
Game Life Cycle
Supporting All screen sizes
Collision Detection
Moving Elements
The Sheep
AGENDA
1 2 3 4 5 6 Choosing the right platform
Game Life Cycle
Supporting All screen sizes
Collision Detection
Moving Elements
The Sheep
Step 1 - Choosing the right platform
Android Specific (Java) Cross Platform
Flash Corona Unity …
Step 1 - Choosing the right platform
Android Specific (Java) Cross Platform
Native And Engine Etc…
Step 1 – Creating the project basics
• Creating the main game component (View) • Creating the main activity
Code
Why make game?
• 80% of $ generated by mobile is from games • The top 25 developers take half of it • 75% of all mobile downloads are games • The mobile gaming industry is expected to
double by 2016
AGENDA
1 2 3 4 5 6 Choosing the right platform
Game Life Cycle
Supporting All screen sizes
Collision Detection
Moving Elements
The Sheep
Step 2 - Game lifecycle
Handling Input
Handling Logic
Writing to screen
Preparing game
One cycle
11
Step 2 – Creating the life cycle
• In the GameView component: – Create the logic function – Create the draw function – Create game states
Code
Making money facts
• In virtual goods alone, freemium games make $12.92 dollars a month per user
• 23% of tablet gamers pay for virtual goods, with an average of $12 dollars per spender
• $3 dollars is the average price at which app gamers feel an app game purchase or a free-top-paid app upgrade is a good value
AGENDA
1 2 3 4 5 6 Choosing the right platform
Game Life Cycle
Supporting All screen sizes
Collision Detection
Moving Elements
The Sheep
Moving the walls “createNewWall()”
• Move this wall from right to left • When the wall reach the left side – create
another wall • Define a constant wall moving time • Use the physics formula: x = v * t
Code
The wall
When do we play?
• Highest percentage of mobile games are played in the bedroom
• Android users spend an average of 9.3 hours a month gaming on their phones
• Games account for 67% of time spent using tablets, vs 33% for smartphones
AGENDA
1 2 3 4 5 6 Choosing the right platform
Game Life Cycle
Supporting All screen sizes
Collision Detection
Moving Elements
The Sheep
Step 4 – The Sheep
• Move the sheep according to the touch
• physics :
Code
AGENDA
1 2 3 4 5 6 Choosing the right platform
Game Life Cycle
Supporting All screen sizes
Collision Detection
Moving Elements
The Sheep
Step 5 – Collision detection
* Pic taken from “Hungry hero” tutorial
Step 5 – Collision detection
In the logic function, check if the sheep collides with the wall object
Code
Popular games facts
• Angry Birds Makes $6 Million per month purely from ads
• Users of Draw Something have created drawings at a rate of 3,000 per second
• Zynga’s mobile gaming division alone brings in more than $10 billion dollars a year
• Roughly 500 billion total birds have been shot in Angry Birds
AGENDA
1 2 3 4 5 6 Choosing the right platform
Game Life Cycle
Supporting All screen sizes
Collision Detection
Moving Elements
The Sheep
Supporting different screen sizes - responsive
Supporting different screen sizes - responsive
• What would happen if we used responsive design in gaming:
Supporting different screen sizes - stretch
• The solution: stretching the display
Wrap it up
Questions?
?
Thank you!
Code on GITHUB: https://github.com/11Sheep/Fluffy-Sheep
Game on google play: https://play.google.com/store/apps/details?id=com.sheep.fluffysheep