SlideShare a Scribd company logo
2D Endless Runner in 
Unity for Mobile 
Murat Gürel 
@muratgurel 
GDG Devfest Istanbul, Dec 2014
About Me 
• Software Engineer, iOS - Peak Games 
• Native iOS development for 3 years - 2 years 
professionally. 
• 4 games with Unity
Why am I here? 
• Evliya Çelebi experiences 
• Insufficient resources on the internet 
• Project management from scratch 
• Tips, tricks & time-savers
Evliya Çelebi 
VIDEO
Evliya Çelebi 
• Started in June 2014 
• 1 month research prior 
• 4 sceneries with 5 different sprite sets (20 total) 
• More than 40 levels with various difficulties
Agenda 
• Components 
• Colliders & Layers 
• Tags & Camera 
• State Machine 
• Animations 
• Level Editor & Level Design 
• Performance 
• Development Environment
Components
Components 
• Unity is a component based system. Don’t try to do 
everything with inheritance
Components 
• Try to separate 
functionality into 
components
Colliders & Layers
Colliders & Layers 
• Use compound colliders. Don’t use 1 collider for 
everything
Colliders & Layers 
• Instead of hard-coded values, use triggers
Colliders & Layers 
• Use layers & collision matrix to disable collision 
between layers
Tags & Camera
Tags 
• Try to be type safe. Don’t rely on tags too much 
• GetComponent is fast & safe
Tags 
• Use tags for higher level stuff 
• Enemy, Player, Obstacle etc. (Not LongObstacle) 
Player 
Collectible 
Obstacle Collectible
Camera 
• Use layers to disable rendering for certain 
cameras
State Machine
State Machine 
• We have a state machine for our main character 
• Listen for events & let state decide what to 
transition into 
• Character listens to state changes 
• Other scripts can also hook into changes
State Machine
State Machine 
Run Slide
Animations
Animations 
• Use mecanim
Animations 
• Know about animation triggers
Animations 
• For smaller animations, we use the legacy 
system
Level Design
Level Design 
• Random enough to be fun 
• Predictable enough to control economy 
• Fully random is extremely hard & not good for game 
• We have separate level slices 
• We append them together 
• Random enough 
• Easier on development & design
Level Design
Level Design 
VIDEO
Level Editor
Unity Editor 
• Do not use editor to set variables excessively 
• Only expose variables a level designer should 
use 
• Validate if needed 
• Do it inside scripts for other stuff
Level Editor 
• If you can, separate level design from coding 
• Unity editor is highly extendible 
• Can make a level editor inside Unity
Level Editor 
ADVANTAGES DISADVANTAGES 
• Sharing workload 
• Faster level design 
• Fewer bugs if done correctly 
• Shorter overall project time 
• Editor itself can have bugs 
• Teaching designers 
• Cannot prevent default unity 
actions
Level Editor 
• Designers place placeholders 
• Have convenience methods 
• Can validate & test level individually 
• Send us the final level
Cross-Platform
Cross-Platform 
• 1 image set with resolution 1280x800 
• Show more game area 
• Use percentage for resolution dependant stuff 
• Preprocessor macros or conditionals 
• uGUI for UI
Performance
Performance 
• Try to use simple shaped colliders (circle, 
rectangle)
Performance 
• Use texture atlases 
• Unity sprite packer is not good, we used 
TexturePacker 
• Better packing algorithm 
• Exports for Unity 
• 54 MB to 37 Mb memory gain
Performance 
• Do not load every asset at once 
• Async load when needed 
VIDEO
Performance 
• Test on device, not 
just simulator 
• Have a FPS gauge
Performance 
• Use profiler
Performance 
• Try to use static fonts
Thank You! 
Twitter: @muratgurel 
E-mail: mrtgurel@gmail.com

More Related Content

What's hot

MediaCast MVP
MediaCast MVPMediaCast MVP
MediaCast MVP
Evan Hsu
 

What's hot (20)

West Coast DevCon 2014: Build Automation - Epic’s Build Tools & Infrastructure
West Coast DevCon 2014: Build Automation - Epic’s Build Tools & InfrastructureWest Coast DevCon 2014: Build Automation - Epic’s Build Tools & Infrastructure
West Coast DevCon 2014: Build Automation - Epic’s Build Tools & Infrastructure
 
Alexey Savchenko, Unreal Engine
Alexey Savchenko, Unreal EngineAlexey Savchenko, Unreal Engine
Alexey Savchenko, Unreal Engine
 
