Detecting Touch and hold on screen IPhone (Xcode)

Im trying to find out how to detect a touch&hold on screen method in the game im making. Im using touches began for single taps (Making the character move up) When they touch and keep holding i want the character to move straight forward. - (voi...
more »

2017-06-19 13:06 (2) Answers

Create dashed line in SpriteKit (OS X)

I'm trying to create a dashed line using an SKShapeNode in SpriteKit for Mac OS X in Objective C, not iOS and not in Swift. I've taken a look at many SO articles for this and tried to piece it together. The main issue that a lot of them are in Swift....
more »

2017-06-17 20:06 (0) Answers

detecting if a spritenode exists in swift

I am trying to detect if one of the nodes that I have made through a subclass of SKNode (called Achievements) exists and if it doesn't exist then i'm trying to turn off a boolean variable. What I use to locate the SKShapeNode (called "Indicator") ...
more »

2017-06-14 11:06 (1) Answers

SpriteKit Actions.sks file need to preload?

I created an Actions.sks file for my game. I've noticed that the first time one of the actions from the file is executed my game glitch's a little bit. Example: My player comes in contact with a specific block, and that is when it happens. It is a 2...
more »

2017-06-13 23:06 (0) Answers

Font is being ignored when app is built?

So I have just finished making a game (with help from @Fluidity) and when I build it the fonts requested are all ignored. I have selected fonts to be used in main.storyboard but when it gets to the game the default is used. Any help is appreciated. ...
more »

2017-06-12 19:06 (2) Answers

GameScene.sks and GameScene.swift

Having issues with the GameScene.sks and GameScene.swift. I was attempting to add a title screen to my project and it went downhill from there. The title screen works fine but the issue is when I edit the Gameviewcontroller.swift. This is how I wan...
more »

2017-05-23 01:05 (1) Answers

How to launch Sprite from above screen in Swift?

I'm programming a game for iOS in Xcode and I'm trying to launch a colorSprite from above the screen so it falls into view. However, I have also formed a border so that no sprites bounce outside view... let border = SKPhysicsBody(edgeLoopFrom: ...
more »

2017-05-15 21:05 (1) Answers

Swift effect, tilt D Pad controls

Working on an iOS game right now using swift, and am having trouble trying to get the effect i want. Basically, i have a Dpad for moving around, it's simply one sprite node that displays the image and then some transparent rectangles overtop to trig...
more »

2017-05-12 02:05 (0) Answers

Delete Nodes Spritekit when interact

I have a circle in the center of my view. Circles known as enemyBall come and collide with it. I want to detect these collisions and then remove the enemyBalls from the view. func generateEnemyBall(){ let enemyBall = SKSpriteNode() let rand...
more »

2017-05-11 20:05 (3) Answers

Pause Menu In SpriteKit - Swift 3

I have read some other questions asked about pause menus in swift but I cant seem to get it to work. I know that I have to use layers but I don't know what to do with the layers. So far I have let pauseLayer = SKNode() let gameLayer = SKNode() o...
more »

2017-05-10 21:05 (0) Answers

SpriteKit sktilemapnode vertical line glitch

I am making a 2d platformer and I decided to use multiple tilemapnodes as my backgrounds. Even with 1 tile map, I get these vertical or horizontal lines that appear and disappear when I'm moving the player around the screen. See image below: My ti...
more »

2017-05-10 02:05 (0) Answers

Use of an Audio Clip Causing Memory Leak

I have a sprite-kit game scene (SKScene) that uses audio clips from time to time. I don't want to create a new action (SKAction) every time I need to run a short audio clip since the sound could stutter. So I initialize an action variable with a fi...
more »

2017-05-07 03:05 (0) Answers

How to activate This Class to another

I have a question about using another class in my main GameplayScene. What I am trying to do is make the motions of the X-axis of the phone move the character left and right. Here is what I have in my MotionClass.swift import SpriteKit import CoreMo...
more »

2017-05-05 17:05 (1) Answers

Swift 3 Physicsbody Collisions doesn't work

This is my class for the Player My Player doesn't collide with the Gamefield they just go through each other. I dont want them to be on top of each other. I tried to google the solution but for me it seems that I did mostly all right. Please Help: ...
more »

2017-05-05 17:05 (1) Answers

SKAction Sequencing and Grouping Animations

I'm doing some death animations for a game, and wanted to ask for some help. I want my monster to disappear in a puff of smoke, but not before it animates a slash effect going across his body. I have 3 animations that I want to use: weaponSlash - a...
more »

2017-05-04 23:05 (1) Answers

Applying wind function to a ball

I have a simple game of throwing basketball to a basket, but I want to add a wind, which affects the ball. I have made a function: func setWind() { let multi = CGFloat(50) let rnd = CGFloat(arc4random_uniform(UInt32(10))) - 5 windLbl.t...
more »

2017-05-03 19:05 (0) Answers