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.

learn more… | top users | synonyms

2
votes
1answer
240 views

Design leaderboard ratings for quiz games

Back in March 2011 i started the following post: How to design a leaderboard? Now my quiz game have been out for approximately a year and sold pretty decently. I am working on to update the game ...
2
votes
1answer
160 views

How can I implement temporary effects in Objective-C?

How could I use this IBAction -(IBAction)shield:(id)sender{ appDelegate.healthInt = 150; } and simply make it work for a limited time. I want to set appDelegate.healthint = 150 for about 20 ...
2
votes
2answers
1k views

Detecting right/left collisions with a bounding box

I'm building a platformer in cocos2d, my first game project. I'm working on movement and collision detection. I'm using a tilemap with a "meta" layer of invisible blocks that are designated ...
2
votes
1answer
426 views

GNUstep Game Development

Are there any good resources out there for game development in GNU step? I looked at some of the source code for ooLite, but that didn't really have much in Objective-C. What is there these days?
2
votes
0answers
36 views

How to implement a property with a base value and a changed value? [duplicate]

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 ...
2
votes
1answer
268 views

Where to put common System functionality in Entity-System Design?

I am working on an Entity System design based largely off of Adam Martin's design and Ray Wenderlich's Objective-C Implementation. I am working on the AI system using a state machine with a System ...
2
votes
0answers
147 views

Difference between multiple AudioUnits and one AudioGraph with a MultiChannelMixer

