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

0
votes
0answers
2 views

make bigger touch space node using spritekit and objective c

I try to make simple game, but I have a problem, node is too small,for smaller iphone phones finger can't move it on ipad it can and on simulator too, so i know its not the code fault. Because I use ...
1
vote
0answers
22 views

How could I achieve an iOS high detailed level design for a platformer?

I'm seeing a lot of games that use a predefined and repeating set of tiles for their level (like FlappyBird or the Super Mario game series). I'm a graphics designer so I would like to create levels ...
0
votes
1answer
39 views

Isometric scene in spritekit

I tried play with spritekit in isometric grid. But i can't understand how to fix level. import SpriteKit import XCPlayground let view:SKView = SKView(frame: CGRectMake(0, 0, 1024, 768)) ...
0
votes
0answers
17 views

Fragment Shader Light Sim

In the game Clash Royale, when you have the ability to upgrade a card, the green part has a light sheen to it an this sheen animates from left to right. How can this be done with a shader? I'm quite ...
0
votes
1answer
30 views

What is an equivalent of Swift's UIScreen.mainScreen().bounds in Unity 2d?

Basically, I am from a Swift SpriteKit background where UIScreen.mainScreen().bounds is a CGRect which represents the screen and can be manipulated in various ways like getting the middle of the ...
3
votes
1answer
103 views

How to determine contact bodies when multiple bodies overlap and a third makes contact with both at the same time

I understand how the below DidBeginConact function works, but how do you detect which categories make contact when you have multiple colored bars (in the example code) or a friend category and enemy ...
0
votes
0answers
16 views

ios SpriteKit game folder size very large

I made a very simple game - only facebook, twitter share icons but it does have Ad Networks SDK's and adapters. My entire folder that contains all the SDK's are currently 200mb. Will this be the final ...
0
votes
1answer
26 views

How can I increase the hit range of a node?

How can I set the radius or the hit range of a node initialized with a texture? Of course I can do that with increasing the size of it, but actually I want to do this without resizing the picture ...
1
vote
0answers
51 views

How do I simulate vehicle movement in a non-gravity environment (e.g., space)?

As a series of small experiments, I've began to tinker with game development, specifically using SpriteKit and Swift. I'm looking to simulate a body moving through a non-gravity environment, ...
0
votes
1answer
47 views

Unity equivalent to cocos2D (and Sprite Kit) Actions?

Does Unity have an equivalent to the Actions feature/functionality of cocos2D and Sprite Kit; if so, what is it? cocos2D Actions: http://python.cocos2d.org/doc/programming_guide/actions.html ...
-1
votes
1answer
42 views

Fix buttons on screen

I've added buttons and SKCameraNode for my player. I got problem. When player moving left/right/jump all buttons dont follow for him. UPDATE class GameScene: SKScene, SKPhysicsContactDelegate { ...
0
votes
1answer
53 views

2D Soccer Goal Net

I want to make a 2D soccer game on iOS, I started with SpriteKit and got the ball physics working. Now, I could make the goal simple and static, but I'd love to make it make it elastic like a real ...
0
votes
1answer
51 views

How to reregister gamecontroller changedvalue handler upon game scene reload

I'm working on a tvOS game that uses the siri gamepad controller. Everything works fine the first time out. If the user loses the round I reload the same scene using presentScene. After reloading the ...
2
votes
0answers
75 views

What is Sprite Kit capable of? [closed]

I am messing around with Game Maker in my free time. I learned some Java at school but never really understood the object oriented principles. When I got to know Game Maker I was surprised that game ...
3
votes
1answer
106 views

Sprite orbiting on a point

I was wondering how to make a Sprite do an orbit on a determinated point in SpriteKit. I tried to set the anchorPoint of the Sprite orbiting with the center point but it doesn't work. Please can ...
0
votes
0answers
63 views

Endless sidescrolling skating spritekit game

I am developing an endless side scrolling game in spritekit. For parallax background scroll : - (void) update:(NSTimeInterval)currentTime { [self.children enumerateObjectsUsingBlock:^(SKNode * ...
0
votes
0answers
11 views

SpriteKit Obj-C – How to add a force on a node a certain distance according to screen size

I have an SKSpriteNode that I'm trying to throw up to a certain point on the screen. I've tried applying an impulse and/or force according to the screen size, but that has strange results. I've also ...
2
votes
1answer
88 views

Objective-C SpriteKit – How to make a circle of buttons

I have some code in a project already, but I'd like to change it up a bit. Currently, my code creates an empty node called _buttonLayer and then create some buttons to add to it. My buttons start from ...
3
votes
1answer
198 views

How to implement 'Fog of War' in SpriteKit or Cocos2D?

Take a look at the image below from the game Warcraft 2. There's a darkened area (like a fog) that represents the limits of the 'field of view' -- to the effect that you would not see any enemy ...
4
votes
2answers
150 views

How should I use Monte Carlo method to simulate some police cars that keep patroling in a tile based map?

I have a tile map (isometric) and I have some police cars that they patrol all the time on the map, there is some building and other cars in map too so they are considered as constraints in my ...
1
vote
1answer
290 views

spritekit sidescroller how to move hero through the level

I am trying to learn spritekit by working my way through developing a simple side scrolling game, but I cannot find a clear answer on how to move the hero through the level. The width of my ground ...
3
votes
1answer
91 views

How to calculate final force vector for the SKSpriteNode

I am creating space game which has an effect similar to black hole's gravitational effect. Wherever the spaceship is going, the black hole will attract it, summing up all the vectors together. I know ...
0
votes
0answers
152 views

What is the best set of formula to use pinch gesture to implement zoom in/out in SpriteKit?

SpriteKit coordinate system origin is at the middle of screen and the positive Y direction is upward, however gesture recognizers origin is at upper left of the screen while the Y axis increase by ...
2
votes
1answer
134 views

Collisions between sprites in SpriteKit

I'm making a game in XCode using SpriteKit. The game has a player and different types of projectiles that he has to avoid. When the player collides with the projectiles, the score changes and the ...
2
votes
1answer
266 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
222 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 ...
8
votes
1answer
2k views

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

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 ...
1
vote
1answer
38 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
96 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
119 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
73 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
209 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
87 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
598 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
128 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
88 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, ...
2
votes
1answer
251 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
361 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
101 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
57 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 ...
2
votes
1answer
1k 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
237 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
751 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
165 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
199 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
134 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
75 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
56 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
148 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
788 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 ...