views:

46

answers:

3

HI to all, I am new in game developing part .Can any one help me out how to develop the game .Because Till toady i am on the normal iphone application developing .Can i develop the game by choosing window or view based application .If yes then give me some kind of sample code or link for that. Thanks in advance

A: 

you're probably best off using a games engine (google cocos2d) or similar to be honest. They come with their own starting templates that you can use, rather than using a view or window based application.

Thomas Clayson
A: 

Its better to use a game engine like cocos2d. But u can make games by choosing view based application also. Refer "Apress Beginning iPhone Games Development" it helps u a lot.

Jack
I don't want to use cocos2d.I trying develop shoot game for self improvement like space invader game can you have any idea or sample code or link to do that .
"Apress Beginning iPhone Games Development" this books clears your concept of sprite and coordinates. with help of this book you can make the game as you want.Treat bullets as sprites and do whatever you want.
Jack
I have the but it doesn't help out
A: 

You should make the object with help of sprite class.You can make Sprite and AtlasSprite classes with help of Apress book. and read all about these classes before use.

Sprite *obj; (in .h file)

//in .m file

obj = [AtlasSprite fromFile:@"img.png" withRows:1 withColumns:1];
//now set the properties of the obj. 
//for moving set

obj.x = 20; obj.y = 25;  //by default x,y is 0,0
obj.speed = 120; //120 is just for example
obj.angle = 0;  //for left to right movement
obj.angle = 180; //for right to left movement
timer = [NSTimer scheduledWithTimeInterval:1/10 target:self selector:@selector(func) userInfo:nil repeats:YES];

-(void)func {
     [obj tic:1/20];  //for moving obj.  1/20 is just for example
}
Jack