Sunday, October 12, 2014

Images in DIV

I;ve always had problems placing images in the div elements. its' not that i cannot place an img inside a div element.. it's hard to place it at the right position. But ive' come across this interesting trick which has been kind of a revelation for me..

http://jsfiddle.net/y6a7xqqj/

Try out the above jsfiddle test i created. It's amazing how flexible it is.

    background-position: 50% 50%


There is a short hand representation for all the properties that are covered by background..

background: url('urltoimg') no-repeat 50% 50%

This is the most beautiful thing ive' come across for positioning an image. You should be able to center the image where ever you feel like. 

Sunday, July 06, 2014

Our Kitchen


Here is a quick 3D model i built for designing our kitchen. It was fun doing it.
I really didn't do the scene graph properly  as i was trying to get it finished quickly.
But it does represent what we wanted to achieve :)L

Friday, May 16, 2014

Bitris (PyWeek18)

I've missed the last pyweek because of some prior commitments but this time iv'e managed to register for it in time and have actually been able to finish it.

Im' not sure if i was aiming low or if i just got better at making games (simple ones' ofcourse). But it took surprisingly less time than it used to. For starters i have used cocos library instead of writing all the update cycles and rendering functions. This made adding effects to the game very easy.

The fact that i've been working with cocos2d-x at work has helped me feel comfortable using cocos in python. I have toyed with using this library before but didn't see the need for it.. I was wrong .. i have been able to accomplish more than i could have if i stuck with writing my own effects etc.

The other thing is the discovery of the method to make any normal image into a pixelated image. Gimp has this as part of blur menu options in Filters menu. This was really handy in creating the icons for the powerups.

 I first created vector art for the icons in inkscape, exported them to png's and then used gimp to get the pixelated look. Oh all the pixelation was done because the theme was 8-bit for the contest.
 
Any way here are the screenshots of what ive' done for the pyweek18. Enoy :)

pyweek.org is the place you should be headed if you want to learn more about this contest. :D

Monday, May 12, 2014

Stylized Drawings

I have been trying to create cute characters so that i could one day make my own cute looking casual game. ive' equated drawing cute characters to drawing chibi characters. So i looked up to my guide ..




I've been following the above artist for a couple of months now, i've been trying to understand the basics so i can make game art myself. So here is what iv'e been able to achieve.




Hope you like these. :) i've been too lazy to digitize them. May be i should start drawing these on the tablet rather than in a book.

Saturday, January 04, 2014

Automating CCB Creation

Cocos2d-x is awesome because you can use cocosbuilder for creating scenes / animations with ease. But there could be scenarios where you want to create multiple CCB (cocosbuilder files) like

1) Same animation but different images
     You might want to create a large number of ccb files with different images but same animations. This could be done in the code as well but this would make it easier.
2) Create a starting point for animation.
    If you had to move the images around in the ccb but you know for sure that all the images have to be dragged into the scene and animated.

So how do we do this?...

Well the "CCB" files are nothing but XML files to be more precise they are PLIST files. So all you have to do is create these XML files using a script of some sort so your manual labour is reduced.

Python was the language of choice here because it's very versatile at doing things like these. I was going to use the xml Etree module for handling this but i quickly realized that it was going to be a nightmare if i didn't have a library that could understand and use plists directly. That is when i found the plistlib which has enabled me to manipulate / update the "CCB" files much easier.

With these in hand a couple of template "CCB" files i was able to quickly generate the target "CCB" files with a single script. Pretty neat :) This is going to be crucial for our Comic Next framework.