27
COMPANY NAME start GAME DEVELOPMENT USING SWIFT BY SARAH HUSSEIN JANUARY 11 TH , 2016

Game Development Using Swift Programming Language

Embed Size (px)

Citation preview

Page 1: Game Development Using Swift Programming Language

COMPANY NAME start

GAME DEVELOPMENT USING SWIFT

BY SARAH HUSSEIN JANUARY 11TH, 2016

Page 2: Game Development Using Swift Programming Language

COMPANY NAME next

S. Hussein 2

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

Page 3: Game Development Using Swift Programming Language

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

Page 4: Game Development Using Swift Programming Language

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

Multimedia S. Hussein

Page 5: Game Development Using Swift Programming Language

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

Page 6: Game Development Using Swift Programming Language

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

Multimedia S. Hussein

Page 7: Game Development Using Swift Programming Language

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

Page 8: Game Development Using Swift Programming Language

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

Multimedia S. Hussein

Page 9: Game Development Using Swift Programming Language

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

Multimedia S. Hussein

Page 10: Game Development Using Swift Programming Language

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

Page 11: Game Development Using Swift Programming Language

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

Multimedia S. Hussein

Page 12: Game Development Using Swift Programming Language

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

Multimedia S. Hussein

Page 13: Game Development Using Swift Programming Language

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

Multimedia S. Hussein

Page 14: Game Development Using Swift Programming Language

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

Page 15: Game Development Using Swift Programming Language

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

Multimedia S. Hussein

Page 16: Game Development Using Swift Programming Language

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

Page 17: Game Development Using Swift Programming Language

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

Page 18: Game Development Using Swift Programming Language

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

Multimedia S. Hussein

Page 19: Game Development Using Swift Programming Language

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

Multimedia S. Hussein

Page 20: Game Development Using Swift Programming Language

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

Page 21: Game Development Using Swift Programming Language

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

Multimedia S. Hussein

Page 22: Game Development Using Swift Programming Language

COMPANY NAME next

22

DEMO

Multimedia End

S. Hussein

Page 23: Game Development Using Swift Programming Language

COMPANY NAME next

23

BACK UP SLIDES

S. Hussein

Page 24: Game Development Using Swift Programming Language

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

Multimedia S. Hussein

Page 25: Game Development Using Swift Programming Language

COMPANY NAME next

25 Multimedia S. Hussein

Page 26: Game Development Using Swift Programming Language

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

Multimedia S. Hussein

Page 27: Game Development Using Swift Programming Language

COMPANY NAME next

27 Multimedia S. Hussein