SlideShare a Scribd company logo
1 of 17
Game Tutorial
Oluwaseye Ayinla
Certified Developer
https://github.com/oluwaseyeayinla/GGJ17-Flappy-Bird-Tutorial
Download Link
Setting up the bird
Drag the 'bird_sheet_0' into the World
gameobject
Rename the new object to Bird
Position the transform of the Bird
gameobject as in the picture
Bird animation
Add an animator component to the
bird gameobject
Find the Bird State Behaviour and
assign it as the controller and test out
the flapping animation
Bird physics & controller
Add a rigidbody2D component to the bird
gameobject and test
Add the bird controller script to the bird and
set its flap force to 300
Then set its gravity scale to 1.5
Test out the flap
Add a circle collider 2d to the bird gameobject
and set the radius to 0.35
Scrolling the ground
Add a box collider 2d to the ground
gameobject in the foreground and test out the
collision
Add a rigidbody 2D to the ground and set it to
kinematic
Attach the scroll controller to the ground
gameobject and test
Fix gap by duplicating the ground and shifting
the x axis of the duplicated ground game
object by 8 units; which is the same length as
the size of the box collider attached to it.
Scrolling the ground contd.
Add the repeating controller script to both
ground objects and watch the magic happen
Add a physics material of solid ground in the
material section of the box colliders of both
ground objects
Dealing with the UI
Add the scene controller to the scene
gameobject and assign all the references
seen in the inspector
Set the scroll speed to -1.5
Dealing with the UI contd.
Attach the blink controller to the tap text of the pause panel and
test out game
Set the OnClick button function of the
restart button to restart game in scene
controller
Set the OnClick button
function of the pause button
to pause game in scene
controller
Play test when done
Spawn pipes
Attach the column spanner to the scene
gameobject and set the column -3.5
Also assign the references seen in the
inspector
Gate Pipe
Add 2 tags in the tags
layer; Gate and Pipe
Assign the Gate tag to
the Pipe (parent)
gameobject and assign
the Pipe tag to the Top
and Bottom (children)
gameobject and test the
collision
Polish
A few things are still wrong
- We don't want the bird to be flapping or flying even after game over
- There is no sound so the game isn't fun
- The bird appears behind the pipes
- And the bird is not rotating as you flap in the air.
Don't forget to assign the proper sound files in the
sounds folder to the bird controller inspector
references
Uncomment the code in the
update method of the bird
controller to fix the flapping
when dead
Also uncomment any
AudioSource code you see
elsewhere in the script and
play test
Adding sound
Set the order layer of the bird game object to be a value of 2 or higher
Bring bird to the front of pipes
Uncomment the fixed update code in the bird controller to perform the
intended rotation
Rotate head of bird
Thanks!
Contact me:
Github: oluwaseyeayinla
Facebook: oluwaseyeayinla
oluwaseyeayinla@gmail.com
www.about.me/oluwaseyeayinla

More Related Content

What's hot

Unity 3D game engine seminar
Unity 3D game engine  seminarUnity 3D game engine  seminar
Unity 3D game engine seminar
NikhilThorat15
 
Touchless technology Seminar Presentation
Touchless technology Seminar PresentationTouchless technology Seminar Presentation
Touchless technology Seminar Presentation
Aparna Nk
 

What's hot (20)

Pong Game using Java awt and swing
Pong Game using Java awt and swingPong Game using Java awt and swing
Pong Game using Java awt and swing
 
Unity 3D game engine seminar
Unity 3D game engine  seminarUnity 3D game engine  seminar
Unity 3D game engine seminar
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Flutter
Flutter Flutter
Flutter
 
First-person Shooters
First-person ShootersFirst-person Shooters
First-person Shooters
 
Flutter talkshow
Flutter talkshowFlutter talkshow
Flutter talkshow
 
PPT on Android Applications
PPT on Android ApplicationsPPT on Android Applications
PPT on Android Applications
 
Flutter overview - advantages & disadvantages for business
Flutter overview - advantages & disadvantages for businessFlutter overview - advantages & disadvantages for business
Flutter overview - advantages & disadvantages for business
 
Android Application And Unity3D Game Documentation
Android Application And Unity3D Game DocumentationAndroid Application And Unity3D Game Documentation
Android Application And Unity3D Game Documentation
 
Touchless technology Seminar Presentation
Touchless technology Seminar PresentationTouchless technology Seminar Presentation
Touchless technology Seminar Presentation
 
Game Development with Unity
Game Development with UnityGame Development with Unity
Game Development with Unity
 
Android Operating System (Androrid OS)
Android Operating System (Androrid OS)Android Operating System (Androrid OS)
Android Operating System (Androrid OS)
 
Mobile operating system
Mobile operating systemMobile operating system
Mobile operating system
 
Android Operating System
Android Operating SystemAndroid Operating System
Android Operating System
 
Flutter
FlutterFlutter
Flutter
 
Game development life cycle
Game development life cycleGame development life cycle
Game development life cycle
 
Ios vs android
Ios vs androidIos vs android
Ios vs android
 
06. Game Architecture
06. Game Architecture06. Game Architecture
06. Game Architecture
 
Car racing game for android
Car racing game for androidCar racing game for android
Car racing game for android
 
Software Engineer- A unity 3d Game
Software Engineer- A unity 3d GameSoftware Engineer- A unity 3d Game
Software Engineer- A unity 3d Game
 

