Game
Development via
Sprite Kit
BUŞRA DENIZ
Buşra Deniz
Çanakkale Onsekiz Mart Üniversitesi
Bilgisayar Mühendisliği
Dotto Bilişim Teknolojileri
Mobile Software / Game Developer
Netaş
Mobile Engineer
www.busradeniz.com
busradeniz@outlook.com
@busradeniz
Frameworks for game development
 OpenGL ES
 UIKit controls and views
 Third-party libraries (Unity, Unreal 3D, cocos2D, Flash -
as3)
OpenGL ES
Hard to learn
Good for experienced programmer /
company
Cross plotform solutions
Good performance but code complexity
UIKit controls and views
Default iOS programming framework
Buttons, pickers, views, navigation
bars etc.
Easy but bad performance
Same interface with other iOS apps
Third-party libraries
Unity
Unreal 3D
Cocos 2D (4000+ games)
Corona SDK etc.
Cocos2D vs Sprite Kit
What is Sprite Kit ?
Apple's 2D game engine for iOS 7
Pros
Part of iOS SDK
Easy to use API
Built-in tools
Built-in Physics engine
iOS / Mac
Cons
Locked into iOS ecosystem
No ability to write custom OpenGL
code
Doesn't have as many useful features
as Cocos2D
First Sprite Kit Project
Sprite Kit Basics
SKView
SKScene
SKNode
SKAction
SKView
SKScene
Only one scene at a time is present on
SKView
SKNode
 SKNode
 SKSpriteNode
 SKLabelNode
 SKShapeNode
 SKEmitterNode
 SKEffectNode
SKNode properties and methods
Properties
 position
 zposition
 xScale - yScale
 name
Methods
 childNodeWithName:(NSString *) name
 enumerateChildWithName:usingBlock
Code sample
self.scoreLabel = [[SKLabelNode alloc]
initWithFontNamed:@"Chalkduster"];
self.scoreLabel.fontSize = 15;
self.scoreLabel.color = [UIColor whiteColor];
self.scoreLabel.position = CGPointMake(20, 300);
self.scoreLabel.zPosition = 100;
[self addChild:self.scoreLabel];
SKAction
Move actions
Rotate actions
Actions that change node scale over
time
Actions that combine other actions
(sequence: / repeatAction:)
Code sample
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
SKAction *moveUp = [SKAction moveBy:CGVectorMake(0, 100)
duration:0.8];
SKAction *moveDown = [SKAction moveBy:CGVectorMake(0, -100)
duration:0.6];
SKAction *seq = [SKAction sequence:@[moveUp, moveDown]];
Player *player = (Player*)[self childNodeWithName:playerName];
[player runAction:seq];
}
Game Interaction
Touching the screen
Gesture recognizers
Accelerometer and gyroscope
Game Controller events
Handling touches
 -(void)touchesBegan:(NSSet *)touches
withEvent:(UIEvent *)event
 -(void)touchesMoved:(NSSet *)touches
withEvent:(UIEvent *)event
 -(void)touchesEnded:(NSSet *)touches
withEvent:(UIEvent *)event
 -(void) touchesCancelled:(NSSet *)touches
withEvent:(UIEvent *) event
Code sample
-(void)touchesMoved:(NSSet *)touches
withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
SKSpriteNode *touchedNode = (SKSpriteNode
*)[self nodeAtPoint:[touch locationInNode:self]];
if (touchedNode.name == playerName) {
Player *player = (Player*) touchedNode;
player.selected = YES;
return;
}
}
Gesture Code Sample
- (void) handleSwipeRight:(UIGestureRecognizer *)recognizer
{
if (recognizer.state == UIGestureRecognizerStateRecognized) {
backgroundMoveSpeed += 50;
}
}
- (void) handleSwipeLeft:(UIGestureRecognizer *)recognizer
{
if (recognizer.state == UIGestureRecognizerStateRecognized &&
backgroundMoveSpeed > 50) {
backgroundMoveSpeed -= 50;
}
}
Sprite Kit Run Cycle
Code sample
- (void)update:(CFTimeInterval)currentTime{
Insert the following code into it:
[self enumerateChildNodesWithName:@"theLabel" usingBlock:^(SKNode
*node, BOOL *stop) {
node.position = CGPointMake(node.position.x - 2, node.
position.y);
if (node.position.x < - node.frame.size.width) {
node.position = CGPointMake(self.frame.size.width, node.
position.y);
}
}];
}
Questions ?
Thanks...

More Related Content

PPTX
Unity - Game Engine
PPTX
Academy PRO: Unity 3D. Environment
PPTX
Unity workshop
PPTX
Unity Game Engine
PDF
Cocos2d 소개 - Korea Linux Forum 2014
PDF
Game engine introduction and approach
PDF
Game development with Cocos2d-x Engine
PDF
Cocos2d-x C++ Windows 8 &Windows Phone 8
Unity - Game Engine
Academy PRO: Unity 3D. Environment
Unity workshop
Unity Game Engine
Cocos2d 소개 - Korea Linux Forum 2014
Game engine introduction and approach
Game development with Cocos2d-x Engine
Cocos2d-x C++ Windows 8 &Windows Phone 8

What's hot (20)

