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
2k 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 ...
10
votes
3answers
4k 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 ...
9
votes
6answers
3k 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?
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
2k 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 ...
9
votes
4answers
4k views

In Cocos2D, how do I check for collisions against an arbitrary user-drawn shape?

I want 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 their finger and draws an abnormal shape around 2 ...
7
votes
7answers
5k 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
19k 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
4k 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
841 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
911 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
310 views

How to approach 360 degree snake without having it “slide”

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 ...
3
votes
3answers
10k 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
694 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
1k 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
1answer
309 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
2answers
313 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?