Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
52 views

I have an app built [in Objective C] for MacOS using SKScene and GameScene that has a floating window with some text in it (a clock). It works great, floats and shows the text. I have implemented hit ...
Glenn Reid's user avatar
1 vote
1 answer
72 views

I have a SKScene, which runs an action, which is spawing notes. The scene runs in a SwiftUI View. The Notes color originates from a Color (from Assets) which is having a Dark and Any mode variant. ...
Mario's user avatar
  • 988
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
1 vote
1 answer
244 views

I have two scenes I want to transition between: class TestGameScene: SKScene { override func didMove(to view: SKView) { size = view.frame.size scaleMode = .resizeFill let ...
rayaantaneja's user avatar
  • 1,764
1 vote
0 answers
54 views

I am developing an iOS application for a "green screen" using ARKit. That is display an image as a background in a ARFaceTrackingConfiguration AR session (similar to the "green screen&...
DCDC's user avatar
  • 536
0 votes
0 answers
46 views

I am creating a game in GameScene/SKScene using SpriteKit, and I am trying to display a AdMob Banner Ad. Somehow the Banner Ad won't show up. This is the Banner Ad part of my code that I am currently ...
Saland's user avatar
  • 15
2 votes
1 answer
281 views

I'm a mega-noob to SpriteKit / iOS dev, so sorry if this is a stupid question. What I'm trying to do is have a small game presented in a SwiftUI View. Everything works mostly perfect, except that for ...
Lucas Cannon's user avatar
0 votes
1 answer
48 views

Neither adding a SKShapeNode nor adding a SKLabelNode to a SKScene appears to work? My gut guesses that I have a coordinate problem .. so here's the short code snippet which I have placed in my ...
user avatar
0 votes
0 answers
53 views

To scroll a SKNode (called scroller) within a SKScene (called menuScene), I'm doing the following, which works perfectly but I'm not sure if it's the correct way to achieve this. Within the ...
Mateus's user avatar
  • 415
0 votes
1 answer
84 views

How do I eliminate SKScene.scaleMode = .aspectFit cutting off on all four sides with rotation? I read elsewhere: .aspectFit Scales the content to fill the size of the view. Some portion of the ...
user avatar
0 votes
1 answer
83 views

My SKScene will show sized correctly in the Simulator, before rotation, but not after? If the Simulator is preset to Portrait, my SKScene is sized correctly .. and ditto if preset to Landscape. But, ...
user avatar
2 votes
0 answers
486 views

There are a lot of tutorials out there about how to create a rainfall and snowfall effect using SKScene. I was wondering if anyone has any idea how I could create the effect of snow accumulating at ...
Luca's user avatar
  • 1,904
1 vote
0 answers
38 views

I am making a very simple game in SpriteKit where a sprite is going in a straight line from left to right. I use applyForce() to give it a constant push. I noticed though, that there are random ...
OhKai's user avatar
  • 11
1 vote
1 answer
207 views

I am trying to detect two simultaneous touches in my sprite kit game, but the game only detects my first touch and ignores the second one. I am using touchesBegan, touchesMoved, and touchesCancelled: ...
Andrew Seaman's user avatar
1 vote
1 answer
388 views

I'm trying to intercept mouse click events inside SpriteKit SKScene inside a a SwiftUI SpriteView in Mac OS. Overriding touchesBegun() that accepts an NSEvent object is never called when I click ...
andrewz's user avatar
  • 5,300
0 votes
1 answer
230 views

I have a class 'GameplaySceneClass' which is an SKScene and I would like to pass parameters to it and then present the scene. The class can be seen below class GameplaySceneClass: SKScene, ...
James Taga's user avatar
1 vote
1 answer
1k views

In the test code below the blue ellipse is drawn, but the red ellipse is not drawn. Is there a way to handle the onChange and call a drawing function in a SpriteKit scene? (The print statement inside ...
Robert22's user avatar
  • 101
1 vote
0 answers
99 views

I have a SKScene which I am Using aspectFit scaleMode because I want use this scene across multiple devices. Is there any way to change the letterbox color to transparent? This is the result of my ...
danTheMan's user avatar
0 votes
1 answer
195 views

I have a UIView that I want to position on top of a certain area in an SKScene. This is the point that I have in my SKScene: guard let point = elementCGPoints.centroid() else { return } ...
narner's user avatar
  • 3,221
2 votes
3 answers
1k views

The Virtual controllers appear but are then obscured by objects added to the view. I've also tried adding the virtual controllers in the UIViewController but this doesn't work either. Is it possible ...
originalmyth's user avatar
3 votes
1 answer
239 views

Update - see my own answer, it was a retain cycle with very indirect results. I wrote an article about it and the struggle to diagnose. I have a very weird bug apparently as some kind of side-effect ...
Andy Dent's user avatar
  • 18.1k
1 vote
1 answer
209 views

I've created a new SpriteKit project and want the scene to fill the screen entirely. I have defined the GameScene with iPhone 12 screen dimensions (390pt x 844pt) and specified the following in ...
Caspar Broekhuizen's user avatar
0 votes
1 answer
76 views

XCode Version 12.4 (12D4e) The first SKScene class in Functions.swift included the buildBackground function which I want to call in different SKScene class. class Functions: SKScene { func ...
Eugene Truuts's user avatar
2 votes
1 answer
342 views

I know my question is similar to SKScene view not filling screen but the answer there does not answer the issue I am having. I want the screen to fill the entire screen and not just a sub-section of ...
ZackSied's user avatar
1 vote
1 answer
1k views

I'd like to "preload" a view (including a SKScene) to gather the bounds of the display area of this scene. The size information is needed to precompute additional data, the computation ...
osx's user avatar
  • 146
0 votes
1 answer
47 views

I have: GameViewController, where I setup a 3D scene and a function "fire". Then I have another SKScene, which is overlaid, so I cannot click the nodes on the 3D scene. On the SKScene I have ...
mptaurus's user avatar
1 vote
1 answer
227 views

I want to display an AdMob Banner Ad over an SKScene. Right now, I have the following code in the GameViewController, but nothing is appearing in the SKScene. Do I need to include code in the didMove ...
helloworld12345's user avatar
0 votes
1 answer
27 views

in XCode 12, using Swift 5, create a new Project using the Game SpriteKit technology. That generates amongst other things: GameViewController.swift GameScene.swift In GameScene.swift I added after ...
Luca Toldo's user avatar
1 vote
0 answers
84 views

I try to make a view controller, where i.e top half of the screen is SKScene, and bottom half of the screen is normal scene, I mean with buttons etc. Is this possible? I created a Single View ...
Anthon Santhez's user avatar
1 vote
0 answers
168 views

Right now I am setting up SwiftUI to use as my UI in SpriteKit game. I have it set up so my game launches and works fine. My UI view is set up like this struct GameView: View{ @ObservedObject var ...
Berhtulf's user avatar
2 votes
1 answer
301 views

Recently I've created a new Xcode - Game project. Without touching anything I ran the template. I was expecting a standard Hello World! app, but I noticed one thing. Instead of pretty filled ...
Czkii's user avatar
  • 53
0 votes
1 answer
109 views

I'm loading a SKScene from a file. In it, a SKShapeNode that I can see on the screen. But if set the "custom class" to a class like TestNode below, the ShapeNode won't be rendered: ...
Eternam's user avatar
  • 23
1 vote
1 answer
313 views

I am using sceneKit in my project, and would like to add a red sphere (as a marker)on the location that the user taps on a 3d model of a human body (see picture below). With the code I have currently, ...
Asritha Bodepudi's user avatar
2 votes
1 answer
255 views

I am working on a simple game to learn the new functionality of SwiftUI with SpriteKit in Xcode 12. When a user touches the SKScene touchesBegan() everything works as expected. When a user touches the ...
Dopp's user avatar
  • 29
0 votes
1 answer
84 views

I am creating a game, where you control using swipes and I wanted to know if it is possible to handle sideways swipes using UIGestureRecodnizer? If so how do I do it. In other word: Instead of having ...
Nocturne's user avatar
0 votes
0 answers
19 views

I'm currently making a game with several levels in Swift. Each level is controlled by its own class that is initialised when the level is to be played. Is it possible to connect all these classes to a ...
Frævik's user avatar
  • 19
0 votes
1 answer
134 views

I have created SKScene via SpriteKit tested it like 2D app. Here is my viewController. Everything works fine. class GameViewController: UIViewController { override func viewDidLoad() { ...
hexwhyzet's user avatar
1 vote
1 answer
115 views

I made a subclass of SKSpriteNode called JoyStick that follows the delegate pattern, where its delegate is GameScene. In an effort to further clean up the GameScene, the JoyStick class also implements ...
muZero's user avatar
  • 978
1 vote
2 answers
683 views

I'm writing a game in SpriteKit that has a joystick to control the player. Previously, I had kept most of the joystick logic in the main GameScene's touchesBegan, touchesMoved, and touchesEnded ...
muZero's user avatar
  • 978
2 votes
1 answer
218 views

Given a SpriteKit scene s, and one node a of type T that inherits from SKSpriteNode contained within s, if both s and a override any touch handler, the touch event is called exclusively on what seems ...
Johnny Bueti's user avatar
1 vote
0 answers
81 views

I tried to add a subview to my GameViewController (because I want to add a banner ad at the bottom). I created it as follows: if let view = self.view as! SKView? { let subView = SKView(...
Moses Harding's user avatar
0 votes
0 answers
496 views

I have a program that used sktilemap and noise map to generate maps. At the end i have a code to export the scene as an image, but the image is cropped and i see less content in the saved image than ...
ZeeBlueAngel's user avatar
0 votes
3 answers
951 views

I am creating this game in SpriteKit. At first launch, the GameViewController presents another ViewController called the MenuViewController linked with a storyboard. And in the MenuViewController ...
Kevin Wang's user avatar
2 votes
2 answers
328 views

Desired behaviour The red node (players arm) is connected to the blue one with a pinned joint. The red node has a physicsBody because: 1) it should move if the blue node does and 2) it should collide ...
ixany's user avatar
  • 6,200
0 votes
2 answers
196 views

I have a .dae file which is in shape of a Medal. Now this .dae file has a label element. I want to load this .dae file and want to update text on that label at runtime so user name will come there. ...
Mohsin Khan's user avatar
0 votes
1 answer
45 views

I am creating an iOS game using sprite kit scene. My sprite kit scenes are sit to a scale value of x = 1136 by y = 640, creating a horizontal game play. This resolution adjusts to all iPhones up to ...
Gage's user avatar
  • 81
0 votes
1 answer
52 views

multiple SKShapeNode are created like below: for i in 1...20 { let waitAct = SKAction.wait(forDuration: delay) self.run(waitAct) { let disc = SKShapeNode(rectOf: ...
jdleung's user avatar
  • 1,088
1 vote
0 answers
77 views

Using CALayer's beginTime we're able to scrub through animations. Is there any way to achieve the same when using SpriteKit? Is there anything similar for SKScene or SKView?
h4master's user avatar
1 vote
3 answers
529 views

I have a GameScene.sks a custom class GameScene.swift which is connected via the Custom Class Inspector (on the right in Xcode). This is working fine. Now in the GameScene.swift where I want to ...
Adam Musial-Bright's user avatar
1 vote
0 answers
105 views

I am not looking to remove all children in the SkScene, I want to completely close the scene once the game is over. Yes I have tried all of the solutions posted here, need some way of either ...
Balaach's user avatar
  • 125

1
2 3 4 5
14