PPTX
Hands On with the Unity 5 Game Engine! - Andy Touch - Codemotion Roma 2015
PPTX
Academy PRO: Unity 3D. Scripting
PPTX
Unity Game Engine - Basics
PPTX
Game Development with Unity
PDF
The Basics of Unity - The Game Engine
PDF
Mobile Game Development in Unity
PDF
Unity - game engine u RIA svijetu PDF
PDF
Unity Introduction
PPTX
Unity 3D, A game engine
PDF
Unity introduction for programmers
PDF
PPTX
Game Development with Unity - by Mickey MacDonald
PPTX
Unity 3d Basics
PDF
Game Engine Overview
PPTX
Game development -session on unity 3d
PPT
What Is A Game Engine
PPTX
PPTX
Mobiele Werkplaats Windows 7 deployment met Novell ZCM en ENGL
PPTX
PRESENTATION ON Game Engine
PPTX
Windows Phone Game Development in Unity
Hands On with the Unity 5 Game Engine! - Andy Touch - Codemotion Roma 2015
Academy PRO: Unity 3D. Scripting
Unity Game Engine - Basics
Game Development with Unity
The Basics of Unity - The Game Engine
Mobile Game Development in Unity
Unity - game engine u RIA svijetu PDF
Unity Introduction
Unity 3D, A game engine
Unity introduction for programmers
Game Development with Unity - by Mickey MacDonald
Unity 3d Basics
Game Engine Overview
Game development -session on unity 3d
What Is A Game Engine
Mobiele Werkplaats Windows 7 deployment met Novell ZCM en ENGL
PRESENTATION ON Game Engine
Windows Phone Game Development in Unity
Ad

Viewers also liked (19)

PDF
SpriteKit 101
PDF
Sprite kit
PPTX
Stefan stolniceanu spritekit, 2 d or not 2d
PDF
ชุดที่ 1
PPTX
Triple moinitor wall mount
PDF
PDF
ชุดที่ 2
PPT
Tutorial penginstalan joomla cms 2
PDF
ชุดที่ 3
PPTX
Egg shell color
PPTX
10 seconds Rule on 5 jan.
PPTX
Business Sectors & Its contribution in india
PDF
Ergonomics - For Employees Satisfaction
PDF
work4-57
PPTX
Tarlan kajian benthic terrain ruggedness
DOCX
onet-work4-56
PDF
work3-57
PPTX
Psikometri - optimisme
PPTX
Unit testing on mobile apps
SpriteKit 101
Sprite kit
Stefan stolniceanu spritekit, 2 d or not 2d
ชุดที่ 1
Triple moinitor wall mount
ชุดที่ 2
Tutorial penginstalan joomla cms 2
ชุดที่ 3
Egg shell color
10 seconds Rule on 5 jan.
Business Sectors & Its contribution in india
Ergonomics - For Employees Satisfaction
work4-57
Tarlan kajian benthic terrain ruggedness
onet-work4-56
work3-57
Psikometri - optimisme
Unit testing on mobile apps
Ad

Similar to Game development via_sprite_kit (20)

PPTX
Game development with Cocos2d
PDF
Shootting Game
PDF
Creating physics game in 1 hour
PDF
Get Into Sprite Kit
PDF
Cocos2d programming
PDF
iOS 2D Gamedev @ CocoaHeads
PDF
Basics cocos2d
PDF
Cocos2d game programming 2
KEY
cocos2d 事例編 HungryMasterの実装から
PDF
iOS Game Development with Cocos2D
PPTX
Stefan stolniceanu spritekit, 2 d or not 2d
PPTX
Iphone game developement - In a game things always move
PDF
Introduction to-cocos2d
PDF
Introduction to Cocos2d
PDF
Programmers guide
PPTX
Cocos2d for beginners
PDF
cocos2d for i Phoneの紹介
PDF
GameDev lvl 1
PDF
iOS Game Development: When Cocoa Met Cocos...
PDF
Demo creating-physics-game.
Game development with Cocos2d
Shootting Game
Creating physics game in 1 hour
Get Into Sprite Kit
Cocos2d programming
iOS 2D Gamedev @ CocoaHeads
Basics cocos2d
Cocos2d game programming 2
cocos2d 事例編 HungryMasterの実装から
iOS Game Development with Cocos2D
Stefan stolniceanu spritekit, 2 d or not 2d
Iphone game developement - In a game things always move
Introduction to-cocos2d
Introduction to Cocos2d
Programmers guide
Cocos2d for beginners
cocos2d for i Phoneの紹介
GameDev lvl 1
iOS Game Development: When Cocoa Met Cocos...
Demo creating-physics-game.

Recently uploaded (20)

PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
Five Habits of High-Impact Board Members
PDF
CloudStack 4.21: First Look Webinar slides
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPT
Geologic Time for studying geology for geologist
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PPTX
Configure Apache Mutual Authentication
PDF
UiPath Agentic Automation session 1: RPA to Agents
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PDF
STKI Israel Market Study 2025 version august
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PPTX
Training Program for knowledge in solar cell and solar industry
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
A review of recent deep learning applications in wood surface defect identifi...
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
Five Habits of High-Impact Board Members
CloudStack 4.21: First Look Webinar slides
sustainability-14-14877-v2.pddhzftheheeeee
Geologic Time for studying geology for geologist
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Configure Apache Mutual Authentication
UiPath Agentic Automation session 1: RPA to Agents
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
STKI Israel Market Study 2025 version august
Microsoft Excel 365/2024 Beginner's training
NewMind AI Weekly Chronicles – August ’25 Week III
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
sbt 2.0: go big (Scala Days 2025 edition)
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
Training Program for knowledge in solar cell and solar industry
Taming the Chaos: How to Turn Unstructured Data into Decisions

Game development via_sprite_kit