Thursday, December 13, 2012

Adrian lives On

I have been wondering what will happen to Adrian after a while.. We haven't really worked on making it better or ported it to any new platforms. Fortunately for us some people still take time to port our game to the platform of their choice.

I never heard of aros before  but that is the point... The game lives on. Would love to see more of such things happen...port for chrome would be awesome.. :)

Monday, November 12, 2012


The simplest way to create a 3D animation is to create multiple keyframes (3D meshes) for different timeframes and interpolating the vertices with time. This is the technique used for Quake2/Quake3 models. The simplest file format would be to start with Quake2's md2 file format. The problem though is that there aren't many exporters around for the format and the loaders that are around seem to screw something up something regarding how the animation is handled.

I could have spent some time to figure this out and fixed the exporters/written one myself.. but i thought it would be a good learning experience to try writing something myself. That's how the 3danim project started. Just one simple ascii based file format that is easy to parse and use. I didn't make it binary as thats' the logical extension for how we store the data, But the important part is to understand everything that is stored in the file.

Iv'e written Loaders in c, python and have had my friend write the java loader. The exporter however is based on python and is an addon for the open source 3d authoring tool blender.

That is where the pain starts actually.. the blender python api has been in so much flux that after every new release, i had to re-write the exporter... the last version i updated to was 2.57 and today ive' been struggling to get the script updated to 2.64 hopefully this will stabilize soon and ill' be able to use it more often. It's probably a wise thing to wait and use an older version before everything stabilizes.. 

Monday, October 29, 2012

Exp with Cocos2d-x

Finally i've started working with cocos2d-x for game dev. It has proved to be really handy for getting prototypes done really fast. I hated the autopointer based implementation at first but have gradually gotten used to it. The one problem i do see is that the constant creation and deletion of objects could lead to a reduced performance. I would recommend anybody to stay away from the autopointer based approach right from the start if you are performance cautious, because re-organizing the code can be a pain.

The cocos2d-x is a really good choice if you want to go multiplatform with the game as well. The best part (in my opinion) is that you dont' have to deal with the java code for the most part, you get access to OpenGL ES so basically you can develop pretty much any game and still have the benefits of scene management and animation for things that you dont' want to care about.

There is an demo of getting 3D models rendered in cocos2D-x using the projective transformation and a little Matrix math help from the internal math library in cocos2D-x. I really hope the development of this library continues at the same pace. It's just awesome to be able to write code in c++ and still deploy on all the relevant platforms. 

Friday, September 07, 2012

SVG as level description file

If you ever wanted to use svg as a level editor for your HTML5 games.. here is the basic code you can use. Obviously you have to make sure that your svg file is using only rects instead of any other type if you want to use this code as is.. But its' a good basic start for getting you started. I've used the color of the rects in svg to determine how it behaves in game.. you could offload it to the editor (i.e inkscape in my case) to add properties to the rects which can be read and used to determine properties.

