Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey
Filter by
Sorted by
Tagged with
1 vote
1 answer
76 views

A significant mechanic of a project I am working on is going to involve dragging objects with your fingers and having the object being dragged interact properly with physics, pushing other objects ...
CalebK's user avatar
  • 737
2 votes
1 answer
260 views

I have an ARView, configured with ARView.CameraMode.nonAR (a virtual camera without real-world data), and I want to use ARSKView to render 2D SpriteKit content positioned in 3D space. According to the ...
West1's user avatar
  • 2,062
0 votes
1 answer
133 views

My game is utilising RealityKit to render a lot of 3D content. In the foreground I want to place a SpriteKit HUD that will contain buttons, and at times, complete overlays of the 3D content. Right ...
PKCLsoft's user avatar
  • 1,513
1 vote
0 answers
45 views

I am working on an Xcode app that uses a Collection View Controller to display images of various animals. When one of the images is touched a GameView (SKView) opens. Each GameView has balls(sprites)...
user4826471's user avatar
0 votes
1 answer
39 views

I’m developing a tvOS game using SpriteKit and trying to make three SKShapeNodes focusable by setting their focusBehavior = .focusable. However, when testing on the Apple TV, the nodes are not ...
I Don't Tell's user avatar
0 votes
0 answers
67 views

I have a SKScene class called GameScene that is embedded in the GameView of my SwiftUI app. The SKScene is for a simple solitaire card game. When the game is over, I'd like the user to be able to hit ...
Newps's user avatar
  • 11
0 votes
0 answers
45 views

I am new to iOS and am porting a simple card game from Android. I'm trying to call a SpriteKit scene from my SwiftUI app. There are many useful posts that show how to do this, and I followed those ...
Newps's user avatar
  • 11
0 votes
0 answers
45 views

I'm new to iOS/Swift/Spritekit and am in the process of migrating a simple solitaire-style card game from Android. At present, I have two scenes: LauncherScene, which is the home page for the app, ...
Newps's user avatar
  • 11
0 votes
1 answer
56 views

I wrote a teensy app in Swift/SpriteKit/iOS for a button that turns a color when pressed. It works fairly well except for one thing: If I touch the button in a certain fashion -- a quick half-swipe, ...
Chris Tucker's user avatar
0 votes
1 answer
39 views

I'm trying to make a running and jumping game where I want the sprite to be able to do one double jump. The problem is that when I click the button a second time while the ninja is in the air, it ...
user25659610's user avatar
0 votes
2 answers
86 views

I've created a SpriteNode subclass which is instantiated in the scene as a spline, and then I call the function .animateDottedPath(). I expect the dashes to animate over 5 seconds along the original ...
KleinerWarden's user avatar
0 votes
0 answers
42 views

