Hot answers tagged

4

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 ...


3

Your question is a good one. I've had exactly the same question regarding SpriteKit and have been very confused about the lack of information on the web about this. SpriteKit seems to encourage you to put all of your Model-View-Controller code into the same class (your SKScene subclass), which is really confusing to me. How would you ever build a game of ...


2

If I understood you correctly, you only want to know whether two tiles, specified by their 2D offset coordinates, are adjacent or not. For any question related to hexagon grids, I'd recommend to refer to the Hexagonal Grids page by Amit Patel. It contains the mathematical backgrounds as well as excellent animated interactive examples, and probably ...


2

First you need to know what is an ellipsoid and why we use them. The earth is spherical and to be exact it can be approximated using an ellipsoid. Location Service and all GPS system that work world wide, must use an ellipsoid that fits the best way the earth, Why we need an ellipsoid? because we need a mathematical model to do the computations. for ...


1

For a 2D puzzle game for iPhone and iPad, SpriteKit would be the easiest way to do this. SpriteKit is made especially for developing 2D games. You don't have to bother creating a scene graph, how to draw images to the screen or how to create a game loop. It is already there, ready for you to use it. Start with creating a new project from the Game template ...


1

1- Well, I have not a huge experience in IOS native development. But if you want it in environment like other Game Engines then I would recommend you to use SpriteKit. You can get start from this tutorial. 2- If you want to set Game Loop in normal Objective-C environment, you can set NSTimer with custom frequency like, NSTimer myTimer =[NSTimer ...


1

to simulate a black hole, I suggest to use SKFieldNode and vortexField(), adjust its strength and falloff property (default is 2). Setting a big number for strength will makes a big perpendicular force which simulates an angular force too (tangant to its imaginary orbital path around the black hole). And let the physics handle the rest, just dont touch ...


1

You have two solutions: 1 - Set scale of your gamepad: self.gamepad.scale = 0.5f This will make all the gamepad look smaller (the main circle and the direction sprites, as they are child of the main circle). 2 - Create a init method with a size, and calculate there the size of your childs: -(id)initWithJoystickWithSize:(CGSize) size andImage:(NSString ...


1

This may be a blatant hack, but Unity now let's you use a custom xib for the splash/loading screen. Maybe you can attach it there. Edit: I forgot, this feature is Pro only.


1

In simple terms a common design in SpriteKit games is scenes, layers, nodes and child nodes. You might make each part into a discrete class that encapsulates all of the parts, properties and methods. For example a Background class that has layered images, particles, various properties like the speed each layer should move and public methods to start and ...


1

In your scene controller, you should do this inside -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event: UITouch *touch = [touches anyObject]; CGPoint touchPos = [touch locationInNode:self]; touchPos will have the position inside your scene, and you can do: if ([self.cardOne containsPoint:touchPos]){ //Do something CGPoint ...



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