Skip to main content

Questions tagged [swift]

Swift is a multi-paradigm, compiled programming language.

Filter by
Sorted by
Tagged with
0 votes
1 answer
71 views

I am trying to make a very simple game that allows the user to tap on any "block" in the scene and "pop" it. If the block is blue and touching another blue block then both blocks ...
jforward5's user avatar
0 votes
0 answers
71 views

I am trying to implement MSAA in my very simple raytracer. However, when I do, my program gets and insane slowdown. I am working in Metal, and on the Metal HUD, I can see that my frametimes drop from ...
oli2's user avatar
  • 3
0 votes
2 answers
438 views

In my game project I create the terrain programmatically by creating tiles on a 2D grid as the player moves around the game map. I have it working where I select the current tile and check all 8 ...
peacetype's user avatar
  • 145
1 vote
1 answer
623 views

I've been working on a Mario Bros clone for the first level, trying to learn how to make games with SpriteKit. I'm trying to use an ...
Frakcool's user avatar
  • 111
2 votes
1 answer
218 views

I am currently making an iOS Game but I have a small problem. The game is simply a ball which you can control to avoid obstacles and find the food. When the ball hits, e.g. the top or the bottom of an ...
Merlin0216's user avatar
0 votes
0 answers
67 views

I'm thinking of building a 2D platformer game similar to Super Mario Bros, but I'm in the planning process and realised I don't really have a good way of storing information about each level – where ...
Frævik's user avatar
1 vote
1 answer
799 views

I have a game and want to reward the user for going on every day. I want to be able to get the true date somehow. I do not want the device date, because the user could just change it and get free ...
Repardeimaj's user avatar
0 votes
1 answer
156 views

How would one create score dependent on total time in game? I would like the score to count by 1000+ each second the game is running for. Later I am going to add some coins which will give my total ...
JimmyK1's user avatar
2 votes
1 answer
66 views

Backwards compatible? The project: I want to render a high definition model on my personal website such that it'll be rendered in the highest definition possible on any device, from a 20-year-old ...
paul_graham_for_president's user avatar
2 votes
1 answer
897 views

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 ...
JoeBob123's user avatar
2 votes
1 answer
2k views

I'm trying to get the four vectors that make up the boundaries of the frustum in ARKit, and the solution I came up with is as follows: Find the field of view angles of the camera Then find the ...
halileohalilei's user avatar
0 votes
1 answer
1k views

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 ...
retrovius's user avatar
  • 117
2 votes
1 answer
680 views

I need code this game for iOS, using Swift; but I don't know how to apply touches to images, using Swift. My attempts thus far have failed; touch!.view != image. <...
Hoang Anh Nguyen's user avatar
1 vote
0 answers
419 views

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 ...
WokerHead's user avatar
  • 111
3 votes
1 answer
1k views

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 ...
Hilarious404's user avatar
2 votes
0 answers
396 views

I recently tried out Swift. I found it to be awesome. But I'm unable to find any libraries for game development as I'm on Linux. Everything seems to be made for MacOS & iOS development. There ...
NightMare's user avatar
1 vote
0 answers
733 views

I am trying to run this code but I keep on getting this error: fatal error: unexpectedly found nil while unwrapping an Optional value I don't understand why I'm getting it. Any hint? ...
Michael Cube's user avatar
1 vote
1 answer
571 views

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 ...
panzerblitzer's user avatar
5 votes
1 answer
4k views

I managed to get pixelation working by using the OpenGLES2 rendering API, and a CIFilter. But it was way too slow, so I want to use the Metal API and just have a very simple filter that pixelates ...
ndbroadbent's user avatar
0 votes
1 answer
1k views

My game is set up so the the display controls the game loop, usual in Cocoa. The callback function calls run() which is this. The thing is, the thread running the ...
fridgemagnet's user avatar
1 vote
0 answers
569 views

I'm trying to write a simple shader able to pass the color to be used for drawing in the fragment shader, through a uniform. I load the shader modifier and pass the uniform: ...
Ramy Al Zuhouri's user avatar
2 votes
1 answer
2k views

All the tutorials that I've found online speak about using Metal alone, without any other supporting library. But I don't understand if it's possible to create a SceneKit game and then use a Metal ...
Ramy Al Zuhouri's user avatar
1 vote
0 answers
261 views

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, ...
naivedeveloper's user avatar
-1 votes
1 answer
418 views

I have a simple tube node in my scene that isn't displaying properly. When I rotate it to face the camera, more than half of it is covered by some invisible sheet. When I rotate the tube enough, it ...
Christian Kreiter's user avatar
-1 votes
1 answer
634 views

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 { <...
Metman's user avatar
  • 101