Future of unreal
Future of unreal Future of unreal
Future of unreal
 
Unreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) PresentationUnreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) Presentation
 
From Unity3D to Unreal Engine 4
From Unity3D to Unreal Engine 4From Unity3D to Unreal Engine 4
From Unity3D to Unreal Engine 4
 
West Coast DevCon 2014: The Slate UI Framework (Part 1) - Introduction
West Coast DevCon 2014: The Slate UI Framework (Part 1) - IntroductionWest Coast DevCon 2014: The Slate UI Framework (Part 1) - Introduction
West Coast DevCon 2014: The Slate UI Framework (Part 1) - Introduction
 
Next generation mobile gp us and rendering techniques - niklas smedberg
Next generation mobile gp us and rendering techniques - niklas smedbergNext generation mobile gp us and rendering techniques - niklas smedberg
Next generation mobile gp us and rendering techniques - niklas smedberg
 
Gamemaker - More core objects
Gamemaker - More core objectsGamemaker - More core objects
Gamemaker - More core objects
 
【Unite 2017 Tokyo】実演!Timeline+Cinemachineによるカットシーン作り
【Unite 2017 Tokyo】実演!Timeline+Cinemachineによるカットシーン作り【Unite 2017 Tokyo】実演!Timeline+Cinemachineによるカットシーン作り
【Unite 2017 Tokyo】実演!Timeline+Cinemachineによるカットシーン作り
 
MediaCast MVP
MediaCast MVPMediaCast MVP
MediaCast MVP
 
Marek-Martin Matyska, Gamajun Games
Marek-Martin Matyska, Gamajun GamesMarek-Martin Matyska, Gamajun Games
Marek-Martin Matyska, Gamajun Games
 
Ottawa unity user_group_feb13_2015
Ottawa unity user_group_feb13_2015Ottawa unity user_group_feb13_2015
Ottawa unity user_group_feb13_2015
 
App Ideas: From Inception To Execution
App Ideas: From Inception To ExecutionApp Ideas: From Inception To Execution
App Ideas: From Inception To Execution
 
1-Introduction (Game Design and Development)
1-Introduction (Game Design and Development)1-Introduction (Game Design and Development)
1-Introduction (Game Design and Development)
 
Brewing Your Own Game Engie eng
Brewing Your Own Game Engie engBrewing Your Own Game Engie eng
Brewing Your Own Game Engie eng
 
Cross-Platform Juggling
Cross-Platform JugglingCross-Platform Juggling
Cross-Platform Juggling
 
Video game development for everybody
Video game development for everybodyVideo game development for everybody
Video game development for everybody
 
Project presentation
Project presentationProject presentation
Project presentation
 
Game Programmer
Game ProgrammerGame Programmer
Game Programmer
 
Unity L01 - Game Development
Unity L01 - Game DevelopmentUnity L01 - Game Development
Unity L01 - Game Development
 

Viewers also liked

PRESENTATION ON Game Engine
PRESENTATION ON Game EnginePRESENTATION ON Game Engine
PRESENTATION ON Game Engine
Diksha Bhargava
 
Computer game graphics
Computer game graphicsComputer game graphics
Computer game graphics
Cameron321
 

Viewers also liked (20)

유니티3D 5의 Ugui #2
유니티3D 5의 Ugui #2유니티3D 5의 Ugui #2
유니티3D 5의 Ugui #2
 
손가락이 제멋대로 UX하고 움직이는 UI #2
손가락이 제멋대로 UX하고 움직이는 UI #2손가락이 제멋대로 UX하고 움직이는 UI #2
손가락이 제멋대로 UX하고 움직이는 UI #2
 
Unity3D 5 의 ugui #1
Unity3D 5 의 ugui #1Unity3D 5 의 ugui #1
Unity3D 5 의 ugui #1
 
Unity 2d sharp
Unity 2d sharpUnity 2d sharp
Unity 2d sharp
 
2D Game Development with Starling
2D Game Development with Starling2D Game Development with Starling
2D Game Development with Starling
 
My Level Design For 2D Scroll Game
My Level Design For 2D Scroll GameMy Level Design For 2D Scroll Game
My Level Design For 2D Scroll Game
 
