Home and Blog button

Pages

Introduction

Welcome To my Blog !!
This is a blog where you can get some knowledge that i have learned and been using. Sharing is gaining pals. So Happy Sharing and don't forget to follow and link my blog with yours! Thanks.
Happy Programming!!

Thursday, January 27, 2011

What are iPhone Development options? Games OR Commercial Applications?

Hi,

In this post, I am going to write about development options in the iphone platform, which are broadly categorized into two heads, Games or Commercial Applications.

iPhone is an most powerful devices in the world of mobile platform with higher processing capability, smooth touch interface and long term durability. So,  it has more options from developers point of view. As a matter of fact, initially iPhone was never especially designed as a gaming device. It was rather designed for social networking, internet browsing and checking mails as most mobile manufacturers targets.

But today there are big number of games in the appstore over commercial applications. Games are the clear winner in the appstore market now. The applications (app) in appstore are generally the iphone version of the websites such as facebook app for iphone, twitter app for iphone etc.

So, while developing for iphone you have two options to go on. You can develop commercial apps or make your careers on game developing for iphones and both also :) .




  • Commercial App Development
For developing commercial applications, you need to have knowledge of the iphone SDK elements. You will be exploring the iPhone SDK which is provided by Apple to you. There are different E-Books found for getting started with the iPhone SDK. While going through these books, you will find how to use the controllers and views that are used while creating application for iPhone. You will have to go through following elements to become a successful iphone app developer.


1. Views
2. TableViews
3. Navigation Controllers
4. TabBars and Pickers
5. Touch Interactions


If you are interested to learn using video tutorials, you can visit to Stanford University Site. This university provides iPhone Development course based on curriculum designed by the University. You can also download and watch the Lecture Videos of the class that are taken by Stanford Professors and former Apple employees. 



I also learned from the above lecture videos, its really awesome and feels like you are in the class. These are very helpful for learning iPhone development. There are loads of stuffs such as assignments, exam etc. which you can see after you visit above link.
If you go through above lecture, you will see that you are only taught to make iPhone apps but not Games. There are some libraries such as CoreAnimation, which can be used for creating the animations but these are really difficult for a beginners for getting started with the Game Development and create your own Game Engine. So, other options raised with the rise in popularity of iPhone and iPhone games.




  • Game Development
Games has always been the most interested and market taking software of all time. While playing games, we rather enjoy playing it than think of creating it. Creating a game is not as simple as it might seems. If you want to create a game, first you need to have better knowledge of game elements. Game is a complete system of visual graphics, audios, animations and events. 

If you want to create you game from scratch, you need to create a Game Engine which would keep track of game variables, game states that occur in your game, so that you can control your game. And to create a game engine is not an easy especially when you are a Beginner Game Developer.

So, there are couple of Game Engines created by third party, which will help you to create a game within less time span. These game engines keeps track of all the low level gaming options, variables, states so that you can work and create new games on top of these engines.
Some of The Game Engines List are:

1.Torque
2.Unity 
3.SIO2 interactive
4.Oolong engine
5.Chipmonk
6.Cocos2d
7.Irrlicht

Edit: If you want to learn more about cocos2d by me, Click here.



For more information of each game engine, click on the above links. Among all the other I prefer Cocos2d. It is because:


  1. It is Open Source.
  2. It has got a loads of community support.
  3. It has online as well as offline documentation.
  4. By now it has also got a lot of tutorials in the internet. (At my learning time, there used to be very few tutorials). The blog of Ray Wenderlich is the great source of help for getting started with cocos2d.
  5. There are two published books so far on getting started with cocos2d. 


Beside cocos2d, other game engines can also be bought or tested for your company. The Chipmonk is a Physics Engine which is also an Open Source and can be easily integrated with Cocos2d.

Hope these information will help you a little for getting started in iPhone development. Don't forget to leave the comments below if you have any thoughts. Thanks for reading.

Happy Sharing and Programming.

How to Begin Iphone Programming ?

Objective C is a programming language used by apple to create an iphone applications and games (You can also use C++, which we will discuss later). Most of programmers who program in Windows environment may not even heard about Objective C language, whereas Mac users and Linux users would be familiar with this term.

To do programming any language we need an IDE. For example we do C# in Visual Studio IDE, Java in NetBeans, Eclipse etc. In a similar manner, the objective C language is performed in Xcode which is IDE for Objective C language. I have already mentioned about it a bit in my previous "Update on the Blog" post.

But the best practice or say the only easy option is to buy Mac, install Xcode and do iphone programming in order to sell your app without any further issues in appstore.

To start iphone programming you need to have following materials:
  1. Object Oriented Programming Language knowledge
  2. Xcode with latest iphoneSDK (ver 4.3 beta 2 is latest)
    1. You can download iphone SDK and latest xcode at Apple Developer Site. For more information join in the iPhone Developer Program.
  3. After you download .dmg file install the Xcode.
  4. Now you are ready to go through the iPhone Programming.
Create a simple Iphone Application:


  1.  Click on File -> New Project (You will see following dialog)
  2. In iPhone OS, select Application -> Window Based Application
  3. Click on Choose -> Give Name of your project and location (default is Documents) -> Ok

Now in Classes directory you will have two files, YourProjectNameAppDelegate.h and YourProjectNameAppDelegate.m file.



The "h" is header file and is understandable if you are familiar with C and C++. And "m" file is the implementation file (similar to .cpp in C++) where you will write all your implementation code.

In Resources directory, you will find a "MainWindow.xib" file which is called "nib" file. It is the Interface builder file. You can build your program interface by directly opening this nib file using drag and drop method (Just like in VB you use drag and drop toolbox items). Or you you can also do code to create each items in interface such as textfield, buttons etc (as in  Turbo C, C++, created using co-ordinate codes).

We will deal about nib file later and ways to hooking controls coz it is the fast way to create your Interface rather than going on coding each piece of code.


Let's go to ".m" file:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {   
   
    // Override point for customization after application launch.
    /* --- Your code goes here --- */
    [window makeKeyAndVisible];
   
    return YES;
}

The above function is the starting function to start our app (analogous to main() function in C, C++). As you have noticed that the above defined function is different from C++ function definition syntax. It is Objection C style syntax. Let's do a little analysis.
  • "-" This starting symbol indicates that this function is a member function of "YourProjectAppDelegate" Class. If instead of "-", you see "+" this ensure that it is a static function of corresponding class (no need of object to call it). If you are C++ user you can easily understand it.
  • (BOOL) is a return type of a function. (BOOL = Boolean type)
  • "application: " It is a function name.
  • The line beyound "application:" are the arguments with corresponding arguments type. 
    I will explain about function definition later, it is where beginners feel uneasy with C++. But above method has a key advantage than using C++ argument types.

    Hope this helps, if you need any help comment it.

      Wednesday, January 26, 2011

      Update on the Blog!!


      Hi, I have started this blog when I was studying Engineering. I thought my lessons that I had learnt in college could be shared here, the tutorials, lab sheets and guidance. I focused mainly on sharing web development stuffs like scripting languages which were difficult to understand at that time for beginners. It covers the basic introduction and beginning code for learning VBScript and JavaScript.

      Now after I have completed my B.E. in Computer, I started to work on mobile application and games developments. I am currently employed as a iphone developer in a recognized company Sprout Technology Pvt Ltd in Nepal. It has been a more that half a year here in my company and I am really enjoying the iphone programming, especially games using Cocos2d, which is an open source game engine.

      Here are some of my experiences that might help other peoples out there who are interested in mobile development.

      While going through the training phase, I became sad to know that Xcode, the IDE environment for developing iphone application using Objective C programming language is only possible in a MAC OS X. The iphone SDK 3.0 needs leopard 10.5.8 or above to install Xcode in it. And later version of iphone SDK can be run on leopard 10.6 or snow leopard. iPhone SDK is upgrading to its higher level. Currently iPhone SDK 4.3 beta 2 is on the way.

      In windows also you can do Objective C programming. You will not actually do Objective C programming but there is a tool or say SDK which will convert all the C and C++ code for you iphone project into your equivalent Objective C code with the help of iphone Simulator. This SDK is known as DragonFireSDK.

      You can also run Hackintosh in ur non-mac pc if you CAN and install iphone SDK for iphone programming. I am here not to talk about Hackintosh anyway, you can dig out in different forums about it. I just thought that I could share my some of my stuffs that I have learned and try to gain in full speed with all the iphone, Xcode programmers out there who also want to share their thought through following this blog and through their blog as well.

      Besides iphone programming, i am keenly interested to learn Window Phone 7 developement as well as Blackberry Development. I am learning both of them in due course.

      Hope to see you guys on comments and sharing links ;).

      Search This Blog