Post not yet marked as solved
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?
Post not yet marked as solved
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
Post not yet marked as solved
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 ?
Post not yet marked as solved
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..
Post not yet marked as solved
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!
Post not yet marked as solved
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?
Post not yet marked as solved
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?!
Post not yet marked as solved
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.
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.
Post not yet marked as solved
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.
Post not yet marked as solved
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
Post not yet marked as solved
can't play fps game with 6 fingers
Post not yet marked as solved
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.
Post not yet marked as solved
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?