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, February 17, 2011

Developing iPhone 2D Game With Cocos2d !!

Hi all,

In my last post for iphone development, I have written about the options that you can choose while developing for the iPhone. In this post, I am going to write about free, open source game engine for iphone : "Cocos2d" for iphone.

Cocos2d

Cocos2d is an open source framework (Game Engine) for building 2d Games. Cocos2d can be found in  windows, linux, mac platforms for developing 2d games. It was first written in Python. Being an open source, it is developed and extended by many programmers. Such one extension is "Cocos2d for iphone".

Cocos2d For iPhone

"Ricardo Quesada" is a lead developer, who is working full time on cocos2d project, and his current income consists of solely of donations and the sale of Sapus Tongue & LevelSVG Source code. He has helped many fellow iphone game developers to create a 2d games for iphone. If you want to give back some respect to the Ricardo, you can donate or buy his, 2d level map editors or source codes from above link. 

Since cocos2d is Free, it is famous and extended by many developers as they require. You can also submit your code for extending cocos2d. It has huge community support also. And now there are couple of books also available in market to learn cocos2d. If you choose to use cocos2d for iphone game, welcome to cocos2d family :) .

Cocos2d is very easy to learn and creating simple 2d game in it will not take more than a couples of months. Before developing any game, you need to understand the basics of game very clearly (game loops, sprites, game engine etc). Then you can start game developing with cocos2d.  

It is easy to get interested in developing and creating your own games. But understanding and creating it is not as easy as it seems. You need to understand game development cycles  (concept) which I will write in my next post if required. But for now lets go for cocos2d for iphone.

Downloading And Installing Cocos2d for iphone

Note that Cocos2d is very good and recommended game engine for beginner iphone game developers. There is one game Trainyard which was developed by only one developer "Matt Rix" in his spare time, who got his app, the nice rating in appstore. Read his full success story, it is really encouraging.

  1. You can download cocos2d latest version from here. Always go for stable version if you don't want any incompatibility issues. 
  2. After you have downloaded the .zip file from above link. Unzip it.
  3. After you unzip it, you need to execute the "install-templates.sh" shell script file. It will install the cocos2d templates in your Xcode.
  4. Now you can create a new cocos2d project by selecting it from Xcode template. Your new cocos2d templates should look like the following image.
Note that in above templates there are "cocos2d Box2d Application" and "cocos2d Chipmunk Application". The Box2d  is an open source physics engine and Chipmunk is also the physics engine which are compatible with the cocos2d. You can use them if your game needs physics.

Hello World Cocos2d

After you create a new project in the cocos2d template, you can build and run the current project. By default,  Hello World Label will be shown in the screen after a cocos2d splash screen. By default you get the Hello World program. You can over write the Helloworld class or add new class to create your own application.

And Yes, there is offline documentation called doxgyen integration and online documentations from where you can learn cocos2d libraries and classes. And if you stuck in any point, there is always a community forum support to help you on this.

Now What?

Now if you want to create some basic games in cocos2d, you better go to How to make basic iphone game post by Ray Wenderlich. It is excellent start up for the iphone game beginner with cocos2d.


Finally, thanks for reading and hope it would help someone who is trying to get started with cocos2d and try to figuring out what it might be. Leave comments if you want something more, or feels not right :).

Happy sharing and learning! Thanks.

Friday, February 4, 2011

Blackberry Development in Mac: With or Without Using VirtualBox!!

Hi all,
In this post, I am writing about Blackberry Development choices and setting up environment using both Blackberry JDE and Blackberry Eclipse Plugin.

Why Blackberry?

Though there are different mobile phones from different manufacturer with various models, the Blackberry smartphone still got the market share in the world of Smart phones. What made the blackberry so special?  Well the key reason behind the success of Blackberry Smartphone is "Security". Basic points can be noted as follows:

  1. All the transactions, messaging, e-mails etc which are transmitted using blackberry smart phones are encrypted to prevent snooping.
  2. All these security features are maintained and monitored by Blackberry Enterprise Server (BES).
  3. Blackberry Enterprise Server (BES) is a server of Research In Motion (RIM), creator of Blackberry. All the incoming, outgoing communications must go through the BES, which ensures its data encryption, virus detection in email-attachments, generating push messages and many advance features to ensure security.

So due to these features, most companies around the globe are providing Blackberry smartphones for their employees.

Introduction

Blackberry development can only be done in windows environment for so long time. The developers were forced to develop in different Java IDE using Blackberry plugins. The most supported IDEs are Eclipse, Netbeans. There were no Blackberry JDE. And all were supported in Windows OS only.

But recently, it has been a half a year, RIM has introduced the Blackberry JDE and Blackberry Plugin for Eclipse for Mac. The Blackberrry JDE is still run only in the windows OS. But the plugin for Eclipse for Mac gave a developer new choice to develop in mac.

Blackberry Plugin For Eclipse for Mac!

Though RIM has introduced the BB Plugin for Mac, it has its own limitation. The simulator doesn't work in Mac OS. The only option while developing in Mac using above plugin would be to use the real device for testing and running the app. It is because the simulators were created in Win OS and needs different win system files to execute.

So, you want to develop in Mac OS, you better have your own Blackberry to test it and run the app. There are quite a lot tutorials on getting started with Eclipse and Blackberry using Eclipse plugin. If you really want to get started, here is Getting Started With Blackberry Development in Eclipse by Anthony
 in his blog.

Blackberry Development in Mac using VirtualBox

So, if you don't have a actual Blackberry Device and need different simulators to test you Blackberry app, then using virtualBox is your only way out.

VirtualBox is an Open Source software for Mac which enables you to install different versions of windows in your Mac. For knowing more follow above link. First download the latest virtualBox for OS X from here. I prefer to install Windows 7 which is the best windows OS from visual and performance view till now.

Installing

  1. Go through this guide to install the fresh copy of windows 7 in VirtualBox. Note that you can either use the CD ROM to boot your bootable Win 7 disk or you can use .iso image of bootable Win 7. There might be some changes with latest version of Virtual Box from guide, but don't panic, you can easily overcome it.
  2. After successfully installing the windows 7, sign in into the Blackberry Developer Zone if you haven't already signed in or Sign UP if you are new.
  3. Download Blackberry JDE 6.0 file if you completely want to develop in new Development IDE, provided by Blackberry from here.
  4. Or if you are familiar with Eclipse and want to develop using Eclipse, then Download the "Blackberry plugin for Eclipse Full" version. This full installation file will install Eclipse integrating Blackberry in it. (It is quite easier one).
  5. Install them. You can also download and install different simulators as per your requirement.

It is easier to install different types of simulators and test it than buying each devices and test it.

Well, here I conclude my post. While following above instructions, if you come to have any problems, or any suggestions feel free to leave comments.

Thanks for reading. Happy Sharing and learning!!




Search This Blog