Tag Info

New answers tagged

2

It depends on the implementation of the multiply operation. The internals will suppose an ordering within your matrices, row major or column major. If the ordering of your matrices is arranged the way the function expects them, then it is up to the second dpendancy: namely the respect of the correct mathematical commutativity. (which they should) When you ...


5

Is this information possible to query using C++? Not practically, no. Apple's Game Center API is an Objective-C one. Technically speaking, you could make a bunch of bare calls to objc_msgSend if you were hell-bent on avoiding Objective-C code, but this is not practical. Instead, you can create a simple wrapper for the relevant Game Center calls by ...


0

I am not familiar with SpriteKit, or Cocos2D, so I can't answer that question. However you should be able to accommodate any screen size if you use percentages. If you calculate the percent of pixels where each circle is placed in regards to your original image, you can use this value to calculate the placement of each marker in the target resolution. For ...


1

Yes, this is possible. Many push notification plugins will execute a callback inside your game if a notification is received while the game is running. Inside this callback you can load your desired scene.


0

This is the most basic code of creating and playing an animation in cocos2d: auto cacher = SpriteFrameCache::getInstance(); cacher->addSpriteFramesWithFile("emad-running.plist"); Sprite* someSprite = Sprite::create(); // load all the animation frames into an array Vector<SpriteFrame*> frames; for (int i = 0; i <= 10; i++) { stringstream ss; ...


1

There's no need to have your own server. Apple provides the ability to restore purchases; details can be found here. You can simply add a button which calls [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]; once you have an observer in your code, which looks like this: [[SKPaymentQueue defaultQueue] addTransactionObserver:self]; and ...


2

I am not completely sure what you want to share across devices, the earned and bought coins or the purchased things (lets call them "hats"). I also do not have any experience with IAPs, iCloud and CloudKit, what I say here is only from observations and reading documentation. IAPs can be restored, you can see that in almost any app that uses them to unlock ...


3

You have only two main options, both of which have serious pros and cons: Use normalized positioning, so that the X and Y coordinates are expressed effectively as a percentage of the available width and height. Use absolute positioning, so the X and Y coordinates are exactly the pixel or point coordinates of the sprite on the screen. Relative positioning ...


2

No. While the details of copyright law varies by jurisdiction (US versus Europe for example), the general thrust is basically the same: copyright gives the author of the work the control over who can use the work and how. It is only okay to use somebody's copywritten work if they have explicitly permitted you to do so. "Giving the author credit" or "not ...


1

As Krom Stern pointed out, there is no "correct" way of doing UI for a game. To be honest the whole rasterVSvector thing is misleading, as you should always chose the one that works best in the particular case (look at this --> article for more info on raster/vector, and when to prefer one over the other). Now when it comes to games two things are always in ...



Top 50 recent answers are included