Developing a 2D Game - A Case Study (Ninja Puzzle) - Presented at CGGA 2013
Developing a 2D Game - A Case Study (Ninja Puzzle) - Presented at CGGA 2013Developing a 2D Game - A Case Study (Ninja Puzzle) - Presented at CGGA 2013
Developing a 2D Game - A Case Study (Ninja Puzzle) - Presented at CGGA 2013
 
Unity technologies on BarCamp Vilnius
Unity technologies on BarCamp VilniusUnity technologies on BarCamp Vilnius
Unity technologies on BarCamp Vilnius
 
Unity in community powerpoint
Unity in community powerpointUnity in community powerpoint
Unity in community powerpoint
 
Practical guide to optimization in Unity
Practical guide to optimization in UnityPractical guide to optimization in Unity
Practical guide to optimization in Unity
 
Unity is strength presentation handout
Unity is strength   presentation handoutUnity is strength   presentation handout
Unity is strength presentation handout
 
Project presentation FPS
Project presentation FPSProject presentation FPS
Project presentation FPS
 
Unity 5 Overview
Unity 5 OverviewUnity 5 Overview
Unity 5 Overview
 
PRESENTATION ON Game Engine
PRESENTATION ON Game EnginePRESENTATION ON Game Engine
PRESENTATION ON Game Engine
 
Computer game graphics
Computer game graphicsComputer game graphics
Computer game graphics
 
Unity introduction for programmers
Unity introduction for programmersUnity introduction for programmers
Unity introduction for programmers
 
2D graphics
2D graphics2D graphics
2D graphics
 
Cg shaders with Unity3D
Cg shaders with Unity3DCg shaders with Unity3D
Cg shaders with Unity3D
 
The Basics of Unity - The Game Engine
The Basics of Unity - The Game EngineThe Basics of Unity - The Game Engine
The Basics of Unity - The Game Engine
 
Mobile Game Development in Unity
Mobile Game Development in UnityMobile Game Development in Unity
Mobile Game Development in Unity
 

Similar to 2D Endless Runner in Unity for Mobile - GDG DevFest Istanbul 2014

OGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
OGDC 2014_Architecting Games in Unity_Mr. Rustum ScammellOGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
OGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
ogdc
 
OGDC 2014: Architecting Games in Unity
OGDC 2014: Architecting Games in UnityOGDC 2014: Architecting Games in Unity
OGDC 2014: Architecting Games in Unity
GameLandVN
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
Howard Greenberg
 
All My Tests Are Passing, Now What?
All My Tests Are Passing, Now What?All My Tests Are Passing, Now What?
All My Tests Are Passing, Now What?
Christopher Read
 

Similar to 2D Endless Runner in Unity for Mobile - GDG DevFest Istanbul 2014 (20)

Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...
Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...
Шлигін Олександр “Розробка ігор в Unity загальні помилки” GameDev Conference ...
 
Unity - Game Engine
Unity - Game EngineUnity - Game Engine
Unity - Game Engine
 
Motion design in FIori
Motion design in FIoriMotion design in FIori
Motion design in FIori
 
Component-first Applications
Component-first ApplicationsComponent-first Applications
Component-first Applications
 
OGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
OGDC 2014_Architecting Games in Unity_Mr. Rustum ScammellOGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
OGDC 2014_Architecting Games in Unity_Mr. Rustum Scammell
 
Creating great Unity games for Windows 10 - Part 1
Creating great Unity games for Windows 10 - Part 1Creating great Unity games for Windows 10 - Part 1
Creating great Unity games for Windows 10 - Part 1
 
New 2D World-Building, Animation & Graphics Features in Unity
New 2D World-Building, Animation & Graphics Features in UnityNew 2D World-Building, Animation & Graphics Features in Unity
New 2D World-Building, Animation & Graphics Features in Unity
 
Unity 3D VS your team
Unity 3D VS your teamUnity 3D VS your team
Unity 3D VS your team
 
Software Engineer- A unity 3d Game
Software Engineer- A unity 3d GameSoftware Engineer- A unity 3d Game
Software Engineer- A unity 3d Game
 
iOS Game Development With UIKit
iOS Game Development With UIKitiOS Game Development With UIKit
iOS Game Development With UIKit
 
OGDC 2014: Architecting Games in Unity
OGDC 2014: Architecting Games in UnityOGDC 2014: Architecting Games in Unity
OGDC 2014: Architecting Games in Unity
 
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...
"Using Automation Tools To Deploy And Operate Applications In Real World Scen..."Using Automation Tools To Deploy And Operate Applications In Real World Scen...
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...
 
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...
"Using Automation Tools To Deploy And Operate Applications In Real World Scen..."Using Automation Tools To Deploy And Operate Applications In Real World Scen...
"Using Automation Tools To Deploy And Operate Applications In Real World Scen...
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3DFrom Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
 