Viewers also liked

Www.mindriderstech.com
Www.mindriderstech.comWww.mindriderstech.com
Www.mindriderstech.com
Yogesh Patil ♛
 

Viewers also liked (7)

Www.mindriderstech.com
Www.mindriderstech.comWww.mindriderstech.com
Www.mindriderstech.com
 
巻取物語 makitori monogatari
巻取物語 makitori monogatari巻取物語 makitori monogatari
巻取物語 makitori monogatari
 
Google vrからはじめるdaydreamへの道
Google vrからはじめるdaydreamへの道Google vrからはじめるdaydreamへの道
Google vrからはじめるdaydreamへの道
 
Pyze Virtual Tour
Pyze Virtual TourPyze Virtual Tour
Pyze Virtual Tour
 
Building VR Applications For Google Cardboard
Building VR Applications For Google CardboardBuilding VR Applications For Google Cardboard
Building VR Applications For Google Cardboard
 
UniteKorea2014 - Making flappy bird workshop
UniteKorea2014 - Making flappy bird workshopUniteKorea2014 - Making flappy bird workshop
UniteKorea2014 - Making flappy bird workshop
 
Technical
TechnicalTechnical
Technical
 

Similar to Flappy Bird Tutorial (7)

Presentation 8.pptx
Presentation 8.pptxPresentation 8.pptx
Presentation 8.pptx
 
The Ring programming language version 1.7 book - Part 53 of 196
The Ring programming language version 1.7 book - Part 53 of 196The Ring programming language version 1.7 book - Part 53 of 196
The Ring programming language version 1.7 book - Part 53 of 196
 
Unity - Add components to 3D GameObjects
Unity - Add components to 3D GameObjectsUnity - Add components to 3D GameObjects
Unity - Add components to 3D GameObjects
 
Tutorial2 scrolling shooter
Tutorial2 scrolling shooterTutorial2 scrolling shooter
Tutorial2 scrolling shooter
 
The Ring programming language version 1.5.1 book - Part 47 of 180
The Ring programming language version 1.5.1 book - Part 47 of 180The Ring programming language version 1.5.1 book - Part 47 of 180
The Ring programming language version 1.5.1 book - Part 47 of 180
 
UE4BlueprintLadderVolumeTutorial
UE4BlueprintLadderVolumeTutorialUE4BlueprintLadderVolumeTutorial
UE4BlueprintLadderVolumeTutorial
 
PPT of Flappy Bird Game for final year.pptx
PPT of Flappy Bird Game for final year.pptxPPT of Flappy Bird Game for final year.pptx
PPT of Flappy Bird Game for final year.pptx
 

Recently uploaded

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Recently uploaded (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 

Flappy Bird Tutorial

  • 3. Setting up the bird Drag the 'bird_sheet_0' into the World gameobject Rename the new object to Bird Position the transform of the Bird gameobject as in the picture
  • 4. Bird animation Add an animator component to the bird gameobject Find the Bird State Behaviour and assign it as the controller and test out the flapping animation
  • 5. Bird physics & controller Add a rigidbody2D component to the bird gameobject and test Add the bird controller script to the bird and set its flap force to 300 Then set its gravity scale to 1.5 Test out the flap Add a circle collider 2d to the bird gameobject and set the radius to 0.35
  • 6. Scrolling the ground Add a box collider 2d to the ground gameobject in the foreground and test out the collision Add a rigidbody 2D to the ground and set it to kinematic Attach the scroll controller to the ground gameobject and test Fix gap by duplicating the ground and shifting the x axis of the duplicated ground game object by 8 units; which is the same length as the size of the box collider attached to it.
  • 7. Scrolling the ground contd. Add the repeating controller script to both ground objects and watch the magic happen Add a physics material of solid ground in the material section of the box colliders of both ground objects
  • 8. Dealing with the UI Add the scene controller to the scene gameobject and assign all the references seen in the inspector Set the scroll speed to -1.5
  • 9. Dealing with the UI contd. Attach the blink controller to the tap text of the pause panel and test out game
  • 10. Set the OnClick button function of the restart button to restart game in scene controller Set the OnClick button function of the pause button to pause game in scene controller Play test when done
  • 11. Spawn pipes Attach the column spanner to the scene gameobject and set the column -3.5 Also assign the references seen in the inspector
  • 12. Gate Pipe Add 2 tags in the tags layer; Gate and Pipe Assign the Gate tag to the Pipe (parent) gameobject and assign the Pipe tag to the Top and Bottom (children) gameobject and test the collision
  • 13. Polish A few things are still wrong - We don't want the bird to be flapping or flying even after game over - There is no sound so the game isn't fun - The bird appears behind the pipes - And the bird is not rotating as you flap in the air.
  • 14. Don't forget to assign the proper sound files in the sounds folder to the bird controller inspector references Uncomment the code in the update method of the bird controller to fix the flapping when dead Also uncomment any AudioSource code you see elsewhere in the script and play test Adding sound
  • 15. Set the order layer of the bird game object to be a value of 2 or higher Bring bird to the front of pipes
  • 16. Uncomment the fixed update code in the bird controller to perform the intended rotation Rotate head of bird
  • 17. Thanks! Contact me: Github: oluwaseyeayinla Facebook: oluwaseyeayinla oluwaseyeayinla@gmail.com www.about.me/oluwaseyeayinla

Editor's Notes

  1. + Add Collisions to the pipes