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
1 answer
149 views

I'm quite experimented in objective C, but now i'm tried cocos2D and his features. I need to add a body on a spritesheet (if possible on a classic 'UIImageView'), in order to detect collisions after. ...
Jerry-fr's user avatar
0 votes
1 answer
705 views

I am making a cocos2d side scroller and I am currently putting collision detection in. I have an enemy that shoots at the player. I want to have the bullets disappear when they hit the player. The ...
PoKoBros's user avatar
  • 103
5 votes
1 answer
869 views

I'm dropping a simple box onto a plane from 100 units and my solution using Bullet Physics is giving me some weird behavior. The dimensions of the box are {2, 4, 1}. When the box hits the ground it ...
Adil Patel's user avatar
1 vote
1 answer
221 views

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 in ...
pasawaya's user avatar
  • 261
0 votes
1 answer
2k views

I'm working on a game with Objective-C and Cocos2d, the game has a huge number of images, and obviously as I add images on the spritesheet (well yes I'm using spritesheets) the loading time get longer,...
Adarkuccio's user avatar
2 votes
2 answers
378 views

I'm making a small text-based adventure in Objective-C. I have a Player class with four properties which represent the player's attributes (...
Jared's user avatar
  • 21
1 vote
0 answers
420 views

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 ...
Paul Renton's user avatar
5 votes
1 answer
805 views

I'm currently making a game similar to this Nyan Cat flash game, although I'm using cocos2d. I'm having a hard time trying to make the rainbow effect: Currently, every update call I add a piece of ...
Andrey Chernukha's user avatar
2 votes
1 answer
2k views

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 ...
Paul Renton's user avatar
1 vote
1 answer
740 views

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 ...
Paul Renton's user avatar
1 vote
0 answers
1k views

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 ...
PruitIgoe's user avatar
  • 197
1 vote
1 answer
673 views

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

I am encountering issues with determining a CCSprite's parent node's scale value. In my game I have a class that extends CCLayer and scales itself based on game triggers. Certain child sprites of ...
Paul Renton's user avatar
6 votes
1 answer
849 views

One of my current endeavors is creating a 2D destructible terrain engine for iOS Cocos2D (See https://github.com/crebstar/PWNDestructibleTerrain ). It is in an infant stages no doubt, but I have made ...
Paul Renton's user avatar
0 votes
1 answer
368 views

In my 2D tile-based game, I have NPCs that move around on a fixed path. I am putting the information about the NPCs in a .plist file that is loaded on startup. The thing is, I'm not sure how to format ...
pasawaya's user avatar
  • 261
3 votes
1 answer
394 views

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 ...
Salmonhands's user avatar
3 votes
0 answers
689 views

What is the most common method for providing gamepad support in an OS X game? I've been using an IOHIDLIB wrapper named DDHIDLib https://github.com/Daij-Djan/DDHidLib and it seems to be working but I ...
Brendan Miller's user avatar
0 votes
1 answer
213 views

How do i set the image/texture of an LHSprite that is loaded into xCode using levelHelper & spriteHelper? I am using sprite sheets. So i tried to load the image the old fashioned way using ...
Kurt Moyer's user avatar
5 votes
2 answers
2k views

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 ...
pasawaya's user avatar
  • 261
0 votes
0 answers
140 views

I need to make a layer over an image and adjust the layer to fit to image and get its co-ordinates of the layer. I need to adjust the layer by touch and pinch. The sample image is as below. I need ...
2vision2's user avatar
  • 131
3 votes
1 answer
852 views

I need to rotate an image in opengles GLkit and get it back to its original position in GLkit. ...
Manoj's user avatar
  • 131
0 votes
1 answer
1k views

Can someone guide me as to how can I make an application quit when you press the cancel button of an Alert View in C# code? Thanks I forgot to add that I am trying to quit application on clicking ok ...
Anil's user avatar
  • 21
1 vote
1 answer
565 views

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 ....
2vision2's user avatar
  • 131
2 votes
2 answers
581 views

I am making a text-based adventure game. How should I go about changing to another scene if the player wants to e.g. go to the house or walk down the road? I am using Objective C, but C will work ...
codegeek511's user avatar
0 votes
1 answer
1k views

I am following this guide: http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:tiled_maps Trying to create a tiled map that also supports multiple layers. The guide says that a way is to use ...
Ramy Al Zuhouri's user avatar
2 votes
0 answers
332 views

I'm porting my game to iOS using MonoTouch, and I'm having some trouble getting sound output to work. SystemSound/AVAudioPlayer ...
Panda Pajama's user avatar
  • 13.5k
0 votes
1 answer
231 views

What is the easiest way to implement DPad style movement (No diagonal) for AI without using and A* algorithm? I thought about having the enemy catch up to the player in the Y axis first then the X ...
Slayter's user avatar
  • 185
1 vote
1 answer
269 views

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 on ...
Mutawe's user avatar
  • 133
2 votes
1 answer
2k views

How could I implement a random game for iOS via Facebook. I registered my game with Facebook and done everything so far... Can Facebook do such a thing? EDIT I connected my app to Facebook, I can ...
Mutawe's user avatar
  • 133
6 votes
1 answer
5k views

I've passed last 2 days reading articles and book for understand how can i make a plugin for iOS in Unity. Basically i need just a demo for understand how it work. For now i've tried to make this ...
Max's user avatar
  • 483
4 votes
4 answers
618 views

I would like to know when a contractor ask you for a technical specs for iOS platform of a game, what's the description that you should give back to him?
Ziad Tamim's user avatar
1 vote
3 answers
3k views

I am developing a simple cocos2d game in which I want to animate two CCSprites simultaneously, and for this purpose I simply set ...
atastrophic's user avatar
0 votes
1 answer
298 views

UPDATE: It no longer crashes after removing [self removeAllChildrenWithCleanup:YES]; from onExit. The artifacts still remain ...
Orin MacGregor's user avatar
1 vote
0 answers
375 views

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 ...
Md Mahbubur Rahman's user avatar
1 vote
1 answer
138 views

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 ...
Karlos Zafra's user avatar
0 votes
1 answer
407 views

In my Cocos2D game for iOS I have a relatively long running calculation that happens at a fairly regular interval (every 1-2 seconds). I'd like to run the calculation on a background thread so the ...
SundayMonday's user avatar
3 votes
2 answers
740 views

How to separate UI and logic in Objective-C based mobile games? To develop games, I use Cocos2d library. I need a good reference to separate my UI code from game logic code.
Md Mahbubur Rahman's user avatar
0 votes
1 answer
1k views

I am developing one 2d game using cocos2d framework, in this game i am using admob for advertising, in some classes not in all classes but admob banner is visible in every class and after some time ...
Anil gupta's user avatar
2 votes
1 answer
494 views

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 ...
PeterK's user avatar
  • 97
0 votes
1 answer
906 views

I am a newbie in OpenGLES, so pardon me if I cannot state the question properly. Is it possible to create a 3D box with the following imports only: OpenGLES, QuartzCore, GLKit I have created a 2D ...
JCurativo's user avatar
  • 101
3 votes
1 answer
391 views

I update the velocity of my vehicle like so: ...
Lewis's user avatar
  • 511
5 votes
1 answer
599 views

i have a UIViewController in a Storyboard and want to draw a IrrlichtScene in this View Controller. My Code: WWSViewController.h ...
regetskcob's user avatar
0 votes
1 answer
505 views

Possible Duplicate: Can I achieve a torchlight effect (lighter area around a light source) in a 2D game? I want to have a picture as a background, say this: Then I would like to apply a mask, just ...
user1586195's user avatar
1 vote
6 answers
13k views

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 ...
Dvole's user avatar
  • 1,875
6 votes
1 answer
5k views

I need some help with OpenGL textures masking. I have it working but need to find some other blending function parameters to work in other way. Now I have: ...
Julius Petraška's user avatar
-1 votes
1 answer
5k views

I want to change the scale of sprite like a paper in 'Paper Toss' game. 'Paper Toss' is the game is available on the App store. I want to make a sprite like a paper and change the scale of sprite ...
android creative's user avatar
-1 votes
2 answers
503 views

I would like to see how things are done in modern iOS games, I am especially interested in Cocos2D games. I need a game that will compile (warnings are ok) and since most of the project I have seen ...
Dvole's user avatar
  • 1,875
1 vote
1 answer
296 views

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

I am making game and need to prepare view for level selection. Could you recommend me some opensource library which could I use? I need icons to vibrate after long pressing one of them, some callbacks ...
Piotr's user avatar
  • 103
1 vote
2 answers
444 views

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 ...
Anil gupta's user avatar