Developing applications and games in Unity engine - Matej Jariabka, Rudolf Ka...
Developing applications and games in Unity engine - Matej Jariabka, Rudolf Ka...Developing applications and games in Unity engine - Matej Jariabka, Rudolf Ka...
Developing applications and games in Unity engine - Matej Jariabka, Rudolf Ka...
 
Software testing and quality assurance
Software testing and quality assuranceSoftware testing and quality assurance
Software testing and quality assurance
 
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
Developing and optimizing a procedural game: The Elder Scrolls Blades- Unite ...
 
All My Tests Are Passing, Now What?
All My Tests Are Passing, Now What?All My Tests Are Passing, Now What?
All My Tests Are Passing, Now What?
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automation
 

Recently uploaded

Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 

Recently uploaded (20)

Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 

2D Endless Runner in Unity for Mobile - GDG DevFest Istanbul 2014

  • 1. 2D Endless Runner in Unity for Mobile Murat Gürel @muratgurel GDG Devfest Istanbul, Dec 2014
  • 2. About Me • Software Engineer, iOS - Peak Games • Native iOS development for 3 years - 2 years professionally. • 4 games with Unity
  • 3. Why am I here? • Evliya Çelebi experiences • Insufficient resources on the internet • Project management from scratch • Tips, tricks & time-savers
  • 5. Evliya Çelebi • Started in June 2014 • 1 month research prior • 4 sceneries with 5 different sprite sets (20 total) • More than 40 levels with various difficulties
  • 6. Agenda • Components • Colliders & Layers • Tags & Camera • State Machine • Animations • Level Editor & Level Design • Performance • Development Environment
  • 8. Components • Unity is a component based system. Don’t try to do everything with inheritance
  • 9. Components • Try to separate functionality into components
  • 10.
  • 12. Colliders & Layers • Use compound colliders. Don’t use 1 collider for everything
  • 13. Colliders & Layers • Instead of hard-coded values, use triggers
  • 14. Colliders & Layers • Use layers & collision matrix to disable collision between layers
  • 16. Tags • Try to be type safe. Don’t rely on tags too much • GetComponent is fast & safe
  • 17. Tags • Use tags for higher level stuff • Enemy, Player, Obstacle etc. (Not LongObstacle) Player Collectible Obstacle Collectible
  • 18. Camera • Use layers to disable rendering for certain cameras
  • 20. State Machine • We have a state machine for our main character • Listen for events & let state decide what to transition into • Character listens to state changes • Other scripts can also hook into changes
  • 25. Animations • Know about animation triggers
  • 26. Animations • For smaller animations, we use the legacy system
  • 28. Level Design • Random enough to be fun • Predictable enough to control economy • Fully random is extremely hard & not good for game • We have separate level slices • We append them together • Random enough • Easier on development & design
  • 32. Unity Editor • Do not use editor to set variables excessively • Only expose variables a level designer should use • Validate if needed • Do it inside scripts for other stuff
  • 33. Level Editor • If you can, separate level design from coding • Unity editor is highly extendible • Can make a level editor inside Unity
  • 34. Level Editor ADVANTAGES DISADVANTAGES • Sharing workload • Faster level design • Fewer bugs if done correctly • Shorter overall project time • Editor itself can have bugs • Teaching designers • Cannot prevent default unity actions
  • 35. Level Editor • Designers place placeholders • Have convenience methods • Can validate & test level individually • Send us the final level
  • 37. Cross-Platform • 1 image set with resolution 1280x800 • Show more game area • Use percentage for resolution dependant stuff • Preprocessor macros or conditionals • uGUI for UI
  • 39. Performance • Try to use simple shaped colliders (circle, rectangle)
  • 40. Performance • Use texture atlases • Unity sprite packer is not good, we used TexturePacker • Better packing algorithm • Exports for Unity • 54 MB to 37 Mb memory gain
  • 41. Performance • Do not load every asset at once • Async load when needed VIDEO
  • 42. Performance • Test on device, not just simulator • Have a FPS gauge
  • 44. Performance • Try to use static fonts
  • 45. Thank You! Twitter: @muratgurel E-mail: mrtgurel@gmail.com