Challenge Overview
Project Overview
Technology Overview
- target platform: iOS8+, Swift, SpriteKit, GameKit Game Center
- Priority is for iPhone 5/5s/5c -- 640x1136 pixel resolution at 326 dpi;
- No iPad support for now
- Only Portrait orientation
- Allows anonymous play, in addition to Apple Game Cente
Competition Task Overview
- The first scene is the game scene (landing page and level selection is not in scope, and no scene transitions)
The first file in the waiting queue will be loaded to the launcher, The user can select any file from the waiting queue and will drag one to the launcher, then user can control the angle that the file will shoot from, plus the speed, then the file can bounce off of the edges of the screen.- The speed of the file depends on the action the user takes to shoot the file. Once the file is placed on the launcher, the user will pull or drag it backwards for power and pan to the sides to change the orientation/direction (the idea is to make the launcher behave as a sort of “catapult”). The wifi signal strength gauge will indicate and display the force applied when launching the file. (refer images under the launch folder in storyboard.zip)
- Once the file is shot, it can do one of these things:
♦ It can hit an obstacle, in which case it does not survive When a file hits an obstacle, the user loses one of their lives. They get 3 lives per level.
in this challenge, two kinds of obstacles are in scope to implement.
1) Frozen obstacles: U Magnet, Rod Magnet (refer to 08_HitMagnet.gif in storyboard.zip)
2) Destroy obstacles: Eraser, Trash bin (refer to 06_HitTrashbin.gif and 10_HitEraser.gif in storyboard.zip)
♦ It can hit the target (white clouds), in which case the user gets points (refer to 01_ReachtheCloud.gif in storyboard.zip).
♦ It can miss a cloud, and fly off of the top of the screen (remember to destroy files out of screen). - Shield is not in scope
Technology Details
resource management
resources are all provided in the res.zip file
Collision detection
There is no gravity in this game.
Use “contact detection” of physical bodies of Sprite Kit to deal with sprite collisions.
There are three categories of physical objects to define:
the File entity category 0x01
the Obstacle entity category 0x02
the Cloud (White) entity category 0x03
We only have to process two types of contact:
- File and Obstacle
- File and Cloud(White)
class hierarchy
some class hierarchy for reference
class BaseSprite: SKSpriteNode
class BaseEntity: BaseSprite
class LauncherEntity: BaseEntity
launch()
class FileEntity: BaseEntity
class ObstacleEntity: BaseEntity
var skills = [] // what skills the obstacle has
contactWith(fileEntity:FileEntity)
// apply skills to the file entity
class CloudEntity:BaseEntity
contactWith(fileEntity:FileEntity)
// reach to the goal!
//update score
//update number of launched
class BaseSkill
applyTo(src: BaseEntity, target: BaseEntity)
// example subclass of BaseSkill: used for Obstacle such as “U magnet”, “Rod Magnet”
class FrozonSkill :BaseSkill
var frozonTime = 5 // will be configurable later
applyTo(src: BaseEntity, target: BaseEntity)
// stop src and target
// play effect
// frozon target for “frozonTime” seconds
// let src and target continue with original velocity
// used for Obstacle such as “Eraser”, “Trash bin”
class DestroySkill: BaseSkill
applyTo(src: BaseEntity, target: BaseEntity)
// play destroy effect
// destroy the target entity
// update number of death
class GameScene:SKScene
loadUIs()
// top bar: pause/resume button(functionality not in scope), time(functionality in scope), scores (functionality in scope)
// shield bar (functionality not in scope)
// files waiting to send (functionality in scope)
// number of deaths and number of files launched (functionality in scope)
// other UIs
loadEntities()
// initialize game entities(launcher 1, obstacle 4, cloud 2 etc.) here, later all the entities will be loaded from a level configure file, including the texture, moving path and skill , for this challenge, initialize them in this method
// textures are loaded from file
// moving path is a sequence of moving actions to repeat for ever
// and we will initialize two kinds of obstacles.
// 1) Frozen obstacles: U Magnet, Rod Magnet (using frozon skill)
// 2) Destroy obstacles: Eraser, Trash bin (using destroy skill)