$.get("drawing.svg", function(res){
                //loading the data from an svg file.
                blocks = [];
                user = null;
                ball = null;

                var $layer = $(res).find('g').first();
                //get all the rectangles in the level and create the list.
                    //string operations to get the color set for the block.
                    var fillstyle = $(this).attr("style").split(';')[0].split(':')[1];
                    var x, y, w, h;
                    x = parseInt($(this).attr('x'));
                    y = parseInt($(this).attr('y'));
                    w = parseInt($(this).attr('width'));
                    h = parseInt($(this).attr('height'));
                    if(fillstyle == "something"){
                    }else if(fillstyle == "something"){

ps:///$.get() is the jquery call, so you need jquery to run this as is.. or you could handle the xmlhttp request thing ..

Monday, May 21, 2012

ramblings about android apps

i got a galaxy nexus recently and as you can imagine i was very excited and began downloading a the popular games most of them behaved fine but there were some apps and games which had services eunning in rhe background even though the app was killed.i had to go to the settings and stop them. i wouldnt bother too much if the battery wasnt effected but from what i have seen it does. i wonder why the developers would so thia on a phone app. i prefer the apps that update when i ask them to. i really hope people stop doing this service atarting frenzy in their apps.

Sunday, April 15, 2012

SpaceGame 48-hr GameJAM

I've participated in my first 48hr gamejam. I've technically spent a lot less time but i've managed to get a prototype up and running and im' pretty happy with the way it turned out. I would have liked to add more things but time is running out so i had to cut corners. Here are the things i wanted to accomplish: 1) Bring out the tangential learning about Gravitation. 2) Make use of the gravity (since it's a space theme). 3) Wanted to do something different with the art. The concept came pretty quickly once i just drew up a mock up screen..
The rest of it was to get the mechanics right.. I used the CAAT engine so i can focus on the game itself, and bother less about the rendering. Which did help, but i also had to spend time looking around the documentation to figure out if there was a better way of doing something i would have just coded straight.. but it did payoff.. I got a playable prototype very soon. I tried to get some artwork done with inkscape based on the concept art..
As you can see i did really basic art but im' beginning to like this style. I'ts very abstract but conveys the objects pretty well. I've uploaded a playable version at . I haven't given the name a lot of thought but i hope it conveys the content of the game.

Thursday, March 22, 2012

Online Leaderboards

Iv'e been on a look out for easy to use online leaderboard services for a while now. is the latest one i came across. The best feature of using this service?.... you can use it through absolutely any platform.. and they have good documentation for all the important things

I've been working on a lot of html5/javascript based games. I could have used any of the standard javascript libraries to use the scoreoid service (since it uses the cgi based implementation) but i didn't want to bring in a whole library for just a simple ajax request. So i wrote a simple javascript function to make it easy to use the service..
Following is the code for the function.

And assuming most people use JSON for response type while in js realm i've forced the function to use JSON. Using it is just making a function call and you should provide callback to handle the returned json object.

You can know the details of what to send as parameters to this function by looking at the console provided on the scoreoid website. I hope this helps people trying to get their html5 games integrated with scoreoid leaderboards. I've started using this service in colortheory and its' been good so far. Give it a try if you need some leaderboard functionality in your game.

Sunday, March 18, 2012

Side Scrolling RTS

A Couple of years ago one of my friends asked if it would be nice / possible to implement a 2D RTS game as a course project. I thought that was a cool idea. but never got around to finding what happened. Why am i talking about this now?.. well ive' come across the swords and soldiers game and its' just like that. I've not played it but it sure does look good. I loved the art style and the animations so much. I wanted to try and design something similar just as an exercise.. but i needed some concept art to start off.. so i worked on making some concept art for it.. im' not sure if ill' ever get around to making the actual game.. but am sure excited about making a simple rts for the experimental gameplay project "Economy" theme..

rough design for characters

Sunday, March 11, 2012

Color World (in progress)

Work in Progress

It's true what they say about how 80% of the work gets done in 20% of the time and the rest is spent trying to get the project done. I had a prototype of a simple puzzle game over a weekend. Then i just left it in the dark. I really liked this game because it was born out of my love for "tripple town" a simple but addictive game. I realized this was quite similar to another game i wrote SQUARED  for the mozilla game dev contest. At the time i was really happy with the "art style" but now not so much.. but i did still enjoy the gameplay. With some tweaks it could be a fun game on the "touch enabled" devices. I've been working on and off this weekend on getting one of my prototypes to a presentable state.. here is a comparison..
Prototype in game Screenshot
Ive spent a lot of time today trying to find the right service for getting the leaderboard up. I was using but with my perceived notion of their un-availability, i started looking at other options.. seemed like a really good alternative till i realized that i needed a php capable hosting to be able to use it unlike playtomic which just works with js.

The hosting of playtomics' javascript library on their site seems to have some problem and i was unable to access it. I just assumed that i wouldn't be able to use this service since the browser would require a cross-domain  ajax request to handle the data. Little did i know that xmlHttp and the corresponding m$ implementation already have this and that playtomic already uses it. So basically i can just get the playtomic js file from their git hub hosting bundle it along with the game and i should be able to show up a basic score board.

On another note.. i just discovered "cloud based editing software" pretty neat.. its' well integrated with the github... so it is extra easy to get started with your projects. .. do try it out if you haven't already..

Update: You can try the game online at

Wednesday, February 22, 2012

Download onClick

Ajax requests to server are always expected to return text output and for some reason the
Content-disposition: attachment;
doesn't cause the browser to show the save dialog. I searched for a while and found a jquery plugin which does it but i kept looking anyway. One interesting solution was to include an iframe in the page and set its' location to the url which would download the file when that didn't work i just used the
var url = "cgi-bin/" + $.params({qo:"LDS", sv:["dk", "df"]});
window.location = url
And surprisingly this worked well atleast on the browsers that i checked with.. (chrome, ff ).

Tuesday, February 21, 2012

2D Boy

No this is not a blog post about the 2D boy game studio. ... its' about a 2D character i designed from scratch.. This was the first time i did it, the work i did with recreating the 2D characters from Sita sings' blues has certainly helped me a lot here. First i used MyPaint to create rough sketches of how i wanted the character to look. 
Sketch of Characters
I wanted to go for a cartoon look but still wanted it to be a believable one. At first i tried to push for a simple Rayman style character but finally decided on this character. The game was going to use a side view.. so i had to work on creating a side view of the character.. I think the isometric view would have been better but the side view is what was requested.. :D
Side View of the Character
Once i got the side view done.. i wasn't too happy about the shoes so i tried to draw that separately so i can focus on its' details. Once i got the side view, i used Inkscape to create the colors and the texture. Once i got the texture done, I used blender to create a model with 2D planes, rigged it and its' all set to go now.. here is the result..
Rendered using Blender
The shadow of hair is pre baked (i.e it's in the texture), but the shadow cast by the legs and arms (i.e, self shadow) is all done by blender.. this is the right way of doing it because you don't have to worry about animations not showing the right shadows. I've uploaded the blend file on hopefully people can pick it up from there.
Update: the blend file is up on blend
Update1: Just discovered a sprite sheet plugin for gimp.. works pretty well, i had to change the final image a little to match my requirement but.. it does the job..
Running Animation 

Tuesday, January 31, 2012

Canvas Experiment

I just discovered that you can put in your script and render stuff to the blog. Pretty cool hopefully i can put a whole game in it. I remember trying this before but it didn't  work seems to be working now :D. It's pretty easy to get it just go to the html of the post and post your javascript and it works :) well not all of the things but for now this should do :)

Monday, January 30, 2012

DroidRun as Pokki

Droid run is the first game i developed using the CAAT library. The code isn't exactly the most beautiful and well organized but i've managed to get it working but then getting it to work as a pokki was a whole other story. I was too lazy to do it but gathered just enough motivation to make it because i did start writing this game for the pokki 1UP contest.

In a rush to get to the finish line .. i moved the code around like crazy and made a lot of local variables as globals and just hacked away at the code without thinking much.. i just wanted to get it working.. may be next time ill' try to be a little more cautious.. :)  I do plan to add in new features like ability to buy costumes and stuff but it can wait.
concept art
Any way if you are interested in getting the pokki for your computer.. click on the button below.. 
Download Droid Run for Pokki

Sunday, January 22, 2012


The CAAT library is really cool for doing html5 games. I was impressed by the demo they had for the library. So i started to think of simple game ideas that i could quickly implement using this library and make it look good as well. Im' always in a rush to finish coding the games ive' started writing so they miss the fine touches of ui animations and stuff. I thought this could be a good library to start experimenting with to get some thing up and running really fast. Since this is the first time i'm using this library i haven't really used it the most effective way but I did have a lot of time to fine tune the gameplay and artwork. Im' yet to integrate the score board into the game but i'm pretty happy with the way it stands right now.

Click to Launch Droid Run
The basic idea in the game is to be able to jump to three different heights and the user has to choose wisely based on the obstacle course. The aim is to last as long as possible and collect as many squares as possible. I wanted to add different costumes and stuff which is pretty straight forward but for now it has only one droid suit. I hope to get this up and running for android device soon.  Technically you should already be able to run this on any html5 compliant device but the performance may be a problem.

You can check out the game in action in the video below. You can also check out the homepage for the game at


Wednesday, January 11, 2012

JavaScript Frameworks

I've always been against using frameworks for getting my javascript work done. I felt they were getting the way of performance and too much obscurity. But after writing my first javascript game, i thought it would be nice to use the jquery library. Which resulted in a better looking code but for some weird reason i couldn't get the setInterval() function to work with the animation effects from jquery. I did find some solutions online to fix the problem but i didn't bother to look too much into it as i was content with the UI without any animation effects. Then i came across this amazing demo. I was blown away by how beautiful everything looked. The fluid animations brought the whole game to life. It was just a delight to look at the animations. I decided to give this library a try. The documentation is pretty extensive and the samples provided pretty much cover everything  you need to know. But the one thing they don't/can't tell you is how to use the library to fit your needs :) I spent a couple of days just trying to get a feel of how they expect people to write their applications im' sure i still didn't get it right, but i've got to a point where i have the gameplay ready and am working on fine tuning the experience. you know adding proper menus and stuff.
As you can tell its' a game based around the android logo. The funny part is that i got the gameplay idea from the android logo itself. :) Anyway.. since this is the first time im' using this library, im' not entirely sure if im' doing something wrong and hence screwing up the browser. Not sure if this is the best performance i can get from the Framework. That's usually the case with using the libraries. You can't really tell if you are using the library as intended.. i guess you keep getting good at it by using it regularly and trying to understand why a certain demo was written a certain way. But there is always this lingering doubt that probably the way im' using it is wrong. I really hope im' using it right :) hopefully it will be a good fun game to play.