Hot answers tagged

8

It is against the Apple and Mac OS terms of agreement to install Mac OS on anything aside from an Apple authorized machine. You are in breach of your user agreement by doing even that. So app-store stuff aside - you are in legal hot water. However! Pushing that aside, I'd like to note at least one game has been published with a similar method as the one you ...


8

This is a very interesting topic. You can build the water effect using SpriteKit and its integrated physics engine. Step 1 Create a Physics World Create many little circular SKSpriteNode(s), each one will have a circular physics body matching the graphics representation Step 2 Then every frame you'll need to: Draw all the sprites on a buffer Apply a ...


5

Remember that SpriteKit's physics system is based on "SKPhysicsBody"s, which are added to "SKSpriteNode"s. Those physics bodies, however, needn't be attached to visible nodes. The simplest method is to create a SpriteNode with no actual sprite or visible body, add it as a child to the area you want on the visible shape, and categorize it differently from ...


5

To get the complete bounding rectangle of a node and its child nodes you use the calculateAccumulatedFrame method. It's a member of SKNode. I ran into this when adding my SKSpriteNodes to separate SKNodes as layers for parallax and HUD elements. I kept getting (0,0) width/height for my bounding rect on the SKNode, and I found this. It returns a CGRect, and ...


5

I actually found a simple solution! Changed the character objects to not only include info and sprite, but also a CGPath. Then implemented a method, to loop all character objects, and check for CGPathContainsPoint( params ...) instead for CGRectContainsPoint( params ...) Tutorial I used: http://www.youtube.com/watch?v=HxHZwzaadNQ - "The magic of CGPath"...


4

This is a pretty late reply, but some new options have shown up recently to address this. Khronos released a reference compiler called glslangValidator that can perform syntax validation (and more) on GLSL shader files. If there are any issues with your shader, it will print them out with line number information. You can set up a custom pre build step or ...


4

NVIDIA's Cg Toolkit should be able to compile (or translate) shaders offline and spit errors. Another option is to create a tiny executable yourself that takes in a shader file and tries to compile it with your GPU driver's compiler (or perhaps such a compiler is already provided for you by the vendor). Though I think at least in the latter cases many ...


3

Wrapping the SKEmitterNode in an SKEffectNode allows the EmitterNode to be rendered into a framebuffer which is subsequently rendered onto the screen. I tested this out (after much push and pull of different nodes and scenes and views) and this results in the exact effect you want, where the Add blend mode is applied to a background that is not rendered ...


3

I'm unfamiliar with objective C, so I can't give any specific code. But the general way to accomplish things like this is by doing a per pixel collision check. Basically it works just like how you have it based on the rectangle, but before firing the touch event, you have to loop through all the pixels that were touched and make sure at least one of them ...


3

No, if you are referring to writing Objective-C using the Cocos2D framework to do animations, your animator will not be able to do so without xCode. He could write the code in a text file and pass that to you, but will not be able to compile them to check that they do work (which really defeats the purpose I suppose.) However, if you only need sprite ...


3

You can use Unity personal tu publish a game on every platform for free but if you start making a revenue up to $100k per year you need to pay an annual plan, which starts at $40 per month. Here you have all the info for that in their site Info of Unity Plans On the other hand you should pay a developer license of each platform to publish. Every platform ...


2

I dont know the version of the sdk you are using, but in the latest version Game Center now support multiplayer games, witch means now Game Center can handle all data exchange. Take a look at this tutorial: How To Make A Simple Multiplayer Game with Game Center Tutorial: Part 1/2


2

Do as ryrich said, however the actual code on Objective-C would be something like this: (Assuming your CCNode class is called "Seal") int sealCounter = 0; for (id *node in self.children) { if ([node isKindOfClass:[Seal class]]) { sealCounter++; } }


2

I think your problem is not program but staff. You need a Beta tester to give you comment on what to pike down or buff up. If your character has certain unique skill it can also contribute or harm the player. Also note on some games, it's not actually possible to kill high level monster without a bit of team play. You can also apply randomness on range of ...


