Questions for sprite-kit


9894

Drawing line with Touch iOS Sprite Kit

Im using the following code to draw lines in my sprite kit scene but nothing shows up. But the node counts goes up. Can anyone see what could be the problem. Ive been fighting with this code foreve...
5125

How do I display my timer in my SKLabelNode?

The score of my game depends on the time you have stayed alive. Although my output log displays the timer counting up, the SKLabelNode stays at 0 on the screen.
8069

Sprite Kit - Hiding SKSpriteNode

How can I make my coin disappear when my player collides with it?
1002

SpriteKit and Scrollable List

I've been trying to figure out an "easy" way to have a scrollable vertical list for my SpriteKit game.
4807

Sprite Kit texture sizes / resolution

I just started using Sprite Kit, and have an issue with loading textured sprites.
5165

Can I use core data with a sprite kit game?

I'm very new to core data. I'd like to use it with a sprite kit game, but I don't see the usual option to check mark it like I did with a generic xcode project. Is it still possible to use it? If s...
8622

SpriteKit - Rotate sprite towards point

I am working on a game where a bunch of enemies spawn outside the screen and move towards the center (where there's a space station). However, I need the spaceships to face in the direction of the
1643

Error with Unarchiving SKEmitterNode

I am trying to add explosion after i shoot object i am using this code to make the method
8807

Sprite Kit game “hickup” when the first sound is played

In my sprite kit game I use a SKAction to play a mp3 file when two sprites did collide. While the game works fine I noticed a small "hickup" in the game the first time the sound should be played. The
1740

How to use paths to create a sprite

I am very new to SpriteKit, and unfortunately cannot find any resources online to find out how this works. Basically, I have tried to create a diamond (from other's questions and answers on here)....
7736

SKShapeNode empty rectangle

I started to learn SpriteKit and immediatly run into a problem. I'm trying to draw an empty rectangle with a SKShapeNode but does appear on the screen. If i set a color to the fill property the rec...
1366

SpriteKit ball loses all energy hitting wall, restitution=1

If I apply an impulse of 1 in the y direction, the ball bounces back and forth without losing any energy. However, if the initial impulse is 0.5 or below, the ball loses all energy instantly when i...
6518

Pausing iAd Request Issue

So when my view controller loads I start sending adBanner requests..
7280

Use of unresolved identifier 'UITextBorderStyleRoundedRect' in swift

I am trying to create a text field by code in swift, here is snippet of my code:
1091

Randomly generating a SKSpriteNode based on possible values in Swift

We have two custom subclasses of SKSpriteNode.
5461

SpriteKit generate 3D objects

I'm trying to add an animation with a cube (3D object) in a SpriteKit Swift (game) application.
3734

SpriteKit Objective Jump

I got a problem with my code. I added the swipe gesture to jump, but my objective won't jump at all. The NSLog for the Swipe gesture works, so it must be something wrong with my objective code.
8780

How to cause a screen transition when an SKSpriteNode is tapped

I am building an iOS application using the spritekit framework, and I am trying to cause the screen to transition over to the next scene when the user taps the "start" button. I am able to get the ...
165

locationInNode: inaccurate after scaling the scene

I've been struggling with this for a while and would love some help!
5705

How to define category bit mask enumeration for SpriteKit in Swift?

To define a category bit mask enum in Objective-C I used to type:
6347

Change font filling color in Sprite Kit

I'm facing a problem using a "open" font with Xcode. My aim is to get a text like the following:
5551

How to make an object jump and land on a moving platform

I'm working on a jumper iOS game where the 'player' moves on a wave. It should be able to jump and land on the wave. In the current version it jumps but doesn't move back down.
613

What is the equivalent of UIImageView animationImages in SpriteKit?

I'm experimenting with SpriteKit, I'm building a humanoid character who uses multiple image files for facial expressions. So I can build up an SKSpriteNode to depict this character using a series of
9181

Difficulty With SKScene Delegating Game Over Task to UIViewController

I have two UIViewControllers. The user starts with UIViewController. Then the user clicks on a button to play a game. So the application seque-switches to the other viewcontroller, PlayViewContr...
6881

Nodes Not Showing Up On Device

In the xcode simulator everything works fine, I have clouds that start at one point and then move and then reset to that same point when the get across the screen. But when I tried this app on my i...
2106

SpriteKit SKAction group is running, but the SKSpriteNode image isn't being affected

I have created an SKAction group that alters the SKSpriteNode image (alpha and rotation) whilst playing a sound effect. However, when I runAction: the sound effect is played, but the image remains ...
7053

How to make a mute and unmute button in swift?

I am trying to make a mute and unmute in sprite kit swift. I'm able to mute the background music, but I can't unmute it. Here is some code for reference:
2322

SKNode nodeAtPoint: / containsPoint: not the same behaviour for SKSpriteNode and SKShapeNode

The nodeAtPoint: gives not the same result if using SKShapeNode and SKSpriteNode. If i am correct nodeAtPoint: will use containsPoint: to check which nodes are at the given point.
2252

muting AVAudioPlayer from SKScene while its playing in ViewController

I have an AVAudioPlayer set to loop indefinitely in the ViewController.m.
7602

How to make sprite kit object not affected by gravity?

I have a sprite which I want to react to every part of the physics simulation except for gravity. I can't make it's dynamic property false otherwise it won't react to impulses and forces, but I still
7895

Xcode 6 beta: Spritekit editor loses sprite

Been trying out the new spritekit editor in Xcode 6 beta and getting this error - I know it's beta software but I just wanted to check with others to see if anyone else is having this problem or wh...
5460

Why does the applicationWillResignActive method not work?

In my GameScene.m I have a method called wentToBackGround. This method is called by applicationWillResignActive in AppDelegate:
6630

SpriteKit support multiple device orientations

I have a SK game which I want to support all orientations. Right now when I change the orientation, the nodes doesn't keep there position. I use the SKSceneScaleModeResizeFill for scaling, because...
1789

Sling shot using SpriteKit?

I am working on a sling shot based game developed using SpriteKit.
9838

Add a sprite node into a mutable array

This is making me feel like a bumbling idiot, and I seem like one by asking this.
4693

Alternative method for performSelector in SKAction in Swift

I'm converting a Sprikit App to Swift. But I have a problem to convert this method:
7611

SpriteKit Collision Detection with Transparent image

I am trying to learn SpriteKit by going through a tutorial on making a Flappy Bird like Game. In my version of the game, the pipes are not pipes, and are irregularly shaped objects that don't fill...
8470

SpriteKit: How to animate drawing of a rounded rectangle

I want to animate the drawing of a rounded box. I've seen an answer where a guy used CGLinePath's to draw a house shape. I thought it was neat, honestly.
5628

SKLabelNode text values won't update when stored in an NSMutableArray

If I change the text attribute on a SKLabelNode after adding it as a child, the text will update in the view. But if I add it to an NSMutableArray, retrieve it, and then change the value, the text ...
2180

Swift: detecting bodyAtPoint. Always nil

I'm struggling to discover why I cannot detect a bodyAtPoint with SpriteKit. bodyAtPoint always returns nil, even when it appears I'm always tapping the sprite node.
8266

Send an object with iOS Game Center Challenge?

I am developing an iOS game in which the player builds an object and completes a timed challenge with that object. I want to use Game Center to allow the player to be able to challenge his friends...
803

How can i make a custom action execute something on specific intervals

So Whenever i run this action, it prints hello world rapidly for 3 seconds (which is what i want), but it prints it too fast. What i cant figure out is how to print "hello world" on certain intervals
1872

game works well on all devices but iPad 2, why?

I am working in Swift and have created a basic game using SpriteKit in which squares move down the screen repeatedly and a sprite node "jumps" when tapped. Relatively simple.
206

looking at Apple's “Adventure Game” tutorial what does “in” mean?

While looking at the source code for the tutorial adventure game using SpriteKit by Apple, I kept seeing variables being declared, and after they are declared there are open brackets, and the word ...
5220

Position on Node After Rotation

Okay so I have a node that's node.size is a (5,5) rectangle. Its position is (100,100), and its anchor point is the default (0.5, 0.5).
6950

How to Add SCNView on top of a SKView

I am trying to add a SCNView on top of a SKView.
7639

Give an SKNode its own physics

Is there a way to give an SKNode its own physics? I have an SKShapeNode call "backGround" which I use for the parent node of most of my other nodes. I am constantly moving "background" to the left,...
9214

Deallocate SKScene after transition to another SKScene in SpriteKit

I have a view controller that has three skscenes as children.
9460

mutableDictionary doesn´t transfer objects to next scene in sprite kit

i know there are a few different topics about that and i read all of them but my first skscene won´t transfer my dictionary objects to the next scene.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.