Skip to main content

Questions tagged [objective-c]

Objective-C is a general-purpose, high-level, object-oriented programming language. It's mainly used for game development on Apple iOS and Mac OS devices, however it's not limitied to this platforms.

Filter by
Sorted by
Tagged with
0 votes
0 answers
160 views

What I really need is the x,y of the object when it is outside of the screen: I'm actually coding a UI in Objective-C, not a game. In this different kind of UI you navigate a 3D space with objects. ...
Vulkan's user avatar
  • 101
1 vote
1 answer
119 views

I am looking for some help on what would be the best approach to create a path from one point in a grid to the other side. Imagine a grid of 5 x 5, where at (0,1) there is a light source pointing ...
Steve's user avatar
  • 11
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
2 answers
2k views

I have a game that plays sounds when some events occur. Currently, I am using AVAudioPlayer for the purpose of playing the sound. But just the bare ...
Pidrilla's user avatar
1 vote
0 answers
48 views

Disclaimer: I'm not well versed in Game Dev best practices so this may be a trivial question. I'm developing an iPhone game in which I have to store a user profile containing such information as ...
pasawaya's user avatar
  • 261
0 votes
2 answers
594 views

I am currently at the last stage of the Tetris Clone using SDL library, the only thing left is rotation. For each piece I have a separate class, and in order to move the pieces down I use a method: <...
user avatar
2 votes
1 answer
288 views

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 ...
artG's user avatar
  • 21
1 vote
1 answer
648 views

I need to draw a Tic-Tac-Toe board in Xcode using OpenGL ES 2.0. I am new to graphics programming and can't find good information on drawing a square in opengl es in iOS. I looked at Ray's tutorials, ...
Sergio Gonzalez's user avatar
3 votes
3 answers
2k views

I'm a fellow game programmer who's done many game engines in Game Maker 8.1, Visual Studio XNA and MonoGame with C#, and one in Java Android with Eclipse. I'm very used to C# and love it plus the VS ...
DrZ214's user avatar
  • 348
1 vote
0 answers
465 views

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 ...
user148013's user avatar
1 vote
0 answers
85 views

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 ...
Christian Kreiter's user avatar
3 votes
1 answer
448 views

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 ...
Christian Kreiter's user avatar
2 votes
0 answers
69 views

Here's where I'm at. Here's where I want to be Here's how it's drawn ...
Daniel's user avatar
  • 21
3 votes
1 answer
372 views

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 ...
Beraliv's user avatar
  • 131
1 vote
1 answer
214 views

I am writing a game with Objective C ( xcode ) and I need to use the users location service to mark their position on a map but since I need to create my own map component, I am not able to use the ...
Rassam's user avatar
  • 58
0 votes
1 answer
1k views

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 ...
Varun Naharia's user avatar
0 votes
0 answers
620 views

I am trying to develop maze game using objective-c, I want to allow moving the pac-man using swipe method, the user can swipe his fingers on the iPhone to indicate where he want PAC-MAN to go but I'm ...
Fad's user avatar
  • 1
1 vote
1 answer
106 views

I want to hook up a crash reporting service to my unity iOS game. It's just one line of objC to add, as early into the app lifecycle as possible, but I'm not sure how to get it to run. I know I could ...
tenpn's user avatar
  • 5,524
0 votes
1 answer
185 views

I've surfed the internet for quite some time but haven't come to find an answer. Any help would be greatly appreciated. I am trying to perform a transition from a UIView to a CCScene So i have a class ...
votelessbubble's user avatar
4 votes
1 answer
4k views

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? ...
Mariam's user avatar
  • 163
10 votes
2 answers
3k views

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. ...
Skyler Lauren's user avatar
1 vote
3 answers
1k views

I have a grid of hexagonal tiles. Every other row is slightly offset for visual reasons. Imagine a player touches any tile - I need to compare the coordinate of that tile, with any tile they touch ...
BotskoNet's user avatar
  • 939
3 votes
3 answers
1k views

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 ...
Codecat's user avatar
  • 133
0 votes
0 answers
53 views

I'm making a multiplayer game which involves drawing lines. It's based this game: http://curvefever.com/sites/default/files/resize/remote/ef86488088c618df13b34f8b87aafd4e-1107x808.jpg. The game is ...
Fredrik's user avatar
  • 26
0 votes
1 answer
114 views

I'm using a single view app in Xcode 6.1 for my game with Storyboards. Not unity or sprite kit. It's a small game not even 3MB. Anyways, I created un-lockable characters with a BOOLEAN. ...
aliya's user avatar
  • 11
0 votes
0 answers
335 views

i have currently a performance problem with the addChild method in cocos2d version 3.3. My scenario is currently that i have about ten ...
Yetispapa's user avatar
  • 101
1 vote
0 answers
54 views

