Sprite Kit is a 2D rendering engine from Apple for iOS and OS X games. It provides rendering and animation for sprites, basic sound playback support and physics simulation.

learn more… | top users | synonyms

-2
votes
0answers
6 views

where can i find ios game assets and app icons? [duplicate]

I'm making a game for ios - and publishing it. And like most solo developers i dont have a designer, so im looking for a sites where i can find: sprites app icons (icons like what's displayed on the ...
1
vote
1answer
53 views

Can I use physics in Isometric map based games?

I am trying to use physics in my game which is an isometric map based strategy game that the player deals with a city full of buildings, roads and people in it. I am writing the game with Swift and ...
0
votes
1answer
26 views

How should I set camera in Blender for example to render a sprite which can be used in an isometric map?

I am trying to render some 3D model in blender and use them as a texture sprite in a game which uses Appleā€™s SpriteKit. I have an isometric map with tiles size : 32 as width and 24 as height, Since I ...
7
votes
1answer
1k views

How do I create a simple RPG game server? [on hold]

I'm working on a Sprite Kit game. I'd like to make it a true multiplayer game, by which I mean that each person joining the game has their own camera. I've seen tutorials on multiplayer games where ...
0
votes
0answers
18 views

Indicate key options in a keyboard-only game

I am creating a music-based app for one of the courses I teach at a high school, so it's not for sale in the app store, it's only for my students to use. I decided to make it keyboard only partially ...
0
votes
1answer
17 views

How to resize the child node fit inside SKSpriteNode when resizing?

I am creating a virtual gamepad for my game, It has one main SKSpriteNode with circle image and four child node(up, down, left, right) with image. When I am using default size for all it looks perfect ...
0
votes
1answer
41 views

Where should I save game object's attributes (hp, score) in Swift?

Scenario: I have a game with several game objects on screen. Each can have different score and hitpoints. When I use collision detection for cannonball vs. ship (example) I need to know which ship is ...
0
votes
1answer
60 views

Game Sprite Motion

I really like the effect that I see in this video of Mario Party 10 Jewel Drop (at 2:40). It occurs when the four green orbs join together. You'll see a four items with long trails move to the top ...
0
votes
1answer
37 views

Is it possible to detect contact with every frame change when using an animation in SpriteKit?

Is it possible to detect contact with every frame change when using an animation in SpriteKit? For example, if I have two nodes of a person walking, I want to detect contact with the ground each time ...
0
votes
1answer
29 views

How to choose a SKSpriteNode randomly?

I want to choose from 4 enemies using random and present it on scene. For that purpose I've made this: func enemyPicker() -> SKSpriteNode { var enemyArray = [mouse, robot, drone, block, bird] var ...
0
votes
1answer
69 views

How do you set multiple collision rules with Swift and SpriteKit?

