KEMBAR78
Game Development Using Swift Programming Language | PDF
COMPANY NAME
start
GAME DEVELOPMENT
USING SWIFT
BY SARAH HUSSEIN
JANUARY 11TH, 2016
COMPANY NAME
next
S. Hussein2
OUTLINE
Multimedia
01
02
03
04
05
06
07
Introduction
Definition of Swift Language
2D Game Development
3D Game Development
Animation & Particles
Audio & Parallax Effects
Conclusion & Demos
COMPANY NAME
next
3
OUTLINE
Multimedia
01
02
03
04
05
06
07
Introduction
Definition of Swift Language
2D Game Development
3D Game Development
Animation & Particles
Audio & Parallax Effects
Conclusion & Demos
S. Hussein
COMPANY NAME
next
4
INTRODUCTION
 
²  Programming languages don’t die easily, but
development shops do
²  Swift has the potential to become the next
programming language for creating immersive and
consumer-facing applications for years to come
² Key Features
EASE TO
MAINTAIN
LESS
CODE
SAFER FASTER
Swift Logo
MultimediaS. Hussein
COMPANY NAME
next
5
OUTLINE
Multimedia
01
02
03
04
05
06
07
Introduction
Definition of Swift Language
2D Game Development
3D Game Development
Animation & Particles
Audio & Parallax Effects
Conclusion & Demos
S. Hussein
COMPANY NAME
next
SUCCESS
STEP 01
STEP 02
STEP 03
STEP 04
6
DEFINITION OF SWIFT
²  Swift is a new programming language
for iOS, OS X, watchOS and tvOS apps
²  It builds on the best of previous
programming languages
²  Swift adopts safe programming
patterns and adds modern features to
make programming easier, more
flexible and more fun
²  With Xcode 7, Apple has made game
development more accessible to
anyone wanting to learn it
C
Objective C
Python
Java
Swift
MultimediaS. Hussein
COMPANY NAME
next
7
OUTLINE
Multimedia
01
02
03
04
05
06
07
Introduction
Definition of Swift Language
2D Game Development
3D Game Development
Animation & Particles
Audio & Parallax Effects
Conclusion & Demos
S. Hussein
COMPANY NAME
next
8
2D GAME DEVELOPMENT(1)
²  SpriteKit is a 2D game development framework for both
iOS and OS X
²  It provides all the tools required to create a complete 2D
game
²  It can create MainMenu, Gameplay , and Options Screens
²  In the gameplay screen, players, enemies, text to display
the score, and particles such as smoke and explosion can
be added
²  Some classes in SpriteKit are the basic building blocks for
creating any game
MultimediaS. Hussein
COMPANY NAME
next
9
2D GAME DEVELOPMENT(2)
There are a lot of features in SpriteKit :
²  Graphics technologies:
² Physics simulations technologies:
² Tools and improvements:
ª  Shaders
ª  Lighting and shadows
ª  Per-pixel physics
ª  Physics fields
ª  Inverse kinematics
ª  Constraints
ª  SpriteKit Editor
ª  Integration with SceneKit
MultimediaS. Hussein
COMPANY NAME
next
10
OUTLINE
Multimedia
01
02
03
04
05
06
07
Introduction
Definition of Swift Language
2D Game Development
3D Game Development
Animation & Particles
Audio & Parallax Effects
Conclusion & Demos
S. Hussein
COMPANY NAME
next
11
3D GAME DEVELOPMENT(1)
²  SceneKit is a 3D game development framework for
iOS and OS X
²  It is a high-level API built on OpenGL and OpenGL
ES, and can be integrated with SpriteKit
²  The camera, lights, and objects for the scene should
be provided
²  Predefined objects can be added, such as boxes,
spheres, tori, planes and texture
²  COLLADA files or Alembic files created in a 3D
program can also be imported
²  3D text and shapes can be added also
MultimediaS. Hussein
COMPANY NAME
next
12
3D GAME DEVELOPMENT(2)
²  SceneKit provides different light
types such as Ambient, Omni,
Direction, and Spot light
²  An editor is available to view your
scene and all the objects added to
the scene
²  SceneKit has actions that can be
performed on objects to animate
them
²  It has a physics engine for physics
simulations and collision detection
MultimediaS. Hussein
COMPANY NAME
next
13
3D GAME
2D GAME
VS.
1.  The screen
2.  The object
COORDINATE SYSTEMS
1.  The World
2.  The Object
3.  The View
4.  The Screen
COORDINATE SYSTEMS
MultimediaS. Hussein
COMPANY NAME
next
14
OUTLINE
Multimedia
01
02
03
04
05
06
07
Introduction
Definition of Swift Language
2D Game Development
3D Game Development
Animation & Particles
Audio & Parallax Effects
Conclusion & Demos
S. Hussein
COMPANY NAME
next
²  To make the game more lively and the
characters a little more believable, animation is
required
²  Sprite Sheets Concept is used to optimize the
game’s performance
²  A sprite sheet contains all the images that will
be used in the game in a single file
ANIMATION
15
ANIMATION & PARTICLES(1)
Rotating Enemie
MultimediaS. Hussein
COMPANY NAME
next
²  A particle system is a collection of sprites or
particles
²  Each particle system has an emitter from where
the particles will be created
²  SpriteKit has an inbuilt particle designer
²  It also includes a number of default particle
systems that are already included
16
ANIMATION & PARTICLES(2)
Fire
Multimedia
PARTICLES
S. Hussein
COMPANY NAME
next
17
OUTLINE
Multimedia
01
02
03
04
05
06
07
Introduction
Definition of Swift Language
2D Game Development
3D Game Development
Animation & Particles
Audio & Parallax Effects
Conclusion & Demos
S. Hussein
COMPANY NAME
next
²  Adding background music and sound effects in
SpriteKit is very easy: one-line code is needed
²  It allows the use of the .caf audio file format
and .mp3 files
²  .mp3 files are used more because are smaller in
size compared to .caf files (475 kBytes vs. 5.2
Mbytes)
²  The more added audio files, the more it will add
to the bundle size
AUDIO
18
AUDIO & PARALLAX EFFECTS
MultimediaS. Hussein
COMPANY NAME
next
²  Parallax or scrolling background is a very
popular effect in games
²  The objects in the foreground will move faster
than the objects in the background, which will
move much slower
²  It gives the illusion of depth and motion
²  These effects can be implemented in a
separate class in the SpriteKit
PARALLAX EFFECTS
19
AUDIO & PARALLAX EFFECTS
MultimediaS. Hussein
COMPANY NAME
next
20
OUTLINE
Multimedia
01
02
03
04
05
06
07
Introduction
Definition of Swift Language
2D Game Development
3D Game Development
Animation & Particles
Audio & Parallax Effects
Conclusion & Demos
S. Hussein
COMPANY NAME
next
21
SUMMARY
²  Swift programming language is becoming more and more popular for
developing iOS and OSX games
²  Foundation for developing 2D and 3D games with Swift, SpriteKit and
SceneKit
²  Good References are :
ª  The Swift Programming Language
(Swift 2.1) - Apple – 2015
ª  Learning iOS 8 Game Development
Using Swift - Siddharth Shekar - 2015
MultimediaS. Hussein
COMPANY NAME
next
22
DEMO
Multimedia
End
S. Hussein
COMPANY NAME
next
23
BACKUP SLIDES
S. Hussein
COMPANY NAME
next
24
3D GAME
2D GAME
VS.
1.  The screen
2.  The object
COORDINATE SYSTEMS
1.  The World
2.  The Object
3.  The View
4.  The Screen
COORDINATE SYSTEMS
MultimediaS. Hussein
COMPANY NAME
next
25 MultimediaS. Hussein
COMPANY NAME
next
26
3D GAME
2D GAME
VS.
1.  The screen
2.  The object
COORDINATE SYSTEMS
1.  The World
2.  The Object
3.  The View
4.  The Screen
COORDINATE SYSTEMS
MultimediaS. Hussein
COMPANY NAME
next
27 MultimediaS. Hussein