I have an issue with CCActionMoveBy when I call the movement action for many of my sprites. I need to move to a certain position and then remove it from the scene. ...
Vijay's user avatar
  • 121
2 votes
1 answer
290 views

I have the following situation: To detect whether is the red rectangle is inside orange area I use this function: ...
gronzzz's user avatar
  • 135
1 vote
1 answer
457 views

i'm making map for a game and need to make scrolling of map, so the main thing what i need is to calculate speed and move layer after player remove finger from screen. I make it my own, but i think ...
gronzzz's user avatar
  • 135
0 votes
1 answer
347 views

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 ...
robert's user avatar
  • 1
1 vote
1 answer
831 views

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

I've added a joystick to my iOS game using the latest SneakyInput joystick code for cocos2d v3. It works well, but when a CCButton I have is pressed, the joystick ...
BotskoNet's user avatar
  • 939
-2 votes
1 answer
421 views

In my game I have a "rocket" type and I want to run a sequence of actions on it. At first it must run an explosion animation and then remove itself from the game. For this I used the following code, ...
HRZ's user avatar
  • 51
1 vote
1 answer
465 views

I'm trying to make a physicsBody rotate as soon as it is instantiated. ...
Appeltaart's user avatar
0 votes
1 answer
156 views

When using particle systems that have a lifetime, with CCParticleSystem and its derived classes, should I manually remove the finished systems from their parent ...
glampert's user avatar
  • 3,057
0 votes
1 answer
891 views

I'm trying to find out how to stop a specific sound effect rather than having to stop all of them. I'm using OALSimpleAudio. I can't seem to find how to do it. simple google searches result in ...
tomvda's user avatar
  • 123
2 votes
1 answer
1k views

I'm using Spritebuilder to make my game, and CCScrollView usually saves me quite a bit of time. I'm trying to implement the scroll view much in the same way as the home screen on an iphone uses the ...
Spaderdabomb's user avatar
5 votes
1 answer
907 views

I've been a "hardcore" developer for sometime now, as I've always worked with pure code reactive rendering, and contributed to Cocos2d library some time ago , (It ...
Joel Hernandez's user avatar
0 votes
1 answer
757 views

I want to rotate a sprite so that it faces the mouse cursor/screen touch location. Currently I'm using the following method to compute the angle of rotation. The input position is the target point the ...
glampert's user avatar
  • 3,057
1 vote
1 answer
1k views

I'm trying to create a preload, but i don't know how to implement the code of this topic in cocos2d iphone v3. Since CCTextureCache has changed to CCTexture, and doesn't have sharedTextureCache ...
Filipe Ferminiano's user avatar
0 votes
2 answers
133 views

Pretty simple question. I'm working in Objective C (cocos2d) and I'm trying to count the number of a sprites of a certain class are present on the current layer being displayed. For example, I have a ...
Spaderdabomb's user avatar
0 votes
1 answer
484 views

I'm trying to animate a CCSprite in cocos2d v3 following this question, but I'm getting the following error message in Log: ...
Filipe Ferminiano's user avatar
0 votes
1 answer
806 views

I am in the process of making a game and I need an object to move only when the buttons are pressed. I have a method that begins the movement, and so far I am ending the movement of an object by ...
user3084800's user avatar
-4 votes
1 answer
174 views

I have a Mac arriving in the next few weeks, and plan to program a 2d game. I know a little bit of Java but nothing about Objective C. I've heard about cocos2d -- it seems good but I don't know ...
user42687's user avatar
0 votes
1 answer
873 views

I am making a tower defense game for iOS using Sprite Kit. I would like for my game to support an endless number of levels, like in Bloons TD 5. What approach should I take to implement this?
PoKoBros's user avatar
  • 103
0 votes
1 answer
545 views

I believe this question can help beginner game developers. I've looked through a dozen or so answers on perlin noise here and on Stackoverflow, and found only 1 concrete implementation of perlin noise ...
Alex Stone's user avatar
2 votes
0 answers
71 views

I have a number of stats and effects in game that are subject to change, they have some kind of base value and the current value. For stats, I implemented this in a dynamic way, but for less important ...
Alex Stone's user avatar
2 votes
2 answers
225 views

I have about 60 skills within my game, which are loaded from a JSON file. Each skill is a subclass of a skill object and has attributes like range, cost, target ...
Alex Stone's user avatar
2 votes
1 answer
578 views

I have a game with an RPG system where derived stats, like HP,armor, etc depend on a variety of components: armor, stats and feats. I'm running into an issue where the code to change derived metrics ...
Alex Stone's user avatar
1 vote
1 answer
187 views

There seems to be an overwhelming amount of info out there on AI of all kinds, and it's kind hard to digest at once. For my testing purposes, I'm creating a "typical stateless AI", as described in ...
Alex Stone's user avatar