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

4
votes
1answer
1k views

How do I break an image into 6 or 8 pieces of different shapes?

I am working on puzzle game, where the player can select an image from iPhone photo gallery. The selected image will save in puzzle page and after 3 second wait the selected image will be broken into ...
9
votes
6answers
2k views

Storing game state at exit on the iPhone with Objective-C

How would you store your game state at exit for an iPhone game written in Objective-C?
7
votes
3answers
3k views

How to achieve uniform speed of movement on a bezier curve?

I'm trying to move an image along Bezier curve. This is how I do it: - (void)startFly { [self runAction:[CCSequence actions: [CCBezierBy actionWithDuration:timeFlying bezier:[self ...
13
votes
5answers
4k views

Tools for generating texture atlases/sprites from source images? [closed]

Is there an industry standard file format for texture atlases? What are the apps that take a directory of images and turns it into a texture atlas png and a text file describing what's on it? This ...
6
votes
3answers
1k views

top down game - checking, drawing enemy's line of sight area with obstacles

Examples of what i'm going to need: I'm using cocos2d to draw a CCTMXTiledMap, on those tiles i'll have to draw the LOS cone. How would i test if the player is within that cone, taking obstacles ...
8
votes
4answers
4k views

Cocos2D collision detection against a random shape

I would like to brainstorm a few ways of handling how to detect a collision between a sprite and a user generated shape of some sort. For example. There are 3 objects on the screen. The user takes ...
7
votes
7answers
4k views

Very simple open source games in various languages? [closed]

Are there any very simple open source games available just to demonstrate the basics of the programming techniques? Preferably something which fits in to a couple hundred lines of actual code. ...
16
votes
5answers
18k views

Objective-C or C++ for iOS games?

I'm pretty confident programming in Objective-C and C++, but I find Objective-C to be somewhat easier to use and more flexible and dynamic in nature. What would be the pros and cons when using C++ ...
1
vote
6answers
3k 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 ...
5
votes
2answers
634 views

How to combine tap and long hold gesture recognizers?

I have a game in which the player moves around a sprite by tapping on various sections of the screen (left, right, up, down). So far, each tap moves the sprite one tile (I use a tile system for ...
4
votes
2answers
834 views

How to design a leaderboard?

This sounds like an easy thing but when I considering the following Many players Some have played many games and some just started Different type of statistics On what information should the ...
3
votes
3answers
9k views

Can Xcode be used to create very simple games?

I am brand new to Xcode, and I am also brand new Objective-C programmer. I was wondering if it is possible to create simple Mac games with Xcode. If it's not possible, could you recommend me some ...
3
votes
1answer
595 views

How can I spawn monsters at random locations?

I made a little 2D shooter game for my iPhone. I want monsters to spawn at random locations. But I don't have any clue where to start to make them spawn. I already made the monster image and ...
2
votes
6answers
999 views

Random Position between ranges

Does anyone have a good algorithm for generating a random y position for spawning a block, which takes into account a minimum and maximum height, allowing player to to jump on the block. Blocks will ...
1
vote
2answers
302 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
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?