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

video error
Hello, I hope you are well. I am developing a hybrid application, the application as such is web, the problem I have is that iOS does not display videos in safari, in Google Chrome yes, when I take out the application for iOS it does not display the videos either, I do not know if It would be due to the same problem that happens with safari. to hybridize the application I am using capacitor / core
0
0
837
Apr ’22
How to construct GKGridGraph using only traversable nodes
I am trying to use GameplayKit's GKGridGraph for a turn-based strategy game. A typical way of using this data structure seems to be to initialize a new GKGridGraph by passing it the grid dimensions, plus a few other params. This results in a fully constructed and connected grid graph of nodes. Then the technique I have seen is to manually remove the nodes that you don't want your agent to be able to traverse, for later usage of findPath(). However, I have found the remove() method to be really bad on performance, for example it takes around 100x longer to call the remove() method than to add a node to the grid graph. I do not know if this is a bug in the framework or not. That performance is going to be a show-stopper for me, so using that technique is not going to be an option for me. I can post all requisite code if there is anyone out there who knows anything about how to use GKGridGraph. Does anyone know how to construct a grid-aware, fully connected GKGridGraph correctly using only the nodes that you want to be in the graph? Also, if there are any Apple support/engineers out there reading this, wow it is hard to get started with GameplayKit due to lack of documentation/tutorials/project samples that are anything more than just the most basic simple use cases. I do believe that GameplayKit is a very well designed framework, but any examples beyond the basics seem to be non-existent anywhere on the internet (March 2022), and the API docs are woefully too little information to get started beyond a Flappy Bird clone. I am attempting to build a professional game. For example, I was not able to find a single example anywhere of how to use a GKGridGraph with a sub-classed GKGridGraphNode class, and then to prep the grid for traversal and usage of findPath(). This technique is only vaguely hinted at in the Apple-supplied Pathfinding sample project at Pathfinding Sample Project. Any help would be greatly appreciated. I am considering abandoning GameplayKit simply due to lack of documentation at this point, but I do believe underneath it is a really good framework, if you know things about it beyond what the API docs tell you.
3
0
1.1k
Mar ’22
GKComponentSystem memory leaking
All GKComponents, registered in some GKComponentSystem, become indestructible after destroying the GKComponentSystem. To avoid that GKComponentSystem must explicitly remove all owned components before being destroyed. Looks like GKComponentSystem has some problem with strong references.
2
0
1.2k
Feb ’22
How to test achievements in 2021
Hello I'm reading a lot about people talking about "sandbox" accounts (that from my understanding actually is no longer available starting from iOS9) or development builds... but I can't find a comprehensive documentation that explain what to do to test achievements. This is the flow that I'm following to add achievements to my game. It is not fully working since I can't see the popup "completed" when I set the achievement as accomplished but other items are working as expected (I can set an achievement as done and I can retrieve the list of completed achievements). Description of my current situation Added all the achievements via AppStoreConnect Created a new version of my App and added the Achievements to this new version (This version has not been submitted yet, but the App is already on the App Store with another version) via AppStoreConnect My App is written in Unity. So I've added all the needed code there. I see that I can unlock achievements and I can retrieve a list of all the unlocked achievements. So the code seems to work as expected. I'm running the App directly from Xcode... it is not uploaded to Testflight. Problems and Doubts When I unlock an achievement the "completed" popup is not shown If I open GameCenter, under my game, I do not see a list of available Achievements. I suppose this is the correct behaviour since the version with the achievements has not been submitted and approved. I'm wondering... which is the right way to test achievements? Someone is talking about using "development" builds... other say to use sandbox accounts... is there a documentation out there that explains the right flow?!
1
1
1.2k
Dec ’21
How to test GameCenter Achievements before publishing?
I'm adding GameCenter Achievements to my game:           let a = GKAchievement(identifier: "levelcomplete2"); a.percentComplete = 100; GKAchievement.resetAchievements() { (e) in 	 print("ERRORA: \(e)") } GKAchievement.report([a]) { (e) in 	 print("ERROR: \(e)");  }; The error shows "nil" but because the Achievement isn't live yet (the App is not published), there's no success-banner showing in the app. How can I test if it's working?
1
0
1.4k
Dec ’21
loadAchievementsWithCompletionHandler not returning hidden achievements
When I run loadAchievementsWithCompletionHandler the results are supposed to give me "The achievements that you previously reported progress for the local player." This is only partially correct. Any achievement I have marked as "hidden" is only returned by that function during the session that I unlock it in. If I quit and resume the game, I will never receive results of that unlocked hidden achievement again. We need to know which achievements the user has gotten but the hidden ones are impossible to query. Is there some other way we should be doing this?
0
0
609
Nov ’21
Xccode 12 game Fullscreen
hi, when i create a game with xcode 12 i have black bars on top and bottom on the phone or in the simulator,  scene.scaleMode = .aspectFill doesn't seem to work. if you do the same in Xcode 11 then it works in full screen without problems. is that a mistake or are there new settings for it. if I start the project created with xcode 11 in xcode 12 then it is also in fullscrenn
7
0
4.7k
Nov ’21
free fire game crash
after free fire update i am not able to play this game at my iphone.when i start game the game app backed me automatically. it makes me too much problem fo playing games.. besides my all apps r crashing when i use it for long time..please give an update for solving this phone bugs..
1
0
2.1k
Aug ’21
video error
Hello, I hope you are well. I am developing a hybrid application, the application as such is web, the problem I have is that iOS does not display videos in safari, in Google Chrome yes, when I take out the application for iOS it does not display the videos either, I do not know if It would be due to the same problem that happens with safari. to hybridize the application I am using capacitor / core
Replies
0
Boosts
0
Views
837
Activity
Apr ’22
How to construct GKGridGraph using only traversable nodes
I am trying to use GameplayKit's GKGridGraph for a turn-based strategy game. A typical way of using this data structure seems to be to initialize a new GKGridGraph by passing it the grid dimensions, plus a few other params. This results in a fully constructed and connected grid graph of nodes. Then the technique I have seen is to manually remove the nodes that you don't want your agent to be able to traverse, for later usage of findPath(). However, I have found the remove() method to be really bad on performance, for example it takes around 100x longer to call the remove() method than to add a node to the grid graph. I do not know if this is a bug in the framework or not. That performance is going to be a show-stopper for me, so using that technique is not going to be an option for me. I can post all requisite code if there is anyone out there who knows anything about how to use GKGridGraph. Does anyone know how to construct a grid-aware, fully connected GKGridGraph correctly using only the nodes that you want to be in the graph? Also, if there are any Apple support/engineers out there reading this, wow it is hard to get started with GameplayKit due to lack of documentation/tutorials/project samples that are anything more than just the most basic simple use cases. I do believe that GameplayKit is a very well designed framework, but any examples beyond the basics seem to be non-existent anywhere on the internet (March 2022), and the API docs are woefully too little information to get started beyond a Flappy Bird clone. I am attempting to build a professional game. For example, I was not able to find a single example anywhere of how to use a GKGridGraph with a sub-classed GKGridGraphNode class, and then to prep the grid for traversal and usage of findPath(). This technique is only vaguely hinted at in the Apple-supplied Pathfinding sample project at Pathfinding Sample Project. Any help would be greatly appreciated. I am considering abandoning GameplayKit simply due to lack of documentation at this point, but I do believe underneath it is a really good framework, if you know things about it beyond what the API docs tell you.
Replies
3
Boosts
0
Views
1.1k
Activity
Mar ’22
GKComponentSystem memory leaking
All GKComponents, registered in some GKComponentSystem, become indestructible after destroying the GKComponentSystem. To avoid that GKComponentSystem must explicitly remove all owned components before being destroyed. Looks like GKComponentSystem has some problem with strong references.
Replies
2
Boosts
0
Views
1.2k
Activity
Feb ’22
Iphone 12
My new iphone 12 128gb variant is not functioning properly, i experience frame drops while plaing pubg mobile. Is there a way to fix this ?
Replies
2
Boosts
0
Views
1k
Activity
Jan ’22
Animation in Swift iOS
Hi, I want to add some animations in my quiz module in an app. Animations like bow arrow, floating balloons, etc. In bow arrow the arrow will hit the target on tap. How can I achieve these animations in swift? Thanks in advance.
Replies
0
Boosts
0
Views
1.1k
Activity
Jan ’22
How to test achievements in 2021
Hello I'm reading a lot about people talking about "sandbox" accounts (that from my understanding actually is no longer available starting from iOS9) or development builds... but I can't find a comprehensive documentation that explain what to do to test achievements. This is the flow that I'm following to add achievements to my game. It is not fully working since I can't see the popup "completed" when I set the achievement as accomplished but other items are working as expected (I can set an achievement as done and I can retrieve the list of completed achievements). Description of my current situation Added all the achievements via AppStoreConnect Created a new version of my App and added the Achievements to this new version (This version has not been submitted yet, but the App is already on the App Store with another version) via AppStoreConnect My App is written in Unity. So I've added all the needed code there. I see that I can unlock achievements and I can retrieve a list of all the unlocked achievements. So the code seems to work as expected. I'm running the App directly from Xcode... it is not uploaded to Testflight. Problems and Doubts When I unlock an achievement the "completed" popup is not shown If I open GameCenter, under my game, I do not see a list of available Achievements. I suppose this is the correct behaviour since the version with the achievements has not been submitted and approved. I'm wondering... which is the right way to test achievements? Someone is talking about using "development" builds... other say to use sandbox accounts... is there a documentation out there that explains the right flow?!
Replies
1
Boosts
1
Views
1.2k
Activity
Dec ’21
How to test GameCenter Achievements before publishing?
I'm adding GameCenter Achievements to my game:           let a = GKAchievement(identifier: "levelcomplete2"); a.percentComplete = 100; GKAchievement.resetAchievements() { (e) in 	 print("ERRORA: \(e)") } GKAchievement.report([a]) { (e) in 	 print("ERROR: \(e)");  }; The error shows "nil" but because the Achievement isn't live yet (the App is not published), there's no success-banner showing in the app. How can I test if it's working?
Replies
1
Boosts
0
Views
1.4k
Activity
Dec ’21
loadAchievementsWithCompletionHandler not returning hidden achievements
When I run loadAchievementsWithCompletionHandler the results are supposed to give me "The achievements that you previously reported progress for the local player." This is only partially correct. Any achievement I have marked as "hidden" is only returned by that function during the session that I unlock it in. If I quit and resume the game, I will never receive results of that unlocked hidden achievement again. We need to know which achievements the user has gotten but the hidden ones are impossible to query. Is there some other way we should be doing this?
Replies
0
Boosts
0
Views
609
Activity
Nov ’21
Xccode 12 game Fullscreen
hi, when i create a game with xcode 12 i have black bars on top and bottom on the phone or in the simulator,  scene.scaleMode = .aspectFill doesn't seem to work. if you do the same in Xcode 11 then it works in full screen without problems. is that a mistake or are there new settings for it. if I start the project created with xcode 11 in xcode 12 then it is also in fullscrenn
Replies
7
Boosts
0
Views
4.7k
Activity
Nov ’21
free fire game crash
after free fire update i am not able to play this game at my iphone.when i start game the game app backed me automatically. it makes me too much problem fo playing games.. besides my all apps r crashing when i use it for long time..please give an update for solving this phone bugs..
Replies
1
Boosts
0
Views
2.1k
Activity
Aug ’21