I'm porting my game to iOS using MonoTouch, and I'm having some trouble getting sound output to work. SystemSound/AVAudioPlayer is way too simple for my needs (I need looping and multiple simultaneous ...
2
votes
1answer
1k views

How To show document directory save image in thumbnail in cocos2d class [closed]

I have just implemented multiple photo selection from iphone photo library and i am saving all selected photo in document directory every time as a array, now i want to show all saved images in my ...
2
votes
2answers
964 views

Issue with removing sprites on collision

I'm trying to make a very simple collision detection procedure just for test purposes. The problem is with the send/receive information between functions I have these lines on the update method ...
2
votes
3answers
619 views

How do you maintain content size vs. content quality in a mobile application?

I am developing my first Cocos2d iPhone/iPad game that includes quite a few sprites, I would need approximately 80 different. As this is for both normal and HD displays I have 2x of each sprite. I am ...
2
votes
1answer
1k views

Best Method to Create Side Scrolling Levels? - Cocos2D

I am looking to start my first side scroller project using Cocos2D, but I am curious. What is the preferred/best method of creating you levels? For large levels I see hand making it very laborious, is ...
2
votes
1answer
519 views

How can I stop the next screen from briefly displaying at the start of a CCTransitionFadeTR?

I am testing transitions in cocos2d, and am running into a problem. I have a MainMenu screen which contains a button. The idea is that clicking on the button will trigger a CCTransitionFadeTR ...
2
votes
1answer
549 views

Xcode workspace with Unity3D as a sub-project?

Let's say we're developing a 2D game with Cocos2d-iPhone and UIKit and CoreAnimation. But we're also considering leveraging the 3D capabilities of Unity 3D. Is it possible that we add the ...
1
vote
5answers
2k views

Learning C++ but wanting to develop iOS Apps

I'm a computer engineering student and taking my second programming class. I'm learning C++ using "C++ Primer Plus" 5th edition by Prata. I want to develop for iOS. I understand the main language for ...
1
vote
5answers
2k views

Snake game logic

So I'm thinking about making snake game. I started thinking about it. I figured out almost everything, but I have found one fundamental problem I can not fix myself and I need your help. The logic ...
1
vote
2answers
349 views

Are C and Objective-C sufficient for creating games on the iOS?

These days, I'm focusing on games development on the iOS. C++ is the lingua franca for games development but seriously, I prefer to code in C programming language, not in C++. So for iOS games ...
1
vote
1answer
213 views

Touch area double sized on newer device

I am developing a universal puzzle game, in which I have used separate image for iPhone4 and for iPhone3, iPhone4 image is double in size of iPhone3 image. My issue is for iPhone4, touch area of image ...
1
vote
2answers
298 views

How can I make a rectangle to an irregular shape?

I used masking for breaking an image into the below pattern. Now that it's broken into different pieces I need to make a rectangle of each piece. I need to drag the broken pieces and adjust to the ...
1
vote
3answers
2k views

How to determine an irregular area of a CCSprite?

In my simple game I use boundingBox for pick coins and other stuff, but I need use irregular area detection of Sprite(with out Alpha)... There is alternative to boundingBox? Here is code: ...
1
vote
1answer
2k views

Count number of CCSprite added to a CCLayer

Does cocos2d has a method that returns the amount of CCSprites added to a CCLayer? A have SceneControlLayer object, and I added some CCSprites to it. @interface SceneControlLayer : CCLayer { } ...
1
vote
2answers
413 views

Connect 4 Iphone game

I'm new to game development and development in general, I want to make a Connect 4 game. I have made a few simple game tutorials and I decided I wanted to make my own game now. I figured a connect 4 ...
1
vote
2answers
138 views

Architecture - how to refer to skills/abilities internally within code?

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 type, etc. Currently each skill has an ...
1
vote
1answer
145 views

How to centralize stat/feat/equipment related changes in an RPG?

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 ...
1
vote
1answer
108 views

Designing a four-directional movement control

I'm developing an RPG for iOS. Currently, I plan my controls to look like this: So the user can interact with objects, people, etc. by tapping on the right side of the screen, and moves by swiping ...
1
vote
1answer
137 views

Determining explosion radius damage - Circle to Rectangle 2D

One of the Cocos2D games I am working on has circular explosion effects. These explosion effects need to deal a percentage of their set maximum damage to all game characters (represented by ...
1
vote
1answer
303 views

Mixing Objective-C and C++: Game Loop Parts

I'm trying to write all of my game in C++ except for drawing and game loop timing. Those parts are going to be in Objective-C for iOS. Right now, I have ViewController handling the update cycle, but ...
1
vote
3answers
1k views

Wait till all CCActions have completed

I am developing a simple cocos2d game in which I want to animate two CCSprites simultaneously, and for this purpose I simply set CCActions on respective `CCSprite's as follows. [first ...
1
vote
3answers
433 views

Missing z-axis rotation for transforming between two vectors

I'm trying to rotate a cube so that it's facing up, but am getting hung up on the final implementation details. It now reliably will rotate the x,y axis to the correct side, but the z-axis is never ...
1
vote
2answers
893 views

Cocos2d: Adding a CCSequence to a CCArray

I have a problem with an action performed by a sprite. I have one CCSequence in a CCArray and I have an scheduled method (is called every 5 seconds) that make the sprite run the action. The action is ...
1
vote
3answers
2k views

Detecting End of Animation

So I am making a death animation for a game. enemy1 is a UIImageView, and what I'm doing is when an integer is less than or equal to zero, it calls this deathAnimation which only happens once. What I ...
1
vote
2answers
2k views

How to animate a flip of a card in Cocos2d?

I am working on a card game and would like to ask if someone could advice me how to implement a flip of a card in Cocos2D?
1
vote
1answer
130 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
1answer
55 views

Manually remove inactive CCParticleSystem from scene?

When using particle systems that have a lifetime, with CCParticleSystem and its derived classes, should I manually remove the finished systems from their parent nodes once the particle animations are ...
1
vote
1answer
261 views

Spritebuilder and CCScrollView, page indicators not showing up?

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 ...
1
vote
1answer
754 views

2D Destructible Terrain with Box2D / Cocos2D -> Image Tracing

Bear with me as this will be a rather lengthy post. For the last month I have been working on an open source Cocos2D, Box2D Destructible Terrain Engine. I have some questions regarding its ...
1
vote
1answer
222 views

opengles display human face in iphone and animate it?

I need to make a human 2D face to 3D face. I used this link to load an ".obj" file and map the textures. This example is only for cube and pyramid. I loaded a human face ".obj" file. This loads the ...
1
vote
1answer
348 views

UIView with IrrlichtScene - iOS

i have a UIViewController in a Storyboard and want to draw a IrrlichtScene in this View Controller. My Code: WWSViewController.h #import <UIKit/UIKit.h> @interface WWSViewController : ...
1
vote
1answer
484 views

Store and create game objects at positions along terrain

I have a circular character that rolls down terrain like that shown in the picture below. The terrain is created from an array holding 1000 points. The ground is drawn one screen width infront and ...
1
vote
3answers
4k views

How do I save data to the iPhone properly and securely?

I'm creating a game using Cocos2D (objective-c) and it has come to the point where I have to save data to local storage, like high scores and similar stuff. I know that NSUserDefaults is not a good ...
1
vote
2answers
936 views

How do I repeatedly move an image by 1 pixel?

I have a method that is moving a UIImageView called shootImg across the screen: -(IBAction)shoot{ if (appDelegate.shootInt > 0) { if (direction == 1) { shootImg.center = ...
1
vote
1answer
480 views

OpenGL ES Faces appear to be transparent when alpha is 1.0?

I am working on an object (OBJ File) loader for my app on iOS, currently I have successfully read the vertices and the faces of the object, and I am now just adding colours to the imported models. I ...
1
vote
1answer
66 views

How can I test if an oriented rectangle contains another oriented rectangle?

I have the following situation: To detect whether is the red rectangle is inside orange area I use this function: - (BOOL)isTile:(CGPoint)tile insideCustomAreaMin:(CGPoint)min max:(CGPoint)max { ...
1
vote
1answer
86 views

applyAngularVelocity causes error when called right after object instantiation

I'm trying to make a physicsBody rotate as soon as it is instantiated. CCNode* ball = [CCBReader load:@"Ball"]; [ball.physicsBody applyForce:force]; [ball.physicsBody ...
1
vote
0answers
65 views

How can i stack up tiles for Connect4 objective C? [closed]

I am trying to learn Objective C and iOS programming. And I'm trying to build a Connect Four. So Far i got this. I've been looking around and asking around but I haven't got the answer to my ...
1
vote
1answer
94 views

Where can I find info on grid based algorithms for stateless AI? [closed]

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 ...
1
vote
0answers
205 views

Image Texture Tracing Algorithm - Cocos2D Box2D

Context: I am working on a 2D Destructible Terrain engine for Cocos2D with Box2D. All images, when a level loads, have their border's traced and cached for the purposes of forming Box2D b2EdgeShape ...
1
vote
0answers
258 views

Objective-C Moving UIView along a curved path

I'm not sure if I am approaching this the correct way. In my app, when a user touches the screen I capture the point and create an arc from a fixed point to that touch point. I then want to move a ...
1
vote
0answers
113 views

iOS Facebook SDK, Games Start Playing post

im trying to implement a method in my native iOS game the publish a story on face book such as this photo most games that is integrated with facebook share stories like this in the activity section ...
1
vote
0answers
254 views

How do I use Objective-C libraries in Cocos2d-x?

We've created several libraries in Objective-C in the past, and now we're moving to the Cocos2d-x game engine. We can't figure out how to reference and use those libraries (we've also tried compiling ...
1
vote
1answer
78 views

Data model for unlockable card collection

My game has a collection of cards (about 64) that are unlocked (one by one) provided that 4 items are collected/gained in the game. Right now the deck of cards is modeled with a plist file, like ...