2

You may want to modify the collisionBitMask property of your SKPhysicsBodies. You can set a bitmask to make collision rules. Objects that shares a same bit collides together. Since collisionBitMask is a UInt32, you can set up to 32 different layers of collision. Set your projectiles in different layers depending on who launched the projectile. Here's an ...


2

I would suggest upgrading to the latest Unity 5 patch release (5.2.2p3) at the time of writing this and build your XCode project from the Mac. If Unity is crashing at that point chances are there is something inherently wrong with your project. I would also suggest a clean of the Library and Obj folders, and even deleting your entire Xcode project and ...


2

The answer at https://answers.unrealengine.com/questions/274013/fresh-install-new-c-third-person-project-doesnt-co.html suggests that you are using a version of OSX or XCode that is not currently supported by Unreal Engine. I don't know the version you are using, but you should check the UE documentation and make sure you have the correct versions. ...


2

When trying to fix your signing issues, Xcode did ask you if you want Xcode to revoke the Certificate for you, which you accepted. As a result, you have to download the new certificate and add it your KeyChain (by doubble clicking it). Also, all provisioning profiles created with the old certificate became invalid, so yo have to recreate all provisioning ...


2

By disabling Facebook application event sending the problem went away, so it was Facebook SDK for Unity 7.9.0 that was causing the freeze. Edit: That was for Unity 5.5.1f1. When building on Unity 5.5.2f1 Firebase 1.1.0 seems to be causing similar problems, while Facebook SDK 7.9.0 works fine.


1

Well you create your game in GameScene that is already linked to your GameViewController when you create a new project. If you need a Main Menu Then you need to create another UIViewController in the MainStroyBoard and a swift class in the project. Then you will have to link that class and UIViewController by clicking on the UIViewController and in ...


1

Your walkAnimation array needs to be defined as inout in order to be mutated. Arrays in Swift are treated as Structs, which cannot be altered when passed by value, which is the default behavior. Using "inout walkAnimation: [(SKTexture)]" allows the array to be passed by reference, thus allowing a change such as your append.


1

I fixed it by changing this: material.SetTexture(0, paperTexture); to this: material.SetTexture("_MainTex", paperTexture); I don't know why the first one worked fine in the unity window but not on the phone. But that's what fixed it. For some reason the more explicit assignment works better. But now everything is rendering properly on the device.


1

Right now I'm not in a place to go over your code thoroughly, but at a glance I'm wondering if you need to declare your code with C linkage as explained here: extern "C" { float FooPluginFunction(); }


1

just use gameCenterController for dismissing. [gameCenterController dismissViewControllerAnimated:YES completion:nil];


1

I think most of your problems might be solved by understanding the use of category masks. Simply set the masks to ignore contact and collision between the sword and player categories. Specifically, this is done by assigning unsigned integers to the categoryBitMask, collisionBitMask, and contactBitMask properties of the SKPhysicsBody of the SKSpriteNode in ...


1

The trick is to use the CCScrollViewDelegate methods to detect scroll events. Add a CCLabelTTF and call it _pageLabel. In Xcode, make the scene containing your scroll view adhere to the CCScrollViewDelegate : @interface myScene : CCNode <CCScrollViewDelegate> Then, in didLoadFromCCB, set the scroll view delegate to self : _scrollView.delegate = ...


1

Changing the working directory worked for me recently: Go to Product -> Scheme -> Edit Scheme. Then click Run on the left hand panel and then finally enter the path of the files under Working Directory. All of your paths are then relative to the path you entered.


1

Build your own level editor - it's the conclusion I came to after having developed several games. A simple editor would involve creating some simple buttons (the items in the levels) and some simple logic for positioning, rotating and scaling them on stage. After you have all the items in a level just push their details (position, type, etc) to an/or several ...


1

It seems that Unity 4.1 changed the trampoline project pretty significantly. There must be a plugin or something that your older project is using that is referencing that old file and needs to be updated to Unity 4.1.


Only top voted, non community-wiki answers of a minimum length are eligible