Top Questions - iphoneGameDev most recent 30 from http://iphonegamedev.stackexchange.com 2010-03-16T13:50:30Z http://iphonegamedev.stackexchange.com/feeds http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://iphonegamedev.stackexchange.com/questions/120/how-to-get-accurate-location-from-core-location-in-iphone-sdk how to get accurate location from core location in iphone sdk? rahul vyas 2010-01-01T08:51:34Z 2010-03-14T01:22:28Z <p>What is the best way to get accurate location from location manager? if someone needs source for my implementation i'll post it</p> http://iphonegamedev.stackexchange.com/questions/123/where-can-i-find-good-tutorials-for-writing-iphone-games Where can I find good tutorials for writing iPhone games? AskAboutGadgets.com 2010-02-12T23:15:15Z 2010-02-12T23:15:15Z <p>I would like to know if there are any good tutorials on the web showing how to write games for the iPhone. I am a beginner on the platform</p> http://iphonegamedev.stackexchange.com/questions/122/high-score-security High score security Mungus Mong 2010-01-27T13:01:49Z 2010-01-27T13:01:49Z <p>Hello,</p> <p>I want to store a high score list for my game on a central server so people can see how well they are doing compared to other people.</p> <p>I really want to avoid people being able to jail-break their phones and edit their scores, or scan the ip traffic to send fake scores to the server.</p> <p>From what I understand Apple don't really like encryption being used in the apps, and it increases the chances of the app being rejected.</p> <p>Whats the best way to deal with this situation?</p> <p>Thanks</p> http://iphonegamedev.stackexchange.com/questions/116/what-skill-sets-required-by-an-indie-developer-for-game-development What skill sets required by an indie developer for game development? unknown (google) 2009-12-16T07:04:05Z 2009-12-30T05:16:03Z <p>Well these days i am working from my house basement and looking to make games for iphone, i dont have budget to pay anything to anyone for anything so i have to do everything by myself to make game and i have never make any game before, so i was wondering if people here can tell me what i should do, what i should learn?</p> <p>To my understanding you should know except programming...</p> <ol> <li>Photoshop</li> <li>Sound making</li> <li>Opengles or something like that</li> </ol> <p>What books can help you to make your first game?</p> http://iphonegamedev.stackexchange.com/questions/44/most-commanly-used-classes-in-cocos-2d-animation most commanly used classes in cocos 2d animation. sagar 2009-10-02T00:30:26Z 2009-12-17T14:56:46Z <p>I would like to know the most commonly used classes &amp; their use.</p> <p>For example.</p> <ul> <li><strong>Class Name</strong> <ul> <li>Sprite class = used for image (or may be anything else / I am a new one to cocos 2d )</li> </ul></li> <li><strong>Usage/Example</strong> <ul> <li>Sprite *backImage=[Sprite spriteWithFile:@"ImageName.png"];</li> </ul></li> </ul> <p>Like in Interface Builder we can know all the UI name from the Interface builder's library.</p> <p>But, We haven't this facility in COCOS.</p> <p>So, This would be a great help.</p> <p>Thanks in advance.</p> <p>Sagar.</p> http://iphonegamedev.stackexchange.com/questions/16/anyone-using-c-stl-for-their-games Anyone using c++ stl for their games? originalnintendo 2009-09-26T01:58:20Z 2009-12-15T15:24:41Z <p>I miss vectors, queues, and maps etc. I'm vaguely aware of similar data structures available in Objective-C but I want to use the c++ stl data structures. Anyone have experience writing or porting c++ code to the iPhone? any quirks?</p> http://iphonegamedev.stackexchange.com/questions/103/how-to-prevent-certain-functions-variables-etc-from-appearing-in-the-xcode-auto How to prevent certain functions, variables etc from appearing in the XCode auto-complete menu? originalnintendo 2009-10-19T03:23:45Z 2009-12-08T14:42:08Z <p>I like typing the first characters of a function name in XCode and pressing escape to get a list of functions w/ similar names. Sometimes I have functions that I don't want to appear in the list. How can I prevent certain functions, variables etc from appearing in the XCode auto-complete menu?</p> http://iphonegamedev.stackexchange.com/questions/112/cocos2d-sprite-animation cocos2d sprite animation Ali Bozorgkhan 2009-11-20T06:51:19Z 2009-11-23T10:15:19Z <p>Hi all, How can I change an image position like background-position in css? By position I don't mean the position of background like ccp(200,150), I mean for example, I have an image with resolution of (1000,200) that contains 5 (200,200) images. I show this image in (200,200) sprite and I want to change the image position so I can show 5 pictures in 1 picture. I think If you want to show a movement like running, you use sprites with like 10 frames of movement and change the picture position so it looks like a person is running. How can I do that? thanx in advance</p> http://iphonegamedev.stackexchange.com/questions/93/anyone-use-mono-develop-and-mono-touch-yet Anyone use mono-develop and mono-touch yet? Jay Stevens 2009-10-10T14:50:17Z 2009-11-15T19:09:49Z <p>Has anyone used Mono Develop and MonoTouch api for development yet? It lets you use C# instead of Objective C as the language. They then statically compile to native code. </p> <p>Is it an ok platform? Is it fully compatible without any gotchas?</p> http://iphonegamedev.stackexchange.com/questions/99/replacing-image-in-sprite-cocos2d-game-development-of-iphone Replacing image in sprite - cocos2d game development of iphone sagar 2009-10-13T21:48:54Z 2009-11-15T19:01:34Z <p>I want to change the sprite image.</p> <p>Say for example.</p> <pre><code>mainSprite=[Sprite spriteWithFile:@"redFile.png"]; [self addChild:mainSprite]; </code></pre> <p>Here, Sprite is already added to a layer. I have mainSprite (pointer) which can access it.</p> <p>If I change </p> <pre><code>[mainSprite setOpacity:150]; </code></pre> <p>it works perfectly. But Here I want to change the sprite image instead of opacity.</p> <p>But Don't know how?</p> <p>Thanks in advance for helping me.</p> <p>Sagar</p> http://iphonegamedev.stackexchange.com/questions/15/are-there-any-podcasts-specifically-for-iphone-game-development Are there any podcasts specifically for iPhone game development? gamedev88 2009-09-26T01:53:36Z 2009-11-03T18:11:45Z <p>I've listened to the podcast on <a href="http://www.iphonegamenetwork.com/" rel="nofollow">iPhoneGamesNetwork</a> a number of times. It's interesting but doesn't contain enough info specifically related to game <strong>development</strong>.</p> <p>Are there any podcasts specifically for iPhone <strong>game development</strong>?</p> http://iphonegamedev.stackexchange.com/questions/107/how-much-testing-is-enough-for-an-iphone-game How much testing is enough for an iPhone game? originalnintendo 2009-10-28T04:03:15Z 2009-10-28T04:03:15Z <p>Before submitting to the app store how do you test your games? Do you test on both iPod Touch and iPhone? What versions of the OS do you test? Do you test the case where the game play is interrupted by a phone call?</p> http://iphonegamedev.stackexchange.com/questions/106/how-can-i-handle-a-phone-call-during-game-play How can I handle a phone call during game play? gamedev88 2009-10-23T03:50:50Z 2009-10-23T03:50:50Z <p>When the user's game play is interrupted by a phone call I'd like to save the state of the game so they can restart approximately where they left off. </p> <p>What's the best way to do this?</p> <p>Is there a delegate like "StopBecauseOfPhoneCall"?</p> <p>Does the game developer have to explicitely deallocate any memory?</p> http://iphonegamedev.stackexchange.com/questions/71/cocos-2d-open-source-game-links-for-beginners cocos 2d open source game links - for beginners sagar 2009-10-06T16:20:28Z 2009-10-20T17:25:19Z <p>From my Previous question - </p> <p><a href="http://iphonegamedev.stackexchange.com/questions/64/cocos-sample-code-tutorials-links" rel="nofollow">http://iphonegamedev.stackexchange.com/questions/64/cocos-sample-code-tutorials-links</a></p> <p>I have asked here, one step ahead.</p> <p>Previous question was basically for " Basic Beginner Source ".</p> <p>Now, I want to start development of game.</p> <p>" Basic Beginner Source " - wasn't enough for game development.</p> <p>Is there any other sources, </p> <p>Which gives direct gives game development - resources ?</p> <p>Thanks in advance.</p> <p>Sagar</p> http://iphonegamedev.stackexchange.com/questions/82/moving-sprites-more-then-one-at-a-time Moving Sprites (more then one) at a time sagar 2009-10-08T01:05:03Z 2009-10-13T22:14:50Z <pre><code>-(void)moveBox:(NSTimer*)myTimer{ float endx=[[[myTimer userInfo] valueForKey:@"endX"] floatValue]; float endy=[[[myTimer userInfo] valueForKey:@"endY"] floatValue]; float timing=[[[myTimer userInfo] valueForKey:@"timeForMove"] floatValue]; Sprite *sp=(Sprite*)[[myTimer userInfo] valueForKey:@"objSprite"]; [sp runAction: [MoveBy actionWithDuration:timing position:ccp(endx,endy)]]; } </code></pre> <p>I use above code in my application. But I don't require this method.</p> <p>Above code is for Moving the sprite.</p> <p>I have placed here above code just because You can imagine what do I need.</p> <p>Now I want to Move 10 sprites at a time.</p> <pre><code> [sp runAction: [MoveBy actionWithDuration:timing position:ccp(endx,endy)]]; </code></pre> <p>Above line - moves one sprite at a time.</p> <p>How to move all sprites all together at once.</p> <p>Why Required ? :</p> <p>You might have seen tetris game.</p> <p>If bottom most row is complete, then all above rows move down by step one.</p> <p>I want to do the same.</p> <p>How?</p> http://iphonegamedev.stackexchange.com/questions/46/how-to-change-menu-color-in-cocos-2d how to change menu color in cocos 2d? sagar 2009-10-02T01:00:05Z 2009-10-13T22:00:16Z <p>I am little bit confused regarding changing the color of Menu Item.</p> <p>Because I didn't found any methods regarding it.</p> <p>I have implemented following in my Game.</p> <pre><code> [MenuItemFont setFontName:@"ArialRoundedMTBold"]; [MenuItemFont setFontSize:30]; MenuItem *start=[MenuItemFont itemFromString:@"-: Start Game :-" target:self selector:@selector(startGame:)]; MenuItem *help=[MenuItemFont itemFromString:@"-: Instructions :-" target:self selector:@selector(help:)]; Menu *menu=[Menu menuWithItems:start,help,nil]; [menu alignItemsVertically]; [menu setPosition:CGPointMake(160, 80)]; [self addChild:menu]; </code></pre> <p>What code should I apply for changing the font color of menu item?</p> http://iphonegamedev.stackexchange.com/questions/73/why-iphonegamedev-has-less-number-of-visitors Why iPhoneGameDev has less number of visitors? sagar 2009-10-06T18:06:10Z 2009-10-11T22:51:49Z <p>When I came to know about iPhoneGameDev, I thought - the ratio of professional Application developers &amp; game developers is same.</p> <p>But I found very few visitors here as compare to stackoverflow.</p> <p>My Question is</p> <p>Why is it so?</p> <p>I believe, Game developers are in bulk size, Then why crowd not entering to iPhoneGameDev?</p> <p>SO has special - sub part - Meta Stack overflow - for bug report etc.</p> <p>Where to ask about - iPhone Game Dev?</p> http://iphonegamedev.stackexchange.com/questions/87/whats-been-your-experience-with-the-app-store What's been your experience with the app store? gamedev88 2009-10-08T02:07:16Z 2009-10-11T22:50:58Z <p>I've had three apps in the store over the past year. The approval time has ranged from 1 day to over three months. What has your experience been? What have you learned?</p> http://iphonegamedev.stackexchange.com/questions/94/how-do-i-handle-provisioning-profiles-after-upgrading-to-os-3-1-2 How do I handle provisioning profiles after upgrading to OS 3.1.2? originalnintendo 2009-10-10T19:21:15Z 2009-10-11T22:48:36Z <p>I just upgraded my iPhone to OS 3.1.2. When I try to run my game that was installed w/ OS 2 I get an error message "Application can't be opened because the provisioning profile has expired". I renewed my developer license a few months ago so that's not the issue. What can I do here?</p> <p>Also the Project -> Set Active SDK menu in XCode doesn't display OS 3.0 or 3.1.2 or anything as options. How can I fix this?</p> http://iphonegamedev.stackexchange.com/questions/42/opengl-to-use-or-not-to-use-why-iphone-application-dev OpenGL - to use or not to use ? why - iPhone application dev sagar 2009-10-01T22:52:35Z 2009-10-10T12:56:16Z <p>I have to develop an application "Behavior like an Tetris game".</p> <p>I have never used "OpenGL" for the iPhone application developement.</p> <p>Application is something like this</p> <pre><code>* Red / green / blue square boxes drop from top * Red + Red + Red = Points &amp; boxes disappears * same way user has to make combination &amp; get points * Different levels are there. * There are three buttons Left, Right for movement &amp; bottom for speedy fall </code></pre> <p>For this kind of application should I use open GL or NOT?</p> <p>i.e. Is it possible to develop entire application with view &amp; it's animation? If yes then, will it be more complex as compare to open gl?</p> <p>What is the advantage of using open GL? (I know that it gives good 2d, 3d look ) (But here my question means - easy coding?) (Or open gl is more complicated as compare to objective-c?) (I am just asking because I am not aware of it)</p> http://iphonegamedev.stackexchange.com/questions/79/where-to-store-gamer-level-details Where to store Gamer Level Details sagar 2009-10-07T16:51:01Z 2009-10-10T01:35:24Z <p>Usually game requires to store following data.</p> <ul> <li>Gamer name</li> <li>Gamer Score</li> <li>Gamer Current Level</li> <li>Gamer Current Life</li> <li>Highest Scores</li> <li>etc.</li> </ul> <p>According to me, there are two ways of storing the details regarding game.</p> <ul> <li>Use SQLite Data base.</li> <li>Use .plist file</li> </ul> <p>Which is best among them? How? (For example, For Gamer - Sagar &amp; Rocky Martin Sagar's Game Level Sagar's Top Score Sagar's Current Life Should we use individual .plist files for that?</p> <p>Or </p> <p>Should we create tables &amp; manage them in database? </p> <p>) Which one is preferable for what kind of games?</p> <p>How to store data in .plist file?</p> http://iphonegamedev.stackexchange.com/questions/86/whats-the-best-way-for-an-independent-iphone-game-developer-to-promote-games What's the best way for an independent iPhone game developer to promote games? gamedev88 2009-10-08T02:04:50Z 2009-10-08T02:04:50Z <p>I'd like to invest some time and/or money in promoting my next game when it appears in the app store. What's the best way to do this? What has worked well for you? What has not worked well?</p> <p>I've thought about advertising on blogs, trying to be a guest on a podcast, promote through a social network etc.</p> http://iphonegamedev.stackexchange.com/questions/39/question-about-testing-apps-and-fixing-crashes Question about testing apps and fixing crashes... originalnintendo 2009-09-30T04:48:23Z 2009-10-08T01:18:19Z <p>I've been working on a relatively simple iPhone game for about six months. It uses OpenGL ES and the SoundEngine/EAGLview from the CrashLanding sample code. Also note I'm still using iPhone OS 2.0.</p> <p>I've noticed a strange behavior... the game will crash after using the google maps app that comes w/ the phone. So after using the map's gps feature, searching for some things, getting directions etc the game will crash immediately upon launch. It doesn't crash at all otherwise. Restarting the phone fixes this problem.</p> <p>What would you do in this situation? Have you encountered problems like this? Could OS 2.0 vs 3.0 make a difference?</p> http://iphonegamedev.stackexchange.com/questions/40/whats-the-ideal-iphone-game-development-team-size-organization What's the ideal iPhone game development team size/organization? gamedev88 2009-09-30T15:04:02Z 2009-10-08T01:12:31Z <p>What's the ideal size of an iPhone game development team? One person? Two People? Why?</p> <p>What skills should the team members have? I think it's common to have an artist and a programmer. What's your experience?</p> http://iphonegamedev.stackexchange.com/questions/12/compare-opengl-es-and-coregraphics-which-is-better-when Compare OpenGL ES and CoreGraphics... which is better? when? gamedev88 2009-09-25T04:11:06Z 2009-10-07T19:25:25Z <p>When is CoreGraphics appropriate for an iPhone game? I'd imagine it would be good for a slow moving game that's probably not 3D. What would make you switch from CoreGraphics to Open GL or a game engine?</p> http://iphonegamedev.stackexchange.com/questions/28/is-iphonegamedev-really-necessary Is iPhoneGameDev really necessary? Gerald 2009-09-28T06:37:36Z 2009-10-07T18:38:27Z <p>Alright, I'll bite the negative bullet: What's the point of iPhoneGameDev when there's a perfectly good and well-frequented StackOverflow? If you're only interested in iPhone dev, then just use the appropriate tags to filter down the traffic, e.g.: <a href="http://stackoverflow.com/questions/tagged/iphone" rel="nofollow">http://stackoverflow.com/questions/tagged/iphone</a></p> <p>In other words, I'd like to know what this particular site would bring when I'm already following SO. There may be genuine things that would not work on SO (that's what I'd like to see first in your answers). But from the questions I see so far, the majority of them would perfectly fit on SO and get quick and relevant answers.</p> http://iphonegamedev.stackexchange.com/questions/74/changing-the-sprite-position-with-timer-how changing the Sprite position with timer - how? sagar 2009-10-06T18:08:46Z 2009-10-07T16:42:16Z <p>I have following method to move sprite.</p> <p>I want to call this function through timer.</p> <p>How to pass arguments when calling function with timer,</p> <p>-(void)setX:(int)x andY:(int)y andObject:(Sprite*)obj { [obj setPosition:CGPointMake(x,y)]; }</p> <p>Now, I want to call above method, using following timer.</p> <p>[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector() userInfo:nil repeats:NO];</p> <p>What to set Here?</p> <p>How to Pass arguments? (as per my knowledge - selector specifies only the method to invoke)</p> http://iphonegamedev.stackexchange.com/questions/64/cocos-sample-code-tutorials-links COCOS Sample Code / Tutorials links sagar 2009-10-03T18:56:33Z 2009-10-06T16:40:53Z <p>I have tried to find out COCOS sample code &amp; tutorials link through google.</p> <p>But I couldn't find what I wanted.</p> <p>If someone know, Please Share with iPhoneGame Dev.</p> <p>Thanks in Advance.</p> <p>Sagar</p> http://iphonegamedev.stackexchange.com/questions/63/to-what-extent-are-iphone-games-being-pirated To what extent are iPhone games being pirated? originalnintendo 2009-10-03T03:13:28Z 2009-10-04T08:44:38Z <p>I recently read about a developer whose games were being pirated quite a lot. What is your opinion/experience? How would one measure the extent to which their games are being pirated?</p> http://iphonegamedev.stackexchange.com/questions/3/what-is-a-great-opengl-es-resource What is a great OpenGL ES resource? gamedev88 2009-09-18T20:10:34Z 2009-10-04T00:45:41Z <p>I'm new to iPhone game development. I want to learn the basics of OpenGL ES. What's a great resource?</p>