Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [spritekit]

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.

0
votes
0answers
3 views

libgdx onto existing IOS and Android App, Feasiblity and App Size

I am an IOS developer, my client has an existing app which they want to add some simple microgames onto. The main requirement is that the app size footprint is as small as possible. I suggested that ...
0
votes
0answers
117 views

Turn off linear filtering of texture in SpriteKit custom shader

I am using SpriteKit to draw some sprites on macOS. I create a texture as follows: ...
0
votes
0answers
51 views
1
vote
1answer
63 views

Use GKEntity's component(ofType:) with inheritance

I'm writing a SpriteKit game in swift and making use of GameplayKit's entity-component system. There are many components that do different stuff but share the same methods in which they do it, so I ...
0
votes
0answers
31 views

Change node color in spritekit

I have a vector illustration of a branch with a few leaves on it. I am moving the branch from the bottom of the screen to the top of the screen. But as the branch moves from the initial position (...
0
votes
0answers
27 views

Why SpriteKit game is loading too long?

I have a game which is written using SpriteKit. In this game I need huge amount of texture (about 1000) for animation. I store all of these textures in a texture atlas. When I launch my game, it's ...
0
votes
0answers
32 views

How SKTileMapNode size impacts game?

Despite already having some experience with mobile dev and swift, I am now trying to learn spritekit for some gamedev. I decide to start trying some map creation, with SKTileMapNode, while learning ...
1
vote
1answer
150 views

Simulate wind affecting a boat using a 2D physics engine like Box2D or SpriteKit?

I'm looking for a way to simulate the forces created by wind and how it affects a boat. In a nutshell: if wind hits a boat (sailing yacht), the bow is aligning with the wind and if the wind is strong ...
0
votes
1answer
176 views

calculating the trajectory of an object in SpriteKit when an impulse is applied to it

I want to make a trajectory line of little balls of where the object is going to go after an impulse, sort of like what is in Angry Birds. I did some research and it seems that the physics in ...
0
votes
0answers
288 views

swift spritekit how to rotate a node so it is always positioned either vertical or horizontal once

I am writing a simple tvOS game using swift 4 and sprite kit. I would like some help on how to rotate a node either be standing straight up and down vertically with the top of the node always on the ...
0
votes
1answer
56 views

Breaking up a map so countries can be colored separately in Spritekit

I'm currently trying to build a little strategy game where players take control of countries on an world. Each player's countries are represented by having a different color background but as each ...
1
vote
1answer
116 views

How can I make a sprite slow down to the speed of another sprite while following it?

I'm making a SpriteKit game where two SpriteNodes are in a maze. That maze is represented as a grid. One sprite (A) travels faster than the other (B). Items randomly pop up, and the sprites have to ...
0
votes
0answers
70 views

Efficiently creating and managing a very large sized tileMap

I am making a 2D JRPG built onto a Birds-eye tileMap and I cant quite wrap my brain around how I would do it efficiently I would like to use 50X50 chunks that are rendered around the player in the 4 ...
6
votes
1answer
396 views

Surprisingly, in SpriteKit game engine, “deltaTime” is not frame time?

In Apple's cocos-like 2D enginer, SpriteKit, they have what they call a custom field: ...
0
votes
0answers
27 views

Textures do not load on one ios device

Im testing the application on the devices of my friends using testflight. On all devices such as: iphone 6s, ipad air 2, ipad 2 the game works fine, but the iphone 7 does not load the textures (...
0
votes
1answer
192 views

Don't know what to do with XML file and Spritesheet (Swift 3)

I'm new to spritesheets and game development in general. I have two files: 1) a .png spritesheet with tons of sprites and 2) a companion XML file with coordinates, anchor points, image names, and ...
0
votes
0answers
87 views

Custom health bar/loading bar

I am trying to create a custom loading bar/health bar. Is there any way to create something like this? https://vimeo.com/232305635 Can you point me in the right direction? Which functions will I ...
1
vote
0answers
192 views

One SKSpriteNode with multiple PhysicsBodies?

I am making a game similar to Lunar Lander, when you land with your ship on different objects, etc... The issue I am having is that I have a Player SKSpriteNode (my Ship) with a slightly complex ...
1
vote
0answers
204 views

Swift Spritekit: Create realistic driving sprite

How would I go by creating a realistic driving experience? I'm using iOS Swift 3 with SpriteKit using the functions applyForce to accelerate when I click the gas button and when braking I add ...
1
vote
1answer
165 views

How to adapt a webgl shader using mouse position to have symmetrical behaviour

I'm trying to create a particular kind of effect for the background of my SpriteKit game, and I've found some shaders on shadertoy that are close to what I want, but I'm struggling to adapt them to do ...
0
votes
1answer
358 views

Drawing an isometric characters: solutions for aiming

I decided to implement an isometric 2D game for iPhone, using SpriteKit and GameplayKit, and Inkscape/GIMP as graphic tools. I prefer vectorial graphics because as a iOS programmer I am required to ...
4
votes
1answer
251 views

How to determine the angular velocity needed move an object to a given position

I am trying to move two lines joint to a fixed position sprite in a way similar to that of a pendulum. I would like the lines to swing from end to end each time. The image below shows what I want to ...
1
vote
1answer
315 views

2D Infinite scrolling terrain on two axes

There seems to be a lot of posts about endlessly scrolling backgrounds on one axis, but not much for a 2-axis solution. As Josh Petrie suggested, I'm posting my approach as an answer to see if anyone ...
1
vote
1answer
559 views

SpriteKit SKTileMapNode with Tileset Integration

SpriteKit supports tile maps as of iOS 10 and has a pretty powerful engine. Only, I am having trouble discovering if it is possible, and how to natively create, tile sets directly from a tileset image....
2
votes
1answer
518 views

How can I create the water-like blur effect in Chameleon Run using SpriteKit and Unity?

As the character in Chameleon Run runs, a water-like blur effect is created. I would really appreciate some guidelines on how I could create this effect in SpriteKit and Unity. Please see the image ...
1
vote
1answer
1k views

Tile based movement with SKAction (Xcode 8, Tile Map)

I am trying to make a game where the Hero can move like in Pokemon with SKActions. But the movement looks unprofessional and have delays. How can we handle to move the Hero smoothly with SKActions ...
1
vote
1answer
341 views

SpriteKit and Swift or Objective-C [closed]

As a newbie to iOS programming, I'm wondering which of these would be more conducive to the type of game I want to program. I've been tasked to program an iOS game for my company. They asked me to do ...
0
votes
1answer
67 views

Should the Sprites in my Boids implementation be backed by model objects?

This question is about the proper way to architect an implementation of Craig Reynolds Boids algorithm. I have an Agent object like this: ...
1
vote
1answer
173 views

Making Bigger Touch Space in Node Using SpriteKit And Objective-C

I am trying to make simple game, but I have a problem. The node is too small. On iPhones with smaller screen size, the finger can't move it. On iPad and on simulator, however, the node can be moved ...
2
votes
0answers
242 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
765 views

Isometric scene in SpriteKit

I tried play with spritekit in isometric grid. But i can't understand how to fix level. ...
1
vote
1answer
214 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 ...
4
votes
2answers
355 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
1answer
94 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
175 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, ...
-1
votes
2answers
456 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 http://...
-1
votes
1answer
366 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
155 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 ...
1
vote
1answer
167 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 ...
1
vote
0answers
422 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
660 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 ...
1
vote
0answers
48 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 ...
3
votes
1answer
330 views

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

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 ...
5
votes
1answer
695 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
506 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
894 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
236 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 ...
2
votes
1answer
750 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 ...
3
votes
1answer
915 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
652 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 ...