So basically I've got 2 types of balls and 2 types of enemies. Green can delete red only, red can hit delete only. Here's what I have for the first collision test: func didBeginContact(contact: ...
1
vote
0answers
41 views

Orientation of SKNode in followPath Swift

I'm developing a game like price wheel where I need to touch the correct answer. For now I find replies where people says: Set yScale of SKNode to -1. Or Set xScale of SKSpriteNode to xScale ...
3
votes
1answer
53 views

An archery's arrow should be a node or particle?

I am using Sprite Kit to do game development. I would like like to design an archery with arrow. Should I use the arrow as one of the node? If so, it is a concern to have too many arrow on the screen, ...
1
vote
1answer
74 views

SpriteKit Game State Management

I've created a SpriteKit Mac OS X app and I am using a simple finite state machine to manage the game states. I've seen some solutions, especially for C++ games, where a GameState class and a ...
0
votes
1answer
202 views

Sprite Kit - keeping character level with the terrain 2d endless runner

I've been trying to figure this out exhaustively for the past few days and still haven't found an answer. I have an endless runner built using swift where the character is fixed and the terrain moves ...
0
votes
1answer
63 views

Trouble drawing repeating and scrolling screen elements from a 2d array for an endless runner in swift [closed]

I've been trying draw level segments for an iOS endless runner using 2d elements that repeat forever. I have a class that generates a random 2d array, then scene elements are drawn and animated to ...
0
votes
1answer
45 views

Easy SpriteKit question on creating a function

The following code is what I'm working on to animate characters in a SK scene class. I can run the code without building, no problem, but I can't build it and run it; I get one error message: Binary ...
1
vote
1answer
467 views

Spritekit water flowing [closed]

I'm wondering if there is a way in spritekit to implement water flowing through a path? like this water flow Right now I'm generating the path using UIBezierPath and PaintCode Any suggestion? ...
2
votes
2answers
201 views

How does a loop work in game engines? [duplicate]

Recently I started working on a game with the spritekit engine. My question is not about spritekit in specific though, but generally about game engines. When I write a loop and run it (eg while i ...
6
votes
2answers
334 views

Does SpriteKit follow the MVC pattern?

I am currently working on an iOS project called Old Frank that I have been trying to follow a MVC design pattern. The gist of it is. GameObjects(model) <- Scene(controller) -> Sprites "SpriteKit" ...
1
vote
1answer
82 views

CGVectorMake to move SKNode at a certain speed towards the middle of screen?

I am trying to launch my ball sprite towards the middle of the screen at the same speed every time I launch it. let vel: CGFloat = 1000 dx = size.width / 2 - ball.position.x dy = vel - size.height / ...
2
votes
2answers
103 views

Data model design using Core Data and Spritekit

I have a entity called Item, and every item can have two or three bonuses... What would be a good model design in this situation. I can think of something like: To have many optional attributes ...
1
vote
0answers
86 views

Efficiently rendering tiled map on OS X

I'm writing an original (top-down) SimCity clone in Swift and attempting to use SpriteKit as the basis for the game. However, I am running into performance issues when rendering and animating the tile ...
1
vote
2answers
59 views

atan2 : inversed result? (angle 180 is on the right side, angle 0 on the left side)

the result of the angle between my touch and the middle,bottom of the screen gives me 180 when the touch is on the right side of the screen, and 0 when it is on the left. I don't understand why... ...
1
vote
1answer
45 views

How to figure out a vector based on 2 points that add up to a certain value

I am writing a game in which I am representing a velocity with a vector. I have a starting point and a point that I want the object to move towards at a certain speed. (I need the resulting vector's x ...
0
votes
2answers
128 views

How to move dashes towards target?

Would you know how to create a dash line that moves towards the direction of the target, and if it collides with a wall, goes to the opposite angle? I have seen atan2 but I am not sure what it does, ...
0
votes
1answer
339 views

Switching bezierpath to follow SpriteKit swift

I am trying to make it so that a SKShapeNode follows a UIBezierPath. Then when the screen is tapped it switches to another UIBezierPath to follow. I have this functionality working except that when ...
1
vote
0answers
213 views

Making a card game [closed]

I'm making a card game, for mainly knowledge reasons. My tendency to learn so far has been to create and struggle through to have the knowledge at the end. However, I've never made a game before. My ...
3
votes
3answers
338 views

How to approach 360 degree snake without having it “slide”

There's a great question here that helps me a little bit in what I want to do, and it explains it quite well: How To Approach 360 Degree Snake Basically, I want to have a smooth 360-degrees Snake ...
0
votes
0answers
118 views

moving a character in sprite kit

So I've created a game in which a number of tiles are created from a txt file to create a level for the player to navigate through, but I'm having trouble moving the player. func ...
1
vote
1answer
198 views

Hexagonal buttons

I'm trying to create a map of touchable hexagons and the playing area would be like in Catan game. I would like to use Sprite Kit to do the job but is it cabable of doing that? Process goes like ...
0
votes
0answers
215 views

SpriteKit: Is applyImpulse not working correctly?

I am writing a free throwing system and because of this, I created a ball using following code. self.ball.position = CGPointMake(posX, posY) self.ball.fillColor = SKColor.blueColor() ...
0
votes
1answer
95 views

Developing game progress screen [duplicate]

I'm developing an application for iPhone with a screen where the user will track his progress. Something like so, as seen in the Two Dots game: Currently I plan on creating this using constraints ...
0
votes
1answer
119 views

How to randomize the ball direction?

I've started trying a few things with Sprite Kit for Game Development. I was creating a brick breaking game. So I've run into a issue on how to randomize the initial starting direction of the ball. I ...
0
votes
0answers
118 views

iOS8 + SpriteKit. Does a Node Moved Via Pan Gesture Have Velocity in the Physics Simulation?

I have some SKSpriteNodes arranged in a 2D grid. Each has a physics body including mass and charge. I attach a pan gesture to the SKView and a corresponding pan handler to the SKScene. When I pan I ...
0
votes
1answer
167 views

Can someone provide a practical example of decoupling game world updates from frame redraws in iOS?

Please bear with me as I've been spending some time lately trying to get a better grasp of some game dev fundamentals. My specific issue is a direct result of trying to apply what I've read about ...
0
votes
0answers
63 views

Using Tile Maps with cocos2d - how do I handle a large amount of images?

I am building a game where the users (players) can build their own town. There they can build houses, add furniture to the houses etc etc. Basically similar to The Sims. I am using the Tiled Map ...
0
votes
1answer
97 views

Showing keyboard on SKScene and performing action on a sprite node based on key tapped

I am trying to learn SpriteKit and play with some simple sample apps. Currently I am trying to achieve below things: Show keyboard over SKScene If user taps 'A', perform some action on a sprite ...
4
votes
2answers
2k views

How to implement color changing fragment shader?

I have a background of a given size and filled with a given color. I want to change it with an animation effect, starting from the center and spread out until it extends the whole background. The new ...
1
vote
1answer
157 views

Game Center Leaderboard not dismissing

I was implementing Game Center into my app and all was going well except for the leaderboard done button not dismissing the leaderboard even with gameCenterControllerDidFinish added in. I call up the ...
0
votes
1answer
136 views

Understanding CGPoints in SpriteKit

I am planning to place three cards on a view which I add to the background. However I wanted to combine two of the cards and replace the first card position with the new card position. Is there any ...
2
votes
1answer
552 views

SpriteKit - How to jump to specific position?

I'm would like to achieve something like Object A will jump to position A in parabolic way. For example: I am able to make the object jump but i do not know how to calculate to make the object jump ...
1
vote
0answers
251 views

UI rich Strategy/RPG UI - 2D Game Engine or UI Toolkit? [closed]

I'm on the fence regarding the graphics engine of my current game and hope for some advice. This is an UI heavy strategy/rpg. Although the game is played on a (simple) 2D map, it is largely turn ...
0
votes
1answer
547 views

Swinging a sword in Xcode with Sprite Kit

I'm working on making an RPG in Xcode, and I'm having a major gameplay issue when it comes to having my character swing his sword in a way that is realistic and gameplay compatible. Right now, when ...
1
vote
1answer
325 views

How should I structure my code to add enemies?

So I am currently making a 1942-style game in Sprite Kit. I've reached the point where I am finished implementing pretty much everything (movement, shooting (also recognizing a hit and exploding an ...
1
vote
2answers
747 views

How to detect collision on specific part of the sprite node

I have a spike and a ball is falling down, when the ball touches the top point of the spike, I want to make the ball invisible, and when it touches on the other part i.e on the sides I don't want to ...
2
votes
1answer
1k views

iOS Sprite Kit - Blend Mode Effect

This question builds upon the following question: How can I achieve a good fire effect with alpha blending and particles? I want to achieve the visual effect of using SKBlendModeAdd on a black layer, ...
1
vote
1answer
228 views

How do I procedurally generate level like in Dino Run, or Tiny Wings?

I'm looking to create a game like Dino Run, where I will need to create large slopes for a level, procedurally generated. How do I go about this? Do I have to make certain predefined pieces of level ...
6
votes
2answers
846 views

How can I make a character stand on slopes?

First of all, note that I want to understand the principle, so I would prefer explanations in plain english (but of course I have nothing against some code to complement these explanations). I am ...
0
votes
1answer
1k views

How to get the complete width of SKSpriteNode which has many child nodes

I have a Sprite node with many 6 child nodes. Each are placed one after another in X-axis. I want to know the complete with of the Sksprite node. SKSpriteNode *array = [SKSpriteNode node]; [array ...