Swift Game Tutorials – Space Shooter Templates

Open Xcode > New Project – select Game

Select language – Swift , game Technology – SpriteKit

swift tutorial


It will build the project with default setting > build to see preview

go to GameScene.swift and remove the default setting it should looks like this

swift tutorial



copy all the required game asset into supporting file

Now to link to our player, make a variable and add the asset name

var Player = SKSpriteNode(imageNamed: “player.png”)

to add player on the stage call

  self.addChild(Player) – also Set its position

swift game tutorials

build the game

swift game tutorials

Now to move player set its position to touch event (both touch event start and touch moving)

swift tutorial

Now add bullet

spritekit tutorial spritekit tutorial

Now add Enemy

swift swift

Now to check for collision detection

you need to Create Structure

swift tutorials

Now add the Physic body to to player , bullet and enemy

 swift tutorial

swift tutorial

swift tutorial

Now checking collision detection

swift tutorial

swift tutorial swift tutorial swift tutorial

Download Template 

Virendra kumre on Facebook
Virendra kumre
Virendra kumre
hi, i am indie game developer

Leave a Reply