I am making a basic chess game in Swift with Spritekit: func moveSelectedPiece(to newPosition: (Int, Int)) { guard let pieceToMove = selectedPiece else { return } // Calculate the ...
aladair123's user avatar
0 votes
0 answers
43 views

Overview In my SKScene, I have a SKAudioNode playing an audio file, declared as follows: var backgroundMusic: SKAudioNode? and initialized like this: guard let musicURL = Bundle.main.url(...
oneshot's user avatar
  • 683
0 votes
1 answer
42 views

I’m a beginner playing around with SpriteKit, and I created a file called GameScene. It contains only one node called mouse. My goal is to animate the mouse and move it to random locations when the ...
Damiano Miazzi's user avatar
2 votes
0 answers
88 views

I'm currently creating a JRPG-like game in swift, but I have been stuck in implementing a tile map made thanks to spriteKit. The problem is that the code can't load the map I made. As I mentioned ...
ミレイナ's user avatar
0 votes
0 answers
44 views

I am new to SpriteKit, and I am trying to practice by making a simple 2D game. I've gotten so far as to have my map displayed on the screen, and cropped to only fill about 1/3 of the screen (so that I ...
silvercoins's user avatar
0 votes
0 answers
37 views

New iOS person here.. Trying to incorporate GCVirtualController into my test code. When I do, I see didMove getting called twice, thus causing lots of down-stream problems. As soon as I comment out ...
Wayne's user avatar
  • 77
0 votes
0 answers
52 views

I am making a SpriteKit platformer game and I am trying to get the collision detection working. so far I have written this code to detect when the player hits a tiles physics body: func didBegin(_ ...
aladair123's user avatar
1 vote
0 answers
83 views

I am facing an issue that I am not able to resolve. I have been able to create a demo project that demonstrates the issue, which I hope enables you to have a look as well and hopefully find a way to ...
sanderFrenken's user avatar
0 votes
1 answer
33 views

I'm trying to display a right-aligned timecode in my game. I had expected that digits would all have the same width, but this doesn't seem to be the case in SpriteKit, even though it seems to be the ...
Nickkk's user avatar
  • 2,747
0 votes
0 answers
28 views

I am making a game like ColorByNumber, i ran into a tricky problem during development. There are many SKSpriteNode in the GameScene, many blocks have many spacing. When the SKCameraNode scale to ...
peterZhang's user avatar
0 votes
0 answers
108 views

I am following some sample code (https://github.com/laanlabs/SCNTechniqueGlow) to add border to a 3d model using SCNTechnique. The code sets the technique to SCNView: scnView.technique = technique ...
OMGPOP's user avatar
  • 1,213
1 vote
1 answer
81 views

See Apple DTS' solution at the bottom of this Post ... I have an oval UIBezierPath with a moving SKSpriteNode, I stop its motion and record the stopped position. I then restart this motion and want it ...
John Love's user avatar
0 votes
1 answer
37 views

I have this minimum reproducible code: class GameViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() if let view = self.view as! SKView? { ...
OMGPOP's user avatar
  • 1,213
0 votes
1 answer
49 views

I have the following minimum reproducible code: class GameViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() if let view = self.view as! SKView? { ...
OMGPOP's user avatar
  • 1,213
2 votes
1 answer
218 views

With a couple of other developers we have been busy with migrating our SpriteKit games and frameworks to Swift 6. There is one issue we are unable to resolve, and this involves the interaction between ...
sanderFrenken's user avatar
0 votes
0 answers
100 views

I have this minimum repro code: import SpriteKit import GameplayKit class MyGameScene3D: SCNScene { weak var node3D: MyNode3D! override init() { super.init() background....
OMGPOP's user avatar
  • 1,213
0 votes
1 answer
74 views

I'm trying to add snow effect to my game scene by using SKEmitterNode. Since the game scene is quite large (25600 x 32000 pixels), I ended up adding the particle effects to the scene camera node. It ...
Bob's user avatar
  • 188
0 votes
0 answers
180 views

I am trying to render a red square using a Metal shader in SpriteKit. Instead I get a white square based on the color I supply when instantiating the SKSpriteNode. Using a default constructor and ...
andrewz's user avatar
  • 5,300
2 votes
1 answer
130 views

I am making a 3D game but would like to reuse some of the components in my existing 2D games (e.g. the pop-up paused window). The top and bottom region where I display menu items are also be 2D. The ...
OMGPOP's user avatar
  • 1,213
0 votes
1 answer
41 views

I am aware that SpriteKit supports compound actions that run in parallel, sequence, etc., and are added to an SKNode with via a single call to SKNode.run What is however, the meaning of multiple, ...
g i i k's user avatar
  • 405
0 votes
0 answers
46 views

I have a scene (code below) in which some nodes should always visually appear to have the same size in the viewport. To achieve this I scale them in sync with the cameraScale. The problem that I am ...
viedev's user avatar
  • 1,663
1 vote
1 answer
311 views

I have the following code: import UIKit import SpriteKit class ViewController: UIViewController { let textureAtlas: SKTextureAtlas required init?(coder: NSCoder) { textureAtlas = ...
OMGPOP's user avatar
  • 1,213
1 vote
1 answer
76 views

I have the following code that builds and runs in a simulator in tvOS 17.5. I am trying to navigate focus between the two SKNodes inside the GameScene that is an SKScene. I am unable to have any of ...
andrewz's user avatar
  • 5,300
0 votes
0 answers
48 views

I have implemented a simple pendulum in SpriteKit that I want to continue swinging forever. I've set the angularDamping of all of my physics bodies to 0, but the pendulum still slows down (eventually ...
Dyldo42's user avatar
  • 2,348
0 votes
0 answers
64 views

I'm trying to call a function that takes in an Array as a reference spill(pool: &objectPool) And the function will make the array pops its first element to run some animations. Once the animation ...
Bob's user avatar
  • 188
1 vote
0 answers
96 views

I am very new to developing IOS games, but have published my first game into the appstore (it was just a very simple dice game like yhatzee using SpriteKit and it has a high-score saved by using ...
Olivia Schroeder's user avatar
0 votes
1 answer
88 views

I am trying to set a transparent background in my gamescene so when it is displayed in gameview a different background is shown. here is my gamescene code: class Gamescene: SKScene, ObservableObject, ...
ECN's user avatar
  • 11
1 vote
1 answer
115 views

I'm having a mare trying to receive TV remote navigation (via the focus engine) in my SpriteKit game. I've got a SwiftUI tvOS app with the following heirarchy: struct SwatchGridSceneView: View { ...
Jacob King's user avatar
  • 6,205
1 vote
1 answer
123 views

In the following code: public class Foo { public func createNode() -> SCNNode { return SCNNode() } public func createNode() -> SKNode { return SKNode() } } ...
AirXygène's user avatar
  • 3,061
0 votes
1 answer
233 views

I'm trying to recreate the sparkle effect from Apple's activity ring animation using SwiftUI. I've found Paul Hudson's Vortex library, which includes a sparkle effect, but as a beginner in SwiftUI ...
user avatar
1 vote
0 answers
35 views

I have a SCNView showing an overlay SKView. I want to transition to another overlay SKView. let newScene = MyNewSKScene() let reveal = SKTransition.reveal(with: .down, duration: 1) currentSKScene....
AirXygène's user avatar
  • 3,061
0 votes
0 answers
72 views

I'm developing an app that moves a "grid" with Spritekit SKAction.move, based on frequent updates from ARKit. It crashes sporadically at camera?.run(moveToAction). Sometimes the app runs for ...
Daniel's user avatar
  • 11
0 votes
2 answers
57 views

I have the following SCSS code to define a ball I have in a game: $color-green-dark: #226f54; $color-cream: #f4f0bb; $color-coffee: #7b4b39; $color-brown: #43291f; .ballType1 { display: flex; ...
Roman Pushkin's user avatar
0 votes
1 answer
133 views

Good morning, I am having an issue with my SKLabel not showing on my Tutorial SKScene. My code is below, I can't seem to find where I went wrong. When trying to add the SKLabel manually, it works fine....
Matt Cantrelle's user avatar
0 votes
0 answers
91 views

I have a SpriteKit SKScene presented via SwiftUI SpriteView. What I want is a mini-map that is a real-time duplicate of the SKScene. So, whatever happens in the main scene also happens in the mini-map....
West1's user avatar
  • 2,062
1 vote
0 answers
126 views

How to detect the location of a mouseDown event for a iOS App using Swift? With the following code snippet, I get the error "Value of type 'UIEvent' has no member 'location' in scope"? ...
user avatar
0 votes
0 answers
119 views

I'm trying to display a SKScene inside SwiftUI on watchOS and detect touch events. var body: some View { GeometryReader { reader in SpriteView(scene: GameScene(size: reader....
Ajul Raj's user avatar
0 votes
1 answer
86 views

I'm working on a game right now, in which when triggered, my custom spritenode subclass, FireAlarm, performs a function where it changes it's texture twice and spawns an "explosion" node. ...
joshuascode's user avatar
0 votes
0 answers
74 views

I'm making a a project that has to use swift playground (.swiftpm); It uses swiftUI for some elements but the main is on a SpriteKit Scene. My problem is that I want to use a particle and it just can'...
Daniel Ishida's user avatar

1
2 3 4 5
265