Game Development Using Swift Programming Language

  • 1.
    COMPANY NAME start GAME DEVELOPMENT USINGSWIFT BY SARAH HUSSEIN JANUARY 11TH, 2016
  • 2.
    COMPANY NAME next S. Hussein2 OUTLINE Multimedia 01 02 03 04 05 06 07 Introduction Definitionof Swift Language 2D Game Development 3D Game Development Animation & Particles Audio & Parallax Effects Conclusion & Demos
  • 3.
    COMPANY NAME next 3 OUTLINE Multimedia 01 02 03 04 05 06 07 Introduction Definition ofSwift Language 2D Game Development 3D Game Development Animation & Particles Audio & Parallax Effects Conclusion & Demos S. Hussein
  • 4.
    COMPANY NAME next 4 INTRODUCTION   ²  Programminglanguages don’t die easily, but development shops do ²  Swift has the potential to become the next programming language for creating immersive and consumer-facing applications for years to come ² Key Features EASE TO MAINTAIN LESS CODE SAFER FASTER Swift Logo MultimediaS. Hussein
  • 5.
    COMPANY NAME next 5 OUTLINE Multimedia 01 02 03 04 05 06 07 Introduction Definition ofSwift Language 2D Game Development 3D Game Development Animation & Particles Audio & Parallax Effects Conclusion & Demos S. Hussein
  • 6.
    COMPANY NAME next SUCCESS STEP 01 STEP02 STEP 03 STEP 04 6 DEFINITION OF SWIFT ²  Swift is a new programming language for iOS, OS X, watchOS and tvOS apps ²  It builds on the best of previous programming languages ²  Swift adopts safe programming patterns and adds modern features to make programming easier, more flexible and more fun ²  With Xcode 7, Apple has made game development more accessible to anyone wanting to learn it C Objective C Python Java Swift MultimediaS. Hussein
  • 7.
    COMPANY NAME next 7 OUTLINE Multimedia 01 02 03 04 05 06 07 Introduction Definition ofSwift Language 2D Game Development 3D Game Development Animation & Particles Audio & Parallax Effects Conclusion & Demos S. Hussein
  • 8.
    COMPANY NAME next 8 2D GAMEDEVELOPMENT(1) ²  SpriteKit is a 2D game development framework for both iOS and OS X ²  It provides all the tools required to create a complete 2D game ²  It can create MainMenu, Gameplay , and Options Screens ²  In the gameplay screen, players, enemies, text to display the score, and particles such as smoke and explosion can be added ²  Some classes in SpriteKit are the basic building blocks for creating any game MultimediaS. Hussein
  • 9.
    COMPANY NAME next 9 2D GAMEDEVELOPMENT(2) There are a lot of features in SpriteKit : ²  Graphics technologies: ² Physics simulations technologies: ² Tools and improvements: ª  Shaders ª  Lighting and shadows ª  Per-pixel physics ª  Physics fields ª  Inverse kinematics ª  Constraints ª  SpriteKit Editor ª  Integration with SceneKit MultimediaS. Hussein
  • 10.
    COMPANY NAME next 10 OUTLINE Multimedia 01 02 03 04 05 06 07 Introduction Definition ofSwift Language 2D Game Development 3D Game Development Animation & Particles Audio & Parallax Effects Conclusion & Demos S. Hussein
  • 11.
    COMPANY NAME next 11 3D GAMEDEVELOPMENT(1) ²  SceneKit is a 3D game development framework for iOS and OS X ²  It is a high-level API built on OpenGL and OpenGL ES, and can be integrated with SpriteKit ²  The camera, lights, and objects for the scene should be provided ²  Predefined objects can be added, such as boxes, spheres, tori, planes and texture ²  COLLADA files or Alembic files created in a 3D program can also be imported ²  3D text and shapes can be added also MultimediaS. Hussein
  • 12.
    COMPANY NAME next 12 3D GAMEDEVELOPMENT(2) ²  SceneKit provides different light types such as Ambient, Omni, Direction, and Spot light ²  An editor is available to view your scene and all the objects added to the scene ²  SceneKit has actions that can be performed on objects to animate them ²  It has a physics engine for physics simulations and collision detection MultimediaS. Hussein
  • 13.
    COMPANY NAME next 13 3D GAME 2DGAME VS. 1.  The screen 2.  The object COORDINATE SYSTEMS 1.  The World 2.  The Object 3.  The View 4.  The Screen COORDINATE SYSTEMS MultimediaS. Hussein
  • 14.
    COMPANY NAME next 14 OUTLINE Multimedia 01 02 03 04 05 06 07 Introduction Definition ofSwift Language 2D Game Development 3D Game Development Animation & Particles Audio & Parallax Effects Conclusion & Demos S. Hussein
  • 15.
    COMPANY NAME next ²  Tomake the game more lively and the characters a little more believable, animation is required ²  Sprite Sheets Concept is used to optimize the game’s performance ²  A sprite sheet contains all the images that will be used in the game in a single file ANIMATION 15 ANIMATION & PARTICLES(1) Rotating Enemie MultimediaS. Hussein
  • 16.
    COMPANY NAME next ²  Aparticle system is a collection of sprites or particles ²  Each particle system has an emitter from where the particles will be created ²  SpriteKit has an inbuilt particle designer ²  It also includes a number of default particle systems that are already included 16 ANIMATION & PARTICLES(2) Fire Multimedia PARTICLES S. Hussein
  • 17.
    COMPANY NAME next 17 OUTLINE Multimedia 01 02 03 04 05 06 07 Introduction Definition ofSwift Language 2D Game Development 3D Game Development Animation & Particles Audio & Parallax Effects Conclusion & Demos S. Hussein
  • 18.
    COMPANY NAME next ²  Addingbackground music and sound effects in SpriteKit is very easy: one-line code is needed ²  It allows the use of the .caf audio file format and .mp3 files ²  .mp3 files are used more because are smaller in size compared to .caf files (475 kBytes vs. 5.2 Mbytes) ²  The more added audio files, the more it will add to the bundle size AUDIO 18 AUDIO & PARALLAX EFFECTS MultimediaS. Hussein
  • 19.
    COMPANY NAME next ²  Parallaxor scrolling background is a very popular effect in games ²  The objects in the foreground will move faster than the objects in the background, which will move much slower ²  It gives the illusion of depth and motion ²  These effects can be implemented in a separate class in the SpriteKit PARALLAX EFFECTS 19 AUDIO & PARALLAX EFFECTS MultimediaS. Hussein
  • 20.
    COMPANY NAME next 20 OUTLINE Multimedia 01 02 03 04 05 06 07 Introduction Definition ofSwift Language 2D Game Development 3D Game Development Animation & Particles Audio & Parallax Effects Conclusion & Demos S. Hussein
  • 21.
    COMPANY NAME next 21 SUMMARY ²  Swiftprogramming language is becoming more and more popular for developing iOS and OSX games ²  Foundation for developing 2D and 3D games with Swift, SpriteKit and SceneKit ²  Good References are : ª  The Swift Programming Language (Swift 2.1) - Apple – 2015 ª  Learning iOS 8 Game Development Using Swift - Siddharth Shekar - 2015 MultimediaS. Hussein
  • 22.
  • 23.
  • 24.
    COMPANY NAME next 24 3D GAME 2DGAME VS. 1.  The screen 2.  The object COORDINATE SYSTEMS 1.  The World 2.  The Object 3.  The View 4.  The Screen COORDINATE SYSTEMS MultimediaS. Hussein
  • 25.
  • 26.
    COMPANY NAME next 26 3D GAME 2DGAME VS. 1.  The screen 2.  The object COORDINATE SYSTEMS 1.  The World 2.  The Object 3.  The View 4.  The Screen COORDINATE SYSTEMS MultimediaS. Hussein
  • 27.