This question is regarding "No Font" problem in SKLabelNode that appears in SpriteKit scene editor in Xcode:
I pulled the recent changes in the project where a new font was added. Checked everything:
Font included into the Copy Bundle Resources -…
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 GameViewController class:
Note: I've added print…
im try to use the font "SFMono-Light" as font of my SKlabel.. but keep getting the error says "SKLabelNode: SFMono-Light" font not found.
func loadSKscene()->SKScene{ // load screenPFD
let loadedScene = SKScene(fileNamed:…
(All the following code has been written in Swift Playgrounds)
First I added 3 variables and put those in an array
var rnaBacteriaCopy1 = SKSpriteNode()
var rnaBacteriaCopy2 = SKSpriteNode()
var rnaVirusCopy4 = SKSpriteNode()
let rnaCopies =…
I am trying to code a word collision detection game.
The problem is that before I add rectangle as a background of my words, all of my codes are working, I can detect the collision and take action. but after add rectangle, I have to change my…
I am working on metal view that shows the heart rate graph. between every peak of this graph, I need to add a label.
In this process, chart moving from right to left
I have an array that dynamically shows the x coordinate of this label
for example…
I am creating a SpriteKit game and want to be able to take advantage of textAlerts - like all the games I grew up playing. I also want them to be flexible so I can subclass them and add them throughout my game - I am not sure how to do this and so…
I added some SKLAbelNode into SKNode, which is placed inside SKScene
I need SKNode for grouping some nodes
I added name "altitude" to my SKLAbelNode
and put this code into SKScene class which was associated with my .sks file
var altitude:SKLabelNode…
I'm using UISliders in my SpriteKit game.
Sometimes I want to pause the game and add some info in an SKLabelNode but I can't find a way to position the SKLabelNode on top of a UISlider.
Here's a simplified example.
override func didMove(to view:…
In this drag and drop game (adapted from this tutorial), the player has to match the label to the right target. I have it set so that if the touch ends and the label's center is inside the target, it is removed from the screen and the game starts…
I have this code to put a score label for my game in the top left corner of the screen.
scoreLabel = SKLabelNode(text:"bats avoided: \(score)")
scoreLabel.fontSize = 50
scoreLabel.horizontalAlignmentMode = .left
scoreLabel.position…
I'm trying to change color on SKLabelNode in my project.
When I run the project on iPhone 5s with iOS 11.1.2 the SKLabelNode have the correct color, but when I run the project on iPad with iOS 9.3.5
the SKLabelNode appears in white.
Here is how I…
I am trying to store in integer value in a SKLabelNode but I keep geting an error that I can only store strings. I need it as an integer later. Here is my code:
import SpriteKit
import GameplayKit
class GameScene: SKScene {
override func…
Spiked text in SKLabelNode, font exist in project. When add text in SKLabel node I see many artefacts on font like this :
enter image description here
this screen shot from iPhone 6s. I think this is SpriteKit work, but hove fix this?
I have a SKLabelNode called round. Here is the code for that below:
round = SKLabelNode(fontNamed: "arial")
round.text = "Round: 1"
round.color = UIColor.white
round.fontSize = 20
round.position.x = 150
round.position.y = 100
round.zPosition =…