GameplayKit

RSS for tag

Architect and organize your game logic and incorporate common gameplay behaviors in your app using GameplayKit.

Posts under GameplayKit tag

50 Posts

Post

Replies

Boosts

Views

Activity

Game Porting Toolkit Error
I tried twice to install homebrew and I got a error message twice: Error: apple/apple/game-porting-toolkit 1.1 did not build Logs: /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/00.options.out /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/01.configure /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/01.configure.cc /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/02.make /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/wine64-build If reporting this issue please do so to (not Homebrew/brew or Homebrew/homebrew-core): apple/apple
1
1
2.3k
Jan ’24
Game Center MatchMaker only work on WIFI
I'm working in a game where I integrate matchmaker and it's working fine when I try with two devices under same wifi network, but in the moment I use 5g mobile network and I do the matchmaker, I can still see each other but the game did not start and I see error sending data to the remote player. The game is not yet published and I'm using TestFlight for the clients.
0
0
769
Jan ’24
GameKit - iCloud Sign In Error
Hi everyone, I'm trying to implement matchmaking in visionOS using GameKit and GameCenter. I'm following the example project that been shared but I get an error. Error: The requested operation could not be completed because you are not signed in to iCloud.. I'm getting this error as a result of matchmaking. I'm already logged in to iCloud in Vision Pro Simulator. I've tried to switch off-on every related settings but didn't work. I'm using latest Xcode Dev Beta and visionOS Beta v6. Would you mind share me any workaround? Regards, Melih
3
0
1.4k
Jan ’24
Xcode SceneKit Scene Editor (and GKEntity)
Hello, I've got a question about the Xcode Scene Editor. That is the SceneKit one NOT SpriteKit. According to this documentation: https://developer.apple.com/documentation/scenekit/scnnode/2873004-entity the entity property of a node serialised via the Xcode's scene editor can be set. While the Xcode's SpriteKit Scene Editor has this option I cannot find anything similar in the SceneKit editor. So my question is do *.scn files produced from Xcode contain GameplayKit information such as a GKEntity graph or only SCNNode data? Do I have to parse the scene and programatically create GKEntities? If that is the case there must be an error in the documentation. Thank you!
1
0
1k
Oct ’23
Where can I find software developers for Vision Pros software?
My name is Leuy, a sophomore at the Wharton School of Business, with a passion for entrepreneurship and a strong belief in the potential of VR and AR technologies to reshape our family interactions. I'm currently working on a groundbreaking startup that aims to create a family-oriented co-working and co-learning platform. The essence of my vision is to help busy working parents spend quality time with their kids using virtual reality (VR) and augmented reality (AR) on Apple's vision pros. Do you know where I can find the best software developers to help bring my vision to life? Thanks.
3
1
1.2k
Aug ’23
SceneKit Xcode 15 Beta3
Previously art work used and porting a complex 3D mechanical Clock I am running into constant build errors using my previous art work .scn files I had some success converting my .usdz original to .scn file some convert but most just being in the art folder of the build environment cause this crash and are no longer compatible I use the same art work of gears and parts in UNITY build environment without any build issues most of my clocks have up to 35 different interacting parts These are replicas of classical clock mechanism Is any one else having problems with similar .scn files [?]
1
0
1.1k
Jul ’23
Xcode 15 Beta3 sceneKit templet
I am getting 4 warnings compiling the current template of sceneKit game /Users/helmut/Documents/spaceTime/scntool:1:1 Could not find bundle inside /Library/Developer/CommandLineTools any idea why the bundle is not installed I did a new download twice now still stuck getting these warnings about bundles not installed or not found any solution to correct the download install so the base dependencies are present thank you
0
0
976
Jul ’23
Adding Component to Sprite in SpriteKit/ GameplayKit grey out simulator after launch screen
I have Xcode 14.3.1 /////START of Code import SpriteKit import GameplayKit class PlayerControlComponent : GKComponent, ControlInputDelegate { var touchControlNode : TouchControlInputNode? func setupControls (camera: SKCameraNode, scene: SKScene){ touchControlNode = TouchControlInputNode(frame: scene.frame) touchControlNode?.inputDelegate = self touchControlNode?.position = CGPoint.zero camera.addChild(touchControlNode!) } func follow(command: String?) { print("command:(String(describing: command))") } } ///////End of code I have no error in project and the simulator shows launch screen then precedes to what I have on the game scene when I have no component in the component inspector of the the Sprite(player) when I add a component to the component inspector of the Sprite(player) that is when, after the launch screen, it is a grey screen. The component is supposed to add the controls I created in the TouchContorolNode file and have the camera and controls so as the player moves the controls follow the Sprite(player). Does anyone know why the screen is turning Grey after the launch screen with the comment attached to the Sprite(player)?
1
0
1.1k
Jun ’23
apple chess app on Mac connection failure
Hello, I've been annoying Apple support with my problem for about 3 months! No solution yet! Maybe you have an idea... I have attached a video on YouTube where the problem can be seen. On the left is my girlfriend's laptop and on the right is mine (on the left MacBook Air M1, on the right my MacBook Air M2). As soon as the left is pulled, the right does not arrive. As soon as I move to my right, I immediately see the move on the left at my girlfriend's... Latest updates everywhere. I also installed my MacBook completely fresh with Ventura and tried immediately after registration if it works, but it doesn't work!! Please help me https://youtu.be/twk_eQFpZYk Thanks Tobi
0
0
871
Feb ’23
fix the errors in my code
import UIKit import AVFoundation class ViewController: UIViewController { @IBOutlet weak var player: UIImageView! @IBOutlet weak var enemy: UIImageView! @IBOutlet weak var scoreLabel: UILabel! @IBOutlet weak var gameOverLabel: UILabel! @IBOutlet weak var levelLabel: UILabel! @IBOutlet weak var powerUp: UIImageView! @IBOutlet weak var powerUpLabel: UILabel! var score = 0 var gameOver = false var level = 1 var powerUpActive = false var powerUpTime = 0 var backgroundMusic: AVAudioPlayer! var enemyDeathSound: AVAudioPlayer! var powerUpSound: AVAudioPlayer! override func viewDidLoad() { super.viewDidLoad() // Add swipe gestures let leftSwipe = UISwipeGestureRecognizer(target: self, action: #selector(swipeLeft)) leftSwipe.direction = .left view.addGestureRecognizer(leftSwipe) let rightSwipe = UISwipeGestureRecognizer(target: self, action: #selector(swipeRight)) rightSwipe.direction = .right view.addGestureRecognizer(rightSwipe) // Load sound effects loadSounds() // Start the enemy moving moveEnemy() // Start the game loop Timer.scheduledTimer(timeInterval: 0.01, target: self, selector: #selector(gameLoop), userInfo: nil, repeats: true) } func loadSounds() { let backgroundMusicPath = Bundle.main.path(forResource: "background", ofType: "mp3") let backgroundMusicUrl = URL(fileURLWithPath: backgroundMusicPath!) do { backgroundMusic = try AVAudioPlayer(contentsOf: backgroundMusicUrl) backgroundMusic.numberOfLoops = -1 backgroundMusic.prepareToPlay() backgroundMusic.play() } catch { print("Error loading background music") } let enemyDeathSoundPath = Bundle.main.path(forResource: "enemyDeath", ofType: "wav") let enemyDeathSoundUrl = URL(fileURLWithPath: enemyDeathSoundPath!) do { enemyDeathSound = try AVAudioPlayer(contentsOf: enemyDeathSoundUrl) enemyDeathSound.prepareToPlay() } catch { print("Error loading enemy death sound") } let powerUpSoundPath = Bundle.main.path(forResource: "powerUp", ofType: "wav") let powerUpSoundUrl = URL(fileURLWith
0
0
1k
Jan ’23
What is the best way to create GKPolygonObstacle from Tile Map?
I am working on an iOS game where the character can move in a 2D continuous space with obstacles. I want to implement path finding via GameplayKit. My understanding is that I need to create a GKObstacleGraph object. First I need a GKPolygonObstacle, but I am unsure how. I want to create tile maps for the levels. My questions is, what is the best way to create the GKPolygonObstacle from a tile map. I know that I can create a navigation path (example in the image), is this a step in the right direction? Or do I need to create physics bodies for the obstacles?
0
1
1.4k
Jan ’23
Help requested...
I am running COIN App on multiple accounts. I would like to simply be able pull my 'score' from each account. I am attempting to figure it out so they can be added together, converted back and forth into XYO tokens as well as USD using up to date conversion rates & displayed live on marquee. I have absolutely no idea where to start so ANY help would be greatly appreciated. Thank you.
0
0
857
Oct ’22
Log in screen
Can you tell me if the following within the policy of Apple: We are an educational gaming company and we want to create a Games login screen that has a (login) button and (register) button.Register button will be used to redirect the user to our website for registration and purchases subscriptions and game assets. The login button will be used to login then retrieves data from our servers related to the child account to reflect his/her performance on games since we are educational game, and purchased items and/or levels. The login will also pass the token for communicating progress in the game. Has any one done this design before or advise on it. Thank you
0
0
888
Sep ’22
How to Unit/UI test a game?
Hi there, Could anyone please provide some clues on how to do a Unit/UI test to a game, for me, a beginner in app/game development? I am making a little game, and basically I’ve done coding for the gameplay. My game is rather simple. Basically it just switches between different “GKState”. When entering each state, I give nodes of actors some actions, and when leaving each state, the actions are removed. The nodes are either “SKNode” or “SKSpriteNode” and are wrapped in “GKComponent”. In some states, I give nodes “GKBehavior”. I’ve been thinking how to test. For Unit test, I learned that it’s for the app’s logic. But my (perhaps naive) understanding is that I can prove the logic is all correct because I play the game and it runs well. I accept the point that we should test it numerically not just visually. But, for example, for the “presentScene” method of “SKView”, should I make some dummy scene and, when entering the dummy scene, should I make some dummy nodes with giving the dummy nodes some actions? Perhaps I can do these, but what’s the meaning? For the UI test, I found all I can retrieve from a UI is the images. But for a game, since actors have different positions and speed and images every time I run the game. So it looks for me that it’s not very possible to do UI test for a game, either via the “UI recording” or programmatically. I also think my playing is a test. So far, for Unit test, I just measure the time of loading my resources. For UI test, I just tested a button in my game. Thanks a lot for any clues!
1
0
2.1k
Aug ’22
GKAgent3d wander goal to stop agent from flying around
I am trying to learn GameplayKit and am using it with SceneKit so I am using a GKAgent3d for my agent to set behaviours on. I have got behaviours working but I am trying to have the agent wander around a plane that I have representing ground but when the agent is wandering it seems to be wandering on all axis so it just ends up flying around. Is there any way to have the agent stick to the ground when it is wandering?
2
1
980
Jul ’22
Struggling Amateur: GKGridGraph implementation.
Hello! I'm very new to coding and am exploring a basic proof of concept which I can then work off. What I would like to do is a create a grid over a tilemap that can be navigated by a player piece. A simple piece, and my input on the grid would tell the piece to walk toward and stop on the clicked tile. Not bothered with graphics yet. I have dug into the documentation for Xcode, reading the Pathfinding via GameplayKit and SceneKit structures. I have identified that I believe I will need to work with the GKGridGraph, for an integer based grid. I will also obviously need a player controller, utilising touch controls. The first thing I am trying to work out... is how to actually create and implement the GKGridGraph. If anyone could.. explain it like I'm an absolute... dummy, or has some tutorials that will help me with this, it would be greatly appreciated.
1
1
990
Jul ’22
Game Porting Toolkit Error
I tried twice to install homebrew and I got a error message twice: Error: apple/apple/game-porting-toolkit 1.1 did not build Logs: /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/00.options.out /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/01.configure /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/01.configure.cc /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/02.make /Users/omarzunun/Library/Logs/Homebrew/game-porting-toolkit/wine64-build If reporting this issue please do so to (not Homebrew/brew or Homebrew/homebrew-core): apple/apple
Replies
1
Boosts
1
Views
2.3k
Activity
Jan ’24
Game Center MatchMaker only work on WIFI
I'm working in a game where I integrate matchmaker and it's working fine when I try with two devices under same wifi network, but in the moment I use 5g mobile network and I do the matchmaker, I can still see each other but the game did not start and I see error sending data to the remote player. The game is not yet published and I'm using TestFlight for the clients.
Replies
0
Boosts
0
Views
769
Activity
Jan ’24
GameKit - iCloud Sign In Error
Hi everyone, I'm trying to implement matchmaking in visionOS using GameKit and GameCenter. I'm following the example project that been shared but I get an error. Error: The requested operation could not be completed because you are not signed in to iCloud.. I'm getting this error as a result of matchmaking. I'm already logged in to iCloud in Vision Pro Simulator. I've tried to switch off-on every related settings but didn't work. I'm using latest Xcode Dev Beta and visionOS Beta v6. Would you mind share me any workaround? Regards, Melih
Replies
3
Boosts
0
Views
1.4k
Activity
Jan ’24
Xcode SceneKit Scene Editor (and GKEntity)
Hello, I've got a question about the Xcode Scene Editor. That is the SceneKit one NOT SpriteKit. According to this documentation: https://developer.apple.com/documentation/scenekit/scnnode/2873004-entity the entity property of a node serialised via the Xcode's scene editor can be set. While the Xcode's SpriteKit Scene Editor has this option I cannot find anything similar in the SceneKit editor. So my question is do *.scn files produced from Xcode contain GameplayKit information such as a GKEntity graph or only SCNNode data? Do I have to parse the scene and programatically create GKEntities? If that is the case there must be an error in the documentation. Thank you!
Replies
1
Boosts
0
Views
1k
Activity
Oct ’23
Where can I find software developers for Vision Pros software?
My name is Leuy, a sophomore at the Wharton School of Business, with a passion for entrepreneurship and a strong belief in the potential of VR and AR technologies to reshape our family interactions. I'm currently working on a groundbreaking startup that aims to create a family-oriented co-working and co-learning platform. The essence of my vision is to help busy working parents spend quality time with their kids using virtual reality (VR) and augmented reality (AR) on Apple's vision pros. Do you know where I can find the best software developers to help bring my vision to life? Thanks.
Replies
3
Boosts
1
Views
1.2k
Activity
Aug ’23
SceneKit Xcode 15 Beta3
Previously art work used and porting a complex 3D mechanical Clock I am running into constant build errors using my previous art work .scn files I had some success converting my .usdz original to .scn file some convert but most just being in the art folder of the build environment cause this crash and are no longer compatible I use the same art work of gears and parts in UNITY build environment without any build issues most of my clocks have up to 35 different interacting parts These are replicas of classical clock mechanism Is any one else having problems with similar .scn files [?]
Replies
1
Boosts
0
Views
1.1k
Activity
Jul ’23
Xcode 15 Beta3 sceneKit templet
I am getting 4 warnings compiling the current template of sceneKit game /Users/helmut/Documents/spaceTime/scntool:1:1 Could not find bundle inside /Library/Developer/CommandLineTools any idea why the bundle is not installed I did a new download twice now still stuck getting these warnings about bundles not installed or not found any solution to correct the download install so the base dependencies are present thank you
Replies
0
Boosts
0
Views
976
Activity
Jul ’23
Adding Component to Sprite in SpriteKit/ GameplayKit grey out simulator after launch screen
I have Xcode 14.3.1 /////START of Code import SpriteKit import GameplayKit class PlayerControlComponent : GKComponent, ControlInputDelegate { var touchControlNode : TouchControlInputNode? func setupControls (camera: SKCameraNode, scene: SKScene){ touchControlNode = TouchControlInputNode(frame: scene.frame) touchControlNode?.inputDelegate = self touchControlNode?.position = CGPoint.zero camera.addChild(touchControlNode!) } func follow(command: String?) { print("command:(String(describing: command))") } } ///////End of code I have no error in project and the simulator shows launch screen then precedes to what I have on the game scene when I have no component in the component inspector of the the Sprite(player) when I add a component to the component inspector of the Sprite(player) that is when, after the launch screen, it is a grey screen. The component is supposed to add the controls I created in the TouchContorolNode file and have the camera and controls so as the player moves the controls follow the Sprite(player). Does anyone know why the screen is turning Grey after the launch screen with the comment attached to the Sprite(player)?
Replies
1
Boosts
0
Views
1.1k
Activity
Jun ’23
Can you use SceneKit with SwiftUI for spatial experiences
I’m wondering if it’s possible to use SceneKit or GamePlayKit to handle physics etc and having SwiftUI to create the 3D content?
Replies
0
Boosts
1
Views
1.3k
Activity
Jun ’23
apple chess app on Mac connection failure
Hello, I've been annoying Apple support with my problem for about 3 months! No solution yet! Maybe you have an idea... I have attached a video on YouTube where the problem can be seen. On the left is my girlfriend's laptop and on the right is mine (on the left MacBook Air M1, on the right my MacBook Air M2). As soon as the left is pulled, the right does not arrive. As soon as I move to my right, I immediately see the move on the left at my girlfriend's... Latest updates everywhere. I also installed my MacBook completely fresh with Ventura and tried immediately after registration if it works, but it doesn't work!! Please help me https://youtu.be/twk_eQFpZYk Thanks Tobi
Replies
0
Boosts
0
Views
871
Activity
Feb ’23
fix the errors in my code
import UIKit import AVFoundation class ViewController: UIViewController { @IBOutlet weak var player: UIImageView! @IBOutlet weak var enemy: UIImageView! @IBOutlet weak var scoreLabel: UILabel! @IBOutlet weak var gameOverLabel: UILabel! @IBOutlet weak var levelLabel: UILabel! @IBOutlet weak var powerUp: UIImageView! @IBOutlet weak var powerUpLabel: UILabel! var score = 0 var gameOver = false var level = 1 var powerUpActive = false var powerUpTime = 0 var backgroundMusic: AVAudioPlayer! var enemyDeathSound: AVAudioPlayer! var powerUpSound: AVAudioPlayer! override func viewDidLoad() { super.viewDidLoad() // Add swipe gestures let leftSwipe = UISwipeGestureRecognizer(target: self, action: #selector(swipeLeft)) leftSwipe.direction = .left view.addGestureRecognizer(leftSwipe) let rightSwipe = UISwipeGestureRecognizer(target: self, action: #selector(swipeRight)) rightSwipe.direction = .right view.addGestureRecognizer(rightSwipe) // Load sound effects loadSounds() // Start the enemy moving moveEnemy() // Start the game loop Timer.scheduledTimer(timeInterval: 0.01, target: self, selector: #selector(gameLoop), userInfo: nil, repeats: true) } func loadSounds() { let backgroundMusicPath = Bundle.main.path(forResource: "background", ofType: "mp3") let backgroundMusicUrl = URL(fileURLWithPath: backgroundMusicPath!) do { backgroundMusic = try AVAudioPlayer(contentsOf: backgroundMusicUrl) backgroundMusic.numberOfLoops = -1 backgroundMusic.prepareToPlay() backgroundMusic.play() } catch { print("Error loading background music") } let enemyDeathSoundPath = Bundle.main.path(forResource: "enemyDeath", ofType: "wav") let enemyDeathSoundUrl = URL(fileURLWithPath: enemyDeathSoundPath!) do { enemyDeathSound = try AVAudioPlayer(contentsOf: enemyDeathSoundUrl) enemyDeathSound.prepareToPlay() } catch { print("Error loading enemy death sound") } let powerUpSoundPath = Bundle.main.path(forResource: "powerUp", ofType: "wav") let powerUpSoundUrl = URL(fileURLWith
Replies
0
Boosts
0
Views
1k
Activity
Jan ’23
What is the best way to create GKPolygonObstacle from Tile Map?
I am working on an iOS game where the character can move in a 2D continuous space with obstacles. I want to implement path finding via GameplayKit. My understanding is that I need to create a GKObstacleGraph object. First I need a GKPolygonObstacle, but I am unsure how. I want to create tile maps for the levels. My questions is, what is the best way to create the GKPolygonObstacle from a tile map. I know that I can create a navigation path (example in the image), is this a step in the right direction? Or do I need to create physics bodies for the obstacles?
Replies
0
Boosts
1
Views
1.4k
Activity
Jan ’23
chooseBestHostingPlayer is very slow
I am trying to use this method to figure out the server-client config, however, it usually takes ~10 seconds for even a match with two players. Is that typical? I searched internet and there is not much talking about this function. Any people is using this API for their own work? any suggestion?
Replies
0
Boosts
0
Views
1.1k
Activity
Nov ’22
Help requested...
I am running COIN App on multiple accounts. I would like to simply be able pull my 'score' from each account. I am attempting to figure it out so they can be added together, converted back and forth into XYO tokens as well as USD using up to date conversion rates & displayed live on marquee. I have absolutely no idea where to start so ANY help would be greatly appreciated. Thank you.
Replies
0
Boosts
0
Views
857
Activity
Oct ’22
Is scenekit powerful ?
Is scenekit powerful ? Or can i create a game with scenekit that has the same quality as say a game made in unity or it is just too weak ??
Replies
2
Boosts
0
Views
2.6k
Activity
Oct ’22
Log in screen
Can you tell me if the following within the policy of Apple: We are an educational gaming company and we want to create a Games login screen that has a (login) button and (register) button.Register button will be used to redirect the user to our website for registration and purchases subscriptions and game assets. The login button will be used to login then retrieves data from our servers related to the child account to reflect his/her performance on games since we are educational game, and purchased items and/or levels. The login will also pass the token for communicating progress in the game. Has any one done this design before or advise on it. Thank you
Replies
0
Boosts
0
Views
888
Activity
Sep ’22
How to Unit/UI test a game?
Hi there, Could anyone please provide some clues on how to do a Unit/UI test to a game, for me, a beginner in app/game development? I am making a little game, and basically I’ve done coding for the gameplay. My game is rather simple. Basically it just switches between different “GKState”. When entering each state, I give nodes of actors some actions, and when leaving each state, the actions are removed. The nodes are either “SKNode” or “SKSpriteNode” and are wrapped in “GKComponent”. In some states, I give nodes “GKBehavior”. I’ve been thinking how to test. For Unit test, I learned that it’s for the app’s logic. But my (perhaps naive) understanding is that I can prove the logic is all correct because I play the game and it runs well. I accept the point that we should test it numerically not just visually. But, for example, for the “presentScene” method of “SKView”, should I make some dummy scene and, when entering the dummy scene, should I make some dummy nodes with giving the dummy nodes some actions? Perhaps I can do these, but what’s the meaning? For the UI test, I found all I can retrieve from a UI is the images. But for a game, since actors have different positions and speed and images every time I run the game. So it looks for me that it’s not very possible to do UI test for a game, either via the “UI recording” or programmatically. I also think my playing is a test. So far, for Unit test, I just measure the time of loading my resources. For UI test, I just tested a button in my game. Thanks a lot for any clues!
Replies
1
Boosts
0
Views
2.1k
Activity
Aug ’22
GKAgent3d wander goal to stop agent from flying around
I am trying to learn GameplayKit and am using it with SceneKit so I am using a GKAgent3d for my agent to set behaviours on. I have got behaviours working but I am trying to have the agent wander around a plane that I have representing ground but when the agent is wandering it seems to be wandering on all axis so it just ends up flying around. Is there any way to have the agent stick to the ground when it is wandering?
Replies
2
Boosts
1
Views
980
Activity
Jul ’22
Struggling Amateur: GKGridGraph implementation.
Hello! I'm very new to coding and am exploring a basic proof of concept which I can then work off. What I would like to do is a create a grid over a tilemap that can be navigated by a player piece. A simple piece, and my input on the grid would tell the piece to walk toward and stop on the clicked tile. Not bothered with graphics yet. I have dug into the documentation for Xcode, reading the Pathfinding via GameplayKit and SceneKit structures. I have identified that I believe I will need to work with the GKGridGraph, for an integer based grid. I will also obviously need a player controller, utilising touch controls. The first thing I am trying to work out... is how to actually create and implement the GKGridGraph. If anyone could.. explain it like I'm an absolute... dummy, or has some tutorials that will help me with this, it would be greatly appreciated.
Replies
1
Boosts
1
Views
990
Activity
Jul ’22
How many touches are supported by iphone 13 max pro
can't play fps game with 6 fingers
Replies
1
Boosts
0
Views
1k
Activity
May ’22