tag:blogger.com,1999:blog-77959417042046556852024-03-06T10:58:20.423+03:303d animation and gameworks about 3d animation and gameAnonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.comBlogger25125tag:blogger.com,1999:blog-7795941704204655685.post-67997491862766694532011-09-01T11:42:00.001+04:302011-09-01T11:42:56.888+04:30Xcode 4.1 and lion<p>Xcode 4.1 and lion</p> <p>In my new series of post I decided to write something about xcode 4.1 </p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGG2CBNjwW5j025Kbgw3hOYf12uhI792HFd1NtWBF0LNXHQRBkVKnvjhGkMQNk4YPeMuCulNjjqnFueRY6D5l3KIiW1ZlZA4u3igSWJ8o-6MtVZx170usnZSUD55ctbqF1ZjJoyT4YiQE/s1600-h/clip_image002%25255B3%25255D.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0RNqunwNScB_CPTtPc1gTm7FA-iLSVlN2CMFC93d7Jgix-mTWNETW_3k6J3NjtoPO9KN8GcxJrSSafLm2wwoV1l3YAb5s0A1QpNBLKwfNppWjT5eQZE4izRqxTOE8K8WOrk8yD6Cz_5M/?imgmax=800" width="244" height="139" /></a></p> <p>and lion os that i use in next post.</p> <p>Xcode 4.1 can use in snow leopard also but you should download deferent version</p> <p>For snow leopard .From Xcode 4 you see great change especially in interface of program.</p> <p>You can add library to program in 4 device orientations (portrait upside-down landscape left and right) without add any more code.</p> <p>With new interface you can use deferent editor without leave of xcode .New editor help you to have easier programming. You can switch between editors with click on view and editor in toolbar.I don’t want explain more about xcode and lion because you can find them in apple site.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV2SbNsDYmpL3Bt9rmyXXVM1S8xVRoc_cSvVRBFSaIXxR8aktLImLj59mMrjhA7CHTX1aeKfmkCmYcY4nZ2-kBO2rDf97deUg-CZZ9Pr6ZEncP9ip_2lx9wb0Nfb3vqja0js2l8dUTuz8/s1600-h/clip_image004%25255B3%25255D.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnaswm2CsmUEDWkhZZ7A-Ma5tse6ommvHwMjAY4th38Xxhkql-ur_3v-ttFjromeVhU03j4x49aWCLKBWMy0_8OwgvwwqQDHALkkxKXws2L5_IYuuyMKSfvD3s9Xr0bA66wMvo_cp0RmI/?imgmax=800" width="244" height="139" /></a>I write this post because if you have problem in xcode and lion discuss it in comment of this posts. In next post you’ll see articles about location based game.</p> <p>Bye for now and wait for your comments.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9kRhzvc9G8ZUuDBFUQUtG3C9wOzBtUz3E_u6OGEZS5kUYWOFuPoWGx15Z4SUp3hbM0pqLi8PCoi1yAPnNvjPpeK8edpkKuRBhhbkX69W0wHdzCzG3tACro0xkGhBdrbirs46mKyjf_3I/s1600-h/clip_image006%25255B3%25255D.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqB7vfSTAi41gDHnAjjCkX48QQ9Yts1pTobvkL29LkWLIFzt3rJ26h4WkiR0A-BabfelkzsqfYlt4GUo3jBD4KA9UZwKy2lqpwnPS-cQkWu6DdlB8thrPjeJbJxbSuuiXSBjWg_W1vcy4/?imgmax=800" width="244" height="139" /></a></p> Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com1tag:blogger.com,1999:blog-7795941704204655685.post-46195612950070353812011-08-05T11:22:00.000+04:302011-08-05T11:22:21.608+04:30about my blog new version and game and applicationhi dear friends<br />
<br />
sorry for my late in posting but i working in games coding and like to come to you with<br />
<br />
new codes and app and games.<br />
<br />
it is my pleasure to see your ideas and project for android and iphon and pc <br />
<br />
and help you about it<br />
<br />
wait for your comment<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLiWm1-W0g6j_-wHfi63nnkgJ54jNKr5hXWQXoxEXUNhNVWRT_-xefK8n9GgbdysSqefIxl5jvSGRA7iOSuS9ADpzrpBn6ZpuZBRvHWCdD6AdEA9XWWqL5E7jKQ9Z35NXN3fNB1XCnYSc/s1600/elvingoh-app-store-icon.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLiWm1-W0g6j_-wHfi63nnkgJ54jNKr5hXWQXoxEXUNhNVWRT_-xefK8n9GgbdysSqefIxl5jvSGRA7iOSuS9ADpzrpBn6ZpuZBRvHWCdD6AdEA9XWWqL5E7jKQ9Z35NXN3fNB1XCnYSc/s1600/elvingoh-app-store-icon.jpg" /></a></div>Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com6tag:blogger.com,1999:blog-7795941704204655685.post-43724702239479239982010-09-01T09:21:00.002+04:302010-09-01T09:26:01.838+04:30my new game will be publishedthanks for your comments ,<br />
<br />
as soon as I'll publish my java 3d game<br />
<br />
and some discussion about games and developing<br />
<br />
send your comment about that what you want from mobile game<br />
<br />
and which games you like and are you played games in mobile or no.<br />
<br />
wait for your commentsAnonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com3tag:blogger.com,1999:blog-7795941704204655685.post-17232036272702854392010-08-22T11:04:00.000+04:302010-08-22T11:04:19.351+04:30codes for touch in iphoneEvery user should control game easily. Game controlling can be doing with keypress <br />
or touch or device(in iphone and some device).Which one you like?In iphone or even <br />
java you should use events for every user command .In this article we focused on <br />
touch events and codes.<br />
<br />
a touch can be occurred in interface that i discussed in previous article. For any touch <br />
and interface you should define function and connection from interface to function.<br />
if you want use button button have many touch event like touch cancel,touch <br />
down,touch up inside and etc.With right click in button in mainwindow you’ll see <br />
events, select one of them and connected it to window select function you create for <br />
button.like this image<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://public.blu.livefilestore.com/y1p1t9a-KJXrkO4hH7NF0hHpinpXy73KMHI6c-cjvNbu-aS5FmuzO1tt8rbx_9c9BwXz6dM9QGTZfxbbX5q-cJNcQ/connectioninterface.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://public.blu.livefilestore.com/y1p1t9a-KJXrkO4hH7NF0hHpinpXy73KMHI6c-cjvNbu-aS5FmuzO1tt8rbx_9c9BwXz6dM9QGTZfxbbX5q-cJNcQ/connectioninterface.png" width="368" /></a></div><br />
For other part of windows you shoul add more code .A code like it can be use<br />
<span style="color: blue;">- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {</span><br />
<span style="color: blue;">}</span><br />
with this code you can define point for your touch .<br />
<span style="color: blue;">CGPoint lastPoint;</span><br />
and in part of program that you can use it for detect your finger.<br />
<span style="color: blue;">CGPoint gamePoint = [touch locationInView:self.view];</span><br />
you can get coordinates of point.<br />
<span style="color: blue;">x=gamePoint.x;y=gamePoint.y</span><br />
in next post we discussed detailed about game making and also i’ll add more source code.Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com7tag:blogger.com,1999:blog-7795941704204655685.post-2826487639070030082010-08-12T15:22:00.001+04:302010-08-12T15:22:09.321+04:30using interface in opengles(part2: functions)<p>In this parti’ll describe how you can run your interface on base of game objects move.</p> <p>Every code for running your game main windows,should be added in EAGLVIew class.</p> <p>in opengles is better that you add more windows to games for performing menus and </p> <p>games and etc but in this project it isn’t necessary .In project that we build before you </p> <p>know that ES1Rendere and ES2Renderer class have code for render engine in </p> <p>opengles1 and opengles2 .All new Iphone device support opengles2.</p> <p>Now we want control speed of colored box (see in previous project).we add two lable </p> <p>and button to windows like this image</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2CyG9XFtHUYgE3ztzV3QlMTn9tTg83fR5gMO0Bp0TytD5_kOvBpvOYx1G8ZvDEcPQHpRPdHeFFPj44OUa7nqqxtH2F2jo2_N9KGUeqK72QPKpOENZHcuLgZP8jN8KL5HI1yAjaxiVmbM/s1600-h/setspeedwin3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="setspeedwin" border="0" alt="setspeedwin" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV27eUl86Py8Hztpfpd_SvssmLmynTIzLVAMkerdL0RFRd8rkfAfF0qCCdpXlxKKS8Cp93vMW6t-WlzphB1qqxJVDEw88l1lBPgAcxpfNs6kziusI2j_QkYGG6OtfBSboaKqLQQO5BZQQ/?imgmax=800" width="157" height="244"></a> </p> <p>Now we define two function increasespeed and decreasespeed and a lable with name label in EAGLView class.in EAGLView.h inside interface we add <font color="#0000ff">UILabel *label ; </font></p> <p>then add </p> <p><font color="#0000ff">- (IBAction)increasespeed:(id)sender;<br>- (IBAction)decreasespeed:(id)sender;</font> <p>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 ) <p><font color="#0000ff"> - (IBAction)decreasespeed:(id)sender { </font></p> <p><font color="#0000ff">label.text=@"increase";<br> speed+=0.15f;<br> [renderer setspeed:(speed)];<br> [renderer render];// is necessary for seeing change</font></p> <p><font color="#0000ff">}</font></p> <p>setspeed is function that should defined in ES1Renderer and ES2Renderer and </p> <p>ESRenderer.in ES1Renderer and ES2Renderer after interface defination add </p> <p><font color="#0000ff">-(void)setspeed:(int)Speed;</font> . do it for ESRenderer after @protocol defination.</p> <p>Now in ES2Renderer.m and ES1Renderer.m add following code</p> <p><font color="#0000ff">-(void)setspeed:(int)Speed<br>{<br> speed=Speed;<br>}</font> <p>it is all you need. now see your app!</p> <p> </p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJVYFWcULxKedqtNpSbqTDgOU2BxeaEvbLoG2ABbKE7JcfNg-c_z74A3Ra0WXQprG9zjMtr4779wdS7vPvtex0OiyKRxhHu4d-pcHj3cx3mg1FAemc8Ccn31TzwQuc4NRkAQnuFgP1glA/s1600-h/setspeedapp3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="setspeedapp" border="0" alt="setspeedapp" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6y5jH1NCfX-nWwXKQ-F-AiZmEAUtHoSK8qkvUYJ4tVtCcUPk5xORSWVuXnmCyRuEl3W5bOAzeQApH-gLZIqQ2AKvhOwkRTSlZU3gStMV4-xmzneVFibsedbHm5Gon1BqIY-RqCh2REs4/?imgmax=800" width="160" height="291"></a></p> Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com12tag:blogger.com,1999:blog-7795941704204655685.post-55574587113201072402010-08-07T11:40:00.001+04:302010-08-07T11:40:55.456+04:30using interface in opengles (part 1)<p>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</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEAzC1IWpwEt9zNN48WFQM2KOe8oJsnVG27KchRhOwxMWG2N4Q2L5tYM6bb6Nd4mm_TVZcmjzyQPwdD4Odr3nhKKo-AL3ziDd9uvnL3SKINT4sHCjrVH6FXEFFqcXVb96xA9m4xq9WSlg/s1600-h/opengl4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="opengl" border="0" alt="opengl" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLze64Bf4zAq16keluP6EW_-dyxeoeOdYLR3wVn9Wxl8nf0Y6nZKmWrkfd-584nlOaEs7C_kUj-v2gxvcJ2Y0tRcsIQf_6gZhu7fYz1qk16l025mveRUSxRGxUAQZvOk3Fuoe2LR7JO0w/?imgmax=800" width="526" height="282"></a> </p> <p>then select name for project .i select “test” for my project you can select another. </p> <p>Xcode opened window like this image for you that you see test project and folders of it.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi22kdNoFN9n2_CG93dVSuC25CNiQzKJRH1nQVUjLwy0LOUZ3tHf5NQwTVILaqrAhbs2hAAHEt_7Smt4lYZkd6yPKxrRiqzNSr_XDfN8dLAjU7L2VtHAzX0PoAr895gCnpPe-CsXVcjZAY/?imgmax=800"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="testproject" border="0" alt="testproject" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ751433x6QOxefn_M52R_tHHHGnjD2A_K6nHv3GhDelimvKlc8giBXSqwgaF1AXJKaWyL5Vz3uDyQCaeBpHjknOHVlBlXn6XBNAb7BSXaZ7KEYllHsS-O04Md_Mw87wiQ7dGYrBuTFso/?imgmax=800" width="518" height="299"></a> </p> <p></p> <blockquote> <p>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</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE7Sy_DV8fv5pnM0_t5Lj2mjA8sRJrc1cYJ2cQ9lsoVv42INIeS8BbL_3tJtesQ_Zdgzx52FiQywTROtL1wjHJgrN3Aumn1gpEiOt24WFHc_wO6ixCBvVhq4qF3f9dvdxXuFXbFf40EfY/s1600-h/window4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="window" border="0" alt="window" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsMfNnNphUuDf9SKoF4cMkYJhVt0oNssQoMA8aRECMsrH1RHRNRnU7cStDZ1v3N6vERXBjwoPdJU1_ioYItid2SsJ69yiNShxOsiWJM_T8-JulvT2nwhCOVuHbqsQl8ZlbG5tat8E1kgs/?imgmax=800" width="214" height="276"></a> </p></blockquote> <p>In opengles codes forced some change in main window after run it.With any code you </p> <p>can change interfaces also .after run your program you can see this window like it.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAkjDzulDoBmlN-tRDa2cE2gSp8q68lIoJuGrMP-BWgd9RE94mMupVk744QanYmYgyiO1FY6e6r9qE_efHTo2FKx7Fxi0lImHTloiGq9mXYOUUrCIUukrLp3oulT_GexjeWLTrH6xshn4/s1600-h/labelopengl3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="labelopengl" border="0" alt="labelopengl" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlhFBWJZQiZvFuSRx3eahF0hMxHMDQuCIRn2DvEAG7EQf5Il2Yqn8qSvfqrgRZUOxRAhITH-1FC1rPSLH-UFHmfP0qN4OTeq42nOZt_BJAGxwMO4Pa8d5NpFumbOcfnvHDOjN1lbHe_QQ/?imgmax=800" width="178" height="317"></a> </p> <p>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.</p> Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com2tag:blogger.com,1999:blog-7795941704204655685.post-89749277850639112502010-08-03T09:57:00.003+04:302010-08-04T09:23:01.420+04:30Introduction to iphone programmingXcode is best tool for Iphone and Ipad and Mac programming.You can used so <br />
many interfaces easily in programming and connect them to source as you <br />
want also with simulator for test your apps.see <a href="http://developer.apple.com/technologies/xcode.html%20">here</a> for more info.In this picture <br />
you see xcode 3.2.3 ide with iphone sdk 4.0<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguEZEC7bA4PYmKzOQ6SELIYaodta-Kilf7Kfs8Oegq7WR_ABRX0RgA06t75l-_0q-YNHddAoi7ePLiBZeA5IuREXlUaBoePofHlISk3cwOtXiJ56EOaoicv_t_w1HGQMTZIJlkqD06Ikc/s1600-h/xcode3.2.34.png"><img alt="xcode3.2.3" border="0" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoj5rBclmsLX5PjqOem4TjWi9xd0wGjkMyZQLSPfFi2l57twUM8HqnhxvwgmVQIn12bnSuoYpLJ5d5Ov1w9Djn-1tr_L4_-0szSxTI6qaZBloAAj0-K1VffGVRN9z_SMuKRjMsuKYOsJ4/?imgmax=800" style="border-width: 0px; display: inline;" title="xcode3.2.3" width="459" /></a> <br />
<br />
Every project in Xcode at last have one windows(or view) .In windows we can <br />
add some library like button,label,slide and…For this purpose we should <br />
expand resource folder in left sidebar and open MainWindow.xib or <br />
MainView.xib .Interface builder tool opened and show a blank window.It is <br />
same windows that you see in iphone app. next drag your library from right <br />
side to your windows . If you can’t see library should select tool menu and <br />
then library.<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr7LoB_mLSp4t0ihKbWDc2I1-WKmaKuffJKV676WiPPdgUlJFMdCc7hL-3e6mJ2zrTVn9Jl7yJRf1L0t8sXLLrZ-81W1XuWsArAt2Qbhuio3Nx_sWebcGZCgFD9nSoS3kxoXQashUvALA/s1600-h/interfacebuilder5.png"><img alt="interfacebuilder" border="0" height="222" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLiLVg8V4AG1FMV7tALHoB0XdptJIfwEEu1KoOL4mQhdZFrCZVwRSvo7hCO8NNm4esCQ9_TzZP_8iM1ietZ2TUl5lvMtdzJQ4bgvuCLfJXTg93dHwr5Ny7zU21ZbOw1jRfTOZ99J4MYVs/?imgmax=800" style="border-width: 0px; display: inline;" title="interfacebuilder" width="444" /></a> <br />
Now build and run your apps .In next post I'll describe opengles tempelete that <br />
is best choose for create 3d games for Iphone .and show how using interface <br />
builders and codes in Xcode. <br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE23gVUamutd7IFsBiGJUvAXy1rhMDhvLJ4s4JPUVFuT97LA7f-gxBz1mJdhC95M_AaDJarThgCA-FQz4DzVTldHnYMFjBO45d2YulcBSW_CLkH6XWe5VtQL2BMynnF8zv86kKIxQdpDk/s1600-h/yourapp12.png"><img alt="yourapp1" border="0" height="244" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkBPXgIkzV3AJPc7bilYvxOqk7bDJDZjvP-peHlSaUwH4cJe9iOW-UudzyG7EKq9JQihyphenhyphenTVsSMjT6TLqcm3rtN0SY_yczsEyFyShSTE4_R30AEK_TywvO1n6-zu0K73DBYo6WYn4es5HA/?imgmax=800" style="border-width: 0px; display: inline;" title="yourapp1" width="123" /></a>Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-79718382250601677492010-08-02T10:10:00.001+04:302010-08-02T10:10:27.447+04:30come back with new article<p>sorry for my delay in updating . But i come back with new articles.this article </p> <p>are about 3d game programming for Iphone.wait for more</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjW0s7T-glyXL7B-_yuBf8wJ8hQwJjuAN8BqIvkSDx5AkjnZSGqQhyuOlp0vAPTqZGiFdAun3KVsM9GJOy3DdhjrijQNrWA4eteTAQ4WU9vbEJvcimLAhXFgdOl0vFgPOJXtPZJnl2JQMM/s1600-h/iphone%5B11%5D.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="iphone" border="0" alt="iphone" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhsFWtra-7IpFNJS0iioacfMo0wQs3mfNvfWg29EvtQUEa6HH1TM3DEdLm-mpE1kZgKOEW1DtPq7UT1juVj1IGRIL_c0M7teVswBc2ASYMiLnZnmjqEsvh_FLwroV_WWhxN65r9JbNL7M/?imgmax=800" width="209" height="244"></a> </p> <p><a href="http://www.kottke.org/plus/misc/images/iphone-parallels.jpg">image link</a></p> Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-17255634173123407132009-05-11T16:19:00.003+04:302009-05-11T16:45:03.200+04:30blender and python and game<a href="http://www.blender.org">blender</a>is a free 3d open source code.in blender you can run a python code and access to object and rotate and scaled and transform<br />them .you can first make figure in poser and then import it on blender or 3ds max.for import any poser figure it is better to select unimesh demo in python script box and make a sample demo from figure and then import it to 3ds max or blender.then you can create a code like this<br /><pre><br /># Windows version <br />import Blender<br />import sys<br /><br />obj=Blender.Object.Get()<br />print str(obj)<br />sys.stdout.flush()<br /></pre><br />and run it on blender.you can custumize code with loop and others and make a game with itAnonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-79461137907806036292009-04-29T10:53:00.005+04:302009-04-29T23:18:04.255+04:30python and animationpython is great scripting language for animation specially use in blender and poser.<br />with a python script you can control tools of this software and moving of object in this.when you want to make game with java you can run a script sample in blender or poser for test of your game in real 3d scene and then make a java code for it.you can download python ide from <a href="http://www.python.org">here </a><br />this is a picture of python shell ide<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTm68blJuqyMtorNrNzx8GANpvFFziNI0qlBOuN0_7w7WpC3X_MuD6rfoBYP-bZoPLElryJsT5HzNSgFkd-TSFS-cTf6ORixQCq7pGpR4e6g2AMiaAXp3D1aGdyoQNvAA8O9WHhsf8psk/s1600-h/pythonshell.png"><img style="cursor: pointer; width: 386px; height: 400px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTm68blJuqyMtorNrNzx8GANpvFFziNI0qlBOuN0_7w7WpC3X_MuD6rfoBYP-bZoPLElryJsT5HzNSgFkd-TSFS-cTf6ORixQCq7pGpR4e6g2AMiaAXp3D1aGdyoQNvAA8O9WHhsf8psk/s400/pythonshell.png" alt="" id="BLOGGER_PHOTO_ID_5329997514748166482" border="0" /></a><br />and this is a part of code for rendering frame of 1 until 10 and save their images<br /><span style="color: rgb(255, 0, 0);">PoserFile.append("E:\\dawood\\movie\\movie1.pz3")</span><br /><span style="color: rgb(255, 0, 0);">TargetDirectory.append("E:\\dawood\\movie\\run\\")</span><br /><span style="color: rgb(255, 0, 0);">FramePrefix.append("Run")</span><br /><span style="color: rgb(255, 0, 0);">StartFrame.append(0)</span><br /><span style="color: rgb(255, 0, 0);">EndFrame.append(10) </span><br />this codes help you also making animation easier and faster and control animation scenes.Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-87038124615085781952009-04-26T21:04:00.001+04:302009-04-26T21:56:28.191+04:303 steps for making animationposer and 3ds max are two good software for making animation and game .Poser is a 3d figuring<br />software and 3ds max is known 3d design software .in 3ds max you can design your 3d object like<br />and export it as 3ds file and import it in poser .In poser after import of 3ds max file you can create<br />figure and move it between frame of 1 and your desired frame.for better learning see here. for using in mobile game you should have a low poly figure and export again object to 3ds file and in 3ds max export all of movie in m3g file or obj file.<br /><span style="color: rgb(255, 0, 0);">it is explained in 3 steps here</span><br />1-make object in 3ds max<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWl5kMpQQy_jMs38Xa1zeVhs03HAFAWWHPApWUTxWM_89CE6wiVYnvCmWmTIxRA-TG1riAU9GNWZaYwzTCsOPYtL0lO9qo45cXN-b2G05vmDQ4zDO7KmdWP4sTR7tX2ZLeqFi3u6j25tU/s1600-h/blog3dmax.png"><img style="cursor: pointer; width: 400px; height: 301px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWl5kMpQQy_jMs38Xa1zeVhs03HAFAWWHPApWUTxWM_89CE6wiVYnvCmWmTIxRA-TG1riAU9GNWZaYwzTCsOPYtL0lO9qo45cXN-b2G05vmDQ4zDO7KmdWP4sTR7tX2ZLeqFi3u6j25tU/s400/blog3dmax.png" alt="" id="BLOGGER_PHOTO_ID_5328888203510050210" border="0" /></a><br />2-import it on poser<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiJbTc9qmiEnMUG4CobaUFPIPBeg_e7Ls5zWeoPEaZvO4MUkQTt8SSYhQ4jYqq4UVeucSFMU9oRTwnlMml_hPJBCQbPM0Hn_A2WzaZT_cILxIk-Vs4DNU5oaLIM11rCie4qcXl8_3QFTU/s1600-h/blogposerimage.png"><img style="cursor: pointer; width: 400px; height: 289px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiJbTc9qmiEnMUG4CobaUFPIPBeg_e7Ls5zWeoPEaZvO4MUkQTt8SSYhQ4jYqq4UVeucSFMU9oRTwnlMml_hPJBCQbPM0Hn_A2WzaZT_cILxIk-Vs4DNU5oaLIM11rCie4qcXl8_3QFTU/s400/blogposerimage.png" alt="" id="BLOGGER_PHOTO_ID_5328889620954730002" border="0" /></a><br />3-render for making animation in poser<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpG9yM-kofr0mYLWJ9yWqickz5FuOJPV7y4qLc2B6UPf8D5BD_x9Xw9R3pQ_Wzuo3OdlMhLiS4BHRG2Vk8BHmSgK4FfEQ66YACLAmAIskyxd3IY_bTp8PmzCOyFmuczb0Ju35E3MqoCv8/s1600-h/blogsamplerender.png"><img style="cursor: pointer; width: 400px; height: 288px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpG9yM-kofr0mYLWJ9yWqickz5FuOJPV7y4qLc2B6UPf8D5BD_x9Xw9R3pQ_Wzuo3OdlMhLiS4BHRG2Vk8BHmSgK4FfEQ66YACLAmAIskyxd3IY_bTp8PmzCOyFmuczb0Ju35E3MqoCv8/s400/blogsamplerender.png" alt="" id="BLOGGER_PHOTO_ID_5328890550809853570" border="0" /></a>Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com2tag:blogger.com,1999:blog-7795941704204655685.post-20458288331423708592009-04-23T11:50:00.003+04:302009-04-23T11:55:49.837+04:303d animation and gamefrom today i want change my blog topic from java game programming to 3d animation and game.<br />because a best way to make games is that make good animation and run it with code in java or other programming language .from today i start my work in this subject .<br />be wait...Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-40182896475355521142009-02-25T15:28:00.004+03:302009-04-30T17:53:20.925+04:30ultimate fight 3d java gamein this version you can fight as iran,us,german,france,spain,......in place iran us, france,china ....<br />watch it here<br /><object height="344" width="425"><param name="movie" value="http://www.youtube.com/v/53cCD3VQkM8&hl=en&fs=1"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/53cCD3VQkM8&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="344" width="425"></embed></object><br /><br />and download it from<br />http://www.esnips.com/web/ultimatefight<br /><br /><table style="border: 1px solid rgb(53, 53, 53); padding: 0px; background-color: rgb(239, 239, 239); color: rgb(51, 51, 51); font-family: Arial,Helvetica,sans-serif; font-size: 11px;" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="padding: 5px;" align="center"><a href="http://www.esnips.com/doc/b440e794-77c3-496b-bfa8-a04e555b7b93/gamepicture1/?widget=medium"><img alt="gamepicture1" title="gamepicture1 on eSnips.com" src="http://www.esnips.com/widget/?objectType=docthumb&objectUUID=b440e794-77c3-496b-bfa8-a04e555b7b93&resourceName=thumbnail" border="0" /></a></td></tr><tr><td style="padding: 5px; font-size: 9px;" valign="bottom">Hosted by <a href="http://www.esnips.com/">eSnips</a></td></tr><tr><td style="padding: 5px; font-size: 9px;" valign="bottom"><br /></td></tr></tbody></table>Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-91065922507253134592009-02-24T18:42:00.003+03:302009-02-24T18:57:52.061+03:30animation and sound in 3d gamesfor this purpose you should use synchronized function for synchronized animation and sound with<br /><br />your events occurred when key pressing.for Synchronize any functions you should use synchronized word before you functions this function is used for play mp3 sound<br /> <span style="color: rgb(51, 102, 255);">public synchronized void playmusic(String file)</span><br /><span style="color: rgb(51, 102, 255);"> {</span><br /><span style="color: rgb(51, 102, 255);">if(sound==0)</span><br /><span style="color: rgb(51, 102, 255);"> try</span><br /><span style="color: rgb(51, 102, 255);">{</span><br /><span style="color: rgb(51, 102, 255);">Player p = Manager.createPlayer(file);</span><br /><span style="color: rgb(51, 102, 255);">p.setLoopCount(5);</span><br /><span style="color: rgb(51, 102, 255);">p.start();</span><br /><span style="color: rgb(51, 102, 255);">}</span><br /><span style="color: rgb(51, 102, 255);">catch(IOException e)</span><br /><span style="color: rgb(51, 102, 255);">{</span><br /><span style="color: rgb(51, 102, 255);">System.out.println("Error in io : " + e.toString());</span><br /><span style="color: rgb(51, 102, 255);">}</span><br /><span style="color: rgb(51, 102, 255);">catch(MediaException e)</span><br /><span style="color: rgb(51, 102, 255);">{</span><br /><span style="color: rgb(51, 102, 255);">System.out.println("Error in media : " + e.toString());</span><br /><span style="color: rgb(51, 102, 255);">}</span><br /><span style="color: rgb(51, 102, 255);"> }</span><br />you should add this function in function that you want played syncronized .<br />public void keypress()<br />{<br />playmusic(file);<br />}<br />for animation you can make any arbitary function like this<br /><span style="color: rgb(51, 102, 255);">syncronized void animation()</span><br /><span style="color: rgb(51, 102, 255);">{</span><br /><span style="color: rgb(51, 102, 255);">x++;</span><br /><span style="color: rgb(51, 102, 255);">group.setTranslation(x,y,z);</span><br /><span style="color: rgb(51, 102, 255);">}</span><br />this function force to moving a group in x axis without stop!<br /> this was a sample way for animation and sound in java 3d game.Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-26270944551654979862009-02-17T15:19:00.008+03:302009-04-30T17:52:28.747+04:30download ultimate fight 3d 0.1 (my new game)<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrdTomtYQZNSZdYSGL-iV2bq7KSTtWMdoirbhws0UxWfe8HOtYddIGeHjyB_sx_iZKxzzNE49nU2ZnnAVWbhoKB2gcTkGKmDR7WryqQyUvAMYhBIT5CwBUZOsxyRv7eS35OxPLEZaki54/s1600-h/gamephoto.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 244px; height: 314px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrdTomtYQZNSZdYSGL-iV2bq7KSTtWMdoirbhws0UxWfe8HOtYddIGeHjyB_sx_iZKxzzNE49nU2ZnnAVWbhoKB2gcTkGKmDR7WryqQyUvAMYhBIT5CwBUZOsxyRv7eS35OxPLEZaki54/s400/gamephoto.jpg" alt="" id="BLOGGER_PHOTO_ID_5304038729485346178" border="0" /></a><br />sorry for my late. i worked in my new game.this is ultimate fight 0.1.this game is in testing and contain a one level and two player now but this will be enhanced as soon as.in this video you can see game in snaps.<br /><br /><a href="http://www.youtube.com/watch?v=seT_571pTDg">watch it</a><br /><br />and download it from here<br /><a href="http://fb.esnips.com/web/ultimatefight">download it</a>Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-7726477377984661142008-10-18T16:26:00.004+03:302008-10-18T16:57:42.129+03:30sample tips in making mobile game:graphics 1tips1:<br />When you making a mobile games you should know that you can't make full city or even building<br /><br />and textured them.Because it forced to have bigger 3d models and some mobile device's(or all of<br /><br />them!).In this case you can textured your desired city or building or...in sample plane or cube<br /><br />and move camera toward them. in game it seems that you moved in real city or building but you<br /><br />moved to image .Then you can add your game sample building and humans and creatures to other<br /><br />side of pictures.like below<br /><br /> <a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOpY7EIv_uCZPwpU1Vzpvbssl8uUp1fl_zR8Ab_g7uTyXY-yPhDh7IVanhM1a46LoEfjVDzA4mm3iqX67if7Cn1dcVIoR6q2ZfShguLai4ANs-_i5o7AY1RnEnDlVRbCWS1Dq6siQs5X4/s1600-h/realmodel.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOpY7EIv_uCZPwpU1Vzpvbssl8uUp1fl_zR8Ab_g7uTyXY-yPhDh7IVanhM1a46LoEfjVDzA4mm3iqX67if7Cn1dcVIoR6q2ZfShguLai4ANs-_i5o7AY1RnEnDlVRbCWS1Dq6siQs5X4/s200/realmodel.png" alt="" id="BLOGGER_PHOTO_ID_5258480014018824898" border="0" /></a><br /><a href="http://www.youtube.com/watch?v=jSRy7kms2vo">this is my video</a>Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-87718157395470496712008-09-15T18:41:00.014+04:302008-09-20T16:59:10.354+04:30step2:rotation object in gameyou can rotate your object in 2 way.Which way you select is in base of your games and<br /><div><div><div><div><br />algorithms and graphics of your programs.In first way you can set origin in game by<br /><br />setOrigin function or like it.prerotate and postrotate function invoke this origin on<br /><br />base of your origin and object default origin and make new origin.( <a href="http://mobilezoo.biz/jsr/184/javax/microedition/m3g/Transformable.html">see here for technical </a><br /><br /><a href="http://mobilezoo.biz/jsr/184/javax/microedition/m3g/Transformable.html">information</a>) This way is used when you want change your rotation origin on base of your game<br /><br />algorithm and you havn't any fixed origin for your objects .But you can set your orotation origin in3d model maker software's and export it m3g.it is better using <a href="http://www.mascotcapsule.com/toolkit/m3g/en/index.php">mascot capsule</a> because some<br /><br />exporter maybe can't export your origin and will be using default origin. For this porpose in 3ds </div><br /><div> </div><br /><br /><div>max 2008 for rotate leg on base of its upside <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz5kVH7BzzjyBoqi9Z7Dg-7dlPN4dE6-3a3hR-0gHxogLogEYxpu2TRusfLhG3Fynbn-bFqyWmdd4hgaoTyZYfTJw0-cY_k_sTNGVxGexBdlcNnZkINFQzOiLH1gNdt6YE0Kv25kLQLxI/s1600-h/womenlegrotate.png"><img style="margin: 0px 0px 10px 10px; float: right;" id="BLOGGER_PHOTO_ID_5246899694022972786" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz5kVH7BzzjyBoqi9Z7Dg-7dlPN4dE6-3a3hR-0gHxogLogEYxpu2TRusfLhG3Fynbn-bFqyWmdd4hgaoTyZYfTJw0-cY_k_sTNGVxGexBdlcNnZkINFQzOiLH1gNdt6YE0Kv25kLQLxI/s200/womenlegrotate.png" border="0" /></a></div><br /><br /><div>first in command panel we select hierarchy(third box from left)<img style="margin: 0px 0px 10px 10px; float: right;" id="BLOGGER_PHOTO_ID_5246900592827143746" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjqN-wP77nvpXvGPabL4Qoe8pT6UMNyCCDkuGCZDQndhuTY5XeWyGfoMqyrIi_sQEDDOClx07u-R2seO84NoMc4T2eyipBzIZlZQ9OeADciEq-HJGozHBmSGRmxYxSyE3wu8T5jsFvGWI/s200/hierrachy.png" border="0" /></div><br /><br /><div>then select pivot button and click on affect pivot only and then you can see small pivots.it is your </div></div><div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEXHP_abti9sUjuCuJDbHpWoibPb62IDG92WsBRTrLLfB5uDFOj5Mrv7P34S4LtfUE_F3vNLD91ApVRhwLHFSgXQwcsK9mpZnzhgF1RxcMHmCW2aKSPwIStbf5ASc2QBdrgsLbJYmcnOM/s1600-h/pivotbutton.png"><img style="cursor: pointer; width: 63px; height: 200px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEXHP_abti9sUjuCuJDbHpWoibPb62IDG92WsBRTrLLfB5uDFOj5Mrv7P34S4LtfUE_F3vNLD91ApVRhwLHFSgXQwcsK9mpZnzhgF1RxcMHmCW2aKSPwIStbf5ASc2QBdrgsLbJYmcnOM/s200/pivotbutton.png" alt="" id="BLOGGER_PHOTO_ID_5246953992034062802" border="0" /></a> <br /><div></div><br /><br /><div>rotate or move or scaling origin you can move it to your desired picture and then click on align to </div><div></div><div>object only button in below now you can rotate your objects in new origin in model and game.</div>you should export this model to m3g with tool that i said before or another good tool and use it in game<br /><div><br /><br /></div><br /><br /><div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiouz_RXs4j9mJS6rP7XstLiukmPcPzPcdwGDm4adqa-QCT2QojHqXky9FrUKqfKX_rwCwpC9DfnzMjTcXkUBv49U4Im-CnLJC-VqQV1L7Delc-h1ljyfHuTVh6Qn2xRx6IsKPdskSFzJc/s1600-h/movingpivot.png"></a></div></div></div></div>Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-91654356355966593922008-09-05T11:36:00.008+04:302008-09-27T09:22:38.344+03:30steps in making real 3d game1.moving<br />moving of objects in 3d game is an important step in games and you should have good control in moving light and cameras .Camera position is on base of your game strategy and your game algorithm.for example in this test game(i'm still beginner) I set camera position with this code.<br /><span style="COLOR: rgb(51,102,255)">cam.postRotate(45, 0, 1,1); </span><span style="COLOR: rgb(51,102,255)">cam.setTranslation(xpos+40, ypos-50, zpos+60);</span><br />and you'll see camera in front of girl and above of her head when she moving near house.<br />in this video you will see how camera move(xpos,ypos,zpos is girl position in 3d place)<br /><br /><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/i656djg5arE"><br /> <embed src="http://www.youtube.com/v/i656djg5arE" type="application/x-shockwave-flash" width="425" height="350"></embed> </object><br />another method for moving is using transformation and transform matrix . a transform matrix is a 4 X 4 matrix and in java code you write it as float array with this code<br />float[] matrix={1,0,0,sx<br />,0,1,0,sy<br />,0,0,1,sz};<br /><br /><br /><br /><span style="COLOR: rgb(51,102,255)">Transform m=new Transform();</span><br /><span style="COLOR: rgb(51,102,255)">m.set(matrix);</span><br />now for moving camera and human in x axis(1 unit) set sx=1 .If you have mesh with name human and camera you need only to this code for moving them.<br /><span style="COLOR: rgb(51,102,255)">camera.setTransform(m);</span><br /><span style="COLOR: rgb(51,102,255)">human.setTransform(m);</span><br />With setting sy and sz you can moving in y and z axis<br /><br />.Matrix transform is very good for rotation and scale also. In next post i show how you can moving human with rotate hand and leg and body.This game also need a sample algorithm for moving girl .<br /><br />You can download game for playing from this link<br /><a href="http://davood.abbaspour.googlepages.com/testmove.jar">download</a><br />(sorry for some problem in exit and speed it was my first game)Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-82241606308508241992008-08-04T17:03:00.007+04:302008-08-05T11:32:19.797+04:30Advanced programming II: images and text<p class="MsoNormal">Advanced programming II: images and text</p> <p class="MsoNormal">Now we want focusing on making better game. For better game we need some text for showing score and some images for maps and other thing and at last a better graphics for<span style=""> </span>getting your game more reality .</p> <p class="MsoNormal">In design of<span style=""> </span>3d models<span style=""> </span>you need getting <span style=""> </span>texture<span style=""> </span>from building and objects that you want to use in game. Some texture maybe force to distortion your model<span style=""> </span>and even maybe you can’t see anything. And of course more high graphics texture and models may not be seen well in some old phone. For example when you download this game for p990 <span style=""> </span>sonny erricson<span style=""> </span>you see a picture like it</p><p class="MsoNormal"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPLzf4AIoGIrXyt2FaEpqPd2VQRHSqOuBl5hXl9JpzliKvAlNpFVsqwOQSdR7WL-Bg3R0HSqirFf78vrFDwC2R8Od77kF2nycrG4fZxsHZB8aqcGYzZLixUvRNx5DNOLxODl7b2YbTrYo/s1600-h/gameinp990.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPLzf4AIoGIrXyt2FaEpqPd2VQRHSqOuBl5hXl9JpzliKvAlNpFVsqwOQSdR7WL-Bg3R0HSqirFf78vrFDwC2R8Od77kF2nycrG4fZxsHZB8aqcGYzZLixUvRNx5DNOLxODl7b2YbTrYo/s200/gameinp990.png" alt="" id="BLOGGER_PHOTO_ID_5230924381595558914" border="0" /></a></p><br /><p class="MsoNormal">But when you want to download it for k750 from same company (sonny ericsson) you will see<span style=""> </span>some graphics<span style=""> </span>problem <span style=""> </span>and maybe even you can’t see some models in older phones.</p> <p class="MsoNormal"><span style="color: rgb(112, 48, 160);">Add text and images and some functions<o:p></o:p></span></p> <p class="MsoNormal">You can add text and images to your games <span style=""> </span>with Graphics class and bind Graphics3D to it .You should add text and<span style=""> </span>images to graphics after bind it to Graphics3D . it is an example code</p> <p class="MsoNormal"><span style="color:red;"><span style=""> </span>g3d.bindTarget(graphics,true,Graphics3D.ANTIALIAS|<o:p></o:p></span></p> <p class="MsoNormal"><span style="color:red;"><span style=""> </span>Graphics3D.TRUE_COLOR);<o:p></o:p></span></p> <p class="MsoNormal"><span style="color:red;"><span style=""> </span><o:p></o:p></span></p> <p class="MsoNormal"><span style="color:red;"><span style=""> </span>g3d.render(_world);<o:p></o:p></span></p> <p class="MsoNormal"><span style="color:red;"><span style=""> </span>g3d.releaseTarget();<o:p></o:p></span></p> <p class="MsoNormal"><span style="color:red;"><span style=""> </span><span style=""> </span>graphics.setColor(0x990000);<o:p></o:p></span></p> <p class="MsoNormal"><span style="color:red;"><span style=""> </span>graphics.setFont(Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_LARGE));<o:p></o:p></span></p> <p class="MsoNormal"><span style="color:red;"><span style=""> </span>graphics.drawString("corner", 90, 150,<o:p></o:p></span></p> <p class="MsoNormal"><span style="color:red;">Graphics.TOP | Graphics.RIGHT);<o:p></o:p></span></p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2dNNxGg6PZx4FF-d6Zs0G1XMlggQ_UFMiuMPdNlgqWxzugHOyyp-2MgdbthkSpUhVY0FlyksWDjwwlvPLEoOml1hx_usxDBCt-oX3N3l4Ufwti9M7KDxGzd-o-azjeQb_nA-dp0G3ISA/s1600-h/gamewithtext.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2dNNxGg6PZx4FF-d6Zs0G1XMlggQ_UFMiuMPdNlgqWxzugHOyyp-2MgdbthkSpUhVY0FlyksWDjwwlvPLEoOml1hx_usxDBCt-oX3N3l4Ufwti9M7KDxGzd-o-azjeQb_nA-dp0G3ISA/s200/gamewithtext.png" alt="" id="BLOGGER_PHOTO_ID_5230924787171282306" border="0" /></a><br /><p class="MsoNormal"><span style=""> </span>In first code we bind target graphics(from Graphics class) to g3d(from Graphics3D)<span style=""> </span>and in second line we render my world class .<span style="color: red;"> </span>After release your g3d object you can change your graphics object and add image or add text .For<span style=""> </span>add text <span style=""> </span>I use<span style=""> </span>three line for set color and font and text.</p> <p class="MsoNormal">Add images is like that and only you need add function drawimage and image object to your code.This image can be<span style=""> </span>maps or character picture or other thing.You can add some function also to your program for controlling move of cameras or objects in your game.I add a sample code for this porpose.</p> <p class="MsoNormal"><o:p> </o:p></p> <p class="MsoNormal"><span style="color: red;">if(y>-20)<o:p></o:p></span></p> <p class="MsoNormal"><span style="color: red;"><span style=""> </span>Y=-20;<o:p></o:p></span></p> <p class="MsoNormal">With this code camera will be stopped if<span style=""> </span>it reached to left<span style=""> </span>wall.In 3ds max wall y position was 20 and </p> <p class="MsoNormal">Camera<span style=""> </span>will be moved to Y <span style=""> </span>with this code</p> <p class="MsoNormal"><span style="color: red;"><span style=""> </span>camera.setTranslation(X, Y, Z);<o:p></o:p></span></p> <p class="MsoNormal"><span style=""> </span>You can see more in this project</p><br /><a href="http://www.filefactory.com/file/5d3a7b/n/game1_zip">download project</a>Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-82301312548263045192008-07-24T12:38:00.007+04:302008-07-24T14:27:30.511+04:30Using pointer: download A sample pointer enabled killer game<span xmlns=""><p>I add a sample project for more discuss in light and cameras. it is only a camera moving in between walls(textures are from internet).I'll add gun and other effects to it in next time.You can also edit 3d model in way you want. This is my model in 3 direction:top,camera,left and perspective</p><p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRdVQiWcVD6kz724Hw7m4R9OK0ZFQo_C2z9zubxz_a54wVdFgd0nUWDKVs79CE-tFOiyiuLAT-cHBA0VII_WMPFQhr_bKjjlMJ_cEcezct3ZWRy_c2OfhAkTFIhGSByZt7UFZyJRjT_Cc/s1600-h/picture2in3dsmax.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRdVQiWcVD6kz724Hw7m4R9OK0ZFQo_C2z9zubxz_a54wVdFgd0nUWDKVs79CE-tFOiyiuLAT-cHBA0VII_WMPFQhr_bKjjlMJ_cEcezct3ZWRy_c2OfhAkTFIhGSByZt7UFZyJRjT_Cc/s200/picture2in3dsmax.png" alt="" id="BLOGGER_PHOTO_ID_5226489945151913682" border="0" /></a></p><p><br /></p><p>This model have a camera and 3 light and you should draw your model on base of your camera(upper right picture) and if you want use another cameras also you should configure your model on base of them. In this model camera id is 14 and for loading camera in program this code is enough<br /></p><p><span style="color: rgb(84, 141, 212);">Camera camera;<br /></span></p><p><span style="color: rgb(84, 141, 212);">Camera=(Camera)(Myworld.find(14));<br /></span></p><p>Camera position in this model is your person eye.You can move camera in every place with this code<br /></p><p><span style="color: rgb(84, 141, 212);">m.setTranslation(x,y,z);<br /></span></p><p>For example you can move it with pointer with this code<br /></p><p><span style="color: rgb(84, 141, 212);"> protected void pointerPressed(int x, int y) {<br /></span></p><p><span style="color: rgb(84, 141, 212);"> m.setTranslation(x,y,z);<br /></span></p><p><br /></p><p><span style="color: rgb(84, 141, 212);"> }<br /></span></p><p>Pointerpress is a function that invoked when a pointer pressed and x,y is pointer location in screen .You can say that when pointer pressed (x,y) location in screen camera can move.you can add image and text to game for this purpose also. In next post i add text and image to this project for getting better result from this project.<br /></p><p><a href="http://davood.abbaspour.googlepages.com/pointer.rar">Download project</a><br /></p><p></p></span>Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-59178697354706018492008-07-16T14:40:00.004+04:302008-07-16T14:52:18.024+04:30Advanced programming I: lights and cameras1.your 3d model<br /><span xmlns=""><p>In every game you should select your lights and cameras carefully and move them on base of your objects moves specially in 3d games.<br /></p><p><span xmlns=""><p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXqkCGdCog0Tpv4Q5qWXfCO-aBA-vLuju4IDgMpvxVMovLOaxZ1KEuTngyVWADb3kyXIGx5e01lCHMy-gtaO1j52eGCMc4wHtnth4V_0PYG8NkBTemi1ji4cGK6LgWPzp9ejER6hUFw6M/s1600-h/gamedesign3dsmax.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXqkCGdCog0Tpv4Q5qWXfCO-aBA-vLuju4IDgMpvxVMovLOaxZ1KEuTngyVWADb3kyXIGx5e01lCHMy-gtaO1j52eGCMc4wHtnth4V_0PYG8NkBTemi1ji4cGK6LgWPzp9ejER6hUFw6M/s320/gamedesign3dsmax.png" alt="" id="BLOGGER_PHOTO_ID_5223552825344823858" border="0" /></a> </p></span> </p><p>In this 3d model you see three light( free spot) and one camera and panel and ball(sphere).this is a sample game for moving a ball in panel.For using it you should export in m3g After do that maybe you see a view such this in a m3g player</p><p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu9xT2cegYOI6s5eCCNgeUJd-F-0VNLoH8frtrZPZq4NorspZlJnmg8ncAAm7Cpg7NYbqW-fEjnnyTYcl2BndpfhAZm8pcrIbVva2eFPSNN9xZDnzbjK2o7QYSDY-c5bT5ZQAVDKWgrHc/s1600-h/m3gpictures.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu9xT2cegYOI6s5eCCNgeUJd-F-0VNLoH8frtrZPZq4NorspZlJnmg8ncAAm7Cpg7NYbqW-fEjnnyTYcl2BndpfhAZm8pcrIbVva2eFPSNN9xZDnzbjK2o7QYSDY-c5bT5ZQAVDKWgrHc/s320/m3gpictures.png" alt="" id="BLOGGER_PHOTO_ID_5223553802488236002" border="0" /></a></p><p> </p><p style="text-align: justify;">As you see you may lost some graphics on base of your m3g exporter and your 3d software now you are ready for moving your lights and cameras.<br /></p><p style="text-align: justify;">2.moving your lights and cameras<br /></p><p style="text-align: justify;">Java have two class for moving light and cameras in m3g files with name Light and Camera.<br /></p><p style="text-align: justify;">For moving light and cameras you can use this codes<br /></p><p style="text-align: justify;"><span style="color: rgb(84, 141, 212);">Light l=(Light)(Myworld.find(lighted);//getting your desired light<br /></span></p><p style="text-align: justify;"><span style="color: rgb(84, 141, 212);">l. setTranslation(x,yz);//move it to x,y,z location<br /></span></p><p style="text-align: justify;"><span style="color: rgb(84, 141, 212);">Camera m;m=(Camera)(Myworld.find(cameraid);//get your desired camera from your world<br /></span></p><p style="text-align: justify;"><span style="color: rgb(84, 141, 212);">m.setTranslation(x,y,z);// move it to x,y ,z location<br /></span></p><p style="text-align: justify;">now you can run your game in netbeans emulator (see picture)but you should now that your game maybe presented in mobiles differently on base of their graphics.<br /></p><p style="text-align: justify;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE19zy_XCBDVImm1mucFXO3Lq8hd1qFgmCry9jyxuLb8NjoyoVqwEcQzpbFIRcemgxTyIG7bbw51oB1bgAVko2fDR3bi929JxSiZ_ta5c9VnU01C_Ce3GxzxevdQvzwvwpyYlQeGCrdu4/s1600-h/picture+in+emulator.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgE19zy_XCBDVImm1mucFXO3Lq8hd1qFgmCry9jyxuLb8NjoyoVqwEcQzpbFIRcemgxTyIG7bbw51oB1bgAVko2fDR3bi929JxSiZ_ta5c9VnU01C_Ce3GxzxevdQvzwvwpyYlQeGCrdu4/s320/picture+in+emulator.png" alt="" id="BLOGGER_PHOTO_ID_5223554141692238530" border="0" /></a> </p><p>You can send your comments about this post .I'll be glad for them.</p></span>Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-56184888057072789092008-07-09T12:07:00.003+04:302008-07-13T11:12:20.352+04:30Download and develop your 3d java game mobile<span xmlns=""><p>For starting in programming with netbeans first I upload a sample java mobile game project that you can download it and run it or change it and even make a new game.<br /></p><p>3d model making<br /></p><p>1-for starting programming first you should have 3d model maker .this software should can export models to m3g.I using 3ds max 2008 but you can also use any 3d software like <a href="http://www.blender.org/download/get-blender/">blender</a> and a <a href="http://www.nelson-games.de/bl2m3g/source/m3g_export.py">m3g exporter</a> with it.Blender and m3g exporter are free.Maya is another good software for it but is not free.Every box and sphere you create in this software ,have an id in m3g that give you access to them and You can rotate and move this object .Graphics of this model maybe have some problem in<br /></p><p>Some phones on base of their graphics.<br /></p><p>Netbeans project information<br /></p><p>2. After make your 3d model and export it now you are ready for programming .you should export your 3d model to subfolder "src\res" from your project folder .<br /></p><p>My game engine is panel1 class and game canvas is "Canvas" and middle is hellomiddlet. 3ds model is in res folder (game1.max)with m3g file and you can change this model in way you want.your project name in netbeans is your project folder(unzip file after download) and you jar file is in dist folder.You can run it from mobile .In next post I'll explain my project functions and cods and models.<br /></p><p> About functions and code<br /></p><p>Panel1 class have two functions setmeshpositions and movemesh.setmeshpositions (15,35,35,35) means that your object with id 15 is positioned in 3 dimension space in xyz coordinate(x=35,y=35,z=35) and movemesh(15,"up",5) moving your object with id 15 to up direction in 5 unit.For example in this code<br /></p><p><span style="color: rgb(84, 141, 212);"> int state = getKeyStates();<br /></span></p><p> <br /></p><p><span style="color: rgb(84, 141, 212);"> if( ( state & DOWN_PRESSED ) != 0 ){<br /></span></p><p> <br /></p><p><span style="color: rgb(84, 141, 212);"> panel.movemesh(15, "up", 5);<br /></span></p><p>state value is 1 when your using a key(in otherwise is 0) or no and DOWN_PRESS value say that you pressed down or<br /></p><p>no and if two of them are true mesh move up 5 unit in up direction.you can change this code with replace up with down or like that.in next post I'll write some more about this codes and functions.<br /></p><p><a href="http://davood.abbaspour.googlepages.com/MobileApplication1.zip">Download project now </a><br /> </p></span>Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com2tag:blogger.com,1999:blog-7795941704204655685.post-36403686956007353762008-07-01T16:59:00.002+04:302008-07-01T17:05:33.389+04:30About middlet and gamecanvas<span xmlns=""><p><span style="color:red;">Midlet<br /></span></p><p>When you start to programming with java for mobile ,first class you build is midlet .Midlet is an interface between you and mobile. In netbeans you can easily add midlet automatically or with right click in project and in new menu click in visual midlet. In visual midlet you have a form by default and actions belong to it and in graphical interface you can easily add text or other thing to form but if you dont wnat to have form in your program you need only midlet.This class have functions like startApp,destoryApp,startMidlet and like .This function say's what you want to do when midlet started or your program started and etc.In middle you can also switch display of your program between graphics and forms that you make or add your command to your program. It is better that you have this class and game canvas and game engine in different file. It give your program better readability and of course better performance.You can use your game engine in other programs and your game canvas in other midlet and many other features.<br /></p><p>Your game engine can also contains more class in base you programs.<br /></p><p>__________________________________________________________________________________<br /></p><p><span style="color:red;">Gamecanvas<br /></span></p><p>In mobile programs you have also a gamecanvas (midpcanvas) class.This class contain function for pressing or dragging or clicking keys or pointers and you can add your functions to them.it is an example<br /></p><p>protected void keyPressed(int keyCode) {<br /></p><p><span style="color: rgb(84, 141, 212);font-family:Courier New;font-size:10;" >int action = getGameAction( key );<br /></span></p><p><span style="color: rgb(84, 141, 212);">switch(action)<br /></span></p><p><span style="color: rgb(84, 141, 212);">{<br /></span></p><p><span style="color: rgb(84, 141, 212);">Case DOWN:<br /></span></p><p><span style="color: rgb(84, 141, 212);">MOVEDOWN();<br /></span></p><p><span style="color: rgb(84, 141, 212);">.<br /></span></p><p><span style="color: rgb(84, 141, 212);">.<br /></span></p><p><span style="color: rgb(84, 141, 212);">.<br />}<br /></span></p><p><span style="color: rgb(84, 141, 212);"> }<br /></span></p><p>DOWN,UP,RIGHT,LEFT are predefined value's in gamecanvas class and their value is same with returning value from <span style="color: rgb(84, 141, 212);">getGameAction(key) </span>when you click down ,up,right and left key in mobile.<br /></p><p>A game canvas also has paint function .With paint and repaint function you can draw your graphic world(you'll learn about it in following posts) .You can change your graphics world everywhere and repaint it everywhere also.But you should know more repaint in bad place in class forced to some problem in your game graphics .<br /></p><p>With this primary information you are almost ready for start programming .<br /></p></span>Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-17469872402235536582008-06-27T16:00:00.002+04:302008-06-27T17:06:24.336+04:30mobile programming basicsWe have two famous java mobile project platform cdc and midp.Cdc is in base of uiq or nokia symbian or like that and we not focused in it now.Midp when combined whith cldc(is not same whith cdc) provide java standart runtime envirument <a href="http://java.sun.com/products/midp/overview.html">see here for more info</a> and<br />cldc defines the base set of application programming interfaces and a virtual machine for resource-constrained devices like mobile phones, pagers, and mainstream personal digital assistants and mainstream personal digital assistants (PDAs).You aren't forced to know this info and only you<br />need to know is that you should select best platform for you and your ide give you options for this porpose.For example in netbeans ide 6 you select menu file->new project and you see a dialog.In this dialog you select mobility and in project segment if you want programming in midp you can select midp and if you want programming in cdc you can select cdc in this segment.When you select midp you click in next and select your project name.If you want add middlet yourself you should remove tick from create hellomiddlet and now you should select cldc and midp version and device.<br />It is better that select default device because it is suitable for many device and other device are only availabe in some of device.Now you can start to programmingAnonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0tag:blogger.com,1999:blog-7795941704204655685.post-74256944155316530562008-06-20T12:13:00.003+04:302008-06-20T12:31:52.407+04:30java mobile game programmingnowadays mobile game's are popular in world.why?Because mobile user's are increasing and ofcourse their user are different. from child's to young , from businessman's to unemployed people's .But everyone need game and music's for some funs in their tiring times specially young people's. In past time's game are limited in mobiles.Because Mobiles have limited memory and graphics but todays mobile have more memory and graphics and we can make better game .New game have 3d model's and high quality sound's that give user real world .Our focus in this blog is in 3d java game programming in mobile and how do it.I'm waiting for your comment about this blog and which content you need for mobile programming.Anonymoushttp://www.blogger.com/profile/16388192517492775120noreply@blogger.com0