Tuesday, November 8, 2011

Cocos2d - what and why ?

Opengl es can be a bit daunting for the people who are relatively new to the game programming scene, and truth be told, using opengl es is not necessary.

For development of basic 2d games opengl es is certainly an overkill, it just doesn't justify the learning curve.

But don't give up hope just yet, Cocos2d is a really great , easy and fun option of getting started with game programming on iOS devices. but this doesn't mean that cocos2d is weak or insufficient in any way, fairly complex games can be build using cocos2d.

Cocos2d also come bundled with two very good physics engines box2d and chipmunk allowing it to bring in the simplicity and ease in game design.

And the best part is that it's FREE.
And the licensing allows for creation of proprietary products, the literature available in form of books are abundant.

So go ahead and create the next angry birds.
Here is how to do it :)

http://maniacdev.com/2011/09/tutorial-develop-an-angry-birds-like-game-with-cocos2d-and-box2d-step-by-step/


Regards,
Ishan Malviya


Sunday, November 6, 2011

Starting opengl development on linux

I have been working on opengl es for iphone from a past few days. But the development environment is available only at my home.

So i thought of trying my hands on opengl too, which will be easier to pick up, owing to the sheer amount of literature available for it.

I have Kubuntu 11.10 installed on my netbook ( a samsung n150 plus, dual core atom) and i use code:blocks as the development ide, when i tried building the provided sample for opengl i got the "GL/gl.h no such file or directory" error.

I looked around for a solution and this is how i was able to solve the problem.
The freeglut3 and freeglut3-dev libraries were missing.

after installing them i was able to execute the example successfully.

On a debian based system we can install them as,

apt-get install freeglut3 freeglut3-dev

Will share more on my experiments with opengl as I delve deeper on this exciting technology.

Regards,
Ishan Malviya





Thursday, October 20, 2011

Alternative way of updating your ios device

As you all might be knowing , iOS 5 was released last week, and Apple's servers were creaking under the pressure of user's trying to upgrade.

I too tried updating the OS on my iPod touch several time,  but was unsuccessful, which considering the size of update (~ 700 MB ) and the limited bandwidth is a costly task to repeat.

So, I started looking for alternatives.

I found out that you can download the update from several other site offering the updated ipsw files. Although i tried downloading ( just downloading not updating ) from Apples server and succeed.

If you also have downloaded the updated firmware and want to use that to update ( not re-downloading ), just press the options key on your mac keyboard and click update key, you will be presented with a prompt to select the ipsw file from your filesystem.

For those like me, using a windows keyboard, Alt key works as options.

So , go ahead and try the new shiny iOS.

Regards,
Ishan Malviya 


Saturday, September 24, 2011

installing Arch linux

I have a Samsung N150plus netbook on which ubuntu 11.04 with unity interface was installed, but i was getting bored with the ease of ubuntu. If I want easy , I will boot up my Mac with Mac os X Lion or my windows XP machine.

So i decided to go with Arch Linux, the bleeding edge distro. As netbooks lack the optical drive i went with usb install option.

I have been using "unetbootin" for installing ubuntu etc from usb media, but somehow i was unable to install Arch using this, The error i was getting was "Boot device didn't show up after 30 seconds".
after few hours of trying to find a solution i decided to go with the old and trusted dd command.

and it worked!

The command i used was
dd if=Arch---.iso of=/dev/sdb

for Arch---.iso you need to use the Arch iso file you downloaded and for of you need to find out the id of your usb device.

Booted and installed , am now trying to get a GUI working on it, yes it boots into plain old command prompt and no GUI is installed :)

Not for the faint hearted....

Regards,
Ishan

Saturday, September 3, 2011

path to the embedded xml's in ios projects

Xml parsing is an integral part of any mobile project you will come across, 4 out of 5 projects are about parsing the xml and then using the data in one way or another.

xml's are also a great way of passing data between different platforms.

NSXMLParser is provided by the Foundation framework and is an event based parser (SAX ), though there are several free third party parsers available which perform better than NSXMLParser.

To get the xml file opened and read into the NSData variable we need to create the path to the xml file stored in the application.

It can be done as :

NSString *appDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"project_name.app/file_name.xml"];

Will post more when i'll experiment with a DOM parser in ios.

Regards,
Ishan


Wednesday, August 31, 2011

complementing c++

C++ as a language is very complex, that's where lies its beauty but everything is not built into the C++ standard library.

Multi threading and network programming are amongst the most missed components.

Some even suggest replacing C++ standard STL components with external libraries, most notable among those are "Boost C++ library".

This is a library designed by programmer, most of them are on the C++ standards committee, so there are great chances of the Boost components getting merged in C++0X standard.

Using Boost also gives the advantage of being platform independent so rather than worrying about porting your multi threaded code, you can now concentrate on better code architecture.

Regards,
Ishan Malviya

Learning c++

I have been a big fan of C/C++ since the time I started programming. In fact C++ was the first programming language I learnt.

Learning C++ is not an easy task and believe me when I say there is no replacement for writing code, but reading good books and reading code written by others is a very helpful practise.

There are a series of books that i would recommend and reading them in the order presented here will elevate your rank in the C++ guild.

1. Thinking in c++ vol 1/2
2. Effective c++
3. More effective c++
4. Modern c++ design
5. Design and principle of C++

I am assuming that you are at least comfortable as beginner, these books can take you from the beginner's level to near master.

As I have already said , nothing matches writing code.

Regards,
Ishan Malviya