writing code

Forum for Objective-C iPhone games and OpenGL related topics including programming doubts, books and other resources for iPhone game development

writing code

Postby rahul7star » Mon Aug 24, 2009 1:02 pm

Hello
i am new to i phone and i love this site as this is quite helpfull for me :)
now what i want to knw is i have XCODE editor can i write code in XCODe for making iphone game or i need OPENGL set up

just brief me how to start coding in iphone
Thanks
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: writing code

Postby rahul7star » Mon Aug 24, 2009 1:09 pm

and yes i would like to know any book that you would like to suggest me for iphone games
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: writing code

Postby DevelopmentTeam » Wed Aug 26, 2009 4:36 am

@rahul7star
Nice seeing you back, and happy to help you on iPhone.
Xcode latest version available on Apple's website contains the SDK for iPhone platform, a good enough stable IDE, Simulator for iPhone and many helpful utilities for development. Xcode is the original IDE for Mac OsX developments as well.

The simulator simulates everything an iPhone has in it. So OpenGL is already in built and you don't have to worry. When you have Xcode you are ready to learn and develop anything for iPhone platform and you need to register as a developer in iphone development portal within Apple's website (you have to pay $99) to start publishing your games.

Books:- We are not aware of any books available here in India that should guide you for iPhone development. We suggest you can use many blogs rather. I'll try to list as few blogs soon.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Re: writing code

Postby rahul7star » Fri Aug 28, 2009 9:46 am

i havent paid 99$ earlier and was using XCode and did some game RnD it was working on simulator but not on ipod....now i paid99$ do i need to install again XCODE??? let me know how to put app on ipod??
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: writing code

Postby rahul7star » Fri Aug 28, 2009 2:11 pm

here is my first ever demo on IpHOne
http://www.youtube.com/watch?v=aBJCHxUU-wE

but make sure to reply me about putting the game on ipod
Thanks
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: writing code

Postby rahul7star » Sat Aug 29, 2009 8:50 am

got the ans
need to have a developer account for the iPhone with Apple in order to get your programs on the device. Until then, you can run them in the simulator


soon will bang with new query :)
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: writing code

Postby rahul7star » Wed Sep 09, 2009 3:08 am

well this is a good book to start with "Begining Iphone development SDK 3.0"
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: writing code

Postby rahul7star » Wed Sep 09, 2009 1:00 pm

after spending 2 days for splash screen i found a easy way to add splash screen

just make a png with "Default.png"
And its done :)

now i am struggling for adding score in my game

:)
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: writing code

Postby DevelopmentTeam » Wed Sep 09, 2009 4:29 pm

Wow, nice watching ur good progress into iphone dev.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Re: writing code

Postby rahul7star » Thu Sep 10, 2009 5:20 am

i am not getting as how to show score count :(
i googled BitmapFontAtlas but in vain... i guess i need to use cocos2d for that..
and i dont waana use cocos2d .. is there any shortcut for displaying score in game ??
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: writing code

Postby rahul7star » Tue Sep 22, 2009 5:36 am

rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: writing code

Postby rahul7star » Tue Sep 29, 2009 1:37 pm

am using cocos2d
now when user press start game .. game scene changes (using director)and game.png get loaded on screen but how to call my startGame() ,i mean where should i call my startgame() as i cant acces appdidfinishlauncing form here..

here is the code

// in app delegate class


(void)applicationDidFinishLaunching:(UIApplication *)application {
printf("Loaded");


self.sliderController = [[SliderController alloc] init]; // 2


UIWindow *window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[window addSubview:sliderController.view];
[window makeKeyAndVisible];
[window setUserInteractionEnabled:YES];
[window setMultipleTouchEnabled:YES];


[[Director sharedDirector] setLandscape: YES];
[[Director sharedDirector] attachInWindow:window];

[window makeKeyAndVisible];

MenuScene * ms = [MenuScene node];

[[Director sharedDirector] runWithScene:ms];
}


////// MenuScene class
@implementation MenuLayer
- (id) init {
self = [super init];
if (self != nil) {
[MenuItemFont setFontSize:20];
[MenuItemFont setFontName:@"Helvetica"];
MenuItem *start = [MenuItemFont itemFromString:@"Start Game1" target:self selector:@selector(startGame:)];
MenuItem *help = [MenuItemFont itemFromString:@"Help" target:self selector:@selector(help:)];
MenuItem *gei = [MenuItemFont itemFromString:@"gei" target:self selector:@selector(gei:)];


Menu *menu = [Menu menuWithItems:start, help, gei,nil];

[menu alignItemsVertically];
[self addChild:menu];
}
return self;
}
-(void)startGame: (id)sender {


//////
GameScene * gs = [GameScene node];
[[Director sharedDirector] replaceScene:gs];





/// in GameScene Class

(id) init {
self = [super init];
if (self != nil) {

//SliderController *sc=[SliderController node];
// [[Director sharedDirector] replaceScene:sc];


printf("JHKHKHKHH");
Sprite * bg = [Sprite spriteWithFile:@"menu1.png"];


// [self initPuzzle:@"menu1.png"];
[bg setPosition:ccp(240, 160)];
[self addChild:bg z:0];
[self addChild:[GameLayer node] z:1];

// -(void) initPuzzle:(NSString *) imagePath;
////

but where should i call my startGame()?
this is really a stupid question but .. i cant even solve this :(

Thanks
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: writing code

Postby rahul7star » Wed Sep 30, 2009 5:01 am

guys i played ur icopter game so i am sure you know the solution
:(
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: writing code

Postby DevelopmentTeam » Thu Oct 08, 2009 6:25 am

Then entire game iCopter classic was written in OpenGL.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Re: writing code

Postby rahul7star » Wed Oct 21, 2009 3:37 am

hey i found this to integrate FB on iphone
http://wiki.developers.facebook.com/ind ... for_iPhone


but i want my score to be displayed on FB . i am saving my score in a variable(count) now how to pass this to FB any IDEA

Thanks
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am


Return to iPhone OpenGL ES 3D Game Development Forum

Who is online

Users browsing this forum: No registered users and 0 guests