as soon as I'll publish my java 3d game
and some discussion about games and developing
send your comment about that what you want from mobile game
and which games you like and are you played games in mobile or no.
wait for your comments
works about 3d animation and game
In this parti’ll describe how you can run your interface on base of game objects move.
Every code for running your game main windows,should be added in EAGLVIew class.
in opengles is better that you add more windows to games for performing menus and
games and etc but in this project it isn’t necessary .In project that we build before you
know that ES1Rendere and ES2Renderer class have code for render engine in
opengles1 and opengles2 .All new Iphone device support opengles2.
Now we want control speed of colored box (see in previous project).we add two lable
and button to windows like this image
Now we define two function increasespeed and decreasespeed and a lable with name label in EAGLView class.in EAGLView.h inside interface we add UILabel *label ;
then add
- (IBAction)increasespeed:(id)sender;
- (IBAction)decreasespeed:(id)sender;
after interface definition Then linked two button + and – to them..Now we add some code in function .for example for decreasespeed function we add this code(is same for increasespeed )
- (IBAction)decreasespeed:(id)sender {
label.text=@"increase";
speed+=0.15f;
[renderer setspeed:(speed)];
[renderer render];// is necessary for seeing change
}
setspeed is function that should defined in ES1Renderer and ES2Renderer and
ESRenderer.in ES1Renderer and ES2Renderer after interface defination add
-(void)setspeed:(int)Speed; . do it for ESRenderer after @protocol defination.
Now in ES2Renderer.m and ES1Renderer.m add following code
-(void)setspeed:(int)Speed
{
speed=Speed;
}
it is all you need. now see your app!
in this tutorial i’ll describe opengles template that using in game developing and add interface to it.You can use text and image and etc without any coding in iphone games.Just for more change in text and images in during game you need coding. first we create new project in Xcode and select opengles template like this image
then select name for project .i select “test” for my project you can select another.
Xcode opened window like this image for you that you see test project and folders of it.
As you see test have 6 folder (classes,shaders,other sources,resources,frameworks and products).In resource you can see MainWindow.xib (is main topic of post).Select window .You can add some text and images and other library .see this image
In opengles codes forced some change in main window after run it.With any code you
can change interfaces also .after run your program you can see this window like it.
i add label(my game 1)to opengles sample project that you see.you can chage font and size of text and others that you want.
sorry for my delay in updating . But i come back with new articles.this article
are about 3d game programming